Updated Branches: refs/heads/trunk 2b09e3261 -> a17127340
AMBARI-2779. The number of background operation count in the Background Ops popup does not update automatically in some cases. (Andrii Babiichuk via yusaku) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/a1712734 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/a1712734 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/a1712734 Branch: refs/heads/trunk Commit: a17127340aac86b2e9cd63362ffd17066364b99e Parents: 2b09e32 Author: Yusaku Sako <[email protected]> Authored: Wed Jul 31 11:30:49 2013 -0700 Committer: Yusaku Sako <[email protected]> Committed: Wed Jul 31 11:30:49 2013 -0700 ---------------------------------------------------------------------- ambari-web/app/utils/host_progress_popup.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a1712734/ambari-web/app/utils/host_progress_popup.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/host_progress_popup.js b/ambari-web/app/utils/host_progress_popup.js index b4eb756..41297fb 100644 --- a/ambari-web/app/utils/host_progress_popup.js +++ b/ambari-web/app/utils/host_progress_popup.js @@ -192,13 +192,10 @@ App.HostPopup = Em.Object.create({ */ setBackgroundOperationHeader: function () { if (this.get("showServices")) { - var allServices = this.get("servicesInfo"); - var numRunning = 0; - numRunning = allServices.filterProperty("status", App.format.taskStatus("IN_PROGRESS")).length; - numRunning += allServices.filterProperty("status", App.format.taskStatus("QUEUED")).length; - numRunning += allServices.filterProperty("status", App.format.taskStatus("PENDING")).length; + var numRunning = this.get('categories').findProperty("value", 'pending').get("count"); + numRunning += this.get('categories').findProperty("value", 'in_progress').get("count"); this.set("popupHeaderName", numRunning + Em.I18n.t('hostPopup.header.postFix')); - }else{ + } else { this.set("popupHeaderName", this.get("serviceName")); } },
