Fixed module graphs in visual console.

This commit is contained in:
Arturo Gonzalez Diaz 2015-10-01 13:42:37 +02:00
parent a72f6e051b
commit 29174e6368
3 changed files with 5 additions and 6 deletions

View File

@ -273,7 +273,7 @@ function readFields() {
values['module'] = $("select[name=module]").val(); values['module'] = $("select[name=module]").val();
values['process_simple_value'] = $("select[name=process_value]").val(); values['process_simple_value'] = $("select[name=process_value]").val();
values['background'] = $("#background_image").val(); values['background'] = $("#background_image").val();
values['period'] = $("select[name=period]").val(); values['period'] = $("#hidden-period").val();
values['width'] = $("input[name=width]").val(); values['width'] = $("input[name=width]").val();
values['height'] = $("input[name=height]").val(); values['height'] = $("input[name=height]").val();
values['parent'] = $("select[name=parent]").val(); values['parent'] = $("select[name=parent]").val();

View File

@ -75,8 +75,7 @@ if (!$vconsole_write && !$vconsole_manage) {
//Fix ajax to avoid include the file, 'functions_graph.php'. //Fix ajax to avoid include the file, 'functions_graph.php'.
$ajax = true; $ajax = true;
require_once($config['homedir'] . "/include/functions_visual_map.php");
require_once('include/functions_visual_map.php');
require_once($config['homedir'] . "/include/functions_agents.php"); require_once($config['homedir'] . "/include/functions_agents.php");
require_once($config['homedir'] . '/include/functions_graph.php'); require_once($config['homedir'] . '/include/functions_graph.php');
require_once($config['homedir'] . '/include/functions_custom_graphs.php'); require_once($config['homedir'] . '/include/functions_custom_graphs.php');
@ -95,7 +94,7 @@ $left = get_parameter('left', null);
$top = get_parameter('top', null); $top = get_parameter('top', null);
$agent = get_parameter('agent', null); $agent = get_parameter('agent', null);
$id_module = get_parameter('module', null); $id_module = get_parameter('module', null);
$period = (int)get_parameter('period', null); $period = get_parameter('period', null);
$width = get_parameter('width', null); $width = get_parameter('width', null);
$height = get_parameter('height', null); $height = get_parameter('height', null);
$parent = get_parameter('parent', null); $parent = get_parameter('parent', null);
@ -159,7 +158,7 @@ switch ($action) {
else { else {
$img = grafico_modulo_sparse($id_agent_module, $img = grafico_modulo_sparse($id_agent_module,
$period, 0, $width, $height, '', null, false, 1, $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); false, false, true, $background_color);
} }

View File

@ -553,7 +553,7 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
// Get module data // Get module data
$data = db_get_all_rows_filter ('tagente_datos', $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 > $datelimit",
"utimestamp < $date", "utimestamp < $date",
'order' => 'utimestamp ASC'), 'order' => 'utimestamp ASC'),