From 62fedd78c8d4f9dcb1b005765f8c31f8a3351ad4 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 8 Jun 2015 16:51:54 +0200 Subject: [PATCH] Fixed the monthly SLA for dashboards. TICKET: #2087 --- .../godmode/reporting/reporting_builder.item_editor.php | 2 +- .../godmode/reporting/reporting_builder.list_items.php | 6 +++--- pandora_console/include/functions_reporting.php | 3 ++- pandora_console/include/functions_reports.php | 6 ++++-- 4 files changed, 10 insertions(+), 7 deletions(-) mode change 100644 => 100755 pandora_console/godmode/reporting/reporting_builder.item_editor.php mode change 100644 => 100755 pandora_console/godmode/reporting/reporting_builder.list_items.php mode change 100644 => 100755 pandora_console/include/functions_reports.php diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php old mode 100644 new mode 100755 index a8429cbf95..eb96ff5286 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -553,7 +553,7 @@ html_print_input_hidden('id_item', $idItem); html_print_select(reports_get_report_types(false, true), 'type', $type, 'chooseType();', '', ''); } else { - $report_type = reports_get_report_types($type); + $report_type = reports_get_report_types(false, true); if (!empty($report_type) and isset($report_type[$type]['name'])) echo $report_type[$type]['name']; else diff --git a/pandora_console/godmode/reporting/reporting_builder.list_items.php b/pandora_console/godmode/reporting/reporting_builder.list_items.php old mode 100644 new mode 100755 index 6745d9a931..08f201f379 --- a/pandora_console/godmode/reporting/reporting_builder.list_items.php +++ b/pandora_console/godmode/reporting/reporting_builder.list_items.php @@ -147,7 +147,7 @@ echo '' . array("title" => __('Toggle filter(s)'), "id" => 'image_form_filter')) . ''; -$table = null; +$table = new stdClass(); $table->width = '100%'; $table->data[0][0] = __('Agents'); $table->data[0][1] = html_print_select($agents, 'agent_filter', $agentFilter, '', __('All'), 0, true); @@ -412,7 +412,7 @@ echo "
colspan[0][0] = 3; $table->size = array(); @@ -435,7 +435,7 @@ echo "colspan[0][0] = 3; $table->size = array(); diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 23e3052f7b..55733ed251 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -4011,8 +4011,9 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f reporting_enterprise_sla_monthly($mini, $content, $report, $table, $item_title); break; case 'SLA_services': - if (function_exists("reporting_enterprise_sla_services")) + if (function_exists("reporting_enterprise_sla_services")) { reporting_enterprise_sla_services($mini, $content, $report, $table, $item_title); + } break; case 3: case 'SLA': diff --git a/pandora_console/include/functions_reports.php b/pandora_console/include/functions_reports.php old mode 100644 new mode 100755 index 1e48c57d86..f150599f8e --- a/pandora_console/include/functions_reports.php +++ b/pandora_console/include/functions_reports.php @@ -528,9 +528,11 @@ function reports_get_report_types ($template = false, $not_editor = false) { $types['SLA'] = array('optgroup' => __('SLA'), 'name' => __('S.L.A.')); - if (!$template && $config['enterprise_installed']) { + if ($config['enterprise_installed']) { $types['SLA_monthly'] = array('optgroup' => __('SLA'), - 'name' => __('Monthly S.L.A.')); + 'name' => __('Monthly S.L.A.')); + } + if (!$template && $config['enterprise_installed']) { $types['SLA_services'] = array('optgroup' => __('SLA'), 'name' => __('Services S.L.A.')); }