Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
717 B
PHP
Raw Permalink Normal View History

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