tidied things

git-svn-id: http://www.observium.org/svn/observer/trunk@252 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-09-25 13:54:58 +00:00
parent d0f2fddd02
commit 8a059f80d3
10 changed files with 74 additions and 44 deletions
+9 -1
View File
@@ -4,7 +4,15 @@
$uptime = @mysql_result(mysql_query("SELECT `attrib_value` FROM `devices_attribs` WHERE `device_id` = '" . $device['device_id'] . "' AND `attrib_type` = 'uptime'"), 0);
echo("
if(is_file("images/devices/" . $device['hardware'] . ".gif")) {
$dev_img = "<div style='float: left;'><img src='images/devices/" . $device['hardware'] . ".gif' align=absmiddle></img></div>";
} elseif (is_file("images/devices/" . $device['hardware'] . ".jpg")) {
$dev_img = "<div style='float: left;'><img src='images/devices/" . $device['hardware'] . ".jpg' align=absmiddle></img></div>";
} else { unset($dev_img); }
echo("$ddev_img
<table width=100%>
<tr>
<td class=list-bold>Operating System</td>
+1 -1
View File
@@ -47,7 +47,7 @@
}
echo("</span>");
echo("</td><td width=100>");
echo("</td><td width=120>");
if($interface['ifOperStatus'] == "up") {
$in_perc = @round($interface['in_rate']/$interface['ifSpeed']*100);
+3 -2
View File
@@ -30,8 +30,9 @@
if($peerhost) { $peername = generatedevicelink($peerhost, shorthost($peerhost['hostname'])); } else { unset($peername); }
echo("<tr bgcolor=$bg_colour>
<td width=30><span class=list-large><center>$i</center></span></td>
<td width=150>".generatedevicelink($peer, shorthost($peer['hostname']))."</td>
<td width=10></td>
<td width=150><span class=list-large>" . $peer['bgpLocalAddr'] . "</span><br />".generatedevicelink($peer, shorthost($peer['hostname']))."</td>
<td width=30>-></td>
<td width=150><span class=list-large>" . $peer['bgpPeerIdentifier'] . "</span><br />".$peername."</td>
<td width=50><b>$peer_type</b></td>
<td><strong>AS" . $peer['bgpPeerRemoteAs'] . "</strong><br />" . $peer['astext'] . "</td>
+12 -10
View File
@@ -154,8 +154,7 @@ if($_SESSION['userlevel'] >= '5') {
$seperator = ",";
}
$sql = "select * from interfaces as I, devices as D WHERE `ifAlias` like 'Transit: %' AND I.device_id = D.device_id AND D.hostname LIKE '%";
$sql .= $config['mydomain'] . "' ORDER BY I.ifAlias";
$sql = "select * from interfaces as I, devices as D WHERE `ifAlias` like 'Transit: %' AND I.device_id = D.device_id ORDER BY I.ifAlias";
$query = mysql_query($sql);
unset ($seperator);
while($interface = mysql_fetch_array($query)) {
@@ -172,6 +171,9 @@ if($_SESSION['userlevel'] >= '5') {
$seperator = ",";
}
$interfaces['broadband'] = "2490,2509";
$interfaces['wave_broadband'] = "2098";
if($interfaces['transit']) {
echo("<a onmouseover=\"return overlib('<img src=\'graph.php?type=multi_bits&interfaces=".$interfaces['transit'].
"&from=".$day."&to=".$now."&width=400&height=150\'>', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >".
@@ -180,19 +182,19 @@ if($_SESSION['userlevel'] >= '5') {
"&from=".$day."&to=".$now."&width=200&height=100'></a>");
}
if($interfaces['l2tp']) {
echo("<a onmouseover=\"return overlib('<img src=\'graph.php?type=multi_bits&interfaces=".$interfaces['l2tp'].
if($interfaces['broadband']) {
echo("<a onmouseover=\"return overlib('<img src=\'graph.php?type=multi_bits&interfaces=".$interfaces['broadband'].
"&from=".$day."&to=".$now."&width=400&height=150\'>', LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 18px; font-weight: bold;'>L2TP ADSL</div>".
"<img src='graph.php?type=multi_bits&interfaces=".$interfaces['l2tp'].
"<div style='font-size: 18px; font-weight: bold;'>Broadband</div>".
"<img src='graph.php?type=multi_bits&interfaces=".$interfaces['broadband'].
"&from=".$day."&to=".$now."&width=200&height=100'></a>");
}
if($interfaces['voip']) {
echo("<a onmouseover=\"return overlib('<img src=\'graph.php?type=multi_bits&interfaces=".$interfaces['voip'].
if($interfaces['wave_broadband']) {
echo("<a onmouseover=\"return overlib('<img src=\'graph.php?type=multi_bits&interfaces=".$interfaces['wave_broadband'].
"&from=".$day."&to=".$now."&width=400&height=150\'>', LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >".
"<div style='font-size: 18px; font-weight: bold;'>VoIP to PSTN</div>".
"<img src='graph.php?type=multi_bits&interfaces=".$interfaces['voip'].
"<div style='font-size: 18px; font-weight: bold;'>Wave Broadhand</div>".
"<img src='graph.php?type=multi_bits&interfaces=".$interfaces['wave_broadband'].
"&from=".$day."&to=".$now."&width=200&height=100'></a>");
}
+1 -1
View File
@@ -4,7 +4,7 @@ echo("<table cellpadding=7 cellspacing=0 class=devicetable width=100%>");
if($_GET['type']) {
$type = $_GET['type'];
$sql = "select * from interfaces as I, devices as D WHERE `ifAlias` like '$type: %' AND I.device_id = D.device_id AND D.hostname LIKE '%" . $config['mydomain'] . "' ORDER BY I.ifAlias";
$sql = "select * from interfaces as I, devices as D WHERE `ifAlias` like '$type: %' AND I.device_id = D.device_id ORDER BY I.ifAlias";
$query = mysql_query($sql);
while($interface = mysql_fetch_array($query)) {
$done = "yes";