Repository: ambari Updated Branches: refs/heads/branch-2.5 f6fdf3c3d -> 750137acf
AMBARI-19434. Changing Capacity-scheduler configs while llap is enabled should warn the user if llap is affected. (Vivek Ratnavel Subramanian via jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/750137ac Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/750137ac Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/750137ac Branch: refs/heads/branch-2.5 Commit: 750137acf328c38dbe2df05519f6699d649138c1 Parents: f6fdf3c Author: Jaimin Jetly <[email protected]> Authored: Wed Jan 11 14:00:12 2017 -0800 Committer: Jaimin Jetly <[email protected]> Committed: Wed Jan 11 14:00:12 2017 -0800 ---------------------------------------------------------------------- ambari-web/app/messages.js | 1 + .../main/service/configs/component_actions_by_configs.js | 10 +++++++++- ambari-web/app/models/configs/theme/config_action.js | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/750137ac/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 766542f..a2a2fbf 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -417,6 +417,7 @@ Em.I18n.translations = { 'popup.highlight':'click to highlight', 'popup.confirmation.commonHeader':'Confirmation', 'popup.confirmation.refreshYarnQueues.body':'It is strongly recommended to <strong>Refresh Yarn Queues</strong> after making a change to the capacity scheduler configuration. Would you like to proceed?', + 'popup.warning.refreshYarnQueues.body': '<div class="alert alert-warning"><strong>Warning: </strong>The queue configuration change may have affected the queue used by LLAP. An LLAP reconfiguration or restart may be required.</div>', 'popup.confirmation.refreshYarnQueues.buttonText':'Refresh Yarn Queues', 'popup.prompt.commonHeader':'Prompt', 'popup.confirmationFeedBack.sending':'Sending...', http://git-wip-us.apache.org/repos/asf/ambari/blob/750137ac/ambari-web/app/mixins/main/service/configs/component_actions_by_configs.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/mixins/main/service/configs/component_actions_by_configs.js b/ambari-web/app/mixins/main/service/configs/component_actions_by_configs.js index ba30dcd..ebfc2c7 100644 --- a/ambari-web/app/mixins/main/service/configs/component_actions_by_configs.js +++ b/ambari-web/app/mixins/main/service/configs/component_actions_by_configs.js @@ -66,9 +66,17 @@ App.ComponentActionsByConfigs = Em.Mixin.create({ self.popupPrimaryButtonCallback(config_action); } else { self.configAction = config_action; + var body = config_action.get('popupProperties').body; + if(config_action.get('popupProperties').hasOwnProperty('conditionalWarning') && config_action.get('popupProperties').conditionalWarning === true) { + // Check if Hive Server 2 Interactive is enabled and show a warning message if it is enabled + var hsiInstance = App.HostComponent.find().filterProperty('componentName', "HIVE_SERVER_INTERACTIVE"); + if(hsiInstance.length > 0) { + body += "<br/><br/>" + config_action.get('popupProperties').warningMessage; + } + } App.showConfirmationPopup(function () { self.popupPrimaryButtonCallback(config_action); - }, config_action.get('popupProperties').body, null, Em.I18n.t('popup.confirmation.commonHeader'), config_action.get('popupProperties').primaryButton.label, false, 'refresh_yarn_queues') + }, body, null, Em.I18n.t('popup.confirmation.commonHeader'), config_action.get('popupProperties').primaryButton.label, false, 'refresh_yarn_queues') } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/750137ac/ambari-web/app/models/configs/theme/config_action.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/configs/theme/config_action.js b/ambari-web/app/models/configs/theme/config_action.js index 905fecb..b2ba09a 100644 --- a/ambari-web/app/models/configs/theme/config_action.js +++ b/ambari-web/app/models/configs/theme/config_action.js @@ -82,6 +82,8 @@ App.ConfigAction.FIXTURES = [ } }, body: Em.I18n.t('popup.confirmation.refreshYarnQueues.body'), + conditionalWarning: true, + warningMessage: Em.I18n.t('popup.warning.refreshYarnQueues.body'), errorMessage: Em.I18n.t('services.service.actions.run.yarnRefreshQueues.error') } }
