initial commit; version 22.5.12042
This commit is contained in:
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
|
Reference in New Issue
Block a user