From 4579d2b8c6d3642a70f657be87b55fdf167eb229 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 13 Oct 2021 15:20:20 +0200 Subject: [PATCH] #8105 Fixed list of elements --- .../visual_console_builder.elements.php | 46 ++++++++++++++++++- .../reporting/visual_console_builder.php | 8 +++- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.elements.php b/pandora_console/godmode/reporting/visual_console_builder.elements.php index 780ef8b397..e1e6727804 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.elements.php +++ b/pandora_console/godmode/reporting/visual_console_builder.elements.php @@ -204,6 +204,15 @@ foreach ($layoutDatas as $layoutData) { ); break; + case CIRCULAR_INTERIOR_PROGRESS_BAR: + case CIRCULAR_PROGRESS_BAR: + $table->data[($i + 1)]['icon'] = html_print_image( + 'images/percentile_item.png', + true, + ['title' => __('Percentile')] + ); + break; + case MODULE_GRAPH: $table->data[($i + 1)]['icon'] = html_print_image( 'images/chart_curve.png', @@ -325,6 +334,30 @@ foreach ($layoutDatas as $layoutData) { ); break; + case BASIC_CHART: + $table->data[($i + 1)]['icon'] = html_print_image( + 'images/basic_chart.png', + true, + ['title' => __('Basic chart')] + ); + break; + + case ODOMETER: + $table->data[($i + 1)]['icon'] = html_print_image( + 'images/odometer.png', + true, + ['title' => __('Odometer')] + ); + break; + + case CLOCK: + $table->data[($i + 1)]['icon'] = html_print_image( + 'images/clock-tab.png', + true, + ['title' => __('Clock')] + ); + break; + default: if (enterprise_installed()) { $table->data[($i + 1)]['icon'] = enterprise_visual_map_print_list_element('icon', $layoutData); @@ -394,6 +427,13 @@ foreach ($layoutDatas as $layoutData) { $table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true).' x '.html_print_input_text('height_'.$idLayoutData, $layoutData['width'], '', 2, 5, true); break; + case CIRCULAR_PROGRESS_BAR: + case CIRCULAR_INTERIOR_PROGRESS_BAR: + case PERCENTILE_BUBBLE: + case PERCENTILE_BAR: + $table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true); + break; + default: $table->data[($i + 1)][2] = html_print_input_text('width_'.$idLayoutData, $layoutData['width'], '', 2, 5, true).' x '.html_print_input_text('height_'.$idLayoutData, $layoutData['height'], '', 2, 5, true); break; @@ -478,6 +518,7 @@ foreach ($layoutDatas as $layoutData) { case LABEL: case NETWORK_LINK: case LINE_ITEM: + case CLOCK: $table->data[($i + 2)][0] = ''; break; @@ -520,7 +561,7 @@ foreach ($layoutDatas as $layoutData) { $params['value'] = db_get_value('alias', 'tagente', 'id_agente', $layoutData['id_agent']); } - if ($layoutData['id_agent'] == 0 and $layoutData['id_custom_graph'] != 0) { + if ($layoutData['id_custom_graph'] != 0) { $table->data[($i + 2)][0] = __('Custom graph'); } else { $table->data[($i + 2)][0] = ui_print_agent_autocomplete_input($params); @@ -540,6 +581,7 @@ foreach ($layoutDatas as $layoutData) { case NETWORK_LINK: case LINE_ITEM: case GROUP_ITEM: + case CLOCK: $table->data[($i + 2)][1] = ''; break; @@ -569,7 +611,7 @@ foreach ($layoutDatas as $layoutData) { $modules = io_safe_output($modules); - if ($layoutData['id_agent'] == 0 and $layoutData['id_custom_graph'] != 0) { + if ($layoutData['id_custom_graph'] != 0) { if (is_metaconsole()) { $graphs = []; $graphs = metaconsole_get_custom_graphs(true); diff --git a/pandora_console/godmode/reporting/visual_console_builder.php b/pandora_console/godmode/reporting/visual_console_builder.php index 444296a290..860ec80a24 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.php +++ b/pandora_console/godmode/reporting/visual_console_builder.php @@ -460,7 +460,13 @@ switch ($activeTab) { case GROUP_ITEM: $values['id_group'] = get_parameter('group_'.$id, 0); - $values['show_statistics'] = get_parameter('show_statistics', 0); + break; + + case CIRCULAR_PROGRESS_BAR: + case CIRCULAR_INTERIOR_PROGRESS_BAR: + case PERCENTILE_BUBBLE: + case PERCENTILE_BAR: + unset($values['height']); break; }