ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lpus...@apache.org
Subject [14/38] ambari git commit: AMBARI-21934. All config versions for a config group are disabled right after renaming the config group (akovalenko)
Date Thu, 14 Sep 2017 14:38:50 GMT
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 <akovalenko@hortonworks.com>
Authored: Tue Sep 12 16:07:46 2017 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
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) {


Mime
View raw message