diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js
index 1ebefe58c3..ba692f20f3 100755
--- a/pandora_console/godmode/reporting/visual_console_builder.editor.js
+++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js
@@ -388,7 +388,6 @@ function update_button_palette_callback() {
else {
setPercentileBar(idItem, values);
}
-
break;
case 'module_graph':
if($('#dir_items').html() == 'horizontal'){
@@ -634,7 +633,8 @@ function readFields() {
values['event_max_time_row'] = $("select[name=event_max_time_row]").val();
values['type_percentile'] = $("select[name=type_percentile]").val();
values['percentile_color'] = $("input[name='percentile_color']").val();
- values['value_show'] = $("input[name=value_show]:checked").val();
+ values['value_show'] = $("select[name=value_show]").val();
+
values['enable_link'] = $("input[name=enable_link]").is(':checked') ? 1 : 0;
values['id_group'] = $("select[name=group]").val();
values['id_custom_graph'] = parseInt(
@@ -1291,14 +1291,7 @@ function loadFieldsFromDB(item) {
}
if (key == 'value_show') {
- if (val == 'percent') {
- $("input[name=value_show][value=percent]")
- .attr("checked", "checked");
- }
- else {
- $("input[name=value_show][value=value]")
- .attr("checked", "checked");
- }
+ $("select[name=value_show]").val(val);
}
if (key == 'id_group') {
@@ -3114,9 +3107,6 @@ function updateDB(type, idElement , values, event) {
}
function copyDB(idItem) {
-
- console.log(idItem);
-
metaconsole = $("input[name='metaconsole']").val();
parameter = Array();
@@ -3572,8 +3562,6 @@ function eventsItems(drag) {
}
}
else{
- console.log('Dragstart');
-
multiDragStart(event);
}
@@ -3590,8 +3578,6 @@ function eventsItems(drag) {
updateDB(selectedItem, idItem, values, 'dragstop');
}
else{
-
- console.log('Dragstop');
multidragStop(event);
}
});
@@ -3679,10 +3665,6 @@ function eventsItems(drag) {
break;
}
}
- else{
- console.log('Drag');
-
- }
});
}
diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php
index 152e3541a3..9479805b59 100755
--- a/pandora_console/include/functions_visual_map.php
+++ b/pandora_console/include/functions_visual_map.php
@@ -1590,11 +1590,23 @@ function visual_map_print_item($mode = "read", $layoutData,
}
}
else {
- if($width == 0){
- $img = progress_circular_bar($id, $percentile, 100,100, $border_color);
+ if (($layoutData['image'] == 'value') && ($value_text !== false)) {
+ $unit_text = db_get_sql ('SELECT unit
+ FROM tagente_modulo
+ WHERE id_agente_modulo = ' . $id_module);
+ $unit_text = trim(io_safe_output($unit_text));
+
+ $percentile = $value_text;
+ }
+ else {
+ $unit_text = "%";
+ }
+
+ if($width < 200){
+ $img = progress_circular_bar($id, $percentile, 200,200, $border_color, $unit_text);
}
else{
- $img = progress_circular_bar($id, $percentile, $width, $width, $border_color);
+ $img = progress_circular_bar($id, $percentile, $width, $width, $border_color, $unit_text);
}
}
@@ -1648,15 +1660,25 @@ function visual_map_print_item($mode = "read", $layoutData,
$img = '';
}
}
- else{
- if ($type == CIRCULAR_INTERIOR_PROGRESS_BAR) {
- if($width == 0){
- $img = progress_circular_bar_interior($id, $percentile, 100,100, $border_color);
-
- }
- else{
- $img = progress_circular_bar_interior($id, $percentile, $width, $width, $border_color);
- }
+ else {
+ if (($layoutData['image'] == 'value') && ($value_text !== false)) {
+ $unit_text = db_get_sql ('SELECT unit
+ FROM tagente_modulo
+ WHERE id_agente_modulo = ' . $id_module);
+ $unit_text = trim(io_safe_output($unit_text));
+
+ $percentile = $value_text;
+ }
+ else {
+ $unit_text = "%";
+ }
+
+ if($width < 200){
+ $img = progress_circular_bar_interior($id, $percentile, 200,200, $border_color);
+
+ }
+ else{
+ $img = progress_circular_bar_interior($id, $percentile, $width, $width, $border_color);
}
}
diff --git a/pandora_console/include/graphs/functions_d3.php b/pandora_console/include/graphs/functions_d3.php
index 4d25701115..9b839b7e02 100644
--- a/pandora_console/include/graphs/functions_d3.php
+++ b/pandora_console/include/graphs/functions_d3.php
@@ -310,7 +310,7 @@ function ux_console_phases_donut ($phases, $id, $return = false) {
return $output;
}
-function progress_circular_bar ($id, $percentile, $width, $height, $color) {
+function progress_circular_bar ($id, $percentile, $width, $height, $color, $unit = "%") {
global $config;
$recipient_name = "circular_progress_bar_" . $id;
@@ -321,13 +321,13 @@ function progress_circular_bar ($id, $percentile, $width, $height, $color) {
$output .= "