Updated Branches: refs/heads/trunk 5ddbc1e84 -> a5f113af4
AMBARI-3971. Should not allow remove custom-config if overridden. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a5f113af Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a5f113af Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a5f113af Branch: refs/heads/trunk Commit: a5f113af45473e7f13e6ecd187a3be0ba17b960e Parents: 5ddbc1e Author: Aleksandr Kovalenko <[email protected]> Authored: Wed Dec 4 17:03:15 2013 +0200 Committer: Aleksandr Kovalenko <[email protected]> Committed: Wed Dec 4 17:03:15 2013 +0200 ---------------------------------------------------------------------- ambari-web/app/models/service_config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/a5f113af/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 a94ee04..834a4dd 100644 --- a/ambari-web/app/models/service_config.js +++ b/ambari-web/app/models/service_config.js @@ -192,9 +192,10 @@ App.ServiceConfigProperty = Ember.Object.extend({ var isOriginalSCP = this.get('isOriginalSCP'); var isUserProperty = this.get('isUserProperty'); var isEditable = this.get('isEditable'); + var hasOverrides = this.get('overrides.length') > 0; // Removable when this is a user property, or it is not an original property and it is editable - return isEditable && (isUserProperty || !isOriginalSCP); - }.property('isUserProperty', 'isOriginalSCP'), + return isEditable && !hasOverrides && (isUserProperty || !isOriginalSCP); + }.property('isUserProperty', 'isOriginalSCP', 'overrides.length'), init: function () { if(this.get("displayType")=="password"){ this.set('retypedPassword', this.get('value'));
