diff --git a/pandora_console/godmode/reporting/visual_console_builder.elements.php b/pandora_console/godmode/reporting/visual_console_builder.elements.php index d90cdd2c32..642d0fde04 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.elements.php +++ b/pandora_console/godmode/reporting/visual_console_builder.elements.php @@ -74,11 +74,11 @@ $table->class = 'databox data'; $table->head = array(); $table->head['icon'] = ''; -$table->head[0] = __('Label') . ' / ' . __('Agent') . ' / ' . __('Group'); -$table->head[1] = __('Image') . ' / ' . __('Module'); +$table->head[0] = __('Label') . '
' . __('Agent') . ' / ' . __('Group'); +$table->head[1] = __('Image') . '
' . __('Module') . ' / ' . __('Custom graph'); $table->head[2] = __('Width x Height
Max value'); -$table->head[3] = __('Period') . ' / ' . __('Position'); -$table->head[4] = __('Parent') . ' / ' . __('Map linked'); +$table->head[3] = __('Position') . '
' . __('Period'); +$table->head[4] = __('Parent') . '
' . __('Map linked'); $table->head[5] = ""; $table->head[5] .= '   ' . html_print_checkbox('head_multiple_delete', '', false, true, false, 'toggle_checkbox_multiple_delete();'); @@ -373,7 +373,11 @@ foreach ($layoutDatas as $layoutData) { $params['value'] = agents_get_name($layoutData['id_agent']); } - $table->data[$i + 2][0] = ui_print_agent_autocomplete_input($params); + if ($layoutData['id_agent'] == 0 and $layoutData['id_custom_graph'] != 0) { + $table->data[$i + 2][0] = __("Custom graph"); + } else { + $table->data[$i + 2][0] = ui_print_agent_autocomplete_input($params); + } } else { $table->data[$i + 2][0] = $cell_content_enterprise; @@ -416,10 +420,16 @@ foreach ($layoutDatas as $layoutData) { $modules = io_safe_output($modules); - $table->data[$i + 2][1] = html_print_select($modules, - 'module_' . $idLayoutData, - $layoutData['id_agente_modulo'], '', '---', 0, true, - false, true, '', false, "width: 120px"); + if ($layoutData['id_agent'] == 0 and $layoutData['id_custom_graph'] != 0) { + $table->data[$i + 2][1] = html_print_select_from_sql( + "SELECT id_graph, name FROM tgraph", 'custom_graph_' . $idLayoutData, + $layoutData['id_custom_graph'], '', __('None'), 0, true); + } else { + $table->data[$i + 2][1] = html_print_select($modules, + 'module_' . $idLayoutData, + $layoutData['id_agente_modulo'], '', '---', 0, true, + false, true, '', false, "width: 120px"); + } } else { $table->data[$i + 2][1] = $cell_content_enterprise; diff --git a/pandora_console/godmode/reporting/visual_console_builder.php b/pandora_console/godmode/reporting/visual_console_builder.php index b946a2bc0b..1759043958 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.php +++ b/pandora_console/godmode/reporting/visual_console_builder.php @@ -353,6 +353,7 @@ switch ($activeTab) { $values['id_agent'] = agents_get_agent_id($agentName); } $values['id_agente_modulo'] = get_parameter('module_' . $id, 0); + $values['id_custom_graph'] = get_parameter('custom_graph_' . $id, 0); $values['parent_item'] = get_parameter('parent_' . $id, 0); $values['id_layout_linked'] = get_parameter('map_linked_' . $id, 0);