diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 942edc72b3..3a035272c7 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2011-02-28 Juan Manuel Ramon + + * include/ajax/visual_console_builder.ajax.php + godmode/reporting/visual_console_builder.editor.js: Status information is + saved when static graph are created in visual console. + * godmode/reporting/visual_console_builder.elements.php: Fixed wrong call to + __() function from functions_db. + 2011-02-27 Miguel de Dios * pandoradb_data.sql, pandoradb.data.postgreSQL.sql: in the table "tgrupo" diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 8d1cc9f174..a35e621a19 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -416,9 +416,9 @@ function setAspectRatioBackground(side) { dataType: "json", success: function(data){ old_width = parseInt($("#background").css('width').replace('px', '')); - old_height = parseInt($("#background").css('height').replace('px', '')); + old_height = parseInt($("#background").css('height').replace('px', '')); - img_width = data[0]; + img_width = data[0]; img_height = data[1]; @@ -672,10 +672,28 @@ function createItem(type, values, id_data) { var sizeStyle = 'width: ' + values['width'] + 'px; height: ' + values['height'] + 'px;'; var imageSize = 'width="' + values['width'] + '" height="' + values['height'] + '"'; } + + var element_status= null; + var parameter = Array(); + parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"}); + parameter.push ({name: "get_element_status", value: "1"}); + parameter.push ({name: "id_element", value: id_data}); + + jQuery.ajax ({ + type: 'POST', + url: action="ajax.php", + data: parameter, + async: false, + timeout: 10000, + success: function (data) { + element_status = data; + } + }); + var item = $('
' + '
' + '' + values['label'] + '' + - '
' + '' ); break; case 'percentile_bar': diff --git a/pandora_console/godmode/reporting/visual_console_builder.elements.php b/pandora_console/godmode/reporting/visual_console_builder.elements.php index 11c5b5b096..ef178bf1ab 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.elements.php +++ b/pandora_console/godmode/reporting/visual_console_builder.elements.php @@ -113,10 +113,10 @@ foreach ($layoutDatas as $layoutData) { $table->data[$i + 1]['icon'] = print_image('images/chart_curve.png', true, array('title' => __('Module Graph'))); break; case SIMPLE_VALUE: - $table->data[$i + 1]['icon'] = print_image('images/binary.png', true, array('title' => ___('Simple Value'))); + $table->data[$i + 1]['icon'] = print_image('images/binary.png', true, array('title' => __('Simple Value'))); break; case LABEL: - $table->data[$i + 1]['icon'] = print_image('images/tag_red.png', true, array('title' => ___('Label'))); + $table->data[$i + 1]['icon'] = print_image('images/tag_red.png', true, array('title' => __('Label'))); break; case ICON: $table->data[$i + 1]['icon'] = print_image('images/photo.png', true, array('title' => __('Icon'))); diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index 51efa86783..bc16ad5dfd 100644 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -52,6 +52,8 @@ $max_percentile = get_parameter('max_percentile', null); $height_module_graph = get_parameter('height_module_graph', null); $width_module_graph = get_parameter('width_module_graph', null); +$get_element_status = get_parameter('get_element_status', 0); + switch ($action) { case 'get_layout_data': $layoutData = get_db_row_filter('tlayout_data', array('id' => $id_element)); @@ -285,4 +287,14 @@ switch ($action) { echo json_encode($return); break; } + +/* visual map element status check */ +if ($get_element_status){ + + $res = getStatusElement($id_element); + + echo $res; + return; +} + ?> \ No newline at end of file