diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php
index 5114a79b19..3df0b56cfe 100644
--- a/pandora_console/include/functions_reporting_html.php
+++ b/pandora_console/include/functions_reporting_html.php
@@ -2466,61 +2466,57 @@ function reporting_html_availability_graph(&$table, $item, $pdf=0) {
$sla_value = sla_truncate($chart['sla_value'], $config['graph_precision']) . '%';
$checks_resume = "(" . $chart['checks_ok'] . "/" . $chart['checks_total'] . ")";
}
- $table1->data[] = array(
- $chart['agent'] . "
" . $chart['module'],
- $chart['chart'],
- "" .
- $sla_value .
- '',
- $checks_resume
- );
+
+ $table1->data[0][0] = $chart['agent'] . "
" . $chart['module'];
+ $table1->data[0][1] = $chart['chart'];
+ $table1->data[0][2] = "" . $sla_value . '';
+ $table1->data[0][3] = $checks_resume;
}
if($item['type'] == 'availability_graph'){
+ //table_legend_graphs;
+ $table2 = new stdClass();
+ $table2->width = '99%';
+ $table2->data = array ();
+ $table2->size = array ();
+ $table2->size[0] = '2%';
+ $table2->data[0][0] = '
';
+ $table2->size[1] = '14%';
+ $table2->data[0][1] = ''.__('OK') . '';
- //table_legend_graphs;
- $table2 = new stdClass();
- $table2->width = '99%';
- $table2->data = array ();
- $table2->size = array ();
- $table2->size[0] = '2%';
- $table2->data[0][0] = '
';
- $table2->size[1] = '14%';
- $table2->data[0][1] = ''.__('OK') . '';
+ $table2->size[2] = '2%';
+ $table2->data[0][2] = '
';
+ $table2->size[3] = '14%';
+ $table2->data[0][3] = ''.__('Critical'). '';
- $table2->size[2] = '2%';
- $table2->data[0][2] = '
';
- $table2->size[3] = '14%';
- $table2->data[0][3] = ''.__('Critical'). '';
+ $table2->size[4] = '2%';
+ $table2->data[0][4] = '
';
+ $table2->size[5] = '14%';
+ $table2->data[0][5] = ''.__('Unknow'). '';
- $table2->size[4] = '2%';
- $table2->data[0][4] = '
';
- $table2->size[5] = '14%';
- $table2->data[0][5] = ''.__('Unknow'). '';
+ $table2->size[6] = '2%';
+ $table2->data[0][6] = '
';
+ $table2->size[7] = '14%';
+ $table2->data[0][7] = ''.__('Not Init'). '';
- $table2->size[6] = '2%';
- $table2->data[0][6] = '
';
- $table2->size[7] = '14%';
- $table2->data[0][7] = ''.__('Not Init'). '';
-
- $table2->size[8] = '2%';
- $table2->data[0][8] = '
';
- $table2->size[9] = '14%';
- $table2->data[0][9] = ''.__('Downtimes'). '';
-
- $table2->size[10] = '2%';
- $table2->data[0][10] = '
';
- $table2->size[11] = '15%';
- $table2->data[0][11] = ''.__('Ignore time'). '';
+ $table2->size[8] = '2%';
+ $table2->data[0][8] = '
';
+ $table2->size[9] = '14%';
+ $table2->data[0][9] = ''.__('Downtimes'). '';
+ $table2->size[10] = '2%';
+ $table2->data[0][10] = '
';
+ $table2->size[11] = '15%';
+ $table2->data[0][11] = ''.__('Ignore time'). '';
}
$table->colspan['charts']['cell'] = 2;
$table->data['charts']['cell'] = html_print_table($table1, true);
$table->colspan['legend']['cell'] = 2;
$table->data['legend']['cell'] = html_print_table($table2, true);
+
if($pdf){
- return html_print_table($table, true);
+ return html_print_table($table1, true) . '
' . html_print_table($table2, true);
}
}
@@ -3919,4 +3915,4 @@ function reporting_html_planned_downtimes_table ($planned_downtimes) {
return $downtimes_table;
}
-?>
\ No newline at end of file
+?>