Kaynağa Gözat

AMBARI-2779. The number of background operation count in the Background Ops popup does not update automatically in some cases. (Andrii Babiichuk via yusaku)

Yusaku Sako 12 yıl önce
ebeveyn
işleme
a17127340a
1 değiştirilmiş dosya ile 3 ekleme ve 6 silme
  1. 3 6
      ambari-web/app/utils/host_progress_popup.js

+ 3 - 6
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"));
     }
   },