mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed services -> Alerts menu link + page
This commit is contained in:
@ -190,7 +190,7 @@ if ($config['show_services']) {
|
||||
if ($service_alerts) {
|
||||
echo('
|
||||
<li role="presentation" class="divider"></li>
|
||||
<li><a href="services/status=0/"><i class="fa fa-bell-o fa-fw fa-lg"></i> Alerts ('.$service_alerts.')</a></li>');
|
||||
<li><a href="services/state=down/"><i class="fa fa-bell-o fa-fw fa-lg"></i> Alerts ('.$service_alerts.')</a></li>');
|
||||
}
|
||||
|
||||
if ($_SESSION['userlevel'] >= '10') {
|
||||
|
@ -16,16 +16,14 @@ if (isset($vars['state'])) {
|
||||
if ($vars['state'] == 'up') {
|
||||
$state = '1';
|
||||
}
|
||||
else if ($vars['state'] == 'down') {
|
||||
elseif ($vars['state'] == 'down') {
|
||||
$state = '0';
|
||||
}
|
||||
}
|
||||
|
||||
if ($vars['state']) {
|
||||
$where .= ' AND service_status= ?';
|
||||
$where .= " AND service_status= ? AND service_disabled='0' AND `service_ignore`='0'";
|
||||
$sql_param[] = $state;
|
||||
$where .= " AND service_disabled='0' AND `service_ignore`='0'";
|
||||
$sql_param[] = '';
|
||||
}
|
||||
|
||||
if ($vars['disabled']) {
|
||||
@ -65,8 +63,15 @@ unset($sep);
|
||||
|
||||
print_optionbar_end();
|
||||
|
||||
echo '<table class="table table-condensed">';
|
||||
// echo("<tr class=interface-desc bgcolor='#e5e5e5'><td>Device</td><td>Service</td><td>Status</td><td>Changed</td><td>Checked</td><td>Message</td></tr>");
|
||||
echo '<div class="table-responsive">
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th>Device</th>
|
||||
<th>Service</th>
|
||||
<th>Status</th>
|
||||
<th>Changed</th>
|
||||
<th>Message</th>
|
||||
</tr>';
|
||||
if ($_SESSION['userlevel'] >= '5') {
|
||||
$host_sql = 'SELECT * FROM devices AS D, services AS S WHERE D.device_id = S.device_id GROUP BY D.hostname ORDER BY D.hostname';
|
||||
$host_par = array();
|
||||
@ -123,4 +128,5 @@ foreach (dbFetchRows($host_sql, $host_par) as $device) {
|
||||
unset($samehost);
|
||||
}//end foreach
|
||||
|
||||
echo '</table>';
|
||||
echo '</table>
|
||||
</div>';
|
||||
|
Reference in New Issue
Block a user