Merge pull request #4448 from crcro/app-ups-nut-update1

app: ups-nut update 1
This commit is contained in:
Neil Lathwood
2016-09-24 18:29:25 +01:00
committed by GitHub
6 changed files with 24 additions and 17 deletions

View File

@@ -31,5 +31,8 @@ $unit_text = 'Percent';
$ups_nut = rrd_name($device['hostname'], array('app', 'ups-nut', $app['app_id']));
if (rrdtool_check_rrd_exists($ups_nut)) {
$rrd_filename = $ups_nut;
} else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_simplex.inc.php';

View File

@@ -31,5 +31,8 @@ $unit_text = 'Percent';
$ups_nut = rrd_name($device['hostname'], array('app', 'ups-nut', $app['app_id']));
if (rrdtool_check_rrd_exists($ups_nut)) {
$rrd_filename = $ups_nut;
} else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_simplex.inc.php';

View File

@@ -17,6 +17,7 @@
* @link http://librenms.org
* @copyright 2016 crcro
* @author Cercel Valentin <crc@nuamchefazi.ro>
*
*/
require 'includes/graphs/common.inc.php';
@@ -27,9 +28,12 @@ $colour_area = 'EEEEEE';
$colour_line = '36393D';
$colour_area_max = 'FFEE99';
$graph_max = 0;
$unit_text = 'Seconds';
$unit_text = 'Minutes';
$ups_nut = rrd_name($device['hostname'], array('app', 'ups-nut', $app['app_id']));
if (rrdtool_check_rrd_exists($ups_nut)) {
$rrd_filename = $ups_nut;
} else {
echo "file missing: $rrd_filename";
}
require 'includes/graphs/generic_simplex.inc.php';

View File

@@ -17,6 +17,7 @@
* @link http://librenms.org
* @copyright 2016 crcro
* @author Cercel Valentin <crc@nuamchefazi.ro>
*
*/
require 'includes/graphs/common.inc.php';
@@ -33,7 +34,6 @@ $addarea = 1;
$transparency = 33;
$rrd_filename = rrd_name($device['hostname'], array('app', 'ups-nut', $app['app_id']));
$array = array(
'battery_low' => array('descr' => 'Low','colour' => '630606',),
'battery_voltage' => array('descr' => 'Current','colour' => '50C150',),
);