mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
puts service status as label into panel heading
This commit is contained in:
@@ -99,14 +99,10 @@ function DisplayDHCPConfig()
|
||||
} else {
|
||||
error_log('CSRF violation');
|
||||
}
|
||||
} else {
|
||||
if ($dnsmasq_state) {
|
||||
$status->addMessage('Dnsmasq is running', 'success');
|
||||
} else {
|
||||
$status->addMessage('Dnsmasq is not running', 'warning');
|
||||
}
|
||||
}
|
||||
|
||||
$serviceStatus = $dnsmasq_state ? "running" : "stopped";
|
||||
|
||||
exec('cat '. RASPI_DNSMASQ_CONFIG, $return);
|
||||
$conf = ParseConfig($return);
|
||||
$arrRange = explode(",", $conf['dhcp-range']);
|
||||
@@ -140,7 +136,10 @@ function DisplayDHCPConfig()
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading"><i class="fa fa-exchange fa-fw"></i> <?php echo _("Configure DHCP"); ?></div>
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-exchange fa-fw"></i> <?php echo _("Configure DHCP"); ?>
|
||||
<span class="label pull-right service-status-<?php echo $serviceStatus ?>">dnsmasq <?php echo _($serviceStatus) ?></span>
|
||||
</div>
|
||||
<!-- /.panel-heading -->
|
||||
<div class="panel-body">
|
||||
<p><?php $status->showMessages(); ?></p>
|
||||
|
Reference in New Issue
Block a user