From 5edbda24c646e6ee3d79566a9ff99c80a3ba5151 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Wed, 3 Sep 2014 19:46:29 +0200 Subject: [PATCH] Added hooks to the service SLA wizard for reports * godmode/reporting/reporting_builder.item_editor.php, godmode/reporting/reporting_builder.php, include/functions_reporting.php, include/functions_reports.php: Added hooks to the enterprise services SLA wizard. --- pandora_console/ChangeLog | 8 ++++++ .../reporting_builder.item_editor.php | 25 +++++++++++++++++++ .../godmode/reporting/reporting_builder.php | 1 + .../include/functions_reporting.php | 3 +++ pandora_console/include/functions_reports.php | 2 ++ 5 files changed, 39 insertions(+) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 3a5b2d9dc7..f4f17f8fdf 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2014-09-03 Alejandro Gallardo + + * godmode/reporting/reporting_builder.item_editor.php, + godmode/reporting/reporting_builder.php, + include/functions_reporting.php, + include/functions_reports.php: Added hooks to the + enterprise services SLA wizard. + 2014-09-03 Alejandro Gallardo * general/pandora_help.php: Error fixes on the help file diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 5a3439ed92..894b8b885e 100644 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -120,6 +120,7 @@ switch ($action) { $type = get_parameter('type', 'SLA'); switch ($type) { case 'SLA_monthly': + case 'SLA_services': case 'SLA': case 'top_n': case 'exception': @@ -235,6 +236,23 @@ switch ($action) { // 'top_n' filed will be reused for SLA sort option $sla_sorted_by = $item['top_n']; break; + case 'SLA_services': + $description = $item['description']; + $period = $item['period']; + $only_display_wrong = $item['only_display_wrong']; + $monday = $item['monday']; + $tuesday = $item['tuesday']; + $wednesday = $item['wednesday']; + $thursday = $item['thursday']; + $friday = $item['friday']; + $saturday = $item['saturday']; + $sunday = $item['sunday']; + $time_from = $item['time_from']; + $time_to = $item['time_to']; + $show_graph = $item['show_graph']; + // 'top_n' filed will be reused for SLA sort option + $sla_sorted_by = $item['top_n']; + break; case 'monitor_report': $description = $item['description']; $idAgentModule = $item['id_agent_module']; @@ -1886,6 +1904,13 @@ function chooseType() { $("#row_show_in_two_columns").show(); $("#row_sort").show(); break; + case 'SLA_services': + $("#row_description").show(); + $("#row_period").show(); + $("#row_only_display_wrong").show(); + $("#row_working_time").show(); + $("#row_sort").show(); + break; case 'monitor_report': $("#row_description").show(); $("#row_agent").show(); diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 25189dc334..dac50deb6d 100644 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -752,6 +752,7 @@ switch ($action) { $values['text'] = $intervals; break; case 'SLA_monthly': + case 'SLA_services': case 'SLA': $values['period'] = get_parameter('period'); $values['top_n'] = get_parameter('combo_sla_sort_options',0); diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index afe2a9676d..fec59121cb 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3369,6 +3369,9 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f case 'SLA_monthly': reporting_enterprise_sla_monthly($mini, $content, $report, $table, $item_title); break; + case 'SLA_services': + reporting_enterprise_sla_services($mini, $content, $report, $table, $item_title); + break; case 3: case 'SLA': if (empty($item_title)) { diff --git a/pandora_console/include/functions_reports.php b/pandora_console/include/functions_reports.php index 16250f784e..f793255524 100644 --- a/pandora_console/include/functions_reports.php +++ b/pandora_console/include/functions_reports.php @@ -531,6 +531,8 @@ function reports_get_report_types ($template = false, $not_editor = false) { if ($config['enterprise_installed']) { $types['SLA_monthly'] = array('optgroup' => __('SLA'), 'name' => __('Monthly S.L.A.')); + $types['SLA_services'] = array('optgroup' => __('SLA'), + 'name' => __('Services S.L.A.')); }