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 2015/11/24 18:00:41 UTC
ambari git commit: AMBARI-14045. FE: Disallow to add the same host to
different CG of the same service (akovalenko)
Repository: ambari
Updated Branches:
refs/heads/trunk 944b8edb0 -> 36dc7a0b7
AMBARI-14045. FE: Disallow to add the same host to different CG of the same service (akovalenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/36dc7a0b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/36dc7a0b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/36dc7a0b
Branch: refs/heads/trunk
Commit: 36dc7a0b796cfca9d9150ec16f9de02bc4c13fb6
Parents: 944b8ed
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Tue Nov 24 17:56:45 2015 +0200
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Tue Nov 24 19:00:10 2015 +0200
----------------------------------------------------------------------
.../app/mixins/common/configs/configs_loader.js | 16 ++++++++++++----
.../configs/service_configs_by_category_view.js | 1 -
2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/36dc7a0b/ambari-web/app/mixins/common/configs/configs_loader.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/configs_loader.js b/ambari-web/app/mixins/common/configs/configs_loader.js
index fdcd171..6008a6b 100644
--- a/ambari-web/app/mixins/common/configs/configs_loader.js
+++ b/ambari-web/app/mixins/common/configs/configs_loader.js
@@ -115,11 +115,19 @@ App.ConfigsLoader = Em.Mixin.create(App.GroupsMappingMixin, {
* @param opt
* @param params
*/
- loadCurrentVersionsSuccess: function(data, opt, params) {
+ loadCurrentVersionsSuccess: function (data, opt, params) {
+ var self = this;
App.configGroupsMapper.map(data, true, params.serviceNames.split(','));
- this.set('selectedConfigGroup', App.ServiceConfigGroup.find().filterProperty('serviceName', this.get('content.serviceName')).findProperty('isDefault'));
- this.parseConfigData(data);
- this.loadConfigGroups(params.serviceNames.split(','));
+ this.loadConfigGroups(params.serviceNames.split(',')).done(function () {
+ if (self.get('isHostsConfigsPage')) {
+ self.set('selectedConfigGroup', App.ServiceConfigGroup.find().filterProperty('serviceName', self.get('content.serviceName')).find(function (cg) {
+ return !cg.get('isDefault') && cg.get('hosts').contains(self.get('host.hostName'));
+ }) || App.ServiceConfigGroup.find().filterProperty('serviceName', self.get('content.serviceName')).findProperty('isDefault'));
+ } else {
+ self.set('selectedConfigGroup', App.ServiceConfigGroup.find().filterProperty('serviceName', self.get('content.serviceName')).findProperty('isDefault'));
+ }
+ self.parseConfigData(data);
+ });
},
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/36dc7a0b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/service_configs_by_category_view.js b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index a1641f2..83180ce 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -321,7 +321,6 @@ App.ServiceConfigsByCategoryView = Em.View.extend(App.UserPref, App.ConfigOverri
selector: '[data-toggle=tooltip]',
placement: 'top'
});
- this.updateReadOnlyFlags();
this.filteredCategoryConfigs();
Em.run.next(function () {
self.updateReadOnlyFlags();