mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Merge pull request #366 from glaszig/feature/improved-service-status-indicator
improved service status display
This commit is contained in:
@@ -44,11 +44,7 @@ function DisplayHostAPDConfig()
|
||||
exec('cat '. RASPI_HOSTAPD_CONFIG, $hostapdconfig);
|
||||
exec('pidof hostapd | wc -l', $hostapdstatus);
|
||||
|
||||
if ($hostapdstatus[0] == 0) {
|
||||
$status->addMessage('HostAPD is not running', 'warning');
|
||||
} else {
|
||||
$status->addMessage('HostAPD is running', 'success');
|
||||
}
|
||||
$serviceStatus = $hostapdstatus[0] == 0 ? "stopped" : "running";
|
||||
|
||||
foreach ($hostapdconfig as $hostapdconfigline) {
|
||||
if (strlen($hostapdconfigline) === 0) {
|
||||
@@ -65,7 +61,10 @@ function DisplayHostAPDConfig()
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading"><i class="fa fa-dot-circle-o fa-fw"></i> <?php echo _("Configure hotspot"); ?></div>
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-dot-circle-o fa-fw"></i> <?php echo _("Configure hotspot"); ?>
|
||||
<span class="label pull-right service-status-<?php echo $serviceStatus ?>">hostapd <?php echo _($serviceStatus) ?></span>
|
||||
</div>
|
||||
<!-- /.panel-heading -->
|
||||
<div class="panel-body">
|
||||
<p><?php $status->showMessages(); ?></p>
|
||||
|
Reference in New Issue
Block a user