mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
[Availability graph] Coloured the main data
This commit is contained in:
parent
0c537b8178
commit
38ea279b96
@ -2563,25 +2563,26 @@ function reporting_html_availability_graph(&$table, $item, $pdf=0) {
|
|||||||
$table1 = new stdClass();
|
$table1 = new stdClass();
|
||||||
$table1->width = '99%';
|
$table1->width = '99%';
|
||||||
$table1->data = array ();
|
$table1->data = array ();
|
||||||
if (!$hide_notinit_agent) {
|
foreach ($item['charts'] as $chart) {
|
||||||
foreach ($item['charts'] as $chart) {
|
switch ($chart['sla_status']) {
|
||||||
$table1->data[] = array(
|
case REPORT_STATUS_ERR:
|
||||||
$chart['agent'] . "<br />" . $chart['module'],
|
$color = COL_CRITICAL;
|
||||||
$chart['chart'],
|
break;
|
||||||
"<span style = 'font: bold 2em Arial, Sans-serif;'>" . sla_truncate($chart['sla_value'], $config['graph_precision']) . '%</span>',
|
case REPORT_STATUS_OK:
|
||||||
"(" . $chart['checks_ok'] . "/" . $chart['checks_total'] . ")"
|
$color = COL_NORMAL;
|
||||||
);
|
break;
|
||||||
}
|
default:
|
||||||
}
|
$color = COL_UNKNOWN;
|
||||||
else{
|
break;
|
||||||
foreach ($item['charts'] as $chart) {
|
|
||||||
$the_first_men_time = get_agent_first_time(io_safe_output($chart['agent']));
|
|
||||||
if ($item['date']['to'] > $the_first_men_time) {
|
|
||||||
$table1->data[] = array(
|
|
||||||
$chart['agent'] . "<br />" . $chart['module'],
|
|
||||||
$chart['chart']);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
$table1->data[] = array(
|
||||||
|
$chart['agent'] . "<br />" . $chart['module'],
|
||||||
|
$chart['chart'],
|
||||||
|
"<span style = 'font: bold 2em Arial, Sans-serif; color: ".$color."'>" .
|
||||||
|
sla_truncate($chart['sla_value'], $config['graph_precision']) . '%' .
|
||||||
|
'</span>',
|
||||||
|
"(" . $chart['checks_ok'] . "/" . $chart['checks_total'] . ")"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($item['type'] == 'availability_graph'){
|
if($item['type'] == 'availability_graph'){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user