You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2013/04/16 01:05:41 UTC

svn commit: r1468265 - in /incubator/ambari/trunk: CHANGES.txt ambari-web/app/utils/host_progress_popup.js

Author: jaimin
Date: Mon Apr 15 23:05:41 2013
New Revision: 1468265

URL: http://svn.apache.org/r1468265
Log:
AMBARI-1927. In background operations popup, requests with same context are showing hosts/tasks info from last request

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/utils/host_progress_popup.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1468265&r1=1468264&r2=1468265&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Mon Apr 15 23:05:41 2013
@@ -730,6 +730,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1927. In background operations popup, requests with same context
+ are showing hosts/tasks info from last request. (yusaku via jaimin)
+
  AMBARI-1907. Service check commands are not getting created on a
  cluster install -> start. (yusaku via jaimin)
 

Modified: incubator/ambari/trunk/ambari-web/app/utils/host_progress_popup.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/host_progress_popup.js?rev=1468265&r1=1468264&r2=1468265&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/host_progress_popup.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/host_progress_popup.js Mon Apr 15 23:05:41 2013
@@ -27,6 +27,7 @@ App.HostPopup = Em.Object.create({
   hosts: null,
   inputData: null,
   serviceName: "",
+  currentServiceId: null,
   popupHeaderName: "",
   serviceController: null,
   showServices: false,
@@ -130,6 +131,7 @@ App.HostPopup = Em.Object.create({
       this.set("servicesInfo", null);
       this.get("inputData").forEach(function (service) {
         var newService = Ember.Object.create({
+          id: service.id,
           displayName: service.displayName,
           detailMessage: service.detailMessage,
           message: service.message,
@@ -182,8 +184,16 @@ App.HostPopup = Em.Object.create({
           hosts.push.apply(hosts, host);
         });
       } else {
-        hostsData = hostsData.filterProperty("name", this.get("serviceName")).objectAt(0);
-        hosts = hostsData.hosts;
+        if(this.get("currentServiceId") != null){
+          hostsData = hostsData.filterProperty("id", this.get("currentServiceId")).objectAt(0);
+        }else{
+          hostsData = hostsData.filterProperty("name", this.get("serviceName")).objectAt(0);
+        }
+
+        if(hostsData.hosts){
+          hosts = hostsData.hosts;
+        }
+
         hosts.setEach("serviceName", this.get("serviceName"));
       }
     }
@@ -528,6 +538,7 @@ App.HostPopup = Em.Object.create({
          */
         gotoHosts: function (event, context) {
           this.get("controller").set("serviceName", event.context.get("name"));
+          this.get("controller").set("currentServiceId", event.context.get("id"));
           this.get("controller").onHostUpdate();
           var servicesInfo = this.get("controller.hosts");
           if (servicesInfo.length) {