diff --git a/pandora_console/godmode/reporting/visual_console_builder.elements.php b/pandora_console/godmode/reporting/visual_console_builder.elements.php index 533511eb0c..0f9949cfbf 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.elements.php +++ b/pandora_console/godmode/reporting/visual_console_builder.elements.php @@ -232,6 +232,7 @@ foreach ($layoutDatas as $layoutData) { break; } + //Parent switch ($layoutData['type']) { case BOX_ITEM: @@ -239,14 +240,10 @@ foreach ($layoutDatas as $layoutData) { $table->data[$i + 1][4] = ""; break; default: - $table->data[$i + 1][4] = html_print_select_from_sql( - 'SELECT id, label - FROM tlayout_data - WHERE id_layout = '. $idVisualConsole . ' - AND id !=' . $idLayoutData, + $parents = visual_map_get_items_parents($idVisualConsole); + $table->data[$i + 1][4] = html_print_select($parents, 'parent_' . $idLayoutData, $layoutData['parent_item'], - '', 'None', 0, true, false, true, false, - 'width: 120px;'); + '', __('None'), 0, true); } //Delete row button @@ -267,6 +264,7 @@ foreach ($layoutDatas as $layoutData) { //Second row $table->data[$i + 2]['icon'] = ''; + //Agent switch ($layoutData['type']) { case GROUP_ITEM: diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index b56f2aa38d..8e0efcc478 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1996,6 +1996,10 @@ function visual_map_create_internal_name_item($label = null, $type, $image, $age case LABEL: $text = __('Label'); break; + case GROUP_ITEM: + case 'group_item': + $text = __('Group') . " - "; + break; case 'icon': case ICON: $text = __('Icon') . " - " . @@ -2035,8 +2039,12 @@ function visual_map_get_items_parents($idVisual) { $agent = io_safe_output(agents_get_name($item['id_agent'])); } - $return[$item['id']] = visual_map_create_internal_name_item($item['label'], - $item['type'], $item['image'], $agent, $item['id_agente_modulo'], + $return[$item['id']] = visual_map_create_internal_name_item( + $item['label'], + $item['type'], + $item['image'], + $agent, + $item['id_agente_modulo'], $item['id']); } diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index c1b4334117..a282f563d1 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -444,7 +444,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { ')'; $form_items_advance['size_row'] = array(); - $form_items_advance['size_row']['items'] = array('background', + $form_items_advance['size_row']['items'] = array( + 'group_item', 'background', 'static_graph', 'icon datos'); $form_items_advance['size_row']['html'] = '' . __('Size') . @@ -459,7 +460,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $parents = visual_map_get_items_parents($visualConsole_id); $form_items_advance['parent_row'] = array(); - $form_items_advance['parent_row']['items'] = array('static_graph', + $form_items_advance['parent_row']['items'] = array( + 'group_item', 'static_graph', 'percentile_bar', 'percentile_item', 'module_graph', 'simple_value', 'label', 'icon', 'datos'); $form_items_advance['parent_row']['html'] = '' . @@ -471,8 +473,9 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items_advance['map_linked_row'] = array(); $form_items_advance['map_linked_row']['items'] = array( - 'static_graph', 'percentile_bar', 'percentile_item', - 'module_graph', 'simple_value', 'icon', 'label', 'datos'); + 'group_item', 'static_graph', 'percentile_bar', + 'percentile_item', 'module_graph', 'simple_value', + 'icon', 'label', 'datos'); $form_items_advance['map_linked_row']['html'] = ''. __('Map linked') . '' . '' . html_print_select_from_sql (