Files

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

33 lines
923 B
PHP
Raw Permalink Normal View History

2011-10-02 22:34:22 +00:00
<?php
2019-04-11 23:26:42 -05:00
require 'includes/html/graphs/common.inc.php';
2011-10-02 22:34:22 +00:00
$scale_min = 0;
$colours = 'mixed';
2011-10-02 22:34:22 +00:00
$nototal = (($width < 550) ? 1 : 0);
$unit_text = 'Messages/sec';
$rrd_filename = Rrd::name($device['hostname'], ['app', 'mailscannerV2', $app->app_id]);
2011-10-02 22:34:22 +00:00
$array = [
'msg_rejected' => ['descr' => 'Rejected'],
'msg_relay' => ['descr' => 'Relayed'],
'msg_waiting' => ['descr' => 'Waiting'],
];
2011-10-02 22:34:22 +00:00
$i = 0;
$x = 0;
2011-10-02 22:34:22 +00:00
2021-03-28 17:25:30 -05:00
if (Rrd::checkRrdExists($rrd_filename)) {
2019-06-23 00:29:12 -05:00
$max_colours = count(Config::get("graph_colours.$colours"));
2017-02-24 15:22:15 +00:00
foreach ($array as $ds => $var) {
$x = (($x <= $max_colours) ? $x : 0);
$rrd_list[$i]['filename'] = $rrd_filename;
2017-02-24 15:22:15 +00:00
$rrd_list[$i]['descr'] = $var['descr'];
$rrd_list[$i]['ds'] = $ds;
2019-06-23 00:29:12 -05:00
$rrd_list[$i]['colour'] = \LibreNMS\Config::get("graph_colours.$colours.$x");
$i++;
$x++;
}
2011-10-02 22:34:22 +00:00
}
2019-04-11 23:26:42 -05:00
require 'includes/html/graphs/generic_multi_line.inc.php';