Repository: ambari Updated Branches: refs/heads/trunk 01a43eef3 -> 3cc686f64
AMBARI-15459. Override button is shown on the host configs page (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3cc686f6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3cc686f6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3cc686f6 Branch: refs/heads/trunk Commit: 3cc686f648b29b54053dd52c26c91d0b50097a10 Parents: 01a43ee Author: Oleg Nechiporenko <onechipore...@apache.org> Authored: Thu Mar 17 13:36:24 2016 +0200 Committer: Oleg Nechiporenko <onechipore...@apache.org> Committed: Thu Mar 17 17:08:04 2016 +0200 ---------------------------------------------------------------------- ambari-web/app/controllers/main/host/configs_service.js | 2 ++ ambari-web/app/controllers/main/service/info/configs.js | 2 +- .../app/templates/common/configs/service_config_category.hbs | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/3cc686f6/ambari-web/app/controllers/main/host/configs_service.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/host/configs_service.js b/ambari-web/app/controllers/main/host/configs_service.js index 9afb309..b738433 100644 --- a/ambari-web/app/controllers/main/host/configs_service.js +++ b/ambari-web/app/controllers/main/host/configs_service.js @@ -24,6 +24,8 @@ App.MainHostServiceConfigsController = App.MainServiceInfoConfigsController.exte typeTagToHostMap: null, configKeyToConfigMap: null, + canEdit: false, + /** * On load function */ http://git-wip-us.apache.org/repos/asf/ambari/blob/3cc686f6/ambari-web/app/controllers/main/service/info/configs.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index 85346d6..93775fb 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -113,7 +113,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A */ canEdit: function () { return (this.get('selectedVersion') == this.get('currentDefaultVersion') || !this.get('selectedConfigGroup.isDefault')) - && !this.get('isCompareMode') && App.isAuthorized('SERVICE.MODIFY_CONFIGS') && !this.get('isHostsConfigsPage'); + && !this.get('isCompareMode') && App.isAuthorized('SERVICE.MODIFY_CONFIGS'); }.property('selectedVersion', 'isCompareMode', 'currentDefaultVersion', 'selectedConfigGroup.isDefault'), serviceConfigs: Em.computed.alias('App.config.preDefinedServiceConfigs'), http://git-wip-us.apache.org/repos/asf/ambari/blob/3cc686f6/ambari-web/app/templates/common/configs/service_config_category.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/configs/service_config_category.hbs b/ambari-web/app/templates/common/configs/service_config_category.hbs index e72606c..5ec4db9 100644 --- a/ambari-web/app/templates/common/configs/service_config_category.hbs +++ b/ambari-web/app/templates/common/configs/service_config_category.hbs @@ -69,7 +69,9 @@ {{t services.service.config.configHistory.configGroup}}</span> {{/if}} {{/if}} - {{view App.ControlsView serviceConfigPropertyBinding="this"}} + {{#if controller.canEdit}} + {{view App.ControlsView serviceConfigPropertyBinding="this"}} + {{/if}} <span class="help-inline">{{errorMessage}}</span> <span class="help-inline">{{warnMessage}}</span> </div>