diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js
index 291c3abd38..2e328b2077 100755
--- a/pandora_console/godmode/reporting/visual_console_builder.editor.js
+++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js
@@ -2486,7 +2486,7 @@ function setDonutsGraph (id_data, values) {
else {
$("#" + id_data + " img").attr('src', url_hack_metaconsole + 'images/console/signes/donut-graph.png');
- if($('#text-width').val() == 0 || $('#text-height').val() == 0){
+ if($('#text-width_percentile').val() == 0){
// Image size
}
else{
diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php
index 07a51af3bb..827f92a512 100755
--- a/pandora_console/include/ajax/visual_console_builder.ajax.php
+++ b/pandora_console/include/ajax/visual_console_builder.ajax.php
@@ -180,7 +180,7 @@ switch ($action) {
}
$is_string = db_get_value_filter ('id_tipo_modulo', 'tagente_modulo',
- array ('id_agente' => _string,
+ array ('id_agente' => $id_agent,
'id_agente_modulo' => $id_module));
if ($layoutData['id_metaconsole'] != 0) {
@@ -613,7 +613,6 @@ switch ($action) {
$values['border_color'] = $resume_color;
$values['type'] = DONUT_GRAPH;
$values['id_agent'] = $id_agent_string;
-
break;
case 'box_item':
$values['border_width'] = $border_width;
@@ -751,6 +750,7 @@ switch ($action) {
case 'donut_graph':
unset($values['border_color']);
unset($values['width']);
+ unset($values['id_agent']);
break;
case 'box_item':
unset($values['border_width']);
@@ -895,6 +895,20 @@ switch ($action) {
case 'donut_graph':
$elementFields['width_percentile'] = $elementFields['width'];
$elementFields['resume_color'] = $elementFields['border_color'];
+ $elementFields['id_agent_string'] = $elementFields['id_agent'];
+ if (($elementFields['id_agent_string'] != 0)
+ && ($elementFields['id_layout_linked'] == 0)) {
+ $modules = agents_get_modules(
+ $elementFields['id_agent'], false,
+ array('disabled' => 0,
+ 'id_agente' => $elementFields['id_agent'],
+ 'tagente_modulo.id_tipo_modulo IN' => "(17,23,3,10,33)"));
+
+ $elementFields['modules_html'] = '';
+ foreach ($modules as $id => $name) {
+ $elementFields['modules_html'] .= '';
+ }
+ }
break;
case 'module_graph':
@@ -1012,8 +1026,8 @@ switch ($action) {
break;
case 'donut_graph':
$values['type'] = DONUT_GRAPH;
- $values['width'] = $width;
- $values['height'] = $height;
+ $values['width'] = $width_percentile;
+ $values['height'] = $width_percentile;
$values['border_color'] = $resume_color;
$values['id_agent'] = $id_agent_string;
break;