diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index d45abda41b..cf91fec84b 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -304,7 +304,8 @@ function reporting_make_reporting_data($report = null, $id_report, $report['contents'][] = reporting_availability_graph( $report, $content, - $pdf); + $pdf + ); break; case 'sql': $report['contents'][] = reporting_sql( diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 3df0b56cfe..182977207d 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -2428,12 +2428,18 @@ function reporting_html_availability(&$table, $item) { function reporting_html_availability_graph(&$table, $item, $pdf=0) { global $config; $metaconsole_on = is_metaconsole(); - if($metaconsole_on && $pdf==0){ - $src= '../../'; + + if($metaconsole_on){ + $hack_metaconsole = "../../"; } else{ - $src=$config['homeurl']; + $hack_metaconsole = ""; } + + $src=ui_get_full_url(false); + + $tables_chart = ''; + $table1 = new stdClass(); $table1->width = '99%'; $table1->data = array (); @@ -2471,6 +2477,7 @@ function reporting_html_availability_graph(&$table, $item, $pdf=0) { $table1->data[0][1] = $chart['chart']; $table1->data[0][2] = "" . $sla_value . ''; $table1->data[0][3] = $checks_resume; + $tables_chart .= html_print_table($table1, true); } if($item['type'] == 'availability_graph'){ @@ -2480,43 +2487,43 @@ function reporting_html_availability_graph(&$table, $item, $pdf=0) { $table2->data = array (); $table2->size = array (); $table2->size[0] = '2%'; - $table2->data[0][0] = ''; + $table2->data[0][0] = ''; $table2->size[1] = '14%'; $table2->data[0][1] = ''.__('OK') . ''; $table2->size[2] = '2%'; - $table2->data[0][2] = ''; + $table2->data[0][2] = ''; $table2->size[3] = '14%'; $table2->data[0][3] = ''.__('Critical'). ''; $table2->size[4] = '2%'; - $table2->data[0][4] = ''; + $table2->data[0][4] = ''; $table2->size[5] = '14%'; $table2->data[0][5] = ''.__('Unknow'). ''; $table2->size[6] = '2%'; - $table2->data[0][6] = ''; + $table2->data[0][6] = ''; $table2->size[7] = '14%'; $table2->data[0][7] = ''.__('Not Init'). ''; $table2->size[8] = '2%'; - $table2->data[0][8] = ''; + $table2->data[0][8] = ''; $table2->size[9] = '14%'; $table2->data[0][9] = ''.__('Downtimes'). ''; $table2->size[10] = '2%'; - $table2->data[0][10] = ''; + $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->data['charts']['cell'] = $tables_chart; $table->colspan['legend']['cell'] = 2; $table->data['legend']['cell'] = html_print_table($table2, true); if($pdf){ - return html_print_table($table1, true) . '
' . html_print_table($table2, true); + return $tables_chart . '
' . html_print_table($table2, true); } }