mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-29 16:29:55 +02:00
Fixed some cosmetic issues with cisco graphs. Added cisco-specific OID for getting better ifType.
git-svn-id: http://www.observium.org/svn/observer/trunk@60 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+7
-1
@@ -18,7 +18,10 @@
|
||||
$device = getifhost($_GET['if']);
|
||||
$ifIndex = getifindexbyid($_GET['if']);
|
||||
}
|
||||
$hostname = gethostbyid($device);
|
||||
if($device) {
|
||||
$hostname = gethostbyid($device);
|
||||
}
|
||||
|
||||
$from = $_GET['from'];
|
||||
$to = $_GET['to'];
|
||||
$width = $_GET['width'];
|
||||
@@ -34,6 +37,9 @@
|
||||
|
||||
switch ($type) {
|
||||
|
||||
case 'global_bits':
|
||||
$graph = graph_global_bits ("global_bits.png", $from, $to, $width, $height);
|
||||
break;
|
||||
case 'device_bits':
|
||||
$graph = graph_device_bits ($device, $graphfile, $from, $to, $width, $height, $title, $vertical);
|
||||
break;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
if($bg == "#ffffff") { $bg = "#e5e5e5"; } else { $bg="#ffffff"; }
|
||||
$graph_url = "graph.php?if=$if_id&from=$twoday&to=$now&width=400&height=120&type=bits";
|
||||
echo("<tr style=\"background-color: $bg; padding: 5px;\" valign=top>
|
||||
<td valign=top width=275>
|
||||
<td valign=top width=300>
|
||||
<span class=list-large><a onmouseover=\"return overlib('<img src=\'$graph_url\'>');\" onmouseout=\"return nd();\"
|
||||
class='$ifclass' href='?page=interface&id=$interface[id]'>
|
||||
$i. $inf
|
||||
@@ -27,9 +27,9 @@
|
||||
$break = " ";
|
||||
}
|
||||
echo("</span>");
|
||||
echo("</td><td width=80>");
|
||||
echo("</td><td width=70>");
|
||||
if($speed && $speed != "") { echo("<span class=box-desc>$speed</span>"); }
|
||||
echo("</td><td width=80>");
|
||||
echo("</td><td width=110>");
|
||||
if($iftype && $iftype != "") { echo("<span class=box-desc>$iftype</span>"); } else { echo("-"); }
|
||||
echo("</td><td width=80>");
|
||||
if($mac && $mac != "") { echo("<span class=box-desc>$mac</span>"); } else { echo("-"); }
|
||||
|
||||
+13
-11
@@ -10,14 +10,16 @@
|
||||
|
||||
while($data = mysql_fetch_array($query)) {
|
||||
unset($class);
|
||||
$iid = $data[iid];
|
||||
$ifIndex = $data[ifIndex];
|
||||
$did = $data[did];
|
||||
$hostname = $data[hostname];
|
||||
$up = $data[up];
|
||||
$up_admin = $data[up_admin];
|
||||
$ifname = fixifname($data[ifname]);
|
||||
$ifalias = $data[ifalias];
|
||||
$iid = $data['iid'];
|
||||
$ifIndex = $data['ifIndex'];
|
||||
$did = $data['did'];
|
||||
$device[id] = $did;
|
||||
$device['hostname'] = $data['hostname'];
|
||||
$hostname = $data['hostname'];
|
||||
$up = $data['up'];
|
||||
$up_admin = $data['up_admin'];
|
||||
$ifname = fixifname($data['ifname']);
|
||||
$ifalias = $data['ifalias'];
|
||||
$ifalias = str_replace("Cust: ", "", $ifalias);
|
||||
$ifalias = str_replace("[PNI]", "Private", $ifalias);
|
||||
$ifclass = ifclass($up, $up_admin);
|
||||
@@ -47,9 +49,9 @@
|
||||
echo("
|
||||
<tr bgcolor='$bg'>
|
||||
<td width='7'></td>
|
||||
<td width='250'><span class=interface>$useifalias</span></td>
|
||||
<td width='200'><a href='?page=device&id=$did' $mouseoverhost>$hostname</a></td>
|
||||
<td width='100'><a href='?page=interface&id=$iid' class=$ifclass $mouseoverint><span class=interface-desc>$ifname</span></td>
|
||||
<td width='250'><span style='font-weight: bold;' class=interface>$useifalias</span></td>
|
||||
<td width='200'>" . generatedevicelink($device) . "</td>
|
||||
<td width='100'>" . generateiflink($data, makeshortif($data['if'])) . "</td>
|
||||
<td>$notes</td>
|
||||
</tr>
|
||||
");
|
||||
|
||||
Reference in New Issue
Block a user