mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-21 23:20:22 +00:00
Fix: display AP interface stats
This commit is contained in:
parent
9faa98dd51
commit
b9ba2946a5
2 changed files with 3 additions and 4 deletions
|
@ -22,7 +22,7 @@ function DisplayDashboard(&$extraFooterScripts)
|
|||
$status->showMessages();
|
||||
return;
|
||||
}
|
||||
exec('ip a show '.$_SESSION['wifi_client_interface'], $stdoutIp);
|
||||
exec('ip a show '.$_SESSION['ap_interface'], $stdoutIp);
|
||||
$stdoutIpAllLinesGlued = implode(" ", $stdoutIp);
|
||||
$stdoutIpWRepeatedSpaces = preg_replace('/\s\s+/', ' ', $stdoutIpAllLinesGlued);
|
||||
|
||||
|
@ -89,7 +89,6 @@ function DisplayDashboard(&$extraFooterScripts)
|
|||
|
||||
define('SSIDMAXLEN', 32);
|
||||
// Warning iw comes with: "Do NOT screenscrape this tool, we don't consider its output stable."
|
||||
// fetch first wireless interface
|
||||
exec('iw dev ' .$_SESSION['wifi_client_interface']. ' link ', $stdoutIw);
|
||||
$stdoutIwAllLinesGlued = implode(' ', $stdoutIw);
|
||||
$stdoutIwWRepSpaces = preg_replace('/\s\s+/', ' ', $stdoutIwAllLinesGlued);
|
||||
|
|
|
@ -3,7 +3,7 @@ $arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini');
|
|||
if ($arrHostapdConf['WifiAPEnable'] == 1) {
|
||||
$client_interface = 'uap0';
|
||||
} else {
|
||||
$client_interface = $_SESSION['wifi_client_interface'];
|
||||
$client_interface = $_SESSION['ap_interface'];
|
||||
}
|
||||
$ap_iface = $_SESSION['ap_interface'];
|
||||
$MACPattern = '"([[:xdigit:]]{2}:){5}[[:xdigit:]]{2}"';
|
||||
|
@ -40,7 +40,7 @@ $ifaceStatus = $wlan0up ? "up" : "down";
|
|||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
<h4><?php echo _("Hourly traffic amount"); ?></h4>
|
||||
<div id="divInterface" class="d-none"><?php echo 'uap0'; ?></div>
|
||||
<div id="divInterface" class="d-none"><?php echo $_SESSION['ap_interface']; ?></div>
|
||||
<div class="col-md-12">
|
||||
<canvas id="divDBChartBandwidthhourly"></canvas>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue