- 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
This commit is contained in:
Geert Hauwaerts
2010-02-25 22:23:48 +00:00
parent 1f4aa89950
commit d067cd5812
3 changed files with 12 additions and 5 deletions

View File

@@ -118,6 +118,10 @@ if ($ports['errored']) {
echo('<li><a href="ports/errors/"><img src="images/16/chart_curve_error.png" border="0" align="absmiddle" /> Errored ('.$ports['errored'].')</a></li>'); echo('<li><a href="ports/errors/"><img src="images/16/chart_curve_error.png" border="0" align="absmiddle" /> Errored ('.$ports['errored'].')</a></li>');
} }
if ($ports['ignored']) {
echo('<li><a href="ports/ignored/"><img src="images/16/chart_curve_link.png" border="0" align="absmiddle" /> Ignored ('.$ports['ignored'].')</a></li>');
}
if ($config['enable_billing']) { echo('<li><a href="bills/"><img src="images/16/money_pound.png" border="0" align="absmiddle" /> Traffic Bills</a></li>'); $ifbreak = 1;} if ($config['enable_billing']) { echo('<li><a href="bills/"><img src="images/16/money_pound.png" border="0" align="absmiddle" /> Traffic Bills</a></li>'); $ifbreak = 1;}
if ($config['enable_pseudowires']) { echo('<li><a href="pseudowires/"><img src="images/16/arrow_switch.png" border="0" align="absmiddle" /> Pseudowires</a></li>'); $ifbreak = 1;} if ($config['enable_pseudowires']) { echo('<li><a href="pseudowires/"><img src="images/16/arrow_switch.png" border="0" align="absmiddle" /> Pseudowires</a></li>'); $ifbreak = 1;}

View File

@@ -63,7 +63,7 @@ if($services['down']) { $services['bgcolour'] = "#ffcccc"; } else { $services['b
<td width=5></td> <td width=5></td>
</tr> </tr>
<tr style="background-color: <?php echo $ports['bgcolour'] ?>"> <tr style="background-color: <?php echo $ports['bgcolour'] ?>">
<td width="5"></td><td>Interfaces : </td> <td width="5"></td><td>Ports : </td>
<td><?php echo $ports['count'] ?></td> <td><?php echo $ports['count'] ?></td>
<td> ( </td> <td> ( </td>
<td style='text-align: right'><span class=green> <?php echo $ports['up'] ?> up </span></td> <td style='text-align: right'><span class=green> <?php echo $ports['up'] ?> up </span></td>

View File

@@ -22,6 +22,7 @@
<option value='down'<?php if($_POST['state'] == "down") { echo("selected"); } ?>>Down</option> <option value='down'<?php if($_POST['state'] == "down") { echo("selected"); } ?>>Down</option>
<option value='admindown' <?php if($_POST['state'] == "admindown") { echo("selected"); } ?>>Shutdown</option> <option value='admindown' <?php if($_POST['state'] == "admindown") { echo("selected"); } ?>>Shutdown</option>
<option value='errors' <?php if($_POST['state'] == "errors") { echo("selected"); } ?>>Errors</option> <option value='errors' <?php if($_POST['state'] == "errors") { echo("selected"); } ?>>Errors</option>
<option value='ignored' <?php if($_POST['state'] == "ignored") { echo("selected"); } ?>>Ignored</option>
<option value='ethernet' <?php if($_POST['state'] == "ethernet") { echo("selected"); } ?>>Ethernet</option> <option value='ethernet' <?php if($_POST['state'] == "ethernet") { echo("selected"); } ?>>Ethernet</option>
<option value='l2vlan' <?php if($_POST['state'] == "l2vlan") { echo("selected"); } ?>>L2 VLAN</option> <option value='l2vlan' <?php if($_POST['state'] == "l2vlan") { echo("selected"); } ?>>L2 VLAN</option>
<option value='sonet' <?php if($_POST['state'] == "sonet") { echo("selected"); } ?>>SONET</option> <option value='sonet' <?php if($_POST['state'] == "sonet") { echo("selected"); } ?>>SONET</option>
@@ -86,14 +87,16 @@
#} #}
if($_GET['type'] == "down" || $_POST['state'] == "down") { if($_GET['opta'] == "down" || $_GET['type'] == "down" || $_POST['state'] == "down") {
$where .= "AND I.ifAdminStatus = 'up' AND I.ifOperStatus = 'down'"; $where .= "AND I.ifAdminStatus = 'up' AND I.ifOperStatus = 'down' AND I.ignore = '0'";
} elseif ($_GET['type'] == "admindown" || $_POST['state'] == "admindown") { } elseif ($_GET['opta'] == "admindown" || $_GET['type'] == "admindown" || $_POST['state'] == "admindown") {
$where .= "AND I.ifAdminStatus = 'down'"; $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' )"; $where .= "AND ( I.`ifInErrors_delta` > '0' OR I.`ifOutErrors_delta` > '0' )";
} elseif ($_GET['type'] == "up" || $_POST['state'] == "up") { } elseif ($_GET['type'] == "up" || $_POST['state'] == "up") {
$where .= "AND I.ifOperStatus = '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") { } elseif ($_GET['type'] == "l2vlan" || $_POST['state'] == "l2vlan") {
$where .= " AND I.ifType = 'l2vlan'"; $where .= " AND I.ifType = 'l2vlan'";
} elseif ($_GET['type'] == "ethernet" || $_POST['state'] == "ethernet") { } elseif ($_GET['type'] == "ethernet" || $_POST['state'] == "ethernet") {