2012-06-11 Miguel de Dios <miguel.dedios@artica.es>
* include/graphs/functions_gd.php, include/graphs/fgraph.php: cleaned source code style. * include/functions_visual_map.php, include/ajax/visual_console_builder.ajax.php, godmode/reporting/visual_console_builder.editor.js, godmode/reporting/visual_console_builder.editor.php: fixed the strange behavior of the bars and bubbles in the editor. MERGED FROM 4.0.2 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6475 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
53c62fc21b
commit
60db76bc53
|
@ -1,3 +1,16 @@
|
|||
2012-06-11 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/graphs/functions_gd.php, include/graphs/fgraph.php:
|
||||
cleaned source code style.
|
||||
|
||||
* include/functions_visual_map.php,
|
||||
include/ajax/visual_console_builder.ajax.php,
|
||||
godmode/reporting/visual_console_builder.editor.js,
|
||||
godmode/reporting/visual_console_builder.editor.php: fixed the
|
||||
strange behavior of the bars and bubbles in the editor.
|
||||
|
||||
MERGED FROM 4.0.2
|
||||
|
||||
2012-06-11 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
* operation/tree.php: Include functions_gis.php file that
|
||||
|
|
|
@ -326,6 +326,7 @@ function readFields() {
|
|||
values['type_percentile'] = $("input[name=type_percentile]:checked").val();
|
||||
values['value_show'] = $("input[name=value_show]:checked").val();
|
||||
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
|
@ -581,8 +582,8 @@ function setAspectRatioBackground(side) {
|
|||
url: "ajax.php",
|
||||
data: parameter,
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
old_width = parseInt($("#background").css('width').replace('px', ''));
|
||||
old_height = parseInt($("#background").css('height').replace('px', ''));
|
||||
|
||||
|
@ -790,6 +791,9 @@ function getModuleValue(id_data, process_simple_value) {
|
|||
}
|
||||
|
||||
function getPercentileBar(id_data, values) {
|
||||
max_percentile = values['max_percentile'];
|
||||
width_percentile = values['width_percentile'];
|
||||
|
||||
var parameter = Array();
|
||||
|
||||
parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"});
|
||||
|
@ -805,11 +809,14 @@ function getPercentileBar(id_data, values) {
|
|||
success: function (data)
|
||||
{
|
||||
module_value = data['value'];
|
||||
max_percentile = data['max_percentile'];
|
||||
width_percentile = data['width_percentile'];
|
||||
unit_text = false
|
||||
if (data['unit_text'] != false)
|
||||
//max_percentile = data['max_percentile'];
|
||||
//width_percentile = data['width_percentile'];
|
||||
unit_text = false;
|
||||
|
||||
if ((data['unit_text'] != false) || typeof(data['unit_text']) != 'boolean') {
|
||||
unit_text = data['unit_text'];
|
||||
}
|
||||
|
||||
colorRGB = data['colorRGB'];
|
||||
}
|
||||
});
|
||||
|
@ -837,7 +844,7 @@ function getPercentileBar(id_data, values) {
|
|||
else
|
||||
var percentile = 100;
|
||||
|
||||
if (unit_text == false) {
|
||||
if (unit_text == false && typeof(unit_text) == 'boolean') {
|
||||
value_text = percentile + "%";
|
||||
}
|
||||
else {
|
||||
|
@ -852,6 +859,9 @@ function getPercentileBar(id_data, values) {
|
|||
}
|
||||
|
||||
function getPercentileBubble(id_data, values) {
|
||||
max_percentile = values['max_percentile'];
|
||||
width_percentile = values['width_percentile'];
|
||||
|
||||
var parameter = Array();
|
||||
|
||||
parameter.push ({name: "page", value: "include/ajax/visual_console_builder.ajax"});
|
||||
|
@ -867,10 +877,10 @@ function getPercentileBubble(id_data, values) {
|
|||
success: function (data)
|
||||
{
|
||||
module_value = data['value'];
|
||||
max_percentile = data['max_percentile'];
|
||||
width_percentile = data['width_percentile'];
|
||||
//max_percentile = data['max_percentile'];
|
||||
//width_percentile = data['width_percentile'];
|
||||
unit_text = false
|
||||
if (data['unit_text'] != false)
|
||||
if ((data['unit_text'] != false) || typeof(data['unit_text']) != 'boolean')
|
||||
unit_text = data['unit_text'];
|
||||
colorRGB = data['colorRGB'];
|
||||
}
|
||||
|
@ -899,7 +909,7 @@ function getPercentileBubble(id_data, values) {
|
|||
else
|
||||
var percentile = 100;
|
||||
|
||||
if (unit_text == false) {
|
||||
if (unit_text == false && typeof(unit_text) == 'boolean') {
|
||||
value_text = percentile + "%";
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -333,7 +333,6 @@ ui_require_javascript_file('wz_jsgraphics');
|
|||
ui_require_javascript_file('pandora_visual_console');
|
||||
//ui_require_jquery_file ('autocomplete');
|
||||
ui_require_javascript_file('visual_console_builder.editor', 'godmode/reporting/');
|
||||
|
||||
// Javascript file for base 64 encoding of label parameter
|
||||
ui_require_javascript_file ('encode_decode_base64');
|
||||
?>
|
||||
|
|
|
@ -101,6 +101,9 @@ switch ($action) {
|
|||
default:
|
||||
$returnValue = db_get_sql ('SELECT datos FROM tagente_estado WHERE id_agente_modulo = ' . $layoutData['id_agente_modulo']);
|
||||
|
||||
//html_debug_print($value_show);
|
||||
//html_debug_print($layoutData);
|
||||
|
||||
if (($layoutData['type'] == PERCENTILE_BAR) ||
|
||||
($layoutData['type'] == PERCENTILE_BUBBLE)) {
|
||||
if ($value_show == 'value') {
|
||||
|
@ -109,7 +112,13 @@ switch ($action) {
|
|||
$unit_text_db = db_get_sql ('SELECT unit FROM tagente_modulo WHERE id_agente_modulo = ' . $layoutData['id_agente_modulo']);
|
||||
$unit_text_db = trim(io_safe_output($unit_text_db));
|
||||
|
||||
$unit_text = false;
|
||||
if ($value_show == 'value') {
|
||||
//Set empty string unit at the moment
|
||||
//and change for old false value
|
||||
|
||||
$unit_text = '';
|
||||
}
|
||||
|
||||
if (!empty($unit_text_db))
|
||||
$unit_text = $unit_text_db;
|
||||
}
|
||||
|
|
|
@ -149,10 +149,10 @@ function visual_map_print_item($layoutData) {
|
|||
$colorStatus = "#ffff00";
|
||||
break;
|
||||
case 3:
|
||||
//Unknown
|
||||
default:
|
||||
$colorStatus = "#5A5AFF";
|
||||
//Unknown
|
||||
// Default is Blue (Other)
|
||||
$colorStatus = "#5A5AFF";
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -198,12 +198,10 @@ function visual_map_print_item($layoutData) {
|
|||
}
|
||||
|
||||
if ( $max_percentile > 0)
|
||||
$percentile = $module_value / $max_percentile * 100;
|
||||
$percentile = format_numeric($module_value / $max_percentile * 100, 0);
|
||||
else
|
||||
$percentile = 100;
|
||||
|
||||
$percentile = round($percentile);
|
||||
|
||||
echo '<div id="' . $id . '" class="item percentile_item" style="color: ' . $color . '; text-align: center; position: absolute; display: inline-block; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
||||
echo $text . '<br />';
|
||||
|
||||
|
|
Loading…
Reference in New Issue