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/godmode/setup/setup_ehorus.php b/pandora_console/godmode/setup/setup_ehorus.php index e0cf119c44..a3f109e463 100644 --- a/pandora_console/godmode/setup/setup_ehorus.php +++ b/pandora_console/godmode/setup/setup_ehorus.php @@ -52,8 +52,9 @@ $table_enable->style['name'] = 'font-weight: bold'; // Enable eHorus. $row = []; -$row['name'] = __('Enable eHorus'); +$row['name'] = ('Enable eHorus'); $row['control'] = html_print_checkbox_switch('ehorus_enabled', 1, $config['ehorus_enabled'], true); +$row['button'] = html_print_submit_button(('Update'), 'update_button', false, 'class="sub upd"', true); $table_enable->data['ehorus_enabled'] = $row; // Remote config table. @@ -139,15 +140,15 @@ if ($config['ehorus_enabled'] && !$custom_field_exists) { ui_print_error_message($error_message); } +echo "
"; // Form enable. -echo ''; +echo '
'; html_print_input_hidden('update_config', 1); html_print_table($table_enable); -echo ''; +echo '
'; // Form remote. -if ($config['ehorus_enabled']) { - echo '
'; + echo '
'; echo '
'; echo ''.__('eHorus API').''; html_print_input_hidden('update_config', 1); @@ -156,30 +157,31 @@ if ($config['ehorus_enabled']) { html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"'); echo '
'; echo ''; + echo ''; echo '
'; -} ?>