You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/02/17 22:06:14 UTC
[15/50] [abbrv] ambari git commit: AMBARI-20028 Operations do not
show up in the operations list without a refresh (dbuzhor)
AMBARI-20028 Operations do not show up in the operations list without a refresh (dbuzhor)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0952b8ff
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0952b8ff
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0952b8ff
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 0952b8ff89d871962da19918c00357e8565625c1
Parents: 2db72cd
Author: Denys Buzhor <bd...@hortonworks.com>
Authored: Wed Feb 15 19:36:59 2017 +0200
Committer: Denys Buzhor <bd...@hortonworks.com>
Committed: Wed Feb 15 23:16:29 2017 +0200
----------------------------------------------------------------------
ambari-web/app/controllers/main/service/info/configs.js | 2 +-
ambari-web/app/mixins/common/track_request_mixin.js | 3 ++-
ambari-web/app/routes/main.js | 4 ++++
3 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0952b8ff/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 c49bfae..d95a2d2 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -235,7 +235,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.AddSecurityConfi
*/
clearStep: function () {
this.abortRequests();
- App.router.get('mainController').stopPolling();
App.set('componentToBeAdded', {});
App.set('componentToBeDeleted', {});
this.clearLoadInfo();
@@ -284,6 +283,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.AddSecurityConfi
*/
loadStep: function () {
var serviceName = this.get('content.serviceName'), self = this;
+ App.router.get('mainController').stopPolling();
this.clearStep();
this.set('dependentServiceNames', (App.StackService.find(serviceName).get('dependentServiceNames') || []).reduce(function(acc, i) {
acc.push(i);
http://git-wip-us.apache.org/repos/asf/ambari/blob/0952b8ff/ambari-web/app/mixins/common/track_request_mixin.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/track_request_mixin.js b/ambari-web/app/mixins/common/track_request_mixin.js
index 07eaf6e..4efcecb 100644
--- a/ambari-web/app/mixins/common/track_request_mixin.js
+++ b/ambari-web/app/mixins/common/track_request_mixin.js
@@ -37,7 +37,8 @@ App.TrackRequestMixin = Em.Mixin.create({
completed: ['resolved', 'rejected'].contains(request.state())
});
request.always(function() {
- Em.setProperties(self.get('requestsInProgress').findProperty('id', requestId), {
+ var requestInProgress = self.get('requestsInProgress').findProperty('id', requestId) || {};
+ Em.setProperties(requestInProgress, {
completed: true,
status: request.state()
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/0952b8ff/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 9ed2dd1..54f36b2 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -248,6 +248,10 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
router.get('mainController').isLoading.call(router.get('clusterController'), 'isConfigsPropertiesLoaded').done(function () {
router.get('mainHostDetailsController').connectOutlet('mainHostConfigs');
});
+ },
+ exitRoute: function (router, context, callback) {
+ router.get('mainController').startPolling();
+ callback();
}
}),