From 0515b4e013633981ad259fe66e670e6b9e179982 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Mon, 21 Mar 2011 12:18:26 +0000 Subject: [PATCH] make port settings page less ugly. also add soem alcatel crap git-svn-id: http://www.observium.org/svn/observer/trunk@1947 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/device/edit/ports.inc.php | 57 +++++++++++++------- includes/discovery/os/alcatel-lucent.inc.php | 4 +- includes/static-config.php | 1 + 3 files changed, 42 insertions(+), 20 deletions(-) diff --git a/html/pages/device/edit/ports.inc.php b/html/pages/device/edit/ports.inc.php index 0e329937a..a83e46e28 100644 --- a/html/pages/device/edit/ports.inc.php +++ b/html/pages/device/edit/ports.inc.php @@ -17,42 +17,63 @@ if ($updated && $update_message) print_error($update_message); } -echo("
+echo("
- - - + "); + +echo("
PortifDescrifAdminStatusifOperStatusDisableIgnore
+ + + + + + + + + + "); +$row=1; + $query = mysql_query("SELECT * FROM `ports` WHERE device_id='".$device['device_id']."' ORDER BY `ifIndex` "); -while ($device = mysql_fetch_array($query)) +while ($port = mysql_fetch_array($query)) { - echo(""); - echo(""); - echo(""); - echo(""); + + $port = ifLabel($port); + + if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } + + echo(""); + echo(""); + echo(""); + echo(""); # Mark interfaces which are OperDown (but not AdminDown) yet not ignored or disabled, or up yet ignored or disabled # - as to draw the attention to a possible problem. - $isportbad = ($device['ifOperStatus'] == 'down' && $device['ifAdminStatus'] != 'down') ? 1 : 0; - $dowecare = ($device['ignore'] == 0 && $device['disabled'] == 0) ? 1 : 0; + $isportbad = ($port['ifOperStatus'] == 'down' && $port['ifAdminStatus'] != 'down') ? 1 : 0; + $dowecare = ($port['ignore'] == 0 && $port['disabled'] == 0) ? 1 : 0; $outofsync = ($isportbad && $dowecare) ? "class=red" : ""; - echo(""); + echo(""); - echo(""); - echo(""); + echo(""); echo(" "); + + $row++; + } echo(''); diff --git a/includes/discovery/os/alcatel-lucent.inc.php b/includes/discovery/os/alcatel-lucent.inc.php index 310868ac2..cf3d1b25f 100755 --- a/includes/discovery/os/alcatel-lucent.inc.php +++ b/includes/discovery/os/alcatel-lucent.inc.php @@ -4,8 +4,8 @@ if (!$os) { - if (strpos($sysObjectId, ".1.3.6.1.4.1.6527.1.800") != FALSE) { $os = "aos"; } - if (strpos($sysObjectId, ".1.3.6.1.4.1.6527.1.3") != FALSE) { $os = "timos"; } + if (strpos($sysObjectId, ".1.3.6.1.4.1.6486.800") !== FALSE) { $os = "aos"; } + if (strpos($sysObjectId, ".1.3.6.1.4.1.6527.1.3") !== FALSE) { $os = "timos"; } } diff --git a/includes/static-config.php b/includes/static-config.php index bde105451..0b8bbbf85 100644 --- a/includes/static-config.php +++ b/includes/static-config.php @@ -86,6 +86,7 @@ $config['os'][$os]['group'] = "aos"; $config['os'][$os]['text'] = "Alcatel-Lucent OS"; $config['os'][$os]['type'] = "network"; $config['os'][$os]['ifXmcbc'] = 1; +$config['os'][$os]['ifname'] = 1; $config['os'][$os]['over'][0]['graph'] = "device_bits"; $config['os'][$os]['over'][0]['text'] = "Device Traffic";
IndexNameAdminOperDisableIgnoreDescription
". $device['ifIndex']."".$device['ifDescr'] . "". $device['ifAdminStatus']."
". $port['ifIndex']."".$port['label'] . "". $port['ifAdminStatus']."". $device['ifOperStatus']."". $port['ifOperStatus'].""); - echo(""); - echo(""); + echo(""); + echo(""); + echo(""); echo(""); - echo(""); - echo(""); + echo(""); + echo(""); + echo(""); echo("".$port['ifAlias'] . "