initial commit; version 22.5.12042
This commit is contained in:
30
html/includes/graphs/sensor/airflow.inc.php
Normal file
30
html/includes/graphs/sensor/airflow.inc.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " COMMENT:' Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],20)."'";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%3.0lfCFM";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%3.0lfCFM\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Air flow sensor measured in CFM.';
|
||||
|
||||
// EOF
|
38
html/includes/graphs/sensor/apower.inc.php
Normal file
38
html/includes/graphs/sensor/apower.inc.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " -A ";
|
||||
$rrd_options .= " COMMENT:' Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " DEF:sensor_max=$rrd_filename_escape:sensor:MAX";
|
||||
$rrd_options .= " DEF:sensor_min=$rrd_filename_escape:sensor:MIN";
|
||||
|
||||
$rrd_options .= " AREA:sensor_max#c5c5c5";
|
||||
$rrd_options .= " AREA:sensor_min#ffffffff";
|
||||
|
||||
#$rrd_options .= " AREA:sensor#FFFF99";
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],22)."'";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%6.2lfW";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%6.2lfW\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Apparent power sensor measured in voltampere.';
|
||||
|
||||
// EOF
|
32
html/includes/graphs/sensor/auth.inc.php
Normal file
32
html/includes/graphs/sensor/auth.inc.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
if (is_numeric($vars['id']))
|
||||
{
|
||||
//$sensor = dbFetchRow("SELECT * FROM `sensors` WHERE `sensor_id` = ?", array($vars['id']));
|
||||
$sensor = get_entity_by_id_cache('sensor', $vars['id']);
|
||||
|
||||
if (is_numeric($sensor['device_id']) && ($auth || is_entity_permitted($sensor['sensor_id'], 'sensor') || device_permitted($sensor['device_id'])))
|
||||
{
|
||||
|
||||
$device = device_by_id_cache($sensor['device_id']);
|
||||
|
||||
$rrd_filename = get_rrd_path($device, get_sensor_rrd($device, $sensor));
|
||||
|
||||
$title = generate_device_link($device);
|
||||
$title .= " :: Sensors :: ";
|
||||
$auth = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
32
html/includes/graphs/sensor/concentration.inc.php
Normal file
32
html/includes/graphs/sensor/concentration.inc.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$ds = "sensor";
|
||||
|
||||
$line_text = rrdtool_escape($sensor['sensor_descr'], 22);
|
||||
|
||||
$colour_line = "cc3300";
|
||||
$colour_area = "FFBBBB";
|
||||
$colour_minmax = "c5c5c5";
|
||||
|
||||
$graph_max = 1;
|
||||
$unit_text = "ppm";
|
||||
$print_min = 1;
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
//if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
//if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Concentration in ppm.';
|
||||
|
||||
// EOF
|
38
html/includes/graphs/sensor/crestfactor.inc.php
Normal file
38
html/includes/graphs/sensor/crestfactor.inc.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " -A ";
|
||||
$rrd_options .= " COMMENT:' Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " DEF:sensor_max=$rrd_filename_escape:sensor:MAX";
|
||||
$rrd_options .= " DEF:sensor_min=$rrd_filename_escape:sensor:MIN";
|
||||
|
||||
$rrd_options .= " AREA:sensor_max#c5c5c5";
|
||||
$rrd_options .= " AREA:sensor_min#ffffffff";
|
||||
|
||||
#$rrd_options .= " AREA:sensor#FFFF99";
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],22)."'";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%6.2lf";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%6.2lf\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Crest Factor';
|
||||
|
||||
// EOF
|
41
html/includes/graphs/sensor/current.inc.php
Normal file
41
html/includes/graphs/sensor/current.inc.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " COMMENT:' Min Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],20)."'";
|
||||
$rrd_options .= " GPRINT:sensor$current_id:MIN:%5.2lfA";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%5.2lfA";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%5.2lfA\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
if (get_var_true($vars['previous']))
|
||||
{
|
||||
$rrd_options .= " DEF:sensorX=$rrd_filename_escape:sensor:AVERAGE:start=".$prev_from.":end=".$from;
|
||||
$rrd_options .= " LINE1.5:sensorX#0000cc:'Prev " . rrdtool_escape($sensor['sensor_descr'],18)."'";
|
||||
$rrd_options .= " SHIFT:sensorX:$period";
|
||||
$rrd_options .= " GPRINT:sensorX$current_id:MIN:%5.2lfA";
|
||||
$rrd_options .= " GPRINT:sensorX:LAST:%5.2lfA";
|
||||
$rrd_options .= " GPRINT:sensorX:MAX:%5.2lfA\\l";
|
||||
}
|
||||
|
||||
$graph_return['descr'] = 'Current sensor measured in Amperes.';
|
||||
$graph_return['valid_options'] = array('previous');
|
||||
|
||||
// EOF
|
47
html/includes/graphs/sensor/db.inc.php
Normal file
47
html/includes/graphs/sensor/db.inc.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
$scale_max = "60";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " COMMENT:' Min Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " DEF:sensor_max=$rrd_filename_escape:sensor:MAX";
|
||||
$rrd_options .= " DEF:sensor_min=$rrd_filename_escape:sensor:MIN";
|
||||
$rrd_options .= " CDEF:sensor_diff=sensor_max,sensor_min,-";
|
||||
$rrd_options .= " AREA:sensor_min";
|
||||
$rrd_options .= " AREA:sensor_diff#c5c5c5::STACK";
|
||||
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],20)."'";
|
||||
$rrd_options .= " GPRINT:sensor_min:MIN:%4.1lfdB";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%4.1lfdB";
|
||||
$rrd_options .= " GPRINT:sensor_max:MAX:%4.1lfdB\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
#wtfbroken code.
|
||||
if (get_var_true($vars['previous'])) {
|
||||
$rrd_options .= " DEF:sensorX=$rrd_filename_escape:sensor:AVERAGE:start=".$prev_from.":end=".$from;
|
||||
$rrd_options .= " LINE1.5:sensorX#0000cc:'Prev " . rrdtool_escape($sensor['sensor_descr'],18)."'";
|
||||
$rrd_options .= " SHIFT:sensorX:$period";
|
||||
$rrd_options .= " GPRINT:sensorX$current_id:MIN:%5.2lfA";
|
||||
$rrd_options .= " GPRINT:sensorX:LAST:%5.2lfA";
|
||||
$rrd_options .= " GPRINT:sensorX:MAX:%5.2lfA\\l";
|
||||
}
|
||||
|
||||
$graph_return['descr'] = nicecase($sensor['sensor_class']).' sensor measured in db.';
|
||||
|
||||
// EOF
|
31
html/includes/graphs/sensor/dbm.inc.php
Normal file
31
html/includes/graphs/sensor/dbm.inc.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " COMMENT:' Min Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],20)."'";
|
||||
$rrd_options .= " GPRINT:sensor$current_id:MIN:%5.2lfdBm";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%5.2lfdBm";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%5.2lfdBm\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'dBm sensor.';
|
||||
|
||||
// EOF
|
48
html/includes/graphs/sensor/dewpoint.inc.php
Normal file
48
html/includes/graphs/sensor/dewpoint.inc.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
$scale_max = "60";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " COMMENT:' Min Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " DEF:sensor_max=$rrd_filename_escape:sensor:MAX";
|
||||
$rrd_options .= " DEF:sensor_min=$rrd_filename_escape:sensor:MIN";
|
||||
$rrd_options .= " CDEF:sensor_diff=sensor_max,sensor_min,-";
|
||||
$rrd_options .= " AREA:sensor_min";
|
||||
$rrd_options .= " AREA:sensor_diff#c5c5c5::STACK";
|
||||
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],20)."'";
|
||||
$rrd_options .= " GPRINT:sensor_min:MIN:%4.1lfC";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%4.1lfC";
|
||||
$rrd_options .= " GPRINT:sensor_max:MAX:%4.1lfC\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
#wtfbroken code.
|
||||
if (get_var_true($vars['previous']))
|
||||
{
|
||||
$rrd_options .= " DEF:sensorX=$rrd_filename_escape:sensor:AVERAGE:start=".$prev_from.":end=".$from;
|
||||
$rrd_options .= " LINE1.5:sensorX#0000cc:'Prev " . rrdtool_escape($sensor['sensor_descr'],18)."'";
|
||||
$rrd_options .= " SHIFT:sensorX:$period";
|
||||
$rrd_options .= " GPRINT:sensorX$current_id:MIN:%5.2lfC";
|
||||
$rrd_options .= " GPRINT:sensorX:LAST:%5.2lfC";
|
||||
$rrd_options .= " GPRINT:sensorX:MAX:%5.2lfC\\l";
|
||||
}
|
||||
|
||||
$graph_return['descr'] = 'Dew point measured in celsius.';
|
||||
|
||||
// EOF
|
33
html/includes/graphs/sensor/distance.inc.php
Normal file
33
html/includes/graphs/sensor/distance.inc.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$ds = "sensor";
|
||||
|
||||
$line_text = rrdtool_escape($sensor['sensor_descr'], 22);
|
||||
|
||||
$colour_line = "cc1100";
|
||||
$colour_area = "FFFF99";
|
||||
$colour_minmax = "c5c5c5";
|
||||
|
||||
$scale_min = 0;
|
||||
$graph_max = 1;
|
||||
$unit_text = "m";
|
||||
$print_min = 1;
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) { $rrd_options .= " HRULE:".$sensor['sensor_limit']."#99999960::dashes"; }
|
||||
if (is_numeric($sensor['sensor_limit_low'])) { $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#99999960::dashes"; }
|
||||
|
||||
$graph_return['descr'] = 'Distance sensor measured in m.';
|
||||
|
||||
// EOF
|
34
html/includes/graphs/sensor/dust.inc.php
Normal file
34
html/includes/graphs/sensor/dust.inc.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
$ds = "sensor";
|
||||
|
||||
$line_text = rrdtool_escape($sensor['sensor_descr'], 22);
|
||||
|
||||
$colour_line = "cc0000";
|
||||
$colour_area = "FFBBBB";
|
||||
$colour_minmax = "c5c5c5";
|
||||
|
||||
$graph_max = 1;
|
||||
$unit_text = "mg/M3";
|
||||
$print_min = 1;
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
//if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
//if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Dust';
|
||||
|
||||
// EOF
|
30
html/includes/graphs/sensor/fanspeed.inc.php
Normal file
30
html/includes/graphs/sensor/fanspeed.inc.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " COMMENT:' Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],20)."'";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%3.0lfrpm";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%3.0lfrpm\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Rotational fan speed sensor measured in RPM.';
|
||||
|
||||
// EOF
|
30
html/includes/graphs/sensor/frequency.inc.php
Normal file
30
html/includes/graphs/sensor/frequency.inc.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " COMMENT:' Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],20)."'";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%6.2lf%sHz";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%6.2lf%sHz\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Frequency sensor measured in hertz';
|
||||
|
||||
// EOF
|
30
html/includes/graphs/sensor/gauge.inc.php
Normal file
30
html/includes/graphs/sensor/gauge.inc.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$ds = "sensor";
|
||||
|
||||
$line_text = rrdtool_escape($sensor['sensor_descr'], 20);
|
||||
|
||||
$colour_line = "cc0000";
|
||||
$colour_area = "FFBBBB";
|
||||
$colour_minmax = "c5c5c5";
|
||||
|
||||
$graph_max = 1;
|
||||
$unit_text = "Gauge";
|
||||
$print_min = 1;
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
$graph_return['descr'] = 'Gauges.';
|
||||
|
||||
// EOF
|
36
html/includes/graphs/sensor/graph.inc.php
Normal file
36
html/includes/graphs/sensor/graph.inc.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
/// FIXME. To unify all sensor graphs.
|
||||
$include = $config['html_dir'] . "/includes/graphs/$type/";
|
||||
switch ($sensor['sensor_class']) {
|
||||
case 'humidity':
|
||||
case 'capacity':
|
||||
case 'load':
|
||||
case 'progress':
|
||||
include($include."percent.inc.php");
|
||||
break;
|
||||
case 'snr':
|
||||
case 'attenuation':
|
||||
case 'sound':
|
||||
include($include."db.inc.php");
|
||||
break;
|
||||
default:
|
||||
if (is_file($include.$sensor['sensor_class'].".inc.php")) {
|
||||
include($include.$sensor['sensor_class'].".inc.php");
|
||||
} else {
|
||||
graph_error($type.'_'.$subtype); // Graph Template Missing;
|
||||
}
|
||||
}
|
||||
unset($include);
|
||||
|
||||
// EOF
|
34
html/includes/graphs/sensor/illuminance.inc.php
Normal file
34
html/includes/graphs/sensor/illuminance.inc.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$ds = "sensor";
|
||||
|
||||
$line_text = rrdtool_escape($sensor['sensor_descr'], 22);
|
||||
|
||||
$colour_line = "cc0000";
|
||||
$colour_area = "FFFF99";
|
||||
$colour_minmax = "c5c5c5";
|
||||
|
||||
$scale_min = 0;
|
||||
$graph_max = 1;
|
||||
$unit_text = "lux";
|
||||
$print_min = 1;
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) { $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes"; }
|
||||
if (is_numeric($sensor['sensor_limit_low'])) { $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes"; }
|
||||
|
||||
$graph_return['descr'] = 'Illuminance sensor measured in lux.';
|
||||
|
||||
// EOF
|
31
html/includes/graphs/sensor/impedence.inc.php
Normal file
31
html/includes/graphs/sensor/impedence.inc.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " COMMENT:' Min Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],20)."'";
|
||||
$rrd_options .= " GPRINT:sensor$current_id:MIN:%5.2lfΩ";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%5.2lfΩ";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%5.2lfΩ\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Resistance sensor.';
|
||||
|
||||
// EOF
|
38
html/includes/graphs/sensor/percent.inc.php
Normal file
38
html/includes/graphs/sensor/percent.inc.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
$scale_max = "100";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " COMMENT:' Min Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " DEF:sensor_max=$rrd_filename_escape:sensor:MAX";
|
||||
$rrd_options .= " DEF:sensor_min=$rrd_filename_escape:sensor:MIN";
|
||||
$rrd_options .= " CDEF:sensor_diff=sensor_max,sensor_min,-";
|
||||
$rrd_options .= " AREA:sensor_min";
|
||||
$rrd_options .= " AREA:sensor_diff#c5c5c5::STACK";
|
||||
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],20)."'";
|
||||
$rrd_options .= " GPRINT:sensor_min:MIN:%4.1lf%%";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%4.1lf%%";
|
||||
$rrd_options .= " GPRINT:sensor_max:MAX:%4.1lf%%\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = nicecase($sensor['sensor_class']).' sensor measured in percent.';
|
||||
|
||||
// EOF
|
34
html/includes/graphs/sensor/power.inc.php
Normal file
34
html/includes/graphs/sensor/power.inc.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
$ds = "sensor";
|
||||
|
||||
$line_text = rrdtool_escape($sensor['sensor_descr'],8);
|
||||
|
||||
$colour_line = "cc0000";
|
||||
$colour_area = "FFBBBB";
|
||||
$colour_minmax = "c5c5c5";
|
||||
|
||||
$graph_max = 1;
|
||||
$unit_text = "Watts";
|
||||
$print_min = 1;
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
//if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
//if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Power sensor measured in watts.';
|
||||
|
||||
// EOF
|
38
html/includes/graphs/sensor/powerfactor.inc.php
Normal file
38
html/includes/graphs/sensor/powerfactor.inc.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " -A ";
|
||||
$rrd_options .= " COMMENT:' Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " DEF:sensor_max=$rrd_filename_escape:sensor:MAX";
|
||||
$rrd_options .= " DEF:sensor_min=$rrd_filename_escape:sensor:MIN";
|
||||
|
||||
$rrd_options .= " AREA:sensor_max#c5c5c5";
|
||||
$rrd_options .= " AREA:sensor_min#ffffffff";
|
||||
|
||||
#$rrd_options .= " AREA:sensor#FFFF99";
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],22)."'";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%6.2lf";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%6.2lf\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Power Factor';
|
||||
|
||||
// EOF
|
33
html/includes/graphs/sensor/pressure.inc.php
Normal file
33
html/includes/graphs/sensor/pressure.inc.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$ds = "sensor";
|
||||
|
||||
$line_text = rrdtool_escape($sensor['sensor_descr'], 22);
|
||||
|
||||
$colour_line = "cc0000";
|
||||
$colour_area = "FFFF99";
|
||||
$colour_minmax = "c5c5c5";
|
||||
|
||||
$graph_max = 1;
|
||||
$unit_text = "Pa";
|
||||
$print_min = 1;
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) { $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes"; }
|
||||
if (is_numeric($sensor['sensor_limit_low'])) { $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes"; }
|
||||
|
||||
$graph_return['descr'] = 'Pressure sensor measured in Pascal.';
|
||||
|
||||
// EOF
|
31
html/includes/graphs/sensor/resistance.inc.php
Normal file
31
html/includes/graphs/sensor/resistance.inc.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " COMMENT:' Min Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],20)."'";
|
||||
$rrd_options .= " GPRINT:sensor$current_id:MIN:%5.2lfΩ";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%5.2lfΩ";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%5.2lfΩ\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Resistance sensor.';
|
||||
|
||||
// EOF
|
38
html/includes/graphs/sensor/rpower.inc.php
Normal file
38
html/includes/graphs/sensor/rpower.inc.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " -A ";
|
||||
$rrd_options .= " COMMENT:' Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " DEF:sensor_max=$rrd_filename_escape:sensor:MAX";
|
||||
$rrd_options .= " DEF:sensor_min=$rrd_filename_escape:sensor:MIN";
|
||||
|
||||
$rrd_options .= " AREA:sensor_max#c5c5c5";
|
||||
$rrd_options .= " AREA:sensor_min#ffffffff";
|
||||
|
||||
#$rrd_options .= " AREA:sensor#FFFF99";
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],22)."'";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%6.2lfW";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%6.2lfW\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Reactive power sensor measured in voltampere reactive.';
|
||||
|
||||
// EOF
|
38
html/includes/graphs/sensor/runtime.inc.php
Normal file
38
html/includes/graphs/sensor/runtime.inc.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " -A ";
|
||||
$rrd_options .= " COMMENT:' Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " DEF:sensor_max=$rrd_filename_escape:sensor:MAX";
|
||||
$rrd_options .= " DEF:sensor_min=$rrd_filename_escape:sensor:MIN";
|
||||
|
||||
$rrd_options .= " AREA:sensor_max#c5c5c5";
|
||||
$rrd_options .= " AREA:sensor_min#ffffffff";
|
||||
|
||||
#$rrd_options .= " AREA:sensor#FFFF99";
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],22)."'";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%6.2lf%smin";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%6.2lf%smin\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Runtime sensor measured in minutes.';
|
||||
|
||||
// EOF
|
28
html/includes/graphs/sensor/state.inc.php
Normal file
28
html/includes/graphs/sensor/state.inc.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " COMMENT:' Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],20)."'";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%3.0lf";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%3.0lf\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
// EOF
|
33
html/includes/graphs/sensor/temperature.inc.php
Normal file
33
html/includes/graphs/sensor/temperature.inc.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2020 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$ds = "sensor";
|
||||
|
||||
$line_text = rrdtool_escape($sensor['sensor_descr'], 22);
|
||||
|
||||
$colour_line = "CC0000";
|
||||
$colour_minmax = "FF5555";
|
||||
|
||||
$scale_min = 0;
|
||||
$graph_max = 60;
|
||||
$unit_text = "C";
|
||||
$print_min = 1;
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) { $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes"; }
|
||||
if (is_numeric($sensor['sensor_limit_low'])) { $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes"; }
|
||||
|
||||
$graph_return['descr'] = 'Temperature sensor measured in celsius.';
|
||||
|
||||
// EOF
|
34
html/includes/graphs/sensor/velocity.inc.php
Normal file
34
html/includes/graphs/sensor/velocity.inc.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$ds = "sensor";
|
||||
|
||||
$line_text = rrdtool_escape($sensor['sensor_descr'], 22);
|
||||
|
||||
$colour_line = "cc0000";
|
||||
$colour_area = "FFFF99";
|
||||
$colour_minmax = "c5c5c5";
|
||||
|
||||
$scale_min = 0;
|
||||
$graph_max = 1;
|
||||
$unit_text = "m/s";
|
||||
$print_min = 1;
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) { $rrd_options .= " HRULE:".$sensor['sensor_limit']."#99999960::dashes"; }
|
||||
if (is_numeric($sensor['sensor_limit_low'])) { $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#99999960::dashes"; }
|
||||
|
||||
$graph_return['descr'] = 'Velocity sensor measured in m/s.';
|
||||
|
||||
// EOF
|
39
html/includes/graphs/sensor/voltage.inc.php
Normal file
39
html/includes/graphs/sensor/voltage.inc.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " -A ";
|
||||
$rrd_options .= " COMMENT:' Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " DEF:sensor_max=$rrd_filename_escape:sensor:MAX";
|
||||
$rrd_options .= " DEF:sensor_min=$rrd_filename_escape:sensor:MIN";
|
||||
|
||||
$rrd_options .= " CDEF:sensor_minmax=sensor_max,sensor_min,-";
|
||||
|
||||
$rrd_options .= " AREA:sensor_min#00000000";
|
||||
$rrd_options .= " AREA:sensor_minmax#ff333360:STACK";
|
||||
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],22)."'";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%6.2lfV";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%6.2lfV\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Potential sensor measured in volts.';
|
||||
|
||||
// EOF
|
34
html/includes/graphs/sensor/volume.inc.php
Normal file
34
html/includes/graphs/sensor/volume.inc.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
$ds = "sensor";
|
||||
|
||||
$line_text = rrdtool_escape($sensor['sensor_descr'], 22);
|
||||
|
||||
$colour_line = "cc0000";
|
||||
$colour_area = "FFBBBB";
|
||||
$colour_minmax = "c5c5c5";
|
||||
|
||||
$graph_max = 1;
|
||||
$unit_text = "Litres";
|
||||
$print_min = 1;
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
//if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
//if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Volume.';
|
||||
|
||||
// EOF
|
30
html/includes/graphs/sensor/waterflow.inc.php
Normal file
30
html/includes/graphs/sensor/waterflow.inc.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$scale_min = "0";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_options .= " COMMENT:' Last Max\\n'";
|
||||
|
||||
$rrd_options .= " DEF:sensor=$rrd_filename_escape:sensor:AVERAGE";
|
||||
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],20)."'";
|
||||
$rrd_options .= " GPRINT:sensor:LAST:%3.0lfl/min";
|
||||
$rrd_options .= " GPRINT:sensor:MAX:%3.0lfl/min\\l";
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
|
||||
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
|
||||
|
||||
$graph_return['descr'] = 'Water flow sensor measured in l/min.';
|
||||
|
||||
// EOF
|
34
html/includes/graphs/sensor/wavelength.inc.php
Normal file
34
html/includes/graphs/sensor/wavelength.inc.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$ds = "sensor";
|
||||
|
||||
$line_text = rrdtool_escape($sensor['sensor_descr'], 22);
|
||||
|
||||
$colour_line = "cc0000";
|
||||
$colour_area = "FFFF99";
|
||||
$colour_minmax = "c5c5c5";
|
||||
|
||||
$scale_min = 0;
|
||||
$graph_max = 1;
|
||||
$unit_text = "nm";
|
||||
$print_min = 1;
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
if (is_numeric($sensor['sensor_limit'])) { $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes"; }
|
||||
if (is_numeric($sensor['sensor_limit_low'])) { $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes"; }
|
||||
|
||||
$graph_return['descr'] = 'Wavelength sensor measured in nm.';
|
||||
|
||||
// EOF
|
Reference in New Issue
Block a user