Repository: ambari Updated Branches: refs/heads/trunk 54d4048ea -> 934a16c00
AMBARI-17831. Service alerts label is updating with delay (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/934a16c0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/934a16c0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/934a16c0 Branch: refs/heads/trunk Commit: 934a16c00aeb11b4fa908fe447698df0348e2fce Parents: 54d4048 Author: Aleksandr Kovalenko <[email protected]> Authored: Thu Jul 21 14:58:30 2016 +0300 Committer: Aleksandr Kovalenko <[email protected]> Committed: Thu Jul 21 19:44:10 2016 +0300 ---------------------------------------------------------------------- .../controllers/global/cluster_controller.js | 24 +++++++++----------- 1 file changed, 11 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/934a16c0/ambari-web/app/controllers/global/cluster_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js index 0ecea4a..2dd0496 100644 --- a/ambari-web/app/controllers/global/cluster_controller.js +++ b/ambari-web/app/controllers/global/cluster_controller.js @@ -241,6 +241,17 @@ App.ClusterController = Em.Controller.extend(App.ReloadPopupMixin, { //hosts should be loaded after services in order to properly populate host-component relation in App.cache.services updater.updateHost(function () { self.set('isHostsLoaded', true); + console.time('Overall alerts loading time'); + updater.updateAlertGroups(function () { + updater.updateAlertDefinitions(function () { + updater.updateAlertDefinitionSummary(function () { + updater.updateUnhealthyAlertInstances(function () { + console.timeEnd('Overall alerts loading time'); + self.set('isAlertsLoaded', true); + }); + }); + }); + }); }); App.config.loadConfigsFromStack(App.Service.find().mapProperty('serviceName')).complete(function () { App.config.loadClusterConfigsFromStack().complete(function () { @@ -270,19 +281,6 @@ App.ClusterController = Em.Controller.extend(App.ReloadPopupMixin, { //force clear filters for hosts page to load all data App.db.setFilterConditions('mainHostController', null); - // alerts loading doesn't affect overall progress - console.time('Overall alerts loading time'); - updater.updateAlertGroups(function () { - updater.updateAlertDefinitions(function () { - updater.updateAlertDefinitionSummary(function () { - updater.updateUnhealthyAlertInstances(function () { - console.timeEnd('Overall alerts loading time'); - self.set('isAlertsLoaded', true); - }); - }); - }); - }); - //load cluster-env, used by alert check tolerance // TODO services auto-start updater.updateClusterEnv();
