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.
This commit is contained in:
Morrvick
2016-02-15 11:44:05 -06:00
parent 16cbd3261c
commit 7aa2b1fa28

View File

@@ -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++;
}