From e2f12ae6c779aa350231c4aa7a2808491cabfe62 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Mon, 3 Nov 2008 15:12:09 +0000 Subject: [PATCH] show errored ports! (thanks geo) git-svn-id: http://www.observium.org/svn/observer/trunk@268 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/print-menubar.php | 5 +++++ html/pages/interfaces.php | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index 8da6a73bc..41286f549 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -114,6 +114,11 @@ if($config['show_locations']) { echo("
  • '0' OR out_errors > '0')"),0); +if($errored) { + echo("
  • Errored Ports ($errored)
  • "); +} + if($_SESSION['userlevel'] >= '5') { echo("

  • "); if($config['int_customers']) { echo("
  • Customers
  • "); $ifbreak = 1;} diff --git a/html/pages/interfaces.php b/html/pages/interfaces.php index 4637e9598..737c3ccfa 100644 --- a/html/pages/interfaces.php +++ b/html/pages/interfaces.php @@ -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("");