separate and improve overview page

git-svn-id: http://www.observium.org/svn/observer/trunk@515 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-11-11 18:20:32 +00:00
parent 8040941635
commit 08ae40ab1e
17 changed files with 298 additions and 186 deletions
+1 -1
View File
@@ -316,7 +316,7 @@ function generatedevicelink($device, $text=0, $start=0, $end=0)
function device_traffic_image($device, $width, $height, $from, $to)
{
return "<img src='graph.php?device=" . $device . "&type=device_bits&from=" . $from . "&to=" . $to . "&width=" . $width . "&height=" . $height . "' />";
return "<img src='graph.php?device=" . $device . "&type=device_bits&from=" . $from . "&to=" . $to . "&width=" . $width . "&height=" . $height . "&legend=no' />";
}
function devclass($device)
+17
View File
@@ -184,6 +184,14 @@ $rewrite_ios_features = array(
'loop' => 'Loop',
);
$rewrite_hrDevice = array (
'GenuineIntel:' => '',
'AuthenticAMD:' => '',
'Intel(R)' => '',
'CPU' => '',
'(R)' => '',
' ' => ' ',
);
// Specific rewrite functions
@@ -220,6 +228,15 @@ function fixifName ($inf)
return $inf;
}
function short_hrDeviceDescr($dev)
{
global $rewrite_hrDevice;
$dev = array_str_replace($rewrite_hrDevice, $dev);
$dev = preg_replace("/\ +/"," ", $dev);
$dev = trim($dev);
return $dev;
}
function short_port_descr ($desc) {
list($desc) = explode("(", $desc);