Repository: ambari Updated Branches: refs/heads/branch-2.5 dd33b2391 -> d2de31ee1
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/d2de31ee Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d2de31ee Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d2de31ee Branch: refs/heads/branch-2.5 Commit: d2de31ee161d3acd6c228ca9c21ee696fefee09a Parents: dd33b23 Author: Denys Buzhor <[email protected]> Authored: Wed Feb 15 19:09:42 2017 +0200 Committer: Denys Buzhor <[email protected]> Committed: Wed Feb 15 21:05:58 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 ++++ .../app/views/common/configs/config_category_container_view.js | 4 +++- 4 files changed, 10 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/d2de31ee/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 265a216..7f2c9c5 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(); @@ -285,6 +284,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/d2de31ee/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/d2de31ee/ambari-web/app/routes/main.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js index 5ead230..05a86f3 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(); } }), http://git-wip-us.apache.org/repos/asf/ambari/blob/d2de31ee/ambari-web/app/views/common/configs/config_category_container_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/configs/config_category_container_view.js b/ambari-web/app/views/common/configs/config_category_container_view.js index 7f89030..37fc10f 100644 --- a/ambari-web/app/views/common/configs/config_category_container_view.js +++ b/ambari-web/app/views/common/configs/config_category_container_view.js @@ -43,7 +43,9 @@ App.ConfigCategoryContainerView = Em.ContainerView.extend({ pushViews: function () { var self = this; var categoriesViews = []; - this.get('categories').forEach(function (category) { + var categories = this.get('categories'); + if (!categories) return false; + categories.forEach(function (category) { var viewClass = category.isCustomView ? category.customView : App.ServiceConfigsByCategoryView; categoriesViews.push(viewClass.create({ category: category,
