add some nice new icons for overview. are they nice?

i don't know. they're certainly nicer than a kick in the balls though, eh?


git-svn-id: http://www.observium.org/svn/observer/trunk@1003 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-03-11 03:38:22 +00:00
parent 1e2d5266ff
commit d9b1cce70b
5 changed files with 12 additions and 6 deletions

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

View File

@@ -2,18 +2,18 @@
if(mysql_result(mysql_query("SELECT count(*) from mempools WHERE device_id = '" . $device['device_id'] . "'"),0)) {
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
echo("<p style='padding: 0px 5px 5px;' class=sectionhead>Memory Pools</p>");
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/mempool.png'> Memory Pools</p>");
echo("<table width=100% cellspacing=0 cellpadding=5>");
$mempool_rows = '1';
$mempools = mysql_query("SELECT * FROM `mempools` WHERE device_id = '" . $device['device_id'] . "'");
while($mempool = mysql_fetch_array($mempools)) {
if(is_integer($mempool_rows/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
$perc = round($mempool['mempool_used'] / ($mempool['mempool_total']) * 100,2);
$text_descr = $mempool['mempool_descr'];
$text_descr = str_replace("Routing Processor", "RP", $text_descr);
$text_descr = str_replace("Switching Processor", "SP", $text_descr);
$text_descr = str_replace("Processor", "Proc", $text_descr);
$text_descr = str_replace("Sub-Module", "Mod", $text_descr);
$text_descr = str_replace("Sub-Module", "Module ", $text_descr);
$text_descr = str_replace("DFC Card", "DFC", $text_descr);
$mempool_url = "/device/".$device['device_id']."/health/memory/";

View File

@@ -3,7 +3,7 @@
if(mysql_result(mysql_query("SELECT count(*) from processors WHERE device_id = '" . $device['device_id'] . "'"),0)) {
$processor_rows = 0;
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
echo("<p style='padding: 0px 5px 5px;' class=sectionhead>Processors</p>");
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/cpuload.png'> Processors</p>");
echo("<table width=100% cellspacing=0 cellpadding=5>");
$i = '1';
$procs = mysql_query("SELECT * FROM `processors` WHERE device_id = '" . $device['device_id'] . "'");
@@ -19,7 +19,13 @@ if(mysql_result(mysql_query("SELECT count(*) from processors WHERE device_id = '
$mini_url = $config['base_url'] . "/graph.php?id=".$proc['processor_id']."&type=processor&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f4";
$text_descr = $proc['processor_descr'];
$text_descr = short_hrDeviceDescr($proc['processor_descr']);
$text_descr = str_replace("Routing Processor", "RP", $text_descr);
$text_descr = str_replace("Switching Processor", "SP", $text_descr);
$text_descr = str_replace("Sub-Module", "Module ", $text_descr);
$text_descr = str_replace("DFC Card", "DFC", $text_descr);
# disable short hrDeviceDescr. need to make this prettier.
#$text_descr = short_hrDeviceDescr($proc['processor_descr']);
$perc = $proc['processor_usage'];

View File

@@ -5,7 +5,7 @@ if(mysql_result(mysql_query("SELECT count(temp_id) from temperature WHERE device
$total = mysql_result(mysql_query("SELECT count(temp_id) from temperature WHERE device_id = '" . $device['device_id'] . "'"),0);
$rows = round($total / 2,0);
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
echo("<p class=sectionhead>Temperatures</p>");
echo("<p class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/temperature.png'> Temperatures</p>");
$i = '1';
$temps = mysql_query("SELECT * FROM temperature WHERE device_id = '" . $device['device_id'] . "'");
echo("<table width=100% valign=top>");