Преглед на файлове

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 години
родител
ревизия
a17127340a
променени са 1 файла, в които са добавени 3 реда и са изтрити 6 реда
  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"));
     }
   },