mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-22 07:30:23 +00:00
Add flag for client configuration
This commit is contained in:
parent
1715237529
commit
6eb51a2d63
2 changed files with 7 additions and 4 deletions
|
@ -152,6 +152,7 @@ function DisplayDashboard(&$extraFooterScripts)
|
|||
exec('cat ' . RASPI_DNSMASQ_LEASES . '| grep -E $(iw dev ' . $apInterface . ' station dump | grep -oE ' . $MACPattern . ' | paste -sd "|")', $clients);
|
||||
}
|
||||
$ifaceStatus = $clientinfo["connected"]=="y" ? "up" : "down";
|
||||
$isClientConfigured = true;
|
||||
switch($clientinfo["type"]) {
|
||||
case "eth":
|
||||
case "usb":
|
||||
|
@ -175,6 +176,7 @@ function DisplayDashboard(&$extraFooterScripts)
|
|||
$client_title = "No information available";
|
||||
$type_name = "Not configured";
|
||||
$ifaceStatus = "warn";
|
||||
$isClientConfigured = false;
|
||||
}
|
||||
|
||||
echo renderTemplate(
|
||||
|
@ -197,7 +199,8 @@ function DisplayDashboard(&$extraFooterScripts)
|
|||
"strTxPackets",
|
||||
"strTxBytes",
|
||||
"txPower",
|
||||
"clientinfo"
|
||||
"clientinfo",
|
||||
"isClientConfigured"
|
||||
)
|
||||
);
|
||||
$extraFooterScripts[] = array('src'=>'app/js/dashboardchart.js', 'defer'=>false);
|
||||
|
|
|
@ -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; if ($isConfigured=($ifaceStatus!="warn")) echo ' '. _($ifaceStatus); ?></span>
|
||||
<span class="text service-status"><?php echo $type_name; if ( $isClientConfigured ) echo ' '. _($ifaceStatus); ?></span>
|
||||
</button>
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
|
@ -69,7 +69,7 @@
|
|||
<div class=""><?php echo _("No Client device or not yet configured"); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if ($isConfigured) : ?>
|
||||
<?php if ($isClientConfigured) : ?>
|
||||
<div class="col-md mt-2 d-flex justify-content-center">
|
||||
<?php
|
||||
preg_match("/.*\((\s*\d*)\s*%\s*\)/",$clientinfo["signal"],$match);
|
||||
|
|
Loading…
Reference in a new issue