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/06/19 17:16:39 UTC
ambari git commit: AMBARI-12017. Sometimes "unsaved changes" popup is
thrown when navigating from Ambari Metrics config tab (akovalenko)
Repository: ambari
Updated Branches:
refs/heads/trunk e6d973c82 -> 93e6d0d9c
AMBARI-12017. Sometimes "unsaved changes" popup is thrown when navigating from Ambari Metrics config tab (akovalenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/93e6d0d9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/93e6d0d9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/93e6d0d9
Branch: refs/heads/trunk
Commit: 93e6d0d9c1e097f5c5d7288a9a7cc1c59efd6ce8
Parents: e6d973c
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Fri Jun 19 17:38:39 2015 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Fri Jun 19 18:15:49 2015 +0300
----------------------------------------------------------------------
.../app/controllers/main/service/info/configs.js | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/93e6d0d9/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js
index f47e396..6ceb89d 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -822,6 +822,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A
* @method onLoadOverrides
*/
onLoadOverrides: function (allConfigs) {
+ var self = this;
this.get('servicesToLoad').forEach(function(serviceName) {
var serviceConfig = App.config.createServiceConfig(serviceName);
if (serviceName == this.get('content.serviceName')) {
@@ -856,7 +857,11 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A
}
this._onLoadComplete();
if (App.isAccessible('MANAGER')) {
- this.getRecommendationsForDependencies(null, true, Em.K);
+ this.getRecommendationsForDependencies(null, true, function(){
+ self.set('hash', self.getHash());
+ });
+ } else {
+ this.set('hash', this.getHash());
}
},
@@ -864,15 +869,14 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A
* @method _getRecommendationsForDependenciesCallback
*/
_onLoadComplete: function () {
- var self = this;
+ this.get('stepConfigs').forEach(function(serviceConfig){
+ serviceConfig.set('initConfigsLength', serviceConfig.get('configs.length'));
+ });
this.setProperties({
dataIsLoaded: true,
versionLoaded: true,
isInit: false
});
- Em.run.next(function(){
- self.set('hash', self.getHash());
- });
},
/**
@@ -942,9 +946,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A
componentConfig.get('configs').pushObject(serviceConfigProperty);
serviceConfigProperty.validate();
}, this);
- Em.run.next(function () {
- componentConfig.set('initConfigsLength', componentConfig.get('configs.length'));
- });
},
/**