2019-08-19 01:04:53 +02:00
|
|
|
<?php
|
|
|
|
$arrHostapdConf = parse_ini_file('/etc/raspap/hostapd.ini');
|
|
|
|
if ($arrHostapdConf['WifiAPEnable'] == 1) {
|
2019-09-07 17:42:31 +02:00
|
|
|
$client_iface = 'uap0';
|
2019-08-19 01:04:53 +02:00
|
|
|
} else {
|
2019-09-07 17:42:31 +02:00
|
|
|
$client_iface = RASPI_WIFI_CLIENT_INTERFACE;
|
2019-08-19 01:04:53 +02:00
|
|
|
}
|
|
|
|
exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(arp -i '.$client_iface.' -n | grep -oE "(([0-9]|[a-f]|[A-F]){2}:){5}([0-9]|[a-f]|[A-F]){2}" | tr "\n" "\|" | sed "s/.$//")', $clients);
|
2019-11-01 10:08:49 +01:00
|
|
|
$ifaceStatus = $wlan0up ? "up" : "down";
|
2019-08-19 01:04:53 +02:00
|
|
|
?>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12">
|
2019-10-11 21:37:59 +02:00
|
|
|
<div class="card">
|
2019-10-14 22:18:16 +02:00
|
|
|
<div class="card-header">
|
|
|
|
<div class="row">
|
2020-02-02 14:37:17 +01:00
|
|
|
<div class="col">
|
|
|
|
<i class="fas fa-tachometer-alt fa-fw mr-2"></i><?php echo _("Dashboard"); ?>
|
|
|
|
</div>
|
|
|
|
<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 strtolower($client_iface) .' '. _($ifaceStatus) ?></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
2019-10-14 22:18:16 +02:00
|
|
|
</div><!-- /.row -->
|
|
|
|
</div><!-- /.card-header -->
|
2020-02-02 09:37:15 +01:00
|
|
|
|
2019-10-11 21:37:59 +02:00
|
|
|
<div class="card-body">
|
2019-08-19 01:04:53 +02:00
|
|
|
<div class="row">
|
2020-02-02 09:37:15 +01:00
|
|
|
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<div class="card mb-3">
|
|
|
|
<div class="card-body">
|
|
|
|
<h4><?php echo _("Hourly traffic amount"); ?></h4>
|
|
|
|
<div id="divInterface" class="d-none"><?php echo RASPI_WIFI_CLIENT_INTERFACE; ?></div>
|
2020-02-02 14:37:17 +01:00
|
|
|
<div class="col-md-12">
|
2020-02-02 15:58:35 +01:00
|
|
|
<canvas id="divDBChartBandwidthhourly"></canvas>
|
2020-02-02 14:37:17 +01:00
|
|
|
</div>
|
2020-02-02 09:37:15 +01:00
|
|
|
</div><!-- /.card-body -->
|
|
|
|
</div><!-- /.card-->
|
|
|
|
</div>
|
|
|
|
|
2019-10-14 12:32:40 +02:00
|
|
|
<div class="col-md-6 mb-3">
|
2020-02-02 09:37:15 +01:00
|
|
|
<div class="card">
|
2019-10-14 12:32:40 +02:00
|
|
|
<div class="card-body wireless">
|
2020-02-02 09:37:15 +01:00
|
|
|
<h4><?php echo _("Wireless Client"); ?></h4>
|
|
|
|
<div class="row justify-content-md-center">
|
|
|
|
<div class="col-md-8">
|
2019-10-15 01:01:22 +02:00
|
|
|
<div class="info-item"><?php echo _("Connected To"); ?></div><div><?php echo htmlspecialchars($connectedSSID, ENT_QUOTES); ?></div>
|
|
|
|
<div class="info-item"><?php echo _("AP Mac Address"); ?></div><div><?php echo htmlspecialchars($connectedBSSID, ENT_QUOTES); ?></div>
|
|
|
|
<div class="info-item"><?php echo _("Bitrate"); ?></div><div><?php echo htmlspecialchars($bitrate, ENT_QUOTES); ?></div>
|
|
|
|
<div class="info-item"><?php echo _("Signal Level"); ?></div><div><?php echo htmlspecialchars($signalLevel, ENT_QUOTES); ?></div>
|
|
|
|
<div class="info-item"><?php echo _("Transmit Power"); ?></div><div><?php echo htmlspecialchars($txPower, ENT_QUOTES); ?></div>
|
|
|
|
<div class="info-item"><?php echo _("Frequency"); ?></div><div><?php echo htmlspecialchars($frequency, ENT_QUOTES); ?></div>
|
2020-02-02 09:37:15 +01:00
|
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
2019-10-15 01:04:17 +02:00
|
|
|
<script>var linkQ = <?php echo json_encode($strLinkQuality); ?>;</script>
|
2019-11-03 18:02:45 +01:00
|
|
|
<div class="chart-container">
|
2020-02-02 09:37:15 +01:00
|
|
|
<canvas id="divChartLinkQ"></canvas>
|
2019-10-14 12:32:40 +02:00
|
|
|
</div>
|
2020-02-02 09:37:15 +01:00
|
|
|
</div><!--row-->
|
|
|
|
</div>
|
2019-10-14 12:32:40 +02:00
|
|
|
</div><!-- /.card-body -->
|
|
|
|
</div><!-- /.card -->
|
|
|
|
</div><!-- /.col-md-6 -->
|
2019-08-19 01:04:53 +02:00
|
|
|
<div class="col-md-6">
|
2020-02-02 14:37:17 +01:00
|
|
|
<div class="card mb-3">
|
2019-10-11 21:37:59 +02:00
|
|
|
<div class="card-body wireless">
|
2019-08-19 01:04:53 +02:00
|
|
|
<h4><?php echo _("Connected Devices"); ?></h4>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th><?php echo _("Host name"); ?></th>
|
|
|
|
<th><?php echo _("IP Address"); ?></th>
|
|
|
|
<th><?php echo _("MAC Address"); ?></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2019-09-07 17:42:31 +02:00
|
|
|
<?php foreach ($clients as $client) : ?>
|
|
|
|
<?php $props = explode(' ', $client) ?>
|
2019-08-19 01:04:53 +02:00
|
|
|
<tr>
|
|
|
|
<td><?php echo htmlspecialchars($props[3], ENT_QUOTES) ?></td>
|
|
|
|
<td><?php echo htmlspecialchars($props[2], ENT_QUOTES) ?></td>
|
|
|
|
<td><?php echo htmlspecialchars($props[1], ENT_QUOTES) ?></td>
|
|
|
|
</tr>
|
2019-09-07 17:42:31 +02:00
|
|
|
<?php endforeach ?>
|
2019-08-19 01:04:53 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div><!-- /.table-responsive -->
|
2019-10-11 21:37:59 +02:00
|
|
|
</div><!-- /.card-body -->
|
|
|
|
</div><!-- /.card -->
|
2019-08-19 01:04:53 +02:00
|
|
|
</div><!-- /.col-md-6 -->
|
|
|
|
</div><!-- /.row -->
|
|
|
|
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<div class="row">
|
|
|
|
<form action="?page=wlan0_info" method="POST">
|
2019-09-07 17:42:31 +02:00
|
|
|
<?php echo CSRFTokenFieldTag() ?>
|
|
|
|
<?php if (!RASPI_MONITOR_ENABLED) : ?>
|
|
|
|
<?php if (!$wlan0up) : ?>
|
2019-10-22 10:01:01 +02:00
|
|
|
<input type="submit" class="btn btn-success" value="<?php echo _("Start").' '.RASPI_WIFI_CLIENT_INTERFACE ?>" name="ifup_wlan0" />
|
2019-09-07 17:42:31 +02:00
|
|
|
<?php else : ?>
|
2019-10-22 10:01:01 +02:00
|
|
|
<input type="submit" class="btn btn-warning" value="<?php echo _("Stop").' '.RASPI_WIFI_CLIENT_INTERFACE ?>" name="ifdown_wlan0" />
|
2019-09-07 17:42:31 +02:00
|
|
|
<?php endif ?>
|
|
|
|
<?php endif ?>
|
2019-10-11 21:37:59 +02:00
|
|
|
<a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
|
2019-08-19 01:04:53 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-10-11 21:37:59 +02:00
|
|
|
</div><!-- /.card-body -->
|
2019-10-20 19:31:39 +02:00
|
|
|
<div class="card-footer"><?php echo _("Information provided by ip and iw and from system"); ?></div>
|
2019-10-11 21:37:59 +02:00
|
|
|
</div><!-- /.card -->
|
2019-08-19 01:04:53 +02:00
|
|
|
</div><!-- /.col-lg-12 -->
|
|
|
|
</div><!-- /.row -->
|
2020-02-02 09:37:15 +01:00
|
|
|
<script type="text/javascript"<?php //echo ' nonce="'.$csp_page_nonce.'"'; ?>>
|
|
|
|
// js translations:
|
|
|
|
var t = new Array();
|
|
|
|
t['send'] = '<?php echo addslashes(_('Send')); ?>';
|
|
|
|
t['receive'] = '<?php echo addslashes(_('Receive')); ?>';
|
|
|
|
</script>
|