From d067cd5812e8cf6338880ec8d78e615d449a0d0e Mon Sep 17 00:00:00 2001 From: Geert Hauwaerts Date: Thu, 25 Feb 2010 22:23:48 +0000 Subject: [PATCH] - BUGFIX: Renamed "Interfaces" to "Ports" in the top navigation menu. - FEATURE: In the menubar for "Ports" added support for ignored interfaces. - BUGFIX: Fixed the /ports/(down|admindown|errors|ignored)/ links. git-svn-id: http://www.observium.org/svn/observer/trunk@955 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/print-menubar.php | 4 ++++ html/includes/topnav.inc | 2 +- html/pages/ports.php | 11 +++++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index ad9bca95b..c858c8a90 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -118,6 +118,10 @@ if ($ports['errored']) { echo('
  • Errored ('.$ports['errored'].')
  • '); } +if ($ports['ignored']) { + echo('
  • Ignored ('.$ports['ignored'].')
  • '); +} + if ($config['enable_billing']) { echo('
  • Traffic Bills
  • '); $ifbreak = 1;} if ($config['enable_pseudowires']) { echo('
  • Pseudowires
  • '); $ifbreak = 1;} diff --git a/html/includes/topnav.inc b/html/includes/topnav.inc index 8d382867b..1748f4fef 100644 --- a/html/includes/topnav.inc +++ b/html/includes/topnav.inc @@ -63,7 +63,7 @@ if($services['down']) { $services['bgcolour'] = "#ffcccc"; } else { $services['b - Interfaces : + Ports : ( up diff --git a/html/pages/ports.php b/html/pages/ports.php index db26ae10e..aefb0c403 100644 --- a/html/pages/ports.php +++ b/html/pages/ports.php @@ -22,6 +22,7 @@ + @@ -86,14 +87,16 @@ #} -if($_GET['type'] == "down" || $_POST['state'] == "down") { - $where .= "AND I.ifAdminStatus = 'up' AND I.ifOperStatus = 'down'"; -} elseif ($_GET['type'] == "admindown" || $_POST['state'] == "admindown") { +if($_GET['opta'] == "down" || $_GET['type'] == "down" || $_POST['state'] == "down") { + $where .= "AND I.ifAdminStatus = 'up' AND I.ifOperStatus = 'down' AND I.ignore = '0'"; +} elseif ($_GET['opta'] == "admindown" || $_GET['type'] == "admindown" || $_POST['state'] == "admindown") { $where .= "AND I.ifAdminStatus = 'down'"; -} elseif ($_GET['type'] == "errors" || $_POST['state'] == "errors") { +} elseif ($_GET['opta'] == "errors" || $_GET['type'] == "errors" || $_POST['state'] == "errors") { $where .= "AND ( I.`ifInErrors_delta` > '0' OR I.`ifOutErrors_delta` > '0' )"; } elseif ($_GET['type'] == "up" || $_POST['state'] == "up") { $where .= "AND I.ifOperStatus = 'up'"; +} elseif ($_GET['opta'] == "ignored" || $_GET['type'] == "ignored" || $_POST['state'] == "ignored") { + $where .= "AND I.ignore = '1'"; } elseif ($_GET['type'] == "l2vlan" || $_POST['state'] == "l2vlan") { $where .= " AND I.ifType = 'l2vlan'"; } elseif ($_GET['type'] == "ethernet" || $_POST['state'] == "ethernet") {