mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
make displaying of per-device health page options menu closer to global. add overview icons (bulb)
git-svn-id: http://www.observium.org/svn/observer/trunk@1154 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
BIN
html/images/icons/greyscale/overview.png
Normal file
BIN
html/images/icons/greyscale/overview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 694 B |
BIN
html/images/icons/overview.png
Normal file
BIN
html/images/icons/overview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 782 B |
@@ -22,6 +22,7 @@ $rrd_options .= " -b 1024";
|
||||
$rrd_options .= " DEF:$storage[storage_id]free=$rrd:free:AVERAGE";
|
||||
$rrd_options .= " CDEF:$storage[storage_id]size=$storage[storage_id]used,$storage[storage_id]free,+";
|
||||
$rrd_options .= " CDEF:$storage[storage_id]perc=$storage[storage_id]used,$storage[storage_id]size,/,100,*";
|
||||
|
||||
$rrd_options .= " LINE1.25:$storage[storage_id]perc#" . $colour . ":'$descr'";
|
||||
$rrd_options .= " GPRINT:$storage[storage_id]size:LAST:%6.2lf%sB";
|
||||
$rrd_options .= " GPRINT:$storage[storage_id]free:LAST:%6.2lf%sB";
|
||||
|
||||
@@ -23,10 +23,9 @@
|
||||
|
||||
<div class="menu2">
|
||||
<ul>
|
||||
<li><a class="menu2four" href="overview/"><img src="images/16/lightbulb.png" border="0" align="absmiddle" /> Status</a>
|
||||
<li><a class="menu2four" href="overview/"><img src="images/16/lightbulb.png" border="0" align="absmiddle" /> Overview</a>
|
||||
<table><tr><td>
|
||||
<ul>
|
||||
<li><a href="overview/"><img src="images/16/zoom.png" border="0" align="absmiddle" /> Overview</a></li>
|
||||
<?php if (isset($config['enable_map']) && $config['enable_map']) {
|
||||
echo('<li><a href="map/"><img src="images/16/map.png" border="0" align="absmiddle" /> Network Map</a></li>');
|
||||
} ?>
|
||||
|
||||
@@ -9,6 +9,7 @@ $volts = mysql_result(mysql_query("select count(*) from voltage WHERE device_id
|
||||
$freqs = mysql_result(mysql_query("select count(*) from frequency WHERE device_id = '" . $device['device_id'] . "'"), 0);
|
||||
$current = mysql_result(mysql_query("select count(*) from current WHERE device_id = '" . $device['device_id'] . "'"), 0);
|
||||
|
||||
$datas[] = 'overview';
|
||||
if ($processor) { $datas[] = 'processors'; }
|
||||
if ($memory) { $datas[] = 'memory'; }
|
||||
if ($storage) { $datas[] = 'storage'; }
|
||||
@@ -18,6 +19,8 @@ if ($volts) { $datas[] = 'voltages'; }
|
||||
if ($freqs) { $datas[] = 'frequencies'; }
|
||||
if ($current) { $datas[] = 'current'; }
|
||||
|
||||
|
||||
$type_text['overview'] = "Overview";
|
||||
$type_text['temperatures'] = "Temperatures";
|
||||
$type_text['memory'] = "Memory Pools";
|
||||
$type_text['storage'] = "Disk Usage";
|
||||
@@ -29,15 +32,22 @@ $type_text['current'] = "Current";
|
||||
|
||||
print_optionbar_start();
|
||||
|
||||
if(!$_GET['opta']) { echo("<b>"); }
|
||||
echo("<a href='".$config['base_url']."/device/" . $device['device_id'] . "/health/'>Main</a>\n");
|
||||
if(!$_GET['opta']) { echo("</b>"); }
|
||||
|
||||
if(!$_GET['opta']) { $_GET['opta'] = "overview"; }
|
||||
|
||||
unset($sep);
|
||||
foreach ($datas as $type) {
|
||||
if ($_GET['opta'] == $type) { echo("<strong>"); }
|
||||
echo(" | <a href='".$config['base_url']."/device/" . $device['device_id'] . "/health/" . $type . "/'>" . $type_text[$type] ."</a>\n");
|
||||
|
||||
echo($sep);
|
||||
|
||||
if ($_GET['opta'] == $type) {
|
||||
echo("<strong>");
|
||||
echo('<img src="images/icons/'.$type.'.png" class="optionicon" />');
|
||||
} else {
|
||||
echo('<img src="images/icons/greyscale/'.$type.'.png" class="optionicon" />');
|
||||
}
|
||||
echo("<a href='".$config['base_url']."/device/".$device['device_id']."/health/" . $type . "/" . $_GET['optb']. "/'> " . $type_text[$type] ."</a>\n");
|
||||
if ($_GET['opta'] == $type) { echo("</strong>"); }
|
||||
$sep = " | ";
|
||||
}
|
||||
|
||||
print_optionbar_end();
|
||||
@@ -47,9 +57,11 @@ if (is_file("pages/device/health/".mres($_GET['opta']).".inc.php"))
|
||||
include("pages/device/health/".mres($_GET['opta']).".inc.php");
|
||||
} else {
|
||||
foreach ($datas as $type) {
|
||||
$graph_title = $type_text[$type];
|
||||
$graph_type = "device_".$type;
|
||||
include ("includes/print-device-graph.php");
|
||||
if($type != "overview") {
|
||||
$graph_title = $type_text[$type];
|
||||
$graph_type = "device_".$type;
|
||||
include ("includes/print-device-graph.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user