Skip to content

Commit

Permalink
Merge pull request #962 from laf/issue-868
Browse files Browse the repository at this point in the history
Updated ports up check to include ifAdminStatus
  • Loading branch information
f0o committed May 11, 2015
2 parents 3d4df79 + b3bbf46 commit 34baabd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion html/pages/device/overview.inc.php
Expand Up @@ -3,7 +3,7 @@
$overview = 1;

$ports['total'] = dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE device_id = ?", array($device['device_id']));
$ports['up'] = dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE device_id = ? AND `ifOperStatus` = 'up'", array($device['device_id']));
$ports['up'] = dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE device_id = ? AND `ifOperStatus` = 'up' AND `ifAdminStatus` = 'up'", array($device['device_id']));
$ports['down'] = dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE device_id = ? AND `ifOperStatus` = 'down' AND `ifAdminStatus` = 'up'", array($device['device_id']));
$ports['disabled'] = dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE device_id = ? AND `ifAdminStatus` = 'down'", array($device['device_id']));

Expand Down

0 comments on commit 34baabd

Please sign in to comment.