diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index bc7c6c3844..65df500454 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -273,7 +273,7 @@ function readFields() { values['module'] = $("select[name=module]").val(); values['process_simple_value'] = $("select[name=process_value]").val(); values['background'] = $("#background_image").val(); - values['period'] = $("select[name=period]").val(); + values['period'] = $("#hidden-period").val(); values['width'] = $("input[name=width]").val(); values['height'] = $("input[name=height]").val(); values['parent'] = $("select[name=parent]").val(); diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index e051e964b0..8ae7aca3ab 100755 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -75,8 +75,7 @@ if (!$vconsole_write && !$vconsole_manage) { //Fix ajax to avoid include the file, 'functions_graph.php'. $ajax = true; - -require_once('include/functions_visual_map.php'); +require_once($config['homedir'] . "/include/functions_visual_map.php"); require_once($config['homedir'] . "/include/functions_agents.php"); require_once($config['homedir'] . '/include/functions_graph.php'); require_once($config['homedir'] . '/include/functions_custom_graphs.php'); @@ -95,7 +94,7 @@ $left = get_parameter('left', null); $top = get_parameter('top', null); $agent = get_parameter('agent', null); $id_module = get_parameter('module', null); -$period = (int)get_parameter('period', null); +$period = get_parameter('period', null); $width = get_parameter('width', null); $height = get_parameter('height', null); $parent = get_parameter('parent', null); @@ -159,7 +158,7 @@ switch ($action) { else { $img = grafico_modulo_sparse($id_agent_module, $period, 0, $width, $height, '', null, false, 1, - false, 0, '', 0, 0, true, true, '', 1, false, '', + 0, 0, '', 0, 0, true, true, '', 1, false, '', false, false, true, $background_color); } diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 5fb0292111..959de71c60 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -553,7 +553,7 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events, // Get module data $data = db_get_all_rows_filter ('tagente_datos', - array ('id_agente_modulo' => $agent_module_id, + array ('id_agente_modulo' => (int)$agent_module_id, "utimestamp > $datelimit", "utimestamp < $date", 'order' => 'utimestamp ASC'),