mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@ -114,6 +114,11 @@ if($config['show_locations']) { echo("<li><a class='menu2four' href='locations/'
|
||||
|
||||
<?php
|
||||
|
||||
$errored = mysql_result(mysql_query("SELECT COUNT(*) FROM interfaces WHERE (in_errors > '0' OR out_errors > '0')"),0);
|
||||
if($errored) {
|
||||
echo("<li><a href='interfaces/errors/'><img src='images/16/chart_curve_error.png' border=0 align=absmiddle> Errored Ports ($errored)</a></li>");
|
||||
}
|
||||
|
||||
if($_SESSION['userlevel'] >= '5') {
|
||||
echo("<li><hr width=140 /></li>");
|
||||
if($config['int_customers']) { echo("<li><a href='customers/'><img src='images/16/group_link.png' border=0 align=absmiddle> Customers</a></li>"); $ifbreak = 1;}
|
||||
|
@ -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%>");
|
||||
|
Reference in New Issue
Block a user