2012-06-11 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_io.php: fixed the function "io_safe_output" for
	arrays, now into the function call other function with the name
	"io_safe_output_array".
	
	* include/functions_visual_map.php,
	include/ajax/visual_console_builder.ajax.php,
	godmode/reporting/visual_console_builder.wizard.php,
	godmode/reporting/visual_console_builder.php,
	godmode/reporting/visual_console_builder.editor.js,
	godmode/reporting/visual_console_builder.elements.php,
	godmode/reporting/visual_console_builder.editor.php,
	godmode/reporting/visual_console_builder.constans.php: fixed a lot
	of things about simple value and derivates.
	
	MERGED FROM 4.0.2




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6497 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2012-06-11 19:13:20 +00:00
parent 538d9c9874
commit dde8590f76
10 changed files with 154 additions and 60 deletions

View File

@ -1,3 +1,21 @@
2012-06-11 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_io.php: fixed the function "io_safe_output" for
arrays, now into the function call other function with the name
"io_safe_output_array".
* include/functions_visual_map.php,
include/ajax/visual_console_builder.ajax.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/visual_console_builder.constans.php: fixed a lot
of things about simple value and derivates.
MERGED FROM 4.0.2
2012-06-11 Dario Rodriguez <dario.rodriguez@artica.es> 2012-06-11 Dario Rodriguez <dario.rodriguez@artica.es>
* operatoin/tree.php: Fixed a bug related to html tag id * operatoin/tree.php: Fixed a bug related to html tag id

View File

@ -23,4 +23,9 @@ define('SIMPLE_VALUE_MAX', 6);
define('SIMPLE_VALUE_MIN', 7); define('SIMPLE_VALUE_MIN', 7);
define('SIMPLE_VALUE_AVG', 8); define('SIMPLE_VALUE_AVG', 8);
define('PERCENTILE_BUBBLE', 9); define('PERCENTILE_BUBBLE', 9);
define('PROCESS_VALUE_NONE', 0);
define('PROCESS_VALUE_MIN', 1);
define('PROCESS_VALUE_MAX', 2);
define('PROCESS_VALUE_AVG', 3);
?> ?>

View File

