Repository: ambari Updated Branches: refs/heads/trunk 4bad90667 -> 52705c266
AMBARI-10765 HIVE Configs page. Discard/Save buttons are enabled when user navigate on this page. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/52705c26 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/52705c26 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/52705c26 Branch: refs/heads/trunk Commit: 52705c2668d29dcec126e0c60a6b457250355084 Parents: 4bad906 Author: aBabiichuk <ababiic...@cybervisiontech.com> Authored: Mon Apr 27 18:10:36 2015 +0300 Committer: aBabiichuk <ababiic...@cybervisiontech.com> Committed: Mon Apr 27 19:20:13 2015 +0300 ---------------------------------------------------------------------- ambari-web/app/models/service_config.js | 7 ++++--- ambari-web/app/utils/config.js | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/52705c26/ambari-web/app/models/service_config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/service_config.js b/ambari-web/app/models/service_config.js index b45cb0d..6d5007e 100644 --- a/ambari-web/app/models/service_config.js +++ b/ambari-web/app/models/service_config.js @@ -59,9 +59,10 @@ App.ServiceConfig = Ember.Object.extend({ }.property('configs.@each.isValid', 'configs.@each.isVisible', 'configCategories.@each.slaveErrorCount', 'configs.@each.overrideErrorTrigger'), isPropertiesChanged: function() { - return this.get('configs').someProperty('isNotSaved') || - this.get('configs').someProperty('isNotDefaultValue') || - this.get('configs').someProperty('isOverrideChanged') || + var requiredByAgent = this.get('configs').filterProperty('isRequiredByAgent'); + return requiredByAgent.someProperty('isNotSaved') || + requiredByAgent.someProperty('isNotDefaultValue') || + requiredByAgent.someProperty('isOverrideChanged') || this.get('configs.length') !== this.get('initConfigsLength') || (this.get('configs.length') === this.get('initConfigsLength') && this.get('configs').someProperty('defaultValue', null)); }.property('configs.@each.isNotDefaultValue', 'configs.@each.isOverrideChanged', 'configs.length', 'configs.@each.isNotSaved') http://git-wip-us.apache.org/repos/asf/ambari/blob/52705c26/ambari-web/app/utils/config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js index 874c7e9..c298fb3 100644 --- a/ambari-web/app/utils/config.js +++ b/ambari-web/app/utils/config.js @@ -351,6 +351,7 @@ App.config = Em.Object.create({ if (!this.getBySiteName(serviceConfigObj.get('filename')).someProperty('name', index)) { if (configsPropertyDef) { if (Em.get(configsPropertyDef, 'isRequiredByAgent') === false) { + configs.push(serviceConfigObj); continue; } this.handleSpecialProperties(serviceConfigObj);