show errored ports! (thanks geo)

git-svn-id: http://www.observium.org/svn/observer/trunk@268 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-11-03 15:12:09 +00:00
parent e146a966b1
commit e2f12ae6c7
2 changed files with 9 additions and 0 deletions
+4
View File
@@ -7,14 +7,18 @@
#}
if($_GET['type'] == "down") {
$where = "AND I.ifAdminStatus = 'up' AND I.ifOperStatus = 'down'";
} elseif ($_GET['type'] == "admindown") {
$where = "AND I.ifAdminStatus = 'down'";
} elseif ($_GET['type'] == "errors") {
$where = "AND ( I.`out_errors` > '0' OR I.`in_errors` > '0' )";
}
$sql = "SELECT * FROM `interfaces` AS I, `devices` AS D WHERE I.device_id = D.device_id $where ORDER BY D.hostname, I.ifDescr";
$query = mysql_query($sql);
echo("<table cellspacing=0 cellpadding=2 width=100%>");