@ -218,7 +218,7 @@ function updateAction() {
break; break;
case 'simple_value': case 'simple_value':
$("#text_" + idItem).html(values['label']); $("#text_" + idItem).html(values['label']);
$("#simplevalue_" + idItem).html(getModuleValue(idItem,values['process_simple_value'])); $("#simplevalue_" + idItem).html(getModuleValue(idItem,values['process_simple_value'], values['period']));
break; break;
case 'label': case 'label':
$("#" + idItem).css('color', values['label_color']); $("#" + idItem).css('color', values['label_color']);
@ -727,11 +727,12 @@ function getModuleGraph(id_data) {
return img; return img;
} }
function getModuleValue(id_data, process_simple_value) { function getModuleValue(id_data, process_simple_value, period) {
var parameter = Array(); var parameter = Array();
parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"}); parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"});
parameter.push ({name: "action", value: "get_module_value"}); parameter.push ({name: "action", value: "get_module_value"});
parameter.push ({name: "id_element", value: id_data}); parameter.push ({name: "id_element", value: id_data});
parameter.push ({name: "period", value: period});
if(process_simple_value != undefined) { if(process_simple_value != undefined) {
parameter.push ({name: "process_simple_value", value: process_simple_value}); parameter.push ({name: "process_simple_value", value: process_simple_value});
} }
@ -1028,7 +1029,7 @@ function createItem(type, values, id_data) {
imageSize = ''; imageSize = '';
item = $('<div id="' + id_data + '" class="item simple_value" style="color: ' + values['label_color'] + '; text-align: center; position: absolute; ' + sizeStyle + ' top: ' + values['top'] + 'px; left: ' + values['left'] + 'px;">' + item = $('<div id="' + id_data + '" class="item simple_value" style="color: ' + values['label_color'] + '; text-align: center; position: absolute; ' + sizeStyle + ' top: ' + values['top'] + 'px; left: ' + values['left'] + 'px;">' +
'<span id="text_' + id_data + '" class="text"> ' + values['label'] + '</span>' + '<span id="text_' + id_data + '" class="text"> ' + values['label'] + '</span> ' +
'<strong>' + getModuleValue(id_data) + '</strong>' + '<strong>' + getModuleValue(id_data) + '</strong>' +
'</div>' '</div>'
); );

View File

@ -129,9 +129,9 @@ echo '<div id="properties_panel" style="display: none; position: absolute; borde
<tr id="process_value_row" class="simple_value datos"> <tr id="process_value_row" class="simple_value datos">
<td><?php echo '<span>' . __('Process') . '</span>';?></td> <td><?php echo '<span>' . __('Process') . '</span>';?></td>
<td><?php html_print_select ( <td><?php html_print_select (
array ('1' => __('Min value'), array (PROCESS_VALUE_MIN => __('Min value'),
'2' => __('Max value'), PROCESS_VALUE_MAX => __('Max value'),
'3' => __('Avg value')), 'process_value', '', '', __('None'), 0);?></td> PROCESS_VALUE_AVG => __('Avg value')), 'process_value', '', '', __('None'), PROCESS_VALUE_NONE);?></td>
</tr> </tr>
<tr id="background_row_1" class="background datos"> <tr id="background_row_1" class="background datos">
<td><?php echo __('Background');?></td> <td><?php echo __('Background');?></td>
@ -183,7 +183,7 @@ echo '<div id="properties_panel" style="display: none; position: absolute; borde
?> ?>
</td> </td>
</tr> </tr>
<tr id="period_row" class="module_graph datos"> <tr id="period_row" class="module_graph simple_value datos">
<td><?php echo __('Period');?></td> <td><?php echo __('Period');?></td>
<td><?php <td><?php
html_print_extended_select_for_time ('period', '', '', '', '') html_print_extended_select_for_time ('period', '', '', '', '')

View File

@ -105,6 +105,15 @@ foreach ($layoutDatas as $layoutData) {
case SIMPLE_VALUE: case SIMPLE_VALUE:
$table->data[$i + 1]['icon'] = html_print_image('images/binary.png', true, array('title' => __('Simple Value'))); $table->data[$i + 1]['icon'] = html_print_image('images/binary.png', true, array('title' => __('Simple Value')));
break; break;
case SIMPLE_VALUE_MAX:
$table->data[$i + 1]['icon'] = html_print_image('images/binary.png', true, array('title' => __('Simple Value (Process Max)')));
break;
case SIMPLE_VALUE_MIN:
$table->data[$i + 1]['icon'] = html_print_image('images/binary.png', true, array('title' => __('Simple Value (Process Min)')));
break;
case SIMPLE_VALUE_AVG:
$table->data[$i + 1]['icon'] = html_print_image('images/binary.png', true, array('title' => __('Simple Value (Process Avg)')));
break;
case LABEL: case LABEL:
$table->data[$i + 1]['icon'] = html_print_image('images/tag_red.png', true, array('title' => __('Label'))); $table->data[$i + 1]['icon'] = html_print_image('images/tag_red.png', true, array('title' => __('Label')));
break; break;
@ -157,8 +166,8 @@ foreach ($layoutDatas as $layoutData) {
$activeTab . '&action=delete&id_visual_console=' . $visualConsole["id"] . '&id_element=' . $idLayoutData . '" ' . $activeTab . '&action=delete&id_visual_console=' . $visualConsole["id"] . '&id_element=' . $idLayoutData . '" ' .
'onclick="javascript: if (!confirm(\'' . __('Are you sure?') . '\')) return false;">' . html_print_image('images/cross.png', true) . '</a>'; 'onclick="javascript: if (!confirm(\'' . __('Are you sure?') . '\')) return false;">' . html_print_image('images/cross.png', true) . '</a>';
//Second row
//Second row
$table->data[$i + 2]['icon'] = ''; $table->data[$i + 2]['icon'] = '';
//Agent //Agent
@ -173,8 +182,11 @@ foreach ($layoutDatas as $layoutData) {
//Modules //Modules
if (($layoutData['type'] != ICON) && ($layoutData['type'] != LABEL)) { if (($layoutData['type'] != ICON) && ($layoutData['type'] != LABEL)) {
$sql = 'SELECT id_agente_modulo, nombre FROM tagente_modulo WHERE disabled = 0 AND id_agente = ' . $layoutData['id_agent']; $modules = agents_get_modules($layoutData['id_agent']);
$table->data[$i + 2][1] = html_print_select_from_sql($sql,
$modules = io_safe_output($modules);
$table->data[$i + 2][1] = html_print_select($modules,
'module_' . $idLayoutData, $layoutData['id_agente_modulo'], '', '---', 0, true); 'module_' . $idLayoutData, $layoutData['id_agente_modulo'], '', '---', 0, true);
} }
else { else {
@ -185,16 +197,21 @@ foreach ($layoutDatas as $layoutData) {
$table->data[$i + 2][2] = ''; $table->data[$i + 2][2] = '';
//Period //Period
if ($layoutData['type'] == MODULE_GRAPH) { switch ($layoutData['type']) {
$table->data[$i + 2][3] = html_print_extended_select_for_time ('period_' . $idLayoutData, $layoutData['period'], '', '--', '0', 10, true); case MODULE_GRAPH:
} case SIMPLE_VALUE_MAX:
else { case SIMPLE_VALUE_MIN:
$table->data[$i + 2][3] = ''; case SIMPLE_VALUE_AVG:
$table->data[$i + 2][3] = html_print_extended_select_for_time ('period_' . $idLayoutData, $layoutData['period'], '', '--', '0', 10, true);
break;
default:
$table->data[$i + 2][3] = '';
break;
} }
//Map linked //Map linked
$table->data[$i + 2][4] = html_print_select_from_sql ('SELECT id, name FROM tlayout WHERE id != ' . $idVisualConsole, $table->data[$i + 2][4] = html_print_select_from_sql ('SELECT id, name FROM tlayout WHERE id != ' . $idVisualConsole,
'map_linked_' . $idLayoutData, $layoutData['id_layout_linked'], '', 'None', '', true); 'map_linked_' . $idLayoutData, $layoutData['id_layout_linked'], '', 'None', '', true);
$table->data[$i + 2][5] = ''; $table->data[$i + 2][5] = '';
if ($alternativeStyle) { if ($alternativeStyle) {

View File

@ -137,8 +137,13 @@ switch ($activeTab) {
$values['pos_x'] = get_parameter('left_' . $id, 0); $values['pos_x'] = get_parameter('left_' . $id, 0);
$values['pos_y'] = get_parameter('top_' . $id, 0); $values['pos_y'] = get_parameter('top_' . $id, 0);
$type = db_get_value('type', 'tlayout_data', 'id', $id); $type = db_get_value('type', 'tlayout_data', 'id', $id);
if ($type == 1) { switch($type) {
$values['period'] = get_parameter('period_' . $id, 0); case MODULE_GRAPH:
case SIMPLE_VALUE_MAX:
case SIMPLE_VALUE_MIN:
case SIMPLE_VALUE_AVG:
$values['period'] = get_parameter('period_' . $id, 0);
break;
} }
$agentName = get_parameter('agent_' . $id, ''); $agentName = get_parameter('agent_' . $id, '');
$values['id_agent'] = agents_get_agent_id($agentName); $values['id_agent'] = agents_get_agent_id($agentName);

View File

@ -74,16 +74,16 @@ $table->data["staticgraph_modulegraph"][0] = __('Size (px)');
$table->data["staticgraph_modulegraph"][1] = __('Width').': '.html_print_input_text ('width', 0, '', 5, 5, true); $table->data["staticgraph_modulegraph"][1] = __('Width').': '.html_print_input_text ('width', 0, '', 5, 5, true);
$table->data["staticgraph_modulegraph"][1] .= ' ' . __('Height').': '.html_print_input_text ('height', 0, '', 5, 5, true); $table->data["staticgraph_modulegraph"][1] .= ' ' . __('Height').': '.html_print_input_text ('height', 0, '', 5, 5, true);
$table->rowstyle["modulegraph"] = 'display: none;'; $table->rowstyle["modulegraph_simplevalue"] = 'display: none;';
$table->data["modulegraph"][0] = __('Period'); $table->data["modulegraph_simplevalue"][0] = __('Period');
$table->data["modulegraph"][1] = html_print_extended_select_for_time ('period', '', '', '', '', false, true); $table->data["modulegraph_simplevalue"][1] = html_print_extended_select_for_time ('period', '', '', '', '', false, true);
$table->rowstyle["simplevalue"] = 'display: none;'; $table->rowstyle["simplevalue"] = 'display: none;';
$table->data["simplevalue"][0] = __('Process'); $table->data["simplevalue"][0] = __('Process');
$table->data["simplevalue"][1] = html_print_select ( $table->data["simplevalue"][1] = html_print_select (
array (SIMPLE_VALUE_MIN => __('Min value'), array (PROCESS_VALUE_MIN => __('Min value'),
SIMPLE_VALUE_MAX => __('Max value'), PROCESS_VALUE_MAX => __('Max value'),
SIMPLE_VALUE_AVG => __('Avg value')), 'process_value', '', '', '', '', true); PROCESS_VALUE_AVG => __('Avg value')), 'process_value', PROCESS_VALUE_AVG, '', __('None'), PROCESS_VALUE_NONE, true);
$table->rowstyle["percentileitem_1"] = 'display: none;'; $table->rowstyle["percentileitem_1"] = 'display: none;';
$table->data["percentileitem_1"][0] = __('Width (px)'); $table->data["percentileitem_1"][0] = __('Width (px)');
@ -147,6 +147,17 @@ var show_only_enabled_modules = true;
$(document).ready (function () { $(document).ready (function () {
hidden_rows(); hidden_rows();
$("#process_value").change(function () {
selected = $("#process_value").val();
if (selected == <?php echo PROCESS_VALUE_NONE;?>) {
$("tr", "#wizard_table").filter(function () {return /^.*modulegraph_simplevalue.*/.test(this.id); }).hide();
}
else {
$("tr", "#wizard_table").filter(function () {return /^.*modulegraph_simplevalue.*/.test(this.id); }).show();
}
});
$("#groups").change (function () { $("#groups").change (function () {
$('#id_agents').attr('disabled', true); $('#id_agents').attr('disabled', true);
$('#id_agents').empty (); $('#id_agents').empty ();

View File

@ -57,7 +57,7 @@ $max_percentile = get_parameter('max_percentile', null);
$height_module_graph = get_parameter('height_module_graph', null); $height_module_graph = get_parameter('height_module_graph', null);
$width_module_graph = get_parameter('width_module_graph', null); $width_module_graph = get_parameter('width_module_graph', null);
$id_agent_module = get_parameter('id_agent_module', 0); $id_agent_module = get_parameter('id_agent_module', 0);
$process_simple_value = get_parameter('process_simple_value', 0); $process_simple_value = get_parameter('process_simple_value', PROCESS_VALUE_NONE);
$type_percentile = get_parameter('type_percentile', 'percentile'); $type_percentile = get_parameter('type_percentile', 'percentile');
$value_show = get_parameter('value_show', 'percent'); $value_show = get_parameter('value_show', 'percent');
@ -94,7 +94,8 @@ switch ($action) {
case SIMPLE_VALUE_MIN: case SIMPLE_VALUE_MIN:
case SIMPLE_VALUE_AVG: case SIMPLE_VALUE_AVG:
$type = visual_map_get_simple_value_type($process_simple_value); $type = visual_map_get_simple_value_type($process_simple_value);
$returnValue = visual_map_get_simple_value($type, $layoutData['id_agente_modulo']); $returnValue = visual_map_get_simple_value($type,
$layoutData['id_agente_modulo'], $period);
break; break;
case PERCENTILE_BAR: case PERCENTILE_BAR:
case PERCENTILE_BUBBLE: case PERCENTILE_BUBBLE:
@ -222,7 +223,10 @@ switch ($action) {
echo (int)$result; echo (int)$result;
break; break;
case 'simple_value': case 'simple_value':
$values['type'] = visual_map_get_simple_value_type($process_simple_value); if ($action == 'update') {
$values['type'] = visual_map_get_simple_value_type($process_simple_value);
$values['period'] = $period;
}
case 'percentile_bar': case 'percentile_bar':
case 'percentile_item': case 'percentile_item':
case 'static_graph': case 'static_graph':
@ -432,6 +436,7 @@ switch ($action) {
case 'simple_value': case 'simple_value':
//This allows min, max and avg process in a simple value //This allows min, max and avg process in a simple value
$values['type'] = visual_map_get_simple_value_type($process_simple_value); $values['type'] = visual_map_get_simple_value_type($process_simple_value);
$values['period'] = $period;
break; break;
case 'label': case 'label':
$values['type'] = LABEL; $values['type'] = LABEL;

View File

@ -172,6 +172,19 @@ function io_html_to_ascii($hex) {
return chr($dec); return chr($dec);
} }
/**
* Safe output function for array.
*
* @param mixed $item The item pass as reference of item.
* @param mixed $key The key of array.
* @param boolean $utf8 The encoding.
*
* @return void
*/
function io_safe_output_array(&$item, $key, $utf8 = true) {
$item = io_safe_output($item, $utf8);
}
/** /**
* Convert the $value encode in html entity to clear char string. This function * Convert the $value encode in html entity to clear char string. This function
* should be called always to "clean" HTML encoded data; to render to a text * should be called always to "clean" HTML encoded data; to render to a text
@ -189,7 +202,8 @@ function io_safe_output($value, $utf8 = true)
return $value; return $value;
if (is_array($value)) { if (is_array($value)) {
array_walk($value, "io_safe_output"); array_walk($value, "io_safe_output_array");
return $value; return $value;
} }

View File

@ -234,7 +234,7 @@ function visual_map_print_item($layoutData) {
case SIMPLE_VALUE_AVG: case SIMPLE_VALUE_AVG:
echo '<div id="' . $id . '" class="item simple_value" style="left: 0px; top: 0px; color: ' . $color . '; text-align: center; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top . 'px; margin-left: ' . $left . 'px;">'; echo '<div id="' . $id . '" class="item simple_value" style="left: 0px; top: 0px; color: ' . $color . '; text-align: center; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top . 'px; margin-left: ' . $left . 'px;">';
echo $text; echo $text;
$value = visual_map_get_simple_value($type, $id_module); $value = visual_map_get_simple_value($type, $id_module, $period);
echo ' <span id="simplevalue_' . $id . '" style="font-weight:bold;">' . $value . '</span>'; echo ' <span id="simplevalue_' . $id . '" style="font-weight:bold;">' . $value . '</span>';
echo '</div>'; echo '</div>';
break; break;
@ -288,17 +288,17 @@ function visual_map_print_item($layoutData) {
* SIMPLE_VALUE, SIMPLE_VALUE_MAX, SIMPLE_VALUE_MIN, SIMPLE_VALUE_AVG * SIMPLE_VALUE, SIMPLE_VALUE_MAX, SIMPLE_VALUE_MIN, SIMPLE_VALUE_AVG
*/ */
function visual_map_get_simple_value_type($process_simple_value) { function visual_map_get_simple_value_type($process_simple_value) {
switch ($process_simple_value){ switch ($process_simple_value) {
case 0: case PROCESS_VALUE_NONE:
return SIMPLE_VALUE; return SIMPLE_VALUE;
break; break;
case 1: case PROCESS_VALUE_MIN:
return SIMPLE_VALUE_MIN; return SIMPLE_VALUE_MIN;
break; break;
case 2: case PROCESS_VALUE_MAX:
return SIMPLE_VALUE_MAX; return SIMPLE_VALUE_MAX;
break; break;
case 3: case PROCESS_VALUE_AVG:
return SIMPLE_VALUE_AVG; return SIMPLE_VALUE_AVG;
break; break;
} }
@ -310,22 +310,26 @@ function visual_map_get_simple_value_type($process_simple_value) {
* @param int type of the retrieving choosed among the constants: * @param int type of the retrieving choosed among the constants:
* SIMPLE_VALUE, SIMPLE_VALUE_MAX, SIMPLE_VALUE_MIN, SIMPLE_VALUE_AVG * SIMPLE_VALUE, SIMPLE_VALUE_MAX, SIMPLE_VALUE_MIN, SIMPLE_VALUE_AVG
* @param int id agent module * @param int id agent module
* @param int period The period in seconds for calculate the avg or min or max value.
* *
* @return string value retrieved with units * @return string value retrieved with units
*/ */
function visual_map_get_simple_value($type, $id_module) { function visual_map_get_simple_value($type, $id_module, $period = SECONDS_1DAY) {
$unit_text = db_get_sql ('SELECT unit FROM tagente_modulo WHERE id_agente_modulo = ' . $id_module); $unit_text = db_get_sql ('SELECT unit
FROM tagente_modulo WHERE id_agente_modulo = ' . $id_module);
$unit_text = trim(io_safe_output($unit_text)); $unit_text = trim(io_safe_output($unit_text));
switch ($type){
switch ($type) {
case SIMPLE_VALUE: case SIMPLE_VALUE:
$value = db_get_value ('datos', 'tagente_estado', 'id_agente_modulo', $id_module); $value = db_get_value ('datos', 'tagente_estado',
'id_agente_modulo', $id_module);
$value = format_for_graph($value, 2); $value = format_for_graph($value, 2);
if (!empty($unit_text)) if (!empty($unit_text))
$value .= " " . $unit_text; $value .= " " . $unit_text;
return $value; return $value;
break; break;
case SIMPLE_VALUE_MAX: case SIMPLE_VALUE_MAX:
$value = reporting_get_agentmodule_data_max ($id_module, 86400, 0); $value = reporting_get_agentmodule_data_max ($id_module, $period, 0);
if ($value === false) { if ($value === false) {
$value = __('Unknown'); $value = __('Unknown');
} }
@ -337,7 +341,7 @@ function visual_map_get_simple_value($type, $id_module) {
return $value; return $value;
break; break;
case SIMPLE_VALUE_MIN: case SIMPLE_VALUE_MIN:
$value = reporting_get_agentmodule_data_min ($id_module, 86400, 0); $value = reporting_get_agentmodule_data_min ($id_module, $period, 0);
if ($value === false) { if ($value === false) {
$value = __('Unknown'); $value = __('Unknown');
} }
@ -349,7 +353,7 @@ function visual_map_get_simple_value($type, $id_module) {
return $value; return $value;
break; break;
case SIMPLE_VALUE_AVG: case SIMPLE_VALUE_AVG:
$value = reporting_get_agentmodule_data_average ($id_module, 86400, 0); $value = reporting_get_agentmodule_data_average ($id_module, $period, 0);
if ($value === false) { if ($value === false) {
$value = __('Unknown'); $value = __('Unknown');
} }
@ -489,7 +493,21 @@ function visual_map_process_wizard_add_modules ($id_modules, $image, $id_layout,
} }
break; break;
case SIMPLE_VALUE: case SIMPLE_VALUE:
$value_type = $process_value; $value_image = '';
switch ($process_value) {
case PROCESS_VALUE_NONE:
$value_type = SIMPLE_VALUE;
break;
case PROCESS_VALUE_MIN:
$value_type = SIMPLE_VALUE_MIN;
break;
case PROCESS_VALUE_MAX:
$value_type = SIMPLE_VALUE_MAX;
break;
case PROCESS_VALUE_AVG:
$value_type = SIMPLE_VALUE_AVG;
break;
}
break; break;
} }
@ -1055,7 +1073,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
echo '<strong>'.$layout_data['label']. ' '; echo '<strong>'.$layout_data['label']. ' ';
//TODO: change interface to add a period parameter, now is set to 1 day //TODO: change interface to add a period parameter, now is set to 1 day
switch ($layout_data['type']){ switch ($layout_data['type']) {
case 2: case 2:
$value = db_get_value ('datos', 'tagente_estado', 'id_agente_modulo', $layout_data['id_agente_modulo']); $value = db_get_value ('datos', 'tagente_estado', 'id_agente_modulo', $layout_data['id_agente_modulo']);
$value = format_for_graph($value, 2); $value = format_for_graph($value, 2);
@ -1064,7 +1082,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
echo $value; echo $value;
break; break;
case 6: case 6:
$value = reporting_get_agentmodule_data_max ($layout_data['id_agente_modulo'], 86400, 0); $value = reporting_get_agentmodule_data_max ($layout_data['id_agente_modulo'], $layout_data['period'], 0);
if ($value === false) { if ($value === false) {
$value = __('Unknown'); $value = __('Unknown');
} }
@ -1076,7 +1094,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
echo $value; echo $value;
break; break;
case 7: case 7:
$value = reporting_get_agentmodule_data_min ($layout_data['id_agente_modulo'], 86400, 0); $value = reporting_get_agentmodule_data_min ($layout_data['id_agente_modulo'], $layout_data['period'], 0);
if ($value === false) { if ($value === false) {
$value = __('Unknown'); $value = __('Unknown');
} }
@ -1088,7 +1106,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
echo $value; echo $value;
break; break;
case 8: case 8:
$value = reporting_get_agentmodule_data_average($layout_data['id_agente_modulo'], 86400, 0); $value = reporting_get_agentmodule_data_average($layout_data['id_agente_modulo'], $layout_data['period'], 0);
if ($value === false) { if ($value === false) {
$value = __('Unknown'); $value = __('Unknown');
} }