ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject ambari git commit: AMBARI-21434 UI - pass in param UpgradeChecks/target_stack to rolling_upgrade_checks endpoint. (atkach)
Date Mon, 10 Jul 2017 13:24:29 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-21348 78255d768 -> b3be727e1


AMBARI-21434 UI - pass in param UpgradeChecks/target_stack to rolling_upgrade_checks endpoint.
(atkach)


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

Branch: refs/heads/branch-feature-AMBARI-21348
Commit: b3be727e178d3292e5619308973889be200a8588
Parents: 78255d7
Author: Andrii Tkach <atkach@apache.org>
Authored: Mon Jul 10 15:53:05 2017 +0300
Committer: Andrii Tkach <atkach@apache.org>
Committed: Mon Jul 10 16:23:54 2017 +0300

----------------------------------------------------------------------
 .../main/admin/stack_and_upgrade_controller.js          | 12 ++++++++----
 ambari-web/app/utils/ajax/ajax.js                       |  2 +-
 .../main/admin/stack_and_upgrade_controller_test.js     |  4 +++-
 3 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b3be727e/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 7e40b42..db4df7f 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
@@ -923,7 +923,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
         this.runPreUpgradeCheckOnly({
           value: version.get('repositoryVersion'),
           label: version.get('displayName'),
-          type: method.get('type')
+          type: method.get('type'),
+          targetStack: version.get('displayName')
         });
       } else {
         //if method not supported in current stack version, mark as check completed
@@ -1043,7 +1044,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
           self.runPreUpgradeCheckOnly({
             value: version.get('repositoryVersion'),
             label: version.get('displayName'),
-            type: event.context.get('type')
+            type: event.context.get('type'),
+            targetStack: version.get('displayName')
           });
         },
         openMessage: function (event) {
@@ -1079,7 +1081,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
               self.runPreUpgradeCheckOnly.call(self, {
                 value: version.get('repositoryVersion'),
                 label: version.get('displayName'),
-                type: event.context.get('type')
+                type: event.context.get('type'),
+                targetStack: version.get('displayName')
               });
             }
           }, configs);
@@ -1315,7 +1318,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
       label: version.get('displayName'),
       type: version.get('upgradeType'),
       skipComponentFailures: version.get('skipComponentFailures') ? 'true' : 'false',
-      skipSCFailures: version.get('skipSCFailures') ? 'true' : 'false'
+      skipSCFailures: version.get('skipSCFailures') ? 'true' : 'false',
+      targetStack: version.get('displayName')
     };
     if (App.get('supports.preUpgradeCheck')) {
       this.set('requestInProgress', true);

http://git-wip-us.apache.org/repos/asf/ambari/blob/b3be727e/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index a952ee4..92f05f1 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -1838,7 +1838,7 @@ var urls = {
   },
 
   'admin.upgrade.pre_upgrade_check': {
-    'real': '/clusters/{clusterName}/rolling_upgrades_check?fields=*&UpgradeChecks/repository_version={value}&UpgradeChecks/upgrade_type={type}',
+    'real': '/clusters/{clusterName}/rolling_upgrades_check?fields=*&UpgradeChecks/repository_version={value}&UpgradeChecks/upgrade_type={type}&UpgradeChecks/target_stack={targetStack}',
     'mock': '/data/stack_versions/pre_upgrade_check.json'
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b3be727e/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 ae8ffe5..2098fd6 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
@@ -406,6 +406,7 @@ describe('App.MainAdminStackAndUpgradeController', function() {
         value: '2.2',
         label: 'HDP-2.2',
         type: 'ROLLING',
+        targetStack: 'HDP-2.2',
         skipComponentFailures: 'false',
         skipSCFailures: 'false'
       });
@@ -1756,7 +1757,8 @@ describe('App.MainAdminStackAndUpgradeController', function() {
       expect(controller.runPreUpgradeCheckOnly.calledWith({
         value: 'v1',
         label: 'V1',
-        type: 'ROLLING'
+        type: 'ROLLING',
+        targetStack: 'V1'
       })).to.be.true;
     });
   });


Mime
View raw message