You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2013/12/04 16:04:37 UTC
git commit: AMBARI-3971. Should not allow remove custom-config if
overridden. (akovalenko)
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 <ak...@hortonworks.com>
Authored: Wed Dec 4 17:03:15 2013 +0200
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
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'));