Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 874CA17C9C for ; Wed, 22 Apr 2015 10:40:08 +0000 (UTC) Received: (qmail 58350 invoked by uid 500); 22 Apr 2015 10:40:08 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 58322 invoked by uid 500); 22 Apr 2015 10:40:08 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 58313 invoked by uid 99); 22 Apr 2015 10:40:08 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Apr 2015 10:40:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5460FE00BA; Wed, 22 Apr 2015 10:40:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ababiichuk@apache.org To: commits@ambari.apache.org Message-Id: <91b561c01f31416189d67b8df20129cf@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-10647 Configs should be removed/added when /recommendations says so (additional patch). (ababiichuk) Date: Wed, 22 Apr 2015 10:40:08 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk 0678ca10e -> 99a9f0696 AMBARI-10647 Configs should be removed/added when /recommendations says so (additional patch). (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/99a9f069 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/99a9f069 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/99a9f069 Branch: refs/heads/trunk Commit: 99a9f0696e5c034f92aa43bc4c904e8a04c24c5d Parents: 0678ca1 Author: aBabiichuk Authored: Wed Apr 22 13:17:54 2015 +0300 Committer: aBabiichuk Committed: Wed Apr 22 13:17:54 2015 +0300 ---------------------------------------------------------------------- ambari-web/app/mixins/common/configs/enhanced_configs.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/99a9f069/ambari-web/app/mixins/common/configs/enhanced_configs.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js index fb0bf14..7762188 100644 --- a/ambari-web/app/mixins/common/configs/enhanced_configs.js +++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js @@ -399,7 +399,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create({ var isNewProperty = (!notDefaultGroup && Em.isNone(cp)) || (notDefaultGroup && group && Em.isNone(override)); - if (!updateOnlyBoundaries && group && !parentPropertiesNames.contains(propertyName) && defaultValue != recommendedValue) { //on first initial request we don't need to change values + if (!updateOnlyBoundaries && !parentPropertiesNames.contains(propertyName) && defaultValue != recommendedValue) { //on first initial request we don't need to change values if (dependentProperty) { Em.set(dependentProperty, 'value', defaultValue); Em.set(dependentProperty, 'recommendedValue', recommendedValue); @@ -488,7 +488,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create({ self.get('_dependentConfigValues').pushObject({ saveRecommended: true, saveRecommendedDefault: true, - propertyValue: cp.get('defaultValue'), + propertyValue: cp && cp.get('defaultValue'), toDelete: true, toAdd: false, isDeleted: true, @@ -554,9 +554,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create({ serviceName: stepConfigs.get('serviceName'), filename: App.config.getOriginalFileName(Em.get(propertyToAdd, 'fileName')), isNotSaved: !Em.get(propertyToAdd, 'isDeleted'), - isRequired: false, - group: selectedGroup.get('isDefault') ? null : selectedGroup, - isOverridable: selectedGroup.get('isDefault') + isRequired: false })); } else { var cp = stepConfigs.get('configs').filterProperty('name', Em.get(propertyToAdd, 'propertyName')).findProperty('filename', App.config.getOriginalFileName(Em.get(propertyToAdd, 'fileName')));