From 402165fd115c92d7430278f7aa7b05ae7adf91cf Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 28 Apr 2015 14:26:19 +0200 Subject: [PATCH] Change some styles in the code of report editor for to made more easy the comparation with the template report editor --- .../reporting_builder.item_editor.php | 188 ++++++++++++++++-- 1 file changed, 166 insertions(+), 22 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index c86ce2f6c1..a8429cbf95 100644 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -29,6 +29,13 @@ $meta = false; if (($config['metaconsole'] == 1) && (defined('METACONSOLE'))) { $meta = true; } + + + + + + + $show_graph_options = Array(); $show_graph_options[0] = __('Only table'); $show_graph_options[1] = __('Table & Graph'); @@ -125,6 +132,7 @@ switch ($action) { // If we are creating a new report item then clean interface and display creation view $type = get_parameter('type', 'SLA'); + switch ($type) { case 'SLA_monthly': case 'SLA_services': @@ -136,6 +144,7 @@ switch ($action) { case 'availability': $get_data_editor = true; break; + default: $actionParameter = 'save'; $action = 'new'; @@ -179,6 +188,7 @@ switch ($action) { $idAgentModule = $item['id_agent_module']; $idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente_modulo' => $idAgentModule)); break; + case 'simple_graph': $only_avg = isset($style['only_avg']) ? (bool) $style['only_avg'] : true; // The break hasn't be forgotten. @@ -197,6 +207,7 @@ switch ($action) { // HACK it is saved in show_graph field. $time_compare_overlapped = $item['show_graph']; break; + case 'prediction_date': $description = $item['description']; $idAgentModule = $item['id_agent_module']; @@ -482,6 +493,7 @@ switch ($action) { $idAgent = $es['id_agents']; $idAgentModule = $inventory_modules; break; + case 'inventory_changes': $period = $item['period']; $description = $item['description']; @@ -489,12 +501,15 @@ switch ($action) { $inventory_modules = $es['inventory_modules']; $id_agents = $es['id_agents']; break; + case 'agent_configuration': $idAgent = $item['id_agent']; break; + case 'group_configuration': $group = $item['id_group']; break; + case 'netflow_area': case 'netflow_pie': case 'netflow_data': @@ -517,6 +532,7 @@ switch ($action) { break; } + $urlForm = $config['homeurl'] . 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=' . $actionParameter . '&id_report=' . $idReport; @@ -528,10 +544,12 @@ html_print_input_hidden('id_item', $idItem); - + + + + + @@ -618,8 +641,10 @@ html_print_input_hidden('id_item', $idItem); + ?> + + - + ?> + @@ -738,6 +765,8 @@ html_print_input_hidden('id_item', $idItem);
+ +
@@ -555,6 +574,7 @@ html_print_input_hidden('id_item', $idItem); ?>
@@ -573,6 +593,7 @@ html_print_input_hidden('id_item', $idItem); ?>
@@ -581,6 +602,7 @@ html_print_input_hidden('id_item', $idItem); ?>
+
+ + @@ -757,6 +786,7 @@ html_print_input_hidden('id_item', $idItem); ?> + @@ -807,8 +837,13 @@ html_print_input_hidden('id_item', $idItem); ?> + - + + + + @@ -865,6 +901,7 @@ html_print_input_hidden('id_item', $idItem); ?> + @@ -880,6 +917,7 @@ html_print_input_hidden('id_item', $idItem); ?> + @@ -897,6 +935,7 @@ html_print_input_hidden('id_item', $idItem); ?> + @@ -956,14 +995,19 @@ html_print_input_hidden('id_item', $idItem); ?> + + + + + @@ -973,6 +1017,7 @@ html_print_input_hidden('id_item', $idItem); + @@ -987,10 +1032,12 @@ html_print_input_hidden('id_item', $idItem); + + @@ -1023,14 +1070,17 @@ html_print_input_hidden('id_item', $idItem); ?> + + + @@ -1044,6 +1094,7 @@ html_print_input_hidden('id_item', $idItem); ?> + @@ -1052,6 +1103,7 @@ html_print_input_hidden('id_item', $idItem); ?> + @@ -1062,7 +1114,9 @@ html_print_input_hidden('id_item', $idItem); - + __('Everything'), REPORT_EXCEPTION_CONDITION_GE => __('Greater or equal (>=)'), @@ -1076,7 +1130,9 @@ html_print_input_hidden('id_item', $idItem); ); html_print_select($list_exception_condition, 'exception_condition', $exception_condition); - /*echo ; + + /* + echo __('Everything'); html_print_radio_button ('radiobutton_exception_condition', 0, '', $exception_condition); echo __('>='); html_print_radio_button ('radiobutton_exception_condition', 1, '', $exception_condition); @@ -1086,13 +1142,16 @@ html_print_input_hidden('id_item', $idItem); html_print_radio_button ('radiobutton_exception_condition', 3, '', $exception_condition); echo __('Not OK'); html_print_radio_button ('radiobutton_exception_condition', 4, '', $exception_condition); - */?> + */ + ?> + + - + + @@ -1131,7 +1191,7 @@ html_print_input_hidden('id_item', $idItem); ?> - + @@ -1161,15 +1221,18 @@ html_print_input_hidden('id_item', $idItem); + + + @@ -1180,6 +1243,9 @@ html_print_input_hidden('id_item', $idItem); ?> + + + @@ -1208,6 +1274,7 @@ echo ''; ui_include_time_picker(); ui_require_javascript_file('pandora'); + if ($enterpriseEnable) { reporting_enterprise_text_box(); } @@ -1255,13 +1322,15 @@ function print_SLA_list($width, $action, $idItem = null) { foreach ($itemsSLA as $item) { $server_name = $item ['server_name']; // Metaconsole db connection - if ($meta && $server_name != '') { + if ($meta && ($server_name != '')) { $connection = metaconsole_get_connection($server_name); if (metaconsole_load_external_db($connection) != NOERR) { //ui_print_error_message ("Error connecting to ".$server_name); continue; } } + + $idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module'])); @@ -1291,6 +1360,7 @@ function print_SLA_list($width, $action, $idItem = null) { ' . html_print_image("images/cross.png", true) . ' '; echo ''; + if ($meta) { //Restore db connection metaconsole_restore_db(); @@ -1310,11 +1380,13 @@ function print_SLA_list($width, $action, $idItem = null) { + + @@ -1359,7 +1431,10 @@ function print_SLA_list($width, $action, $idItem = null) { - + + + + - + + + $item['id_agent_module'])); @@ -1483,6 +1564,7 @@ function print_General_list($width, $action, $idItem = null, $type = 'general') } echo ''; ?> + @@ -1497,6 +1579,7 @@ function print_General_list($width, $action, $idItem = null, $type = 'general') + @@ -1542,6 +1625,7 @@ function print_General_list($width, $action, $idItem = null, $type = 'general') + + + $("#row_servers").show(); + + $("#combo_group").change(function() { $('#hidden-date_selected').val(''); @@ -2449,14 +2582,18 @@ function chooseType() { if (!$("#hidden-date_selected").val()) updateInventoryDates(); break; + case 'inventory_changes': break; + case 'agent_configuration': $("#row_agent").show(); break; + case 'group_configuration': $("#row_group").show(); break; + case 'netflow_area': $("#row_netflow_filter").show(); $("#row_description").show(); @@ -2465,6 +2602,7 @@ function chooseType() { $("#row_resolution").show(); $("#row_servers").show(); break; + case 'netflow_pie': $("#row_netflow_filter").show(); $("#row_description").show(); @@ -2473,6 +2611,7 @@ function chooseType() { $("#row_resolution").show(); $("#row_servers").show(); break; + case 'netflow_data': $("#row_netflow_filter").show(); $("#row_description").show(); @@ -2481,6 +2620,7 @@ function chooseType() { $("#row_resolution").show(); $("#row_servers").show(); break; + case 'netflow_summary': $("#row_netflow_filter").show(); $("#row_description").show(); @@ -2488,6 +2628,7 @@ function chooseType() { $("#row_resolution").show(); $("#row_servers").show(); break; + case 'netflow_statistics': $("#row_netflow_filter").show(); $("#row_description").show(); @@ -2496,6 +2637,9 @@ function chooseType() { $("#row_resolution").show(); $("#row_servers").show(); break; + + case 'automatic_graph': + break; } } @@ -2513,4 +2657,4 @@ function set_last_value_period() { $("#row_period").show(); } } - + \ No newline at end of file