Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CB0B0200D26 for ; Thu, 14 Sep 2017 16:38:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C987C1609D1; Thu, 14 Sep 2017 14:38:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D258F1609D8 for ; Thu, 14 Sep 2017 16:38:39 +0200 (CEST) Received: (qmail 76093 invoked by uid 500); 14 Sep 2017 14:38:38 -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 75530 invoked by uid 99); 14 Sep 2017 14:38:38 -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; Thu, 14 Sep 2017 14:38:38 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 57913F5817; Thu, 14 Sep 2017 14:38:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lpuskas@apache.org To: commits@ambari.apache.org Date: Thu, 14 Sep 2017 14:38:50 -0000 Message-Id: <77a761acc7254a32b247e7d89bad05a1@git.apache.org> In-Reply-To: <40039aac4f22462cbe0d8da11829cb17@git.apache.org> References: <40039aac4f22462cbe0d8da11829cb17@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [14/38] ambari git commit: AMBARI-21934. All config versions for a config group are disabled right after renaming the config group (akovalenko) archived-at: Thu, 14 Sep 2017 14:38:41 -0000 AMBARI-21934. All config versions for a config group are disabled right after renaming the config group (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fa0ecc48 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fa0ecc48 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fa0ecc48 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: fa0ecc48ac68335fcce06bd41d473cfcfcfd475e Parents: c6e19b7 Author: Aleksandr Kovalenko Authored: Tue Sep 12 16:07:46 2017 +0300 Committer: Aleksandr Kovalenko Committed: Wed Sep 13 14:15:05 2017 +0300 ---------------------------------------------------------------------- .../controllers/main/service/manage_config_groups_controller.js | 4 ++-- ambari-web/app/views/common/configs/config_history_flow.js | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/fa0ecc48/ambari-web/app/controllers/main/service/manage_config_groups_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js index a260652..cca3d89 100644 --- a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js +++ b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js @@ -956,8 +956,8 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, { if (errors.length > 0) { self.get('subViewController').set('errorMessage', errors.join(". ")); } else { - if (!self.get('isAddService') && !self.get('isInstaller') && !modifiedConfigGroups.toCreate.everyProperty('properties.length', 0)) { - //update service config versions only if it is service configs page and at least one newly created group had properties + if (!self.get('isAddService') && !self.get('isInstaller')) { + //update service config versions only if it is service configs page App.router.get('mainServiceInfoConfigsController').loadServiceConfigVersions().done(function () { self.updateConfigGroupOnServicePage(); self.hide(); http://git-wip-us.apache.org/repos/asf/ambari/blob/fa0ecc48/ambari-web/app/views/common/configs/config_history_flow.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/configs/config_history_flow.js b/ambari-web/app/views/common/configs/config_history_flow.js index 6903e8e..32a5e71 100644 --- a/ambari-web/app/views/common/configs/config_history_flow.js +++ b/ambari-web/app/views/common/configs/config_history_flow.js @@ -95,13 +95,12 @@ App.ConfigHistoryFlowView = Em.View.extend({ shortNotes: Em.computed.truncate('displayedServiceVersion.notes', 100, 100), serviceVersions: function () { - var groupName = this.get('controller.selectedConfigGroup.isDefault') ? App.ServiceConfigGroup.defaultGroupName - : this.get('controller.selectedConfigGroup.name'); + var isDefaultGroupSelected = this.get('controller.selectedConfigGroup.isDefault'); var groupId = this.get('controller.selectedConfigGroup.id'); var self = this; this.get('allServiceVersions').forEach(function (version) { - version.set('isDisabled', !(version.get('groupName') === groupName)); + version.set('isDisabled', !(version.get('groupId') === groupId || isDefaultGroupSelected && version.get('groupName') === App.ServiceConfigGroup.defaultGroupName)); }, this); var serviceVersions = this.get('allServiceVersions').filter(function(s) {