Repository: ambari Updated Branches: refs/heads/trunk cb5250625 -> b2931c1a4
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/b2931c1a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b2931c1a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b2931c1a Branch: refs/heads/trunk Commit: b2931c1a4adca28d263dfc88275d2bdea9187766 Parents: cb52506 Author: Jaimin Jetly <[email protected]> Authored: Wed Jan 11 14:00:12 2017 -0800 Committer: Jaimin Jetly <[email protected]> Committed: Wed Jan 11 14:02:57 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/b2931c1a/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index fa82003..bd60f90 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -431,6 +431,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/b2931c1a/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 8b014c2..35ddc0f 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/b2931c1a/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') } }
