mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Major changes to graphing system organisation. Prevent sensors from being discovered in ENTITY-SENSOR-MIB if they've already been detected in CISCO-ENTITY-SENSOR-MIB (they share entPhysicalIndex). Fix ADSL poller. Make popup overlibs prettier as default.
git-svn-id: http://www.observium.org/svn/observer/trunk@1470 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -43,6 +43,8 @@ RewriteRule ^device/([0-9]+) ?page=device&id=$1
|
||||
|
||||
RewriteRule ^([a-z|0-9\-]+)/$ ?page=$1
|
||||
|
||||
RewriteRule ^([a-z|0-9]+)/(.+)/(.+)/(.+)/(.+)/(.+)/$ ?page=$1&opta=$2&optb=$3&optc=$4&optd=$5&opte=$6
|
||||
RewriteRule ^([a-z|0-9]+)/(.+)/(.+)/(.+)/(.+)/$ ?page=$1&opta=$2&optb=$3&optc=$4&optd=$5
|
||||
RewriteRule ^([a-z|0-9]+)/(.+)/(.+)/(.+)/$ ?page=$1&opta=$2&optb=$3&optc=$4
|
||||
RewriteRule ^([a-z|0-9]+)/(.+)/(.+)/$ ?page=$1&opta=$2&optb=$3
|
||||
RewriteRule ^([a-z|0-9]+)/(.+)/$ ?page=$1&opta=$2
|
||||
|
@ -1,85 +1,5 @@
|
||||
<?php
|
||||
|
||||
if($_GET['debug']) {
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 0);
|
||||
ini_set('log_errors', 0);
|
||||
ini_set('allow_url_fopen', 0);
|
||||
ini_set('error_reporting', E_ALL);
|
||||
}
|
||||
|
||||
include("../includes/defaults.inc.php");
|
||||
include("../config.php");
|
||||
include("../includes/common.php");
|
||||
include("../includes/rewrites.php");
|
||||
include("includes/authenticate.inc.php");
|
||||
|
||||
if(!$config['allow_unauth_graphs']) {
|
||||
if(!$_SESSION['authenticated']) { echo("not authenticated"); exit; }
|
||||
}
|
||||
|
||||
if($_GET['device']) {
|
||||
$_GET['id'] = $_GET['device'];
|
||||
$device_id = $_GET['device'];
|
||||
} elseif($_GET['if']) {
|
||||
$_GET['id'] = $_GET['if'];
|
||||
} elseif($_GET['port']) {
|
||||
$_GET['id'] = $_GET['port'];
|
||||
} elseif($_GET['peer']) {
|
||||
$_GET['id'] = $_GET['peer'];
|
||||
}
|
||||
|
||||
$from = mres($_GET['from']);
|
||||
$to = mres($_GET['to']);
|
||||
$width = mres($_GET['width']);
|
||||
$height = mres($_GET['height']);
|
||||
$title = mres($_GET['title']);
|
||||
$vertical = mres($_GET['vertical']);
|
||||
$type = mres($_GET['type']);
|
||||
$legend = mres($_GET['legend']);
|
||||
$id = mres($_GET['id']);
|
||||
|
||||
$graphfile = $config['temp_dir'] . "/" . strgen() . ".png";
|
||||
|
||||
$os = gethostosbyid($device_id);
|
||||
if($config['os'][$os]['group']) {$os_group = $config['os'][$os]['group'];}
|
||||
|
||||
if(is_file($config['install_dir'] . "/html/includes/graphs/".$type."_".$os.".inc.php")) {
|
||||
/// Type + OS Specific
|
||||
include($config['install_dir'] . "/html/includes/graphs/".$type."_".$os.".inc.php");
|
||||
}elseif($os_group && is_file($config['install_dir'] . "/html/includes/graphs/".$type."_".$os_group.".inc.php")) {
|
||||
/// Type + OS Group Specific
|
||||
include($config['install_dir'] . "/html/includes/graphs/".$type."_".$os_group.".inc.php");
|
||||
} elseif(is_file($config['install_dir'] . "/html/includes/graphs/$type.inc.php")) {
|
||||
/// Type Specific
|
||||
include($config['install_dir'] . "/html/includes/graphs/$type.inc.php");
|
||||
}
|
||||
|
||||
if($rrd_options) {
|
||||
|
||||
if($config['rrdcached']) { $rrd_switches = " --daemon ".$config['rrdcached'] . " "; }
|
||||
$rrd_cmd = $config['rrdtool'] . " graph $graphfile $rrd_options" . $rrd_switches;
|
||||
$woo = shell_exec($rrd_cmd);
|
||||
if($_GET['debug']) { echo("<pre>".$rrd_cmd."</pre>"); }
|
||||
# $thing = popen($config['rrdtool'] . " -",'w');
|
||||
# fputs($thing, "graph $graphfile $rrd_options");
|
||||
# pclose($thing);
|
||||
if(is_file($graphfile)) {
|
||||
header('Content-type: image/png');
|
||||
$fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd);
|
||||
unlink($graphfile);
|
||||
} else {
|
||||
header('Content-type: image/png');
|
||||
$string = "Graph Generation Error";
|
||||
$im = imagecreate($width, $height);
|
||||
$orange = imagecolorallocate($im, 255, 255, 255);
|
||||
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
|
||||
imagestring($im, 3, $px, $height / 2 - 8, $string, imagecolorallocate($im, 128, 0, 0));
|
||||
imagepng($im);
|
||||
imagedestroy($im);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
include("includes/graphs/graph.inc.php");
|
||||
|
||||
?>
|
||||
|
@ -49,17 +49,20 @@ function generatedevicelink($device, $text=0, $start=0, $end=0)
|
||||
}
|
||||
|
||||
$url = $config['base_url']."/device/" . $device['device_id'] . "/";
|
||||
$contents = "<div class=list-large>".$device['hostname'] . " - $descr</div>";
|
||||
$contents = "<div class=list-large>".$device['hostname'];
|
||||
if($device['hardware']) { $contents .= " - ".$device['hardware']; }
|
||||
$contents .= "</div>";
|
||||
|
||||
|
||||
$contents .= "<div>";
|
||||
if($device['os']) { $contents .= $config['os'][$device['os']]['text']; }
|
||||
if($device['version']) { $contents .= " ".$device['version']; }
|
||||
if($device['features']) { $contents .= " (".$device['features'].")"; }
|
||||
if($device['hardware']) { $contents .= " - ".$device['hardware']; }
|
||||
# if($device['hardware']) { $contents .= " - ".$device['hardware']; }
|
||||
$contents .= "</div>";
|
||||
|
||||
|
||||
if (isset($device['location'])) { $contents .= "" . htmlentities($device['location'])."<br />"; }
|
||||
# if (isset($device['location'])) { $contents .= "" . htmlentities($device['location'])."<br />"; }
|
||||
foreach ($graphs as $entry)
|
||||
{
|
||||
$graph = $entry['graph'];
|
||||
@ -204,6 +207,8 @@ function generate_if_link($args, $text = NULL)
|
||||
$args = ifNameDescr($args);
|
||||
if(!$text) { $text = fixIfName($args['label']); }
|
||||
if(!$args['graph_type']) { $args['graph_type'] = 'port_bits'; }
|
||||
|
||||
|
||||
$class = ifclass($args['ifOperStatus'], $args['ifAdminStatus']);
|
||||
if(!isset($args['hostname'])) { $args = array_merge($args, device_by_id_cache($args['device_id'])); }
|
||||
|
||||
@ -238,7 +243,7 @@ function generate_if_link($args, $text = NULL)
|
||||
function generate_port_thumbnail($args)
|
||||
{
|
||||
if(!$args['bg']) { $args['bg'] = "FFFFF"; }
|
||||
$args['content'] = "<img src='graph.php?type=".$args['graph_type']."&id=".$args['interface_id']."&from=".$args['from']."&to=".$args['to']."&width=".$args['width']."&height=".$args['height']."&legend=no&bg=".$args['bg']."'>";
|
||||
$args['content'] = "<img src='graph.php?type=".$args['graph_type']."&subtype=".$args['graph_subtype']."&id=".$args['interface_id']."&from=".$args['from']."&to=".$args['to']."&width=".$args['width']."&height=".$args['height']."&legend=no&bg=".$args['bg']."'>";
|
||||
$output = generate_if_link($args, $args['content']);
|
||||
echo $output;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
$device = device_by_id_cache($id);
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/mem.rrd";
|
||||
|
33
html/includes/graphs/altiga_ssl_sessions.inc.php
Normal file
33
html/includes/graphs/altiga_ssl_sessions.inc.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
$device = device_by_id_cache($id);
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/altiga-ssl.rrd.rrd";
|
||||
|
||||
$rrd_options .= " DEF:TotalSessions=$rrd_filename:TotalSessions:AVERAGE";
|
||||
$rrd_options .= " DEF:ActiveSessions=$rrd_filename:ActiveSessions:AVERAGE";
|
||||
$rrd_options .= " DEF:MaxSessions=$rrd_filename:MaxSessions:AVERAGE";
|
||||
$rrd_options .= " CDEF:a=1min,100,/";
|
||||
$rrd_options .= " CDEF:b=5min,100,/";
|
||||
$rrd_options .= " CDEF:c=15min,100,/";
|
||||
$rrd_options .= " CDEF:cdefd=a,b,c,+,+";
|
||||
$rrd_options .= " COMMENT:Load\ Average\ \ Current\ \ \ \ Average\ \ \ \ Maximum\\\\n";
|
||||
$rrd_options .= " AREA:a#ffeeaa:1\ Min:";
|
||||
$rrd_options .= " LINE1:a#c5aa00:";
|
||||
$rrd_options .= " GPRINT:a:LAST:\ \ \ \ %7.2lf";
|
||||
$rrd_options .= " GPRINT:a:AVERAGE:\ \ %7.2lf";
|
||||
$rrd_options .= " GPRINT:a:MAX:\ \ %7.2lf\\\\n";
|
||||
$rrd_options .= " LINE1.25:b#ea8f00:5\ Min:";
|
||||
$rrd_options .= " GPRINT:b:LAST:\ \ \ \ %7.2lf";
|
||||
$rrd_options .= " GPRINT:b:AVERAGE:\ \ %7.2lf";
|
||||
$rrd_options .= " GPRINT:b:MAX:\ \ %7.2lf\\\\n";
|
||||
$rrd_options .= " LINE1.25:c#cc0000:15\ Min";
|
||||
$rrd_options .= " GPRINT:c:LAST:\ \ \ %7.2lf";
|
||||
$rrd_options .= " GPRINT:c:AVERAGE:\ \ %7.2lf";
|
||||
$rrd_options .= " GPRINT:c:MAX:\ \ %7.2lf\\\\n";
|
||||
|
||||
|
||||
?>
|
0
html/includes/graphs/atmvp/bits.inc.php
Normal file
0
html/includes/graphs/atmvp/bits.inc.php
Normal file
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
if($_GET['id']) { $atm_vp_id = $_GET['id']; }
|
||||
|
||||
$sql = "SELECT * FROM `juniAtmVp` as J, `ports` AS I, `devices` AS D";
|
||||
$sql .= " WHERE J.juniAtmVp_id = '".$atm_vp_id."' AND I.interface_id = J.interface_id AND I.device_id = D.device_id";
|
||||
|
||||
$query = mysql_query($sql);
|
||||
$vp = mysql_fetch_array($query);
|
||||
|
||||
|
||||
$rrd_test = $config['rrd_dir'] . "/" . $vp['hostname'] . "/" . safename("vp-" . $vp['ifIndex'] . "-".$vp['vp_id'].".rrd");
|
||||
if(is_file($rrd_test)) {
|
||||
$rrd_filename = $rrd_test;
|
||||
}
|
||||
|
||||
$rra_in = "inpacketoctets";
|
||||
$rra_out = "outpacketoctets";
|
||||
|
||||
include("generic_bits.inc.php");
|
||||
|
||||
?>
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
include("common.inc.php");
|
||||
|
||||
$rrd_options .= " -u 100 -l 0 -E -b 1024 ";
|
||||
|
||||
$iter = "1";
|
||||
$sql = mysql_query("SELECT * FROM `cempMemPool` AS C, `devices` AS D where C.`cempMemPool_id` = '".mres($_GET['id'])."' AND C.device_id = D.device_id");
|
||||
$rrd_options .= " COMMENT:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Cur\ \ \ \ Max\\\\n";
|
||||
while($mempool = mysql_fetch_array($sql)) {
|
||||
$entPhysicalName = mysql_result(mysql_query("SELECT entPhysicalName from entPhysical WHERE device_id = '".$mempool['device_id']."'
|
||||
AND entPhysicalIndex = '".$mempool['entPhysicalIndex']."'"),0);
|
||||
if($iter=="1") {$colour="CC0000";} elseif($iter=="2") {$colour="008C00";} elseif($iter=="3") {$colour="4096EE";
|
||||
} elseif($iter=="4") {$colour="73880A";} elseif($iter=="5") {$colour="D01F3C";} elseif($iter=="6") {$colour="36393D";
|
||||
} elseif($iter=="7") {$colour="FF0084"; unset($iter); }
|
||||
$mempool['descr_fixed'] = $entPhysicalName . " " . $mempool['cempMemPoolName'];
|
||||
$mempool['descr_fixed'] = str_replace("Routing Processor", "RP", $mempool['descr_fixed']);
|
||||
$mempool['descr_fixed'] = str_replace("Switching Processor", "SP", $mempool['descr_fixed']);
|
||||
$mempool['descr_fixed'] = str_replace("Processor", "Proc", $mempool['descr_fixed']);
|
||||
$mempool['descr_fixed'] = str_pad($mempool['descr_fixed'], 28);
|
||||
$mempool['descr_fixed'] = substr($mempool['descr_fixed'],0,28);
|
||||
$oid = $mempool['entPhysicalIndex'] . "." . $mempool['Index'];
|
||||
$rrd = $config['rrd_dir'] . "/".$mempool['hostname']."/" . safename("cempMemPool-$oid.rrd");
|
||||
$id = $mempool['entPhysicalIndex'] . "-" . $mempool['Index'];
|
||||
$rrd_options .= " DEF:mempool" . $id . "free=$rrd:free:AVERAGE ";
|
||||
$rrd_options .= " DEF:mempool" . $id . "used=$rrd:used:AVERAGE ";
|
||||
$rrd_options .= " CDEF:mempool" . $id . "total=mempool" . $id . "used,mempool" . $id . "used,mempool" . $id . "free,+,/,100,* ";
|
||||
$rrd_options .= " LINE1:mempool" . $id . "total#" . $colour . ":'" . $mempool['descr_fixed'] . "' ";
|
||||
$rrd_options .= " GPRINT:mempool" . $id . "total:LAST:%3.0lf";
|
||||
$rrd_options .= " GPRINT:mempool" . $id . "total:MAX:%3.0lf\\\l ";
|
||||
$iter++;
|
||||
}
|
||||
|
||||
|
||||
?>
|
@ -11,7 +11,7 @@ case 'amperes':
|
||||
break;
|
||||
}
|
||||
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $sensor['hostname'] . "/" . safename("ces-" . $sensor['entPhysicalIndex'] . ".rrd");
|
||||
|
||||
|
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
include("common.inc.php");
|
||||
|
||||
$rrd_options .= " -u 100 -l 0 -E -b 1024 ";
|
||||
|
||||
$iter = "1";
|
||||
$sql = mysql_query("SELECT * FROM `cmpMemPool` AS C, `devices` AS D where C.`cmp_id` = '".mres($_GET['id'])."' AND C.device_id = D.device_id");
|
||||
$rrd_options .= " COMMENT:' Cur Max\\n'";
|
||||
while($mempool = mysql_fetch_array($sql)) {
|
||||
if($iter=="1") {$colour="CC0000";} elseif($iter=="2") {$colour="008C00";} elseif($iter=="3") {$colour="4096EE";
|
||||
} elseif($iter=="4") {$colour="73880A";} elseif($iter=="5") {$colour="D01F3C";} elseif($iter=="6") {$colour="36393D";
|
||||
} elseif($iter=="7") {$colour="FF0084"; unset($iter); }
|
||||
$mempool['descr_fixed'] = $mempool['cmpName'];
|
||||
$mempool['descr_fixed'] = str_pad($mempool['descr_fixed'], 28);
|
||||
$mempool['descr_fixed'] = substr($mempool['descr_fixed'],0,28);
|
||||
$oid = $mempool['Index'];
|
||||
$rrd = $config['rrd_dir'] . "/".$mempool['hostname']."/" . safename("cmp-$oid.rrd");
|
||||
$rrd_options .= " DEF:mempool" . $oid . "free=$rrd:free:AVERAGE ";
|
||||
$rrd_options .= " DEF:mempool" . $oid . "used=$rrd:used:AVERAGE ";
|
||||
$rrd_options .= " CDEF:mempool" . $oid . "total=mempool" . $oid . "used,mempool" . $oid . "used,mempool" . $oid . "free,+,/,100,* ";
|
||||
$rrd_options .= " LINE1:mempool" . $oid . "total#" . $colour . ":'" . $mempool['descr_fixed'] . "' ";
|
||||
$rrd_options .= " GPRINT:mempool" . $oid . "total:LAST:%3.0lf";
|
||||
$rrd_options .= " GPRINT:mempool" . $oid . "total:MAX:%3.0lf\\\l ";
|
||||
$iter++;
|
||||
}
|
||||
|
||||
|
||||
?>
|
@ -17,6 +17,6 @@ $colour_line_out = "000099";
|
||||
$colour_area_in = "CDEB8B";
|
||||
$colour_area_out = "C3D9FF";
|
||||
|
||||
include ("generic_multi_bits.inc.php");
|
||||
include ("includes/graphs/generic_multi_bits.inc.php");
|
||||
|
||||
?>
|
@ -36,6 +36,6 @@ $colour_line_out = "000099";
|
||||
$colour_area_in = "CDEB8B";
|
||||
$colour_area_out = "C3D9FF";
|
||||
|
||||
include ("generic_multi_bits.inc.php");
|
||||
include ("includes/graphs/generic_multi_bits.inc.php");
|
||||
|
||||
?>
|
@ -32,7 +32,7 @@ $scale_max = "100";
|
||||
$nototal = 1;
|
||||
|
||||
if ($rrd_list) {
|
||||
include ("generic_multi_line.inc.php");
|
||||
include ("includes/graphs/generic_multi_line.inc.php");
|
||||
}
|
||||
|
||||
?>
|
@ -13,7 +13,8 @@ $scale_max = "100";
|
||||
|
||||
$nototal = 1;
|
||||
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$database = $config['rrd_dir'] . "/" . $device['hostname'] . "/powerconnect-cpu.rrd";
|
||||
|
||||
$rrd_options .= " DEF:load=$database:LOAD:AVERAGE";
|
@ -13,7 +13,8 @@ $scale_max = "100";
|
||||
|
||||
$nototal = 1;
|
||||
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$database = $config['rrd_dir'] . "/" . $device['hostname'] . "/procurve-cpu.rrd";
|
||||
|
||||
$rrd_options .= " DEF:load=$database:LOAD:AVERAGE";
|
@ -34,10 +34,10 @@ $nototal = 1;
|
||||
|
||||
if ($rrd_list) {
|
||||
|
||||
include ("generic_multi_line.inc.php");
|
||||
include ("includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
} else {
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . "ucd_cpu.rrd";
|
||||
$rrd_options .= " DEF:user=$rrd_filename:user:AVERAGE";
|
||||
$rrd_options .= " DEF:nice=$rrd_filename:nice:AVERAGE";
|
5
html/includes/graphs/device/diskio.inc.php
Normal file
5
html/includes/graphs/device/diskio.inc.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
include("diskio_ops.inc.php");
|
||||
|
||||
?>
|
@ -30,6 +30,6 @@ $nototal = 1;
|
||||
$rra_in = "read";
|
||||
$rra_out = "written";
|
||||
|
||||
include ("generic_multi_bits_separated.inc.php");
|
||||
include ("includes/graphs/generic_multi_bits_separated.inc.php");
|
||||
|
||||
?>
|
@ -30,6 +30,6 @@ $colours_out = 'blues';
|
||||
$nototal = 1;
|
||||
|
||||
|
||||
include ("generic_multi_seperated.inc.php");
|
||||
include ("includes/graphs/generic_multi_seperated.inc.php");
|
||||
|
||||
?>
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
include('common.inc.php');
|
||||
include('includes/graphs/common.inc.php');
|
||||
|
||||
$device = device_by_id_cache($id);
|
||||
|
@ -31,7 +31,7 @@ $scale_max = "100";
|
||||
$nototal = 1;
|
||||
|
||||
if ($rrd_list) {
|
||||
include ("generic_multi_line.inc.php");
|
||||
include ("includes/graphs/generic_multi_line.inc.php");
|
||||
}
|
||||
|
||||
?>
|
@ -1,5 +0,0 @@
|
||||
<?php
|
||||
|
||||
include("device_diskio_ops.inc.php");
|
||||
|
||||
?>
|
@ -3,7 +3,7 @@
|
||||
/// Draw generic bits graph
|
||||
/// args: rra_in, rra_out, rrd_filename, bg, legend, from, to, width, height, inverse
|
||||
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
if($inverse) { $in = 'out'; $out = 'in'; } else { $in = 'in'; $out = 'out'; }
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
/// Draw generic bits graph
|
||||
/// args: rra_in, rra_out, rrd_filename, bg, legend, from, to, width, height, inverse, $percentile
|
||||
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$unit_text = str_pad(truncate($unit_text,10),10);
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
/// Draws aggregate bits graph from multiple RRDs
|
||||
/// Variables : colour_[line|area]_[in|out], rrd_filenames
|
||||
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$i=0;
|
||||
foreach($rrd_filenames as $rrd_filename) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$i = 0;
|
||||
$rrd_options .= " COMMENT:' In\: Current Maximum '";
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$unit_text = str_pad($unit_text, 13);
|
||||
$unit_text = substr($unit_text,0,13);
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$units_descr = substr(str_pad($units_descr, 18),0,18);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$unit_text = str_pad(truncate($unit_text,10),10);
|
||||
$rrd_options .= " COMMENT:'$unit_text Cur Max'";
|
||||
|
@ -3,7 +3,7 @@
|
||||
/// Draw generic bits graph
|
||||
/// args: rra_in, rra_out, rrd_filename, bg, legend, from, to, width, height, inverse, percentile
|
||||
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$unit_text = str_pad(truncate($unit_text,10),10);
|
||||
|
||||
|
96
html/includes/graphs/graph.inc.php
Normal file
96
html/includes/graphs/graph.inc.php
Normal file
@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
if($_GET['debug']) {
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 0);
|
||||
ini_set('log_errors', 0);
|
||||
ini_set('allow_url_fopen', 0);
|
||||
ini_set('error_reporting', E_ALL);
|
||||
}
|
||||
|
||||
include("../includes/defaults.inc.php");
|
||||
include("../config.php");
|
||||
include("../includes/common.php");
|
||||
include("../includes/rewrites.php");
|
||||
include("includes/authenticate.inc.php");
|
||||
|
||||
if(!$config['allow_unauth_graphs']) {
|
||||
if(!$_SESSION['authenticated']) { echo("not authenticated"); exit; }
|
||||
}
|
||||
|
||||
if($_GET['device']) {
|
||||
$_GET['id'] = $_GET['device'];
|
||||
$device_id = $_GET['device'];
|
||||
} elseif($_GET['if']) {
|
||||
$_GET['id'] = $_GET['if'];
|
||||
} elseif($_GET['port']) {
|
||||
$_GET['id'] = $_GET['port'];
|
||||
} elseif($_GET['peer']) {
|
||||
$_GET['id'] = $_GET['peer'];
|
||||
}
|
||||
|
||||
preg_match('/^(?P<type>[A-Za-z0-9]+)_(?P<subtype>.+)/', mres($_GET['type']), $graphtype);
|
||||
|
||||
$type = $graphtype['type'];
|
||||
$subtype = $graphtype['subtype'];
|
||||
|
||||
if($debug) {print_r($graphtype);}
|
||||
|
||||
$from = mres($_GET['from']);
|
||||
$to = mres($_GET['to']);
|
||||
$width = mres($_GET['width']);
|
||||
$height = mres($_GET['height']);
|
||||
$title = mres($_GET['title']);
|
||||
$vertical = mres($_GET['vertical']);
|
||||
$legend = mres($_GET['legend']);
|
||||
$id = mres($_GET['id']);
|
||||
|
||||
$graphfile = $config['temp_dir'] . "/" . strgen() . ".png";
|
||||
|
||||
$os = gethostosbyid($device_id);
|
||||
if($config['os'][$os]['group']) {$os_group = $config['os'][$os]['group'];}
|
||||
|
||||
# if(is_file($config['install_dir'] . "/html/includes/graphs/".$type."_".$os.".inc.php")) {
|
||||
# /// Type + OS Specific
|
||||
# include($config['install_dir'] . "/html/includes/graphs/".$type."_".$os.".inc.php");
|
||||
# }elseif($os_group && is_file($config['install_dir'] . "/html/includes/graphs/".$type."_".$os_group.".inc.php")) {
|
||||
# /// Type + OS Group Specific
|
||||
# include($config['install_dir'] . "/html/includes/graphs/".$type."_".$os_group.".inc.php");
|
||||
# } elseif(is_file($config['install_dir'] . "/html/includes/graphs/$type.inc.php")) {
|
||||
# /// Type Specific
|
||||
# include($config['install_dir'] . "/html/includes/graphs/$type.inc.php");
|
||||
# }
|
||||
|
||||
if(is_file($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.php")) {
|
||||
include($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.php");
|
||||
}
|
||||
|
||||
|
||||
if($rrd_options) {
|
||||
|
||||
if($config['rrdcached']) { $rrd_switches = " --daemon ".$config['rrdcached'] . " "; }
|
||||
$rrd_cmd = $config['rrdtool'] . " graph $graphfile $rrd_options" . $rrd_switches;
|
||||
$woo = shell_exec($rrd_cmd);
|
||||
if($_GET['debug']) { echo("<pre>".$rrd_cmd."</pre>"); }
|
||||
# $thing = popen($config['rrdtool'] . " -",'w');
|
||||
# fputs($thing, "graph $graphfile $rrd_options");
|
||||
# pclose($thing);
|
||||
if(is_file($graphfile)) {
|
||||
header('Content-type: image/png');
|
||||
$fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd);
|
||||
unlink($graphfile);
|
||||
} else {
|
||||
header('Content-type: image/png');
|
||||
$string = "Graph Generation Error";
|
||||
$im = imagecreate($width, $height);
|
||||
$orange = imagecolorallocate($im, 255, 255, 255);
|
||||
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
|
||||
imagestring($im, 3, $px, $height / 2 - 8, $string, imagecolorallocate($im, 128, 0, 0));
|
||||
imagepng($im);
|
||||
imagedestroy($im);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
@ -2,7 +2,7 @@
|
||||
|
||||
function graph_multi_bits ($args) {
|
||||
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
$i = 1;
|
||||
$options .= " COMMENT:' In\: Current Maximum '";
|
||||
if(!$args['nototal']) {$options .= " COMMENT:'Total '";}
|
||||
|
@ -33,7 +33,7 @@ $scale_min = "0";
|
||||
$nototal = 1;
|
||||
|
||||
if ($rrd_list) {
|
||||
include ("generic_multi_line.inc.php");
|
||||
include ("includes/graphs/generic_multi_line.inc.php");
|
||||
}
|
||||
|
||||
?>
|
@ -32,7 +32,7 @@ $scale_min = "0";
|
||||
$nototal = 1;
|
||||
|
||||
if ($rrd_list) {
|
||||
include ("generic_multi_line.inc.php");
|
||||
include ("includes/graphs/generic_multi_line.inc.php");
|
||||
}
|
||||
|
||||
?>
|
@ -32,7 +32,7 @@ $scale_min = "0";
|
||||
$nototal = 1;
|
||||
|
||||
if ($rrd_list) {
|
||||
include ("generic_multi_line.inc.php");
|
||||
include ("includes/graphs/generic_multi_line.inc.php");
|
||||
}
|
||||
|
||||
?>
|
@ -32,7 +32,7 @@ $scale_min = "0";
|
||||
$nototal = 1;
|
||||
|
||||
if ($rrd_list) {
|
||||
include ("generic_multi_line.inc.php");
|
||||
include ("includes/graphs/generic_multi_line.inc.php");
|
||||
}
|
||||
|
||||
?>
|
@ -33,7 +33,7 @@ $scale_min = "0";
|
||||
$nototal = 1;
|
||||
|
||||
if ($rrd_list) {
|
||||
include ("generic_multi_line.inc.php");
|
||||
include ("includes/graphs/generic_multi_line.inc.php");
|
||||
}
|
||||
|
||||
?>
|
@ -29,7 +29,7 @@ $colours = "mixed";
|
||||
$nototal = 1;
|
||||
$unit_text = "Errors";
|
||||
|
||||
include ("generic_multi_simplex_seperated.inc.php");
|
||||
include ("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
|
||||
|
||||
|
@ -38,7 +38,7 @@ if(is_file($config['rrd_dir'] . "/" . $port['hostname'] . "/ifx-" . safename($po
|
||||
|
||||
$nototal = 1;
|
||||
|
||||
include ("generic_multi_seperated.inc.php");
|
||||
include ("includes/graphs/generic_multi_seperated.inc.php");
|
||||
|
||||
}
|
||||
elseif(is_file($config['rrd_dir'] . "/" . $port['hostname'] . "/" . safename($port['ifIndex'] . ".rrd")))
|
||||
@ -60,7 +60,7 @@ elseif(is_file($config['rrd_dir'] . "/" . $port['hostname'] . "/" . safename($po
|
||||
|
||||
$graph_max = 1;
|
||||
|
||||
include("generic_duplex.inc.php");
|
||||
include("includes/graphs/generic_duplex.inc.php");
|
||||
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ $nototal = 1;
|
||||
$rra_in = "INOCTETS";
|
||||
$rra_out = "OUTOCTETS";
|
||||
|
||||
include ("generic_multi_bits_separated.inc.php");
|
||||
include ("includes/graphs/generic_multi_bits_separated.inc.php");
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
$scale_min = "0";
|
||||
$scale_max = "1";
|
||||
|
||||
include("common.inc.php");
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$iter = "1";
|
||||
|
||||
|
@ -27,12 +27,17 @@
|
||||
$yearly_url = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=".$config['year']."&to=".$config['now']."&width=400&height=150";
|
||||
$yearly_url .= $args;
|
||||
|
||||
echo("<a onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
|
||||
<img src='$daily_traffic' border=0></a> ");
|
||||
$graph_args = $device['device_id'] . "/" . $graph_type . "/";
|
||||
|
||||
echo("<a href='".$config['base_url']."/graphs/" . $graph_args . "' onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT".$config['overlib_defaults'].");\"
|
||||
onmouseout=\"return nd();\"> <img src='$daily_traffic' border=0></a> ");
|
||||
|
||||
echo("<a onmouseover=\"return overlib('<img src=\'$weekly_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
|
||||
<img src='$weekly_traffic' border=0></a> ");
|
||||
|
||||
echo("<a onmouseover=\"return overlib('<img src=\'$monthly_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
|
||||
<img src='$monthly_traffic' border=0></a> ");
|
||||
|
||||
echo("<a onmouseover=\"return overlib('<img src=\'$yearly_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
|
||||
<img src='$yearly_traffic' border=0></a>");
|
||||
|
||||
|
@ -19,7 +19,7 @@ while($current = mysql_fetch_array($query)) {
|
||||
</tr>\n");
|
||||
echo("<tr bgcolor=$row_colour><td colspan='4'>");
|
||||
|
||||
$graph_type = "current";
|
||||
$graph_type = "sensor_current";
|
||||
|
||||
// start current graphs
|
||||
|
||||
|
@ -29,7 +29,7 @@ while($drive = mysql_fetch_array($query)) {
|
||||
$fs_url = "/device/".$device['device_id']."/health/diskio/";
|
||||
|
||||
$fs_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$drive['diskio_descr'];
|
||||
$fs_popup .= "</div><img src=\'graph.php?id=" . $drive['diskio_id'] . "&type=ucd_diskio&from=$month&to=$now&width=400&height=125\'>";
|
||||
$fs_popup .= "</div><img src=\'graph.php?id=" . $drive['diskio_id'] . "&type=diskio_ops&from=$month&to=$now&width=400&height=125\'>";
|
||||
$fs_popup .= "', RIGHT, FGCOLOR, '#e5e5e5');\" onmouseout=\"return nd();\"";
|
||||
|
||||
if($perc > '90') { $left_background='c4323f'; $right_background='C96A73';
|
||||
|
@ -19,7 +19,7 @@ while($fan = mysql_fetch_array($query)) {
|
||||
</tr>\n");
|
||||
echo("<tr bgcolor=$row_colour><td colspan='4'>");
|
||||
|
||||
$graph_type = "fanspeed";
|
||||
$graph_type = "sensor_fanspeed";
|
||||
|
||||
// start fanspeed graphs
|
||||
|
||||
|
@ -19,7 +19,7 @@ while($freq = mysql_fetch_array($query)) {
|
||||
</tr>\n");
|
||||
echo("<tr bgcolor=$row_colour><td colspan='4'>");
|
||||
|
||||
$graph_type = "frequency";
|
||||
$graph_type = "sensor_frequency";
|
||||
|
||||
// start frequency graphs
|
||||
|
||||
|
@ -19,7 +19,7 @@ while($humidity = mysql_fetch_array($query)) {
|
||||
</tr>\n");
|
||||
echo("<tr bgcolor=$row_colour><td colspan='4'>");
|
||||
|
||||
$graph_type = "humidity";
|
||||
$graph_type = "sensor_humidity";
|
||||
|
||||
// start humidity graphs
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
$graph_type = "mempool_usage";
|
||||
|
||||
echo("<div style='margin-top: 5px; padding: 0px;'>");
|
||||
echo("<table width=100% cellpadding=6 cellspacing=0>");
|
||||
$i = '1';
|
||||
@ -12,10 +14,10 @@
|
||||
$text_descr = rewrite_entity_descr($mempool['mempool_descr']);
|
||||
|
||||
$mempool_url = "/device/".$device['device_id']."/health/memory/";
|
||||
$mini_url = $config['base_url'] . "/graph.php?id=".$mempool['mempool_id']."&type=mempool&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f4";
|
||||
$mini_url = $config['base_url'] . "/graph.php?id=".$mempool['mempool_id']."&type=".$graph_type."&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f4";
|
||||
|
||||
$mempool_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$text_descr;
|
||||
$mempool_popup .= "</div><img src=\'graph.php?id=" . $mempool['mempool_id'] . "&type=mempool&from=$month&to=$now&width=400&height=125\'>";
|
||||
$mempool_popup .= "</div><img src=\'graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$month&to=$now&width=400&height=125\'>";
|
||||
$mempool_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
|
||||
|
||||
$total = formatStorage($mempool['mempool_total']);
|
||||
@ -41,17 +43,17 @@
|
||||
|
||||
echo("<tr bgcolor='$row_colour'><td colspan=5>");
|
||||
|
||||
$daily_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=mempool&from=$day&to=$now&width=211&height=100";
|
||||
$daily_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=mempool&from=$day&to=$now&width=400&height=150";
|
||||
$daily_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$day&to=$now&width=211&height=100";
|
||||
$daily_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$day&to=$now&width=400&height=150";
|
||||
|
||||
$weekly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=mempool&from=$week&to=$now&width=211&height=100";
|
||||
$weekly_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=mempool&from=$week&to=$now&width=400&height=150";
|
||||
$weekly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$week&to=$now&width=211&height=100";
|
||||
$weekly_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$week&to=$now&width=400&height=150";
|
||||
|
||||
$monthly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=mempool&from=$month&to=$now&width=211&height=100";
|
||||
$monthly_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=mempool&from=$month&to=$now&width=400&height=150";
|
||||
$monthly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$month&to=$now&width=211&height=100";
|
||||
$monthly_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$month&to=$now&width=400&height=150";
|
||||
|
||||
$yearly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=mempool&from=$year&to=$now&width=211&height=100";
|
||||
$yearly_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=mempool&from=$year&to=$now&width=400&height=150";
|
||||
$yearly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$year&to=$now&width=211&height=100";
|
||||
$yearly_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$year&to=$now&width=400&height=150";
|
||||
|
||||
echo("<a onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT);\" onmouseout=\"return nd();\">
|
||||
<img src='$daily_graph' border=0></a> ");
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
$graph_type = "processor_usage";
|
||||
|
||||
echo("<div style='margin-top: 5px; padding: 0px;'>");
|
||||
echo("<table width=100% cellpadding=6 cellspacing=0>");
|
||||
$i = '1';
|
||||
@ -8,14 +10,14 @@
|
||||
|
||||
$proc_url = $config['base_url']."/device/".$device['device_id']."/health/processors/";
|
||||
|
||||
$mini_url = $config['base_url'] . "/graph.php?id=".$proc['processor_id']."&type=processor&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f4";
|
||||
$mini_url = $config['base_url'] . "/graph.php?id=".$proc['processor_id']."&type=".$graph_type."&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f4";
|
||||
|
||||
$text_descr = $proc['processor_descr'];
|
||||
|
||||
$text_descr = rewrite_entity_descr($text_descr);
|
||||
|
||||
$proc_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$text_descr;
|
||||
$proc_popup .= "</div><img src=\'graph.php?id=" . $proc['processor_id'] . "&type=processor&from=$month&to=$now&width=400&height=125\'>";
|
||||
$proc_popup .= "</div><img src=\'graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$month&to=$now&width=400&height=125\'>";
|
||||
$proc_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"";
|
||||
|
||||
$perc = round($proc['processor_usage']);
|
||||
@ -36,17 +38,17 @@
|
||||
|
||||
echo("<tr bgcolor='$row_colour'><td colspan=5>");
|
||||
|
||||
$daily_graph = "graph.php?id=" . $proc['processor_id'] . "&type=processor&from=$day&to=$now&width=211&height=100";
|
||||
$daily_url = "graph.php?id=" . $proc['processor_id'] . "&type=processor&from=$day&to=$now&width=400&height=150";
|
||||
$daily_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=211&height=100";
|
||||
$daily_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=400&height=150";
|
||||
|
||||
$weekly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=processor&from=$week&to=$now&width=211&height=100";
|
||||
$weekly_url = "graph.php?id=" . $proc['processor_id'] . "&type=processor&from=$week&to=$now&width=400&height=150";
|
||||
$weekly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$week&to=$now&width=211&height=100";
|
||||
$weekly_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$week&to=$now&width=400&height=150";
|
||||
|
||||
$monthly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=processor&from=$month&to=$now&width=211&height=100";
|
||||
$monthly_url = "graph.php?id=" . $proc['processor_id'] . "&type=processor&from=$month&to=$now&width=400&height=150";
|
||||
$monthly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$month&to=$now&width=211&height=100";
|
||||
$monthly_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$month&to=$now&width=400&height=150";
|
||||
|
||||
$yearly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=processor&from=$year&to=$now&width=211&height=100";
|
||||
$yearly_url = "graph.php?id=" . $proc['processor_id'] . "&type=processor&from=$year&to=$now&width=400&height=150";
|
||||
$yearly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$year&to=$now&width=211&height=100";
|
||||
$yearly_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$year&to=$now&width=400&height=150";
|
||||
|
||||
echo("<a onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT);\" onmouseout=\"return nd();\">
|
||||
<img src='$daily_graph' border=0></a> ");
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
$graph_type = "storage_usage";
|
||||
|
||||
$sql = "SELECT * FROM `storage` WHERE device_id = '" . ($_GET['id']) . "' ORDER BY storage_descr";
|
||||
$query = mysql_query($sql);
|
||||
|
||||
@ -29,7 +31,7 @@ while($drive = mysql_fetch_array($query)) {
|
||||
$fs_url = "?page=device&id=".$device['device_id']."§ion=dev-storage";
|
||||
|
||||
$fs_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$drive['storage_descr'];
|
||||
$fs_popup .= "</div><img src=\'graph.php?id=" . $drive['storage_id'] . "&type=storage&from=$month&to=$now&width=400&height=125\'>";
|
||||
$fs_popup .= "</div><img src=\'graph.php?id=" . $drive['storage_id'] . "&type=".$graph_type."&from=$month&to=$now&width=400&height=125\'>";
|
||||
$fs_popup .= "', RIGHT, FGCOLOR, '#e5e5e5');\" onmouseout=\"return nd();\"";
|
||||
|
||||
if($perc > '90') { $left_background='c4323f'; $right_background='C96A73';
|
||||
@ -43,8 +45,6 @@ while($drive = mysql_fetch_array($query)) {
|
||||
</td><td>" . $free . "</td><td></td></tr>");
|
||||
|
||||
|
||||
$graph_type = "storage";
|
||||
|
||||
// start temperature graphs
|
||||
|
||||
$daily_temp = "graph.php?id=" . $drive['storage_id'] . "&type=$graph_type&from=$day&to=$now&width=212&height=100";
|
||||
|
@ -19,7 +19,7 @@ while($temp = mysql_fetch_array($query)) {
|
||||
</tr>\n");
|
||||
echo("<tr bgcolor=$row_colour><td colspan='4'>");
|
||||
|
||||
$graph_type = "temperature";
|
||||
$graph_type = "sensor_temperature";
|
||||
|
||||
// start temperature graphs
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user