ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject ambari git commit: AMBARI-9831 Stack Versions page: disable controls while call in progress. (ababiichuk)
Date Wed, 11 Mar 2015 19:19:29 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 516d718fc -> 14ef5195c


AMBARI-9831 Stack Versions page: disable controls while call in progress. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 14ef5195c9ba643302759e0c82a7d4a210951bfd
Parents: 516d718
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Wed Mar 11 18:39:41 2015 +0200
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Wed Mar 11 21:18:19 2015 +0200

----------------------------------------------------------------------
 .../main/admin/stack_and_upgrade_controller.js            | 10 ++++++++--
 .../main/admin/stack_and_upgrade_controller_test.js       |  3 ++-
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/14ef5195/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index 73975eb..a40e69e 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -145,7 +145,6 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
     this.loadUpgradeData(true).done(function() {
       self.loadStackVersionsToModel(true).done(function () {
         self.loadRepoVersionsToModel().done(function() {
-          self.set('requestInProgress', false);
           var currentVersion = App.StackVersion.find().findProperty('state', 'CURRENT');
           if (currentVersion) {
             self.set('currentVersion', {
@@ -431,11 +430,13 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
     };
 
     if (App.get('supports.preUpgradeCheck')) {
+      this.set('requestInProgress', true);
       App.ajax.send({
         name: "admin.rolling_upgrade.pre_upgrade_check",
         sender: this,
         data: params,
-        success: "runPreUpgradeCheckSuccess"
+        success: "runPreUpgradeCheckSuccess",
+        error: "runPreUpgradeCheckError"
       });
     } else {
       this.upgrade(params);
@@ -452,6 +453,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
    */
   runPreUpgradeCheckSuccess: function (data, opt, params) {
     if (data.items.someProperty('UpgradeChecks.status', "FAIL")) {
+      this.set('requestInProgress', false);
       var header = Em.I18n.t('popup.clusterCheck.Upgrade.header').format(params.label);
       var title = Em.I18n.t('popup.clusterCheck.Upgrade.title');
       var alert = Em.I18n.t('popup.clusterCheck.Upgrade.alert');
@@ -461,6 +463,10 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
     }
   },
 
+  runPreUpgradeCheckError: function() {
+    this.set('requestInProgress', false);
+  },
+
   /**
    * confirmation popup before install repository version
    */

http://git-wip-us.apache.org/repos/asf/ambari/blob/14ef5195/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
index 2af6753..48f3514 100644
--- a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
@@ -245,7 +245,8 @@ describe('App.MainAdminStackAndUpgradeController', function() {
           value: '2.2',
           label: 'HDP-2.2'
         },
-        success: "runPreUpgradeCheckSuccess"
+        success: "runPreUpgradeCheckSuccess",
+        error: "runPreUpgradeCheckError"
       });
     });
   });


Mime
View raw message