mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Add unconfigured client state to dashboard.php
Add tun device as client_udev_prototypes.json
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<div class="col">
|
||||
<button class="btn btn-light btn-icon-split btn-sm service-status float-right">
|
||||
<span class="icon"><i class="fas fa-circle service-status-<?php echo $ifaceStatus ?>"></i></span>
|
||||
<span class="text service-status"><?php echo $type_name .' '. _($ifaceStatus) ?></span>
|
||||
<span class="text service-status"><?php echo $type_name . ($ifaceStatus!="warn") echo ' '. _($ifaceStatus) ?></span>
|
||||
</button>
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
@@ -66,7 +66,7 @@
|
||||
<div class="info-item"><?php echo _("Device"); ?></div><div><?php $valEcho($clientinfo,"vendor")." ".$valEcho($clientinfo,"model"); ?></div>
|
||||
<div class="info-item"><?php echo _("IP Address"); ?></div><div><?php echo $valEcho($clientinfo,"ipaddress"); ?></div>
|
||||
<?php else : // NO CLIENT ?>
|
||||
<div class="info-item"><?php echo _("No Client device found"); ?></div>
|
||||
<div class="info-item"><?php echo _("No Client foudn or client is not unconfigured yet"); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="col-md mt-2 d-flex justify-content-center">
|
||||
@@ -139,7 +139,7 @@
|
||||
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
||||
<?php if ($ifaceStatus == "down") : ?>
|
||||
<input type="submit" class="btn btn-success" value="<?php echo _("Start").' '.$type_name ?>" name="ifup_wlan0" data-toggle="modal" data-target="#switchClientModal"/>
|
||||
<?php else : ?>
|
||||
<?php elseif ($ifaceStatus == "up") : ?>
|
||||
<input type="submit" class="btn btn-warning" value="<?php echo _("Stop").' '.$type_name ?>" name="ifdown_wlan0" data-toggle="modal" data-target="#switchClientModal"/>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
@@ -135,12 +135,12 @@
|
||||
if(!empty($devname)) $devname=$devname[0];
|
||||
}
|
||||
if(empty($devname)) $devname="";
|
||||
$isStatic = $isStatic || $dev["type"] === "ppp";
|
||||
$isStatic = $isStatic || in_array($dev["type"],array("ppp","tun"));
|
||||
$txtdisabled=$isStatic ? "disabled":"";
|
||||
echo '<td><select '.$txtdisabled.' class="selectpicker" id="int-new-type-'.$dev["name"].'">';
|
||||
foreach($_SESSION["net-device-types"] as $i => $type) {
|
||||
$txt=$_SESSION["net-device-types-info"][$i];
|
||||
$txtdisabled = $type == "ppp" ? "disabled":"";
|
||||
$txtdisabled = in_array($type,array("ppp","tun")) ? "disabled":"";
|
||||
if(preg_match("/^".$_SESSION["net-device-name-prefix"][$i]."[0-9]*$/",$dev["name"])===1) echo '<option '.$txtdisabled.' selected value="'.$type.'">'.$txt.'</option>';
|
||||
else echo '<option '.$txtdisabled.' value="'.$type.'">'.$txt.'</option>';
|
||||
}
|
||||
|
Reference in New Issue
Block a user