diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 03841a342e..bc00f703c8 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -674,12 +674,17 @@ function update_button_palette_callback() { return false; } } - if (values["module"] == 0) { + var radio_value = $("input[name='radio_choice']:checked").val(); + if (values["agent"] == "" && radio_value == "module_graph") { + dialog_message("#message_alert_no_agent"); + return false; + } + if (values["module"] == 0 && radio_value == "module_graph") { dialog_message("#message_alert_no_module"); return false; } - if (values["agent"] == "") { - dialog_message("#message_alert_no_agent"); + if (values["id_custom_graph"] == 0 && radio_value == "custom_graph") { + dialog_message("#message_alert_no_custom_graph"); return false; } if ($("input[name=width_module_graph]").val() == "") { @@ -1425,11 +1430,12 @@ function create_button_palette_callback() { break; case "module_graph": - if (values["module"] == 0) { + var radio_value = $("input[name='radio_choice']:checked").val(); + if (values["module"] == 0 && radio_value == "module_graph") { dialog_message("#message_alert_no_module"); validate = false; } - if (values["id_custom_graph"] == 0) { + if (values["id_custom_graph"] == 0 && radio_value == "module_graph") { if (values["agent"] == "") { dialog_message("#message_alert_no_agent"); validate = false; @@ -1439,6 +1445,10 @@ function create_button_palette_callback() { validate = false; } } + if (values["id_custom_graph"] == 0 && radio_value == "custom_graph") { + dialog_message("#message_alert_no_custom_graph"); + validate = false; + } if ( values["height_module_graph"] == "" || values["height_module_graph"] == 0 diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index 5cf5121e55..20aa6f3095 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -1386,6 +1386,10 @@ function visual_map_editor_print_hack_translate_strings() echo "
".__('Could not be save.').'
'; echo ''; + echo " '; + }