ソースを参照

AMBARI-2869 Background Ops popup acts in a strange way. (atkach)

atkach 12 年 前
コミット
20755818f0
1 ファイル変更3 行追加1 行削除
  1. 3 1
      ambari-web/app/utils/host_progress_popup.js

+ 3 - 1
ambari-web/app/utils/host_progress_popup.js

@@ -28,6 +28,7 @@ App.HostPopup = Em.Object.create({
   inputData: null,
   serviceName: "",
   currentServiceId: null,
+  previousServiceId: null,
   popupHeaderName: "",
   serviceController: null,
   showServices: false,
@@ -298,7 +299,7 @@ App.HostPopup = Em.Object.create({
       var existedHosts = self.get('hosts');
 
       if (hosts) {
-        if (existedHosts && existedHosts.length === hosts.length) {
+        if (existedHosts && this.get('currentServiceId') === this.get('previousServiceId')) {
           existedHosts.forEach(function (host) {
             var newHostInfo = hosts.findProperty('name', host.get('name'));
             if (newHostInfo) {
@@ -428,6 +429,7 @@ App.HostPopup = Em.Object.create({
             hostsArr.push(hostInfo);
           }, this);
           self.set("hosts", hostsArr);
+          self.set('previousServiceId', this.get('currentServiceId'));
         }
       }
     }