From bb3ed471bcd264306729d13c0709781742c5c40f Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 11 Jun 2012 19:13:20 +0000 Subject: [PATCH] 2012-06-11 Miguel de Dios * 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 --- pandora_console/ChangeLog | 18 +++++ .../visual_console_builder.constans.php | 5 ++ .../visual_console_builder.editor.js | 9 +-- .../visual_console_builder.editor.php | 8 +-- .../visual_console_builder.elements.php | 35 +++++++--- .../reporting/visual_console_builder.php | 9 ++- .../visual_console_builder.wizard.php | 23 +++++-- .../ajax/visual_console_builder.ajax.php | 15 ++-- pandora_console/include/functions_io.php | 24 +++++-- .../include/functions_visual_map.php | 68 ++++++++++++------- 10 files changed, 154 insertions(+), 60 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a63dd8b868..c62c1a6ad8 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,21 @@ +2012-06-11 Miguel de Dios + + * 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 * operatoin/tree.php: Fixed a bug related to html tag id diff --git a/pandora_console/godmode/reporting/visual_console_builder.constans.php b/pandora_console/godmode/reporting/visual_console_builder.constans.php index 80a0d7c0aa..ad7ff18fca 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.constans.php +++ b/pandora_console/godmode/reporting/visual_console_builder.constans.php @@ -23,4 +23,9 @@ define('SIMPLE_VALUE_MAX', 6); define('SIMPLE_VALUE_MIN', 7); define('SIMPLE_VALUE_AVG', 8); define('PERCENTILE_BUBBLE', 9); + +define('PROCESS_VALUE_NONE', 0); +define('PROCESS_VALUE_MIN', 1); +define('PROCESS_VALUE_MAX', 2); +define('PROCESS_VALUE_AVG', 3); ?> diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index d23841f91a..4a04ce286a 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -179,7 +179,7 @@ function updateAction() { success: function (data) { $("#background_img").attr('src', data); } - }); + }); idElement = 0; break; @@ -218,7 +218,7 @@ function updateAction() { break; case 'simple_value': $("#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; case 'label': $("#" + idItem).css('color', values['label_color']); @@ -727,11 +727,12 @@ function getModuleGraph(id_data) { return img; } -function getModuleValue(id_data, process_simple_value) { +function getModuleValue(id_data, process_simple_value, period) { var parameter = Array(); parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"}); parameter.push ({name: "action", value: "get_module_value"}); parameter.push ({name: "id_element", value: id_data}); + parameter.push ({name: "period", value: period}); if(process_simple_value != undefined) { parameter.push ({name: "process_simple_value", value: process_simple_value}); } @@ -1028,7 +1029,7 @@ function createItem(type, values, id_data) { imageSize = ''; item = $('
' + - ' ' + values['label'] + '' + + ' ' + values['label'] + ' ' + '' + getModuleValue(id_data) + '' + '
' ); diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.php b/pandora_console/godmode/reporting/visual_console_builder.editor.php index fb0f253c40..02f60355c4 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.php +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.php @@ -129,9 +129,9 @@ echo '