From d84b2c6c3ebfe204e443727b809d24d74438c78c Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 15 Dec 2016 15:31:53 +0100 Subject: [PATCH] fixed error new sla in metaconsole --- .../reporting_builder.item_editor.php | 3 -- .../include/functions_reporting_html.php | 39 +++++++++++++------ 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index b4d0ab5a14..c5c34f8ef6 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -144,11 +144,8 @@ switch ($action) { case 'general': case 'network_interfaces_report': case 'availability': -<<<<<<< HEAD -======= case 'availability_graph': case 'agent_module': ->>>>>>> 2b0820d... add new reports sla_hourly , weekly and availability graph $get_data_editor = true; break; diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index b318b15c23..ff1ca50e38 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -311,6 +311,14 @@ function reporting_html_SLA($table, $item, $mini) { $font_size = '3'; } + $metaconsole_on = is_metaconsole(); + if($metaconsole_on){ + $src= '../../'; + } + else{ + $src=$config['homeurl']; + } + if (!empty($item['failed'])) { $table->colspan['sla']['cell'] = 3; $table->data['sla']['cell'] = $item['failed']; @@ -618,32 +626,32 @@ function reporting_html_SLA($table, $item, $mini) { $table1->data = array (); $table1->size = array (); $table1->size[0] = '2%'; - $table1->data[0][0] = ''; + $table1->data[0][0] = ''; $table1->size[1] = '14%'; $table1->data[0][1] = ''.__('OK') . ''; $table1->size[2] = '2%'; - $table1->data[0][2] = ''; + $table1->data[0][2] = ''; $table1->size[3] = '14%'; $table1->data[0][3] = ''.__('Critical'). ''; $table1->size[4] = '2%'; - $table1->data[0][4] = ''; + $table1->data[0][4] = ''; $table1->size[5] = '14%'; $table1->data[0][5] = ''.__('Unknow'). ''; $table1->size[6] = '2%'; - $table1->data[0][6] = ''; + $table1->data[0][6] = ''; $table1->size[7] = '14%'; $table1->data[0][7] = ''.__('Not Init'). ''; $table1->size[8] = '2%'; - $table1->data[0][8] = ''; + $table1->data[0][8] = ''; $table1->size[9] = '14%'; $table1->data[0][9] = ''.__('Downtimes'). ''; $table1->size[10] = '2%'; - $table1->data[0][10] = ''; + $table1->data[0][10] = ''; $table1->size[11] = '15%'; $table1->data[0][11] = ''.__('Ignore time'). ''; @@ -2171,6 +2179,13 @@ 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= '../../'; + } + else{ + $src=$config['homeurl']; + } $table1 = new stdClass(); $table1->width = '99%'; $table1->data = array (); @@ -2201,32 +2216,32 @@ 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'). '';