Files
librenms-librenms/includes/html/graphs/device/availability.inc.php
Zane C. Bowers-Hadley f023d37cfc update various device graphs to to have better stats (#14815)
* update graphs -> systems page

* update availability graph to use the stats graph for 1 day averages

* a bit of cleanup for various graphs

* a few style fixes I missed

* another style fix

* update the pingperf graph as well

* update the poller perf graph as well

* style fix

* move graphs to using generic_stats default for readability
2023-03-01 01:00:13 +01:00

31 lines
718 B
PHP

<?php
$ds = 'availability';
$unit_text = 'Availability(%)';
$float_precision = '3';
if ($vars['duration'] > 86400) {
$scale_min = '0';
$scale_max = '100';
$rrd_filename = Rrd::name($device['hostname'], ['availability', $vars['duration']]);
$colour_line = '000000';
$colour_area = '8B8BEB44';
$colour_area_max = 'cc9999';
$line_text = \LibreNMS\Util\Time::formatInterval($vars['duration']);
$graph_title .= '::' . $line_text;
$graph_max = 1;
require 'includes/html/graphs/generic_simplex.inc.php';
} else {
$filename = Rrd::name($device['hostname'], ['availability', $vars['duration']]);
$descr = '';
require 'includes/html/graphs/generic_stats.inc.php';
}