diff --git a/html/includes/graphs/device_hrstorage.inc.php b/html/includes/graphs/device_hrstorage.inc.php
deleted file mode 100644
index cca571825..000000000
--- a/html/includes/graphs/device_hrstorage.inc.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
diff --git a/html/includes/graphs/device_storage.inc.php b/html/includes/graphs/device_storage.inc.php
new file mode 100644
index 000000000..55a949d6d
--- /dev/null
+++ b/html/includes/graphs/device_storage.inc.php
@@ -0,0 +1,30 @@
+
diff --git a/html/includes/graphs/port_etherlike.inc.php b/html/includes/graphs/port_etherlike.inc.php
index 8288eeb8f..4c210af25 100644
--- a/html/includes/graphs/port_etherlike.inc.php
+++ b/html/includes/graphs/port_etherlike.inc.php
@@ -2,8 +2,7 @@
## Generate a list of ports and then call the multi_bits grapher to generate from the list
-$query = mysql_query("SELECT * FROM `ports` AS I, `devices` AS D WHERE I.interface_id = '".mres($_GET['port'])."'
- AND I.device_id = D.device_id");
+$query = mysql_query("SELECT * FROM `ports` AS I, `devices` AS D WHERE I.interface_id = '".mres($_GET['port'])."' AND I.device_id = D.device_id");
$port = mysql_fetch_array($query);
$oids = array('dot3StatsAlignmentErrors', 'dot3StatsFCSErrors', 'dot3StatsSingleCollisionFrames', 'dot3StatsMultipleCollisionFrames',
@@ -12,17 +11,19 @@ $oids = array('dot3StatsAlignmentErrors', 'dot3StatsFCSErrors', 'dot3StatsSingle
'dot3StatsSymbolErrors');
$i=0;
-if(is_file($config['rrd_dir'] . "/" . $port['hostname'] . "/" . safename("etherlike-" . $port['ifIndex'] . ".rrd"))) {
+$file = $config['rrd_dir'] . "/" . $port['hostname'] . "/" . safename("etherlike-" . $port['ifIndex'] . ".rrd");
+if(is_file($file)) {
foreach($oids as $oid){
$oid = str_replace("dot3Stats", "", $oid);
$oid_rra = truncate($oid, 19, '');
- $rrd_create .= " DS:$oid:COUNTER:600:U:100000000000";
- $rrd_list[$i]['filename'] = $config['rrd_dir'] . "/" . $port['hostname'] . "/" . safename("etherlike-" . $port['ifIndex'] . ".rrd");
+ $rrd_list[$i]['filename'] = $file;
$rrd_list[$i]['descr'] = $oid;
$rrd_list[$i]['rra'] = $oid_rra;
$i++;
}
-}
+} else {echo("file missing: $file"); }
+
+print_r($rrd_list);
$colours = "mixed";
$nototal = 1;
diff --git a/html/pages/device/graphs/os-unix.inc.php b/html/pages/device/graphs/os-unix.inc.php
index bcaeebac2..6636eacc0 100644
--- a/html/pages/device/graphs/os-unix.inc.php
+++ b/html/pages/device/graphs/os-unix.inc.php
@@ -2,7 +2,6 @@
include("cpu.inc.php");
include("memory.inc.php");
-include("hrstorage.inc.php");
include("temperatures.inc.php");
include("netstats.inc.php");
include("laload.inc.php");
diff --git a/html/pages/device/graphs/os-windows.inc.php b/html/pages/device/graphs/os-windows.inc.php
index bcaeebac2..6636eacc0 100644
--- a/html/pages/device/graphs/os-windows.inc.php
+++ b/html/pages/device/graphs/os-windows.inc.php
@@ -2,7 +2,6 @@
include("cpu.inc.php");
include("memory.inc.php");
-include("hrstorage.inc.php");
include("temperatures.inc.php");
include("netstats.inc.php");
include("laload.inc.php");
diff --git a/html/pages/device/graphs/hrstorage.inc.php b/html/pages/device/graphs/storage.inc.php
similarity index 83%
rename from html/pages/device/graphs/hrstorage.inc.php
rename to html/pages/device/graphs/storage.inc.php
index dc1586d3d..a7369a6cb 100644
--- a/html/pages/device/graphs/hrstorage.inc.php
+++ b/html/pages/device/graphs/storage.inc.php
@@ -2,7 +2,7 @@
if(mysql_result(mysql_query("SELECT count(storage_id) FROM storage WHERE device_id = '" . $device['device_id'] . "'"),0)) {
$graph_title = "Storage";
- $graph_type = "device_hrstorage";
+ $graph_type = "device_storage";
include ("includes/print-device-graph.php");
}
diff --git a/html/pages/device/health.inc.php b/html/pages/device/health.inc.php
index f49724602..d885e5244 100644
--- a/html/pages/device/health.inc.php
+++ b/html/pages/device/health.inc.php
@@ -1,20 +1,20 @@
"); }
+ if ($_GET['opta'] == $type) { echo(" | "); }
echo("" . $type_text[$type] ."\n");
if ($_GET['opta'] == $type) { echo(""); }
- $sep = ' | ';
}
-unset ($sep);
print_optionbar_end();
-if (is_file("pages/device/health/".mres($_GET['opta']).".inc.php")) { include("pages/device/health/".mres($_GET['opta']).".inc.php"); } else { echo("failed to open"); }
+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");
+ }
+}
?>
diff --git a/html/pages/device/health/temp.inc.php b/html/pages/device/health/temperatures.inc.php
similarity index 100%
rename from html/pages/device/health/temp.inc.php
rename to html/pages/device/health/temperatures.inc.php