Updated Branches:
  refs/heads/trunk 7d396bb6a -> c6033d353

AMBARI-3231. Background operations in enable/disable security wizard do not 
show tasks on first try. (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/c6033d35
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/c6033d35
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/c6033d35

Branch: refs/heads/trunk
Commit: c6033d3538af7d7c3ad2cf094d0ff210e71329eb
Parents: 7d396bb
Author: Yusaku Sako <[email protected]>
Authored: Fri Sep 13 14:54:36 2013 -0700
Committer: Yusaku Sako <[email protected]>
Committed: Fri Sep 13 14:54:36 2013 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers/main/admin/security/add/step4.js | 4 ++--
 ambari-web/app/controllers/main/admin/security/disable.js   | 4 ++--
 ambari-web/app/utils/host_progress_popup.js                 | 8 ++++++--
 3 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/c6033d35/ambari-web/app/controllers/main/admin/security/add/step4.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security/add/step4.js 
b/ambari-web/app/controllers/main/admin/security/add/step4.js
index af5ea30..75b2087 100644
--- a/ambari-web/app/controllers/main/admin/security/add/step4.js
+++ b/ambari-web/app/controllers/main/admin/security/add/step4.js
@@ -104,7 +104,7 @@ App.MainAdminSecurityAddStep4Controller = 
Em.Controller.extend({
       }, this);
       if (stages.someProperty('isError', true)) {
         this.get('stages').pushObjects(stages);
-        this.addObserver('[email protected]', this.onCompleteStage);
+        this.addObserver('[email protected]', this, 'onCompleteStage');
         return;
       } else if (stages.filterProperty('isStarted', 
true).someProperty('isCompleted', false)) {
         var runningStage = stages.filterProperty('isStarted', 
true).findProperty('isCompleted', false);
@@ -123,7 +123,7 @@ App.MainAdminSecurityAddStep4Controller = 
Em.Controller.extend({
         stopStage.set('requestId', stopAllOperation.get('id'));
       }
     }
-    this.addObserver('[email protected]', this.onCompleteStage);
+    this.addObserver('[email protected]', this, 'onCompleteStage');
     this.moveToNextStage();
   },
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/c6033d35/ambari-web/app/controllers/main/admin/security/disable.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/security/disable.js 
b/ambari-web/app/controllers/main/admin/security/disable.js
index 8fcae55..7e0322a 100644
--- a/ambari-web/app/controllers/main/admin/security/disable.js
+++ b/ambari-web/app/controllers/main/admin/security/disable.js
@@ -72,7 +72,7 @@ App.MainAdminSecurityDisableController = 
Em.Controller.extend({
       if (stages.someProperty('isError', true)) {
         this.get('stages').pushObjects(stages);
         this.loadSecureServices();
-        this.addObserver('[email protected]', this.onCompleteStage);
+        this.addObserver('[email protected]', this, 'onCompleteStage');
         return;
       } else if (stages.filterProperty('isStarted', 
true).someProperty('isCompleted', false)) {
         var runningStage = stages.filterProperty('isStarted', 
true).findProperty('isCompleted', false);
@@ -92,7 +92,7 @@ App.MainAdminSecurityDisableController = 
Em.Controller.extend({
       }
     }
     this.loadSecureServices();
-    this.addObserver('[email protected]', this.onCompleteStage);
+    this.addObserver('[email protected]', this, 'onCompleteStage');
     this.moveToNextStage();
   },
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/c6033d35/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 bede1d4..da5aa39 100644
--- a/ambari-web/app/utils/host_progress_popup.js
+++ b/ambari-web/app/utils/host_progress_popup.js
@@ -33,6 +33,7 @@ App.HostPopup = Em.Object.create({
   serviceController: null,
   showServices: false,
   currentHostName: null,
+  isPopup: null,
 
   /**
    * Sort object array
@@ -80,6 +81,7 @@ App.HostPopup = Em.Object.create({
     this.set('serviceController', null);
     this.set('showServices', false);
     this.set('currentHostName', null);
+    this.get('isPopup')?this.get('isPopup').remove():null;
   },
 
   /**
@@ -468,7 +470,7 @@ App.HostPopup = Em.Object.create({
         return Em.I18n.t(this.get('labelPath')).format(this.get('count'));
       }.property('count')
     });
-    return App.ModalPopup.show({
+    self.set('isPopup', App.ModalPopup.show({
       //no need to track is it loaded when popup contain only list of hosts
       isLoaded: !showServices,
       isOpen: false,
@@ -487,6 +489,7 @@ App.HostPopup = Em.Object.create({
           $(this.get('element')).detach();
         } else {
           this.hide();
+          self.set('isPopup', null);
         }
       },
       onPrimary: function () {
@@ -833,7 +836,8 @@ App.HostPopup = Em.Object.create({
           $(".task-detail-log-maintext").css("display", "block");
         }
       })
-    });
+    }));
+    return self.get('isPopup');
   }
 
 });

Reply via email to