From 7aa2b1fa28fa80c7017874f88e2dc481918fc7e2 Mon Sep 17 00:00:00 2001 From: Morrvick Date: Mon, 15 Feb 2016 11:44:05 -0600 Subject: [PATCH] Ignore devices that do not provide an uptime statistic. Hundreds of my devices do not supply an uptime in their data. This causes lots of useless warnings in my availability map. This tweak corrects that. --- html/includes/common/availability-map.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/includes/common/availability-map.inc.php b/html/includes/common/availability-map.inc.php index 2fc72a0909..401ed7bfcf 100644 --- a/html/includes/common/availability-map.inc.php +++ b/html/includes/common/availability-map.inc.php @@ -53,7 +53,7 @@ else { foreach(dbFetchRows($sql, $param) as $device) { if ($device['status'] == '1') { $btn_type = 'btn-success'; - if ($device['uptime'] < $config['uptime_warning']) { + if (($device['uptime'] < $config['uptime_warning']) && ($device['uptime'] != '0')) { $btn_type = 'btn-warning'; $c++; }