ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rle...@apache.org
Subject [26/50] [abbrv] ambari git commit: AMBARI-22084. Upgrade Wizard Expand Details Does Not Work (alexantonenko)
Date Mon, 02 Oct 2017 20:39:37 GMT
AMBARI-22084. Upgrade Wizard Expand Details Does Not Work (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f744a36d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f744a36d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f744a36d

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: f744a36d378765f50d4ab808065604f64c7ffb1d
Parents: 8e0f782
Author: Alex Antonenko <aantonenko@hortonworks.com>
Authored: Thu Sep 28 21:23:14 2017 +0300
Committer: Alex Antonenko <aantonenko@hortonworks.com>
Committed: Thu Sep 28 21:23:14 2017 +0300

----------------------------------------------------------------------
 .../main/admin/stack_upgrade/upgrade_wizard_view.js   | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f744a36d/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
index 415d87d..89c54ce 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
@@ -394,22 +394,30 @@ App.upgradeWizardView = Em.View.extend({
   },
 
   /**
+   * previous item request
+   */
+  prevItemRequest: null,
+
+  /**
    * poll for tasks when item is expanded
    */
   doUpgradeItemPolling: function () {
     var self = this;
     var item = this.get('runningItem') || this.get('failedItem');
-
+    var request = this.get('prevItemRequest');
+    if ( request ) request.abort();
     if (item && this.get('isDetailsOpened')) {
-      this.get('controller').getUpgradeItem(item).complete(function () {
+      request = this.get('controller').getUpgradeItem(item).complete(function () {
         self.set('upgradeItemTimer', setTimeout(function () {
           self.doUpgradeItemPolling();
         }, App.bgOperationsUpdateInterval));
       });
+
+      this.set('prevItemRequest', request);
     } else {
       clearTimeout(this.get('upgradeItemTimer'));
     }
-  }.observes('isDetailsOpened'),
+  }.observes('isDetailsOpened', 'runningItem', 'failedItem'),
 
   /**
    * set current upgrade item state to FAILED (for HOLDING_FAILED) or TIMED_OUT (for HOLDING_TIMED_OUT)


Mime
View raw message