mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Only show rebooted systems on front page when uptime > 0
For SNMP-agents that do not report uptime (EMC VNX5300 for one) Patch by RobJE. git-svn-id: http://www.observium.org/svn/observer/trunk@2979 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -83,9 +83,9 @@ if (filter_var($config['uptime_warning'], FILTER_VALIDATE_FLOAT) !== FALSE && $c
|
||||
{
|
||||
if ($_SESSION['userlevel'] == '10')
|
||||
{
|
||||
$sql = mysql_query("SELECT * FROM `devices` AS D WHERE D.status = '1' AND D.uptime < '" . $config['uptime_warning'] . "' AND D.ignore = 0");
|
||||
$sql = mysql_query("SELECT * FROM `devices` AS D WHERE D.status = '1' AND D.uptime > 0 AND D.uptime < '" . $config['uptime_warning'] . "' AND D.ignore = 0");
|
||||
} else {
|
||||
$sql = mysql_query("SELECT * FROM `devices` AS D, devices_perms AS P WHERE D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' AND D.status = '1' AND D.uptime < '" .
|
||||
$sql = mysql_query("SELECT * FROM `devices` AS D, devices_perms AS P WHERE D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' AND D.status = '1' AND D.uptime > 0 AND D.uptime < '" .
|
||||
$config['uptime_warning'] . "' AND D.ignore = 0");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user