Files

44 lines
1010 B
PHP
Raw Permalink Normal View History

2020-06-16 01:04:30 +02:00
<?php
require 'includes/html/graphs/common.inc.php';
2020-09-21 15:40:17 +02:00
$rrd_filename = rrd_name($device['hostname'], ['app', 'backupninja', $app['app_id']]);
2020-06-16 01:04:30 +02:00
2020-09-21 15:40:17 +02:00
$array = [
'last_actions' => [
'descr' => 'last_actions',
'colour' => '22FF22',
],
'last_fatal' => [
'descr' => 'last_fatal',
'colour' => '0022FF',
],
'last_error' => [
'descr' => 'last_error',
'colour' => 'FF0000',
],
'last_warning' => [
'descr' => 'last_warning',
'colour' => '0080C0',
],
];
2020-06-16 01:04:30 +02:00
$i = 0;
if (rrdtool_check_rrd_exists($rrd_filename)) {
foreach ($array as $ds => $var) {
$rrd_list[$i]['filename'] = $rrd_filename;
2020-09-21 15:40:17 +02:00
$rrd_list[$i]['descr'] = $var['descr'];
$rrd_list[$i]['ds'] = $ds;
2020-06-16 01:04:30 +02:00
// $rrd_list[$i]['colour'] = $var['colour'];
$i++;
}
} else {
echo "file missing: $file";
}
2020-09-21 15:40:17 +02:00
$colours = 'mixed';
$nototal = 1;
2020-06-16 01:04:30 +02:00
$unit_text = 'backups';
require 'includes/html/graphs/generic_multi_line.inc.php';