ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiw...@apache.org
Subject ambari git commit: AMBARI-14280. Drop the distinction from the UI and always show upgrade as Paused rather than Aborted.(xiwang)
Date Wed, 09 Dec 2015 23:48:45 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 06ee768fb -> d4e64b2f8


AMBARI-14280. Drop the distinction from the UI and always show upgrade as Paused rather than
Aborted.(xiwang)


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

Branch: refs/heads/branch-2.2
Commit: d4e64b2f8c6272a0a054a81ecf7d161ea587f5d0
Parents: 06ee768
Author: Xi Wang <xiwang@apache.org>
Authored: Tue Dec 8 17:50:16 2015 -0800
Committer: Xi Wang <xiwang@apache.org>
Committed: Wed Dec 9 15:47:42 2015 -0800

----------------------------------------------------------------------
 ambari-web/app/app.js                           | 10 ++---
 .../main/admin/stack_and_upgrade_controller.js  | 11 ++---
 ambari-web/app/messages.js                      |  3 ++
 ambari-web/app/models/upgrade_entity.js         |  4 +-
 ambari-web/app/templates/application.hbs        | 15 +++----
 .../stack_upgrade/stack_upgrade_wizard.hbs      | 44 +++++++-------------
 .../stack_upgrade/upgrade_version_box_view.js   | 16 ++-----
 .../admin/stack_upgrade/upgrade_wizard_view.js  |  8 +---
 ambari-web/test/app_test.js                     | 18 +-------
 .../admin/stack_and_upgrade_controller_test.js  | 16 +++----
 ambari-web/test/models/upgrade_entity_test.js   | 11 ++++-
 .../upgrade_version_box_view_test.js            |  8 ++--
 .../stack_upgrade/upgrade_wizard_view_test.js   | 12 +-----
 13 files changed, 60 insertions(+), 116 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d4e64b2f/ambari-web/app/app.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js
index b2f97af..ccf7edb 100644
--- a/ambari-web/app/app.js
+++ b/ambari-web/app/app.js
@@ -70,8 +70,8 @@ module.exports = Em.Application.create({
    * @returns {boolean}
    */
   upgradeAborted: function () {
-    return this.get('upgradeState') === "ABORTED" && !App.router.get('mainAdminStackAndUpgradeController.isSuspended');
-  }.property('upgradeState', 'router.mainAdminStackAndUpgradeController.isSuspended'),
+    return this.get('upgradeState') === "ABORTED";
+  }.property('upgradeState'),
 
   /**
    * RU is running
@@ -86,8 +86,8 @@ module.exports = Em.Application.create({
    * @returns {boolean}
    */
   upgradeIsNotFinished: function () {
-    return this.get('upgradeIsRunning') || this.get('upgradeAborted') || App.router.get('mainAdminStackAndUpgradeController.isSuspended');
-  }.property('upgradeIsRunning', 'upgradeAborted', 'router.mainAdminStackAndUpgradeController.isSuspended'),
+    return this.get('upgradeIsRunning') || this.get('upgradeAborted');
+  }.property('upgradeIsRunning', 'upgradeAborted'),
 
   /**
    * compute user access rights by permission type
@@ -101,7 +101,7 @@ module.exports = Em.Application.create({
    * @return {boolean}
    */
   isAccessible: function (type) {
-    if (!App.router.get('mainAdminStackAndUpgradeController.isSuspended') &&
+    if (!(this.get('upgradeState') == "ABORTED") &&
         !App.get('supports.opsDuringRollingUpgrade') &&
         !['INIT', 'COMPLETED'].contains(this.get('upgradeState')) &&
         !type.contains('upgrade_')) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4e64b2f/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 ff5bf3d..3eb2385 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
@@ -154,8 +154,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
     'upgradeType',
     'failuresTolerance',
     'isDowngrade',
-    'downgradeAllowed',
-    'isSuspended'
+    'downgradeAllowed'
   ],
 
   /**
@@ -257,14 +256,14 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
    * @type {string}
    */
   requestStatus: function () {
-    if (this.get('isSuspended')) {
+    if (this.get('upgradeData.Upgrade') && this.get('upgradeData.Upgrade.request_status')
== 'ABORTED') {
       return 'SUSPENDED';
     } else if (this.get('upgradeData.Upgrade')){
       return this.get('upgradeData.Upgrade.request_status');
     } else {
       return '';
     }
-  }.property('isSuspended', 'upgradeData.Upgrade.request_status'),
+  }.property('upgradeData.Upgrade.request_status'),
 
   init: function () {
     this.initDBProperties();
@@ -1531,9 +1530,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
     var self = this;
     return this.abortUpgrade().done(function () {
       App.set('upgradeState', 'ABORTED');
-      self.set('isSuspended', true);
       self.setDBProperty('upgradeState', 'ABORTED');
-      self.setDBProperty('isSuspended', true);
       App.clusterStatus.setClusterStatus({
         wizardControllerName: self.get('name'),
         localdb: App.db.data
@@ -1549,9 +1546,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
     this.retryUpgrade().done(function () {
       App.set('upgradeState', 'PENDING');
       App.propertyDidChange('upgradeAborted');
-      self.set('isSuspended', false);
       self.setDBProperty('upgradeState', 'PENDING');
-      self.setDBProperty('isSuspended', false);
       App.clusterStatus.setClusterStatus({
         wizardControllerName: self.get('name'),
         localdb: App.db.data

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4e64b2f/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index ff10f70..8e0b6de 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1486,6 +1486,7 @@ Em.I18n.translations = {
   'admin.stackVersions.version.downgrade.pause': "Downgrade: Action Required",
   'admin.stackVersions.version.downgrade.running': "Downgrade: In Process",
   'admin.stackVersions.version.downgrade.aborted': "Downgrade: Aborted",
+  'admin.stackVersions.version.downgrade.suspended': "Downgrade: Paused",
 
   'admin.stackVersions.version.upgrade.upgradeOptions.header': "Upgrade Options",
   'admin.stackVersions.version.upgrade.upgradeOptions.bodyMsg.version': "You are about to
perform an upgrade to <b>{0}</b>.",
@@ -1576,7 +1577,9 @@ Em.I18n.translations = {
   'admin.stackUpgrade.dialog.aborted': "Upgrade is aborted. \n You can either downgrade or
retry upgrade.",
   'admin.stackUpgrade.dialog.downgrade.aborted': "Downgrade is aborted. \n You can retry
downgrade.",
   'admin.stackUpgrade.dialog.suspended': "Upgrade is Paused",
+  'admin.stackUpgrade.dialog.suspended.downgrade': "Downgrade is Paused",
   'admin.stackUpgrade.dialog.resume': "Resume Upgrade",
+  'admin.stackUpgrade.dialog.resume.downgrade': "Resume Downgrade",
   'admin.stackUpgrade.dialog.details.open': "show details",
   'admin.stackUpgrade.dialog.details.hide': "hide details",
   'admin.stackUpgrade.dialog.notActive': "Waiting to execute the next task...",

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4e64b2f/ambari-web/app/models/upgrade_entity.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/upgrade_entity.js b/ambari-web/app/models/upgrade_entity.js
index ab9806a..3484d11 100644
--- a/ambari-web/app/models/upgrade_entity.js
+++ b/ambari-web/app/models/upgrade_entity.js
@@ -83,11 +83,11 @@ App.upgradeEntity = Em.Object.extend({
   }.property('isActive', 'hasExpandableItems'),
 
   upgradeGroupStatus: function () {
-    if (this.get('status') === 'ABORTED' && App.router.get('mainAdminStackAndUpgradeController.isSuspended'))
{
+    if (this.get('status') === 'ABORTED') {
       return 'SUSPENDED';
     }
     if (this.get('type') === 'GROUP') {
       return !this.get('isActive') && this.get('hasExpandableItems') ? 'SUBITEM_FAILED'
: this.get('display_status') || this.get('status');
     }
-  }.property('isExpandableGroup', 'App.router.mainAdminStackAndUpgradeController.isSuspended')
+  }.property('isExpandableGroup')
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4e64b2f/ambari-web/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/application.hbs b/ambari-web/app/templates/application.hbs
index 0a8309a..0385be4 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -130,19 +130,14 @@
                   {{/if}}
                   {{#if App.upgradeAborted}}
                     {{#if App.router.mainAdminStackAndUpgradeController.isDowngrade}}
-                      <span
-                              class="label upgrade-aborted" {{action "openUpgradeDialog"
target="App.router.mainAdminStackAndUpgradeController"}}>
-                          <i class="icon-remove"></i>&nbsp;{{t admin.stackVersions.version.downgrade.aborted}}</span>
+                      <span class="label upgrade-holding" {{action "openUpgradeDialog"
target="App.router.mainAdminStackAndUpgradeController"}}>
+                        <i class="icon-pause"></i>&nbsp;{{t admin.stackVersions.version.downgrade.suspended}}
+                      </span>
                     {{else}}
-                      <span
-                              class="label upgrade-aborted" {{action "openUpgradeDialog"
target="App.router.mainAdminStackAndUpgradeController"}}>
-                          <i class="icon-remove"></i>&nbsp;{{t admin.stackVersions.version.upgrade.aborted}}</span>
-                    {{/if}}
-                  {{/if}}
-                  {{#if App.router.mainAdminStackAndUpgradeController.isSuspended}}
                       <span class="label upgrade-holding" {{action "openUpgradeDialog"
target="App.router.mainAdminStackAndUpgradeController"}}>
-                          <i class="icon-pause"></i>&nbsp;{{t admin.stackVersions.version.upgrade.suspended}}
+                        <i class="icon-pause"></i>&nbsp;{{t admin.stackVersions.version.upgrade.suspended}}
                       </span>
+                    {{/if}}
                   {{/if}}
                 </a>
                 </p>

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4e64b2f/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs b/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
index 32c457d..ca7cf52 100644
--- a/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
+++ b/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
@@ -310,43 +310,27 @@
             </div>
           </div>
         {{/if}}
-        {{#if isSuspended}}
+        {{#if App.upgradeAborted}}
           <div class="box details-box">
             <label class="message">
+            {{#if view.isDowngradeAvailable}}
+              {{t admin.stackUpgrade.dialog.suspended.downgrade}}
+            {{else}}
               {{t admin.stackUpgrade.dialog.suspended}}
+            {{/if}}
             </label>
             <div class="button-row">
-              <button class="btn btn-primary" {{action resumeUpgrade target="controller"}}>
-                {{t admin.stackUpgrade.dialog.resume}}
-              </button>
+              {{#if view.isDowngradeAvailable}}
+                <button class="btn btn-primary" {{action resumeUpgrade target="controller"}}>
+                  {{t admin.stackUpgrade.dialog.resume.downgrade}}
+                </button>
+              {{else}}
+                <button class="btn btn-primary" {{action resumeUpgrade target="controller"}}>
+                  {{t admin.stackUpgrade.dialog.resume}}
+                </button>
+              {{/if}}
             </div>
           </div>
-        {{else}}
-          {{#if App.upgradeAborted}}
-            {{#unless requestInProgress}}
-              <div class="box details-box">
-                <label class="message">
-                    {{#if view.isDowngradeAvailable}}
-                      {{t admin.stackUpgrade.dialog.aborted}}
-                    {{else}}
-                      {{t admin.stackUpgrade.dialog.downgrade.aborted}}
-                    {{/if}}
-                </label>
-                <div class="button-row">
-                    {{#if view.isDowngradeAvailable}}
-                  <button class="btn btn-danger" {{bindAttr disabled="controller.requestInProgress"}}
{{action confirmDowngrade view.manualItem target="controller"}}>{{t common.downgrade}}</button>
-                    {{/if}}
-                    <button class="btn btn-success" {{action retryUpgrade target="controller"}}>
-                      {{#if view.isDowngradeAvailable}}
-                        {{t common.reUpgrade}}
-                      {{else}}
-                        {{t common.reDowngrade}}
-                      {{/if}}
-                    </button>
-                </div>
-              </div>
-            {{/unless}}
-          {{/if}}
         {{/if}}
       </div>
       {{#each group in view.upgradeGroups}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4e64b2f/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
index 1be4290..22a578a 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
@@ -154,7 +154,6 @@ App.UpgradeVersionBoxView = Em.View.extend({
     });
     var isInstalling = this.get('parentView.repoVersions').someProperty('status', 'INSTALLING');
     var isAborted = App.get('upgradeState') === 'ABORTED';
-    var isSuspended = App.router.get('mainAdminStackAndUpgradeController.isSuspended');
 
     if (['INSTALLING', 'CURRENT'].contains(status)) {
       element.setProperties(statePropertiesMap[status]);
@@ -214,15 +213,9 @@ App.UpgradeVersionBoxView = Em.View.extend({
       }
     }
     else if (isAborted) {
-      if (isSuspended) {
-        element.setProperties(statePropertiesMap['SUSPENDED']);
-        element.set('isDisabled', this.get('controller.requestInProgress'));
-      } else {
-        element.set('isButton', true);
-        element.set('text', this.get('controller.isDowngrade') ? Em.I18n.t('common.reDowngrade')
: Em.I18n.t('common.reUpgrade'));
-        element.set('action', this.get('controller.isDowngrade') ? 'confirmRetryDowngrade'
: 'confirmRetryUpgrade');
-        element.set('isDisabled', this.get('controller.requestInProgress'));
-      }
+      element.setProperties(statePropertiesMap['SUSPENDED']);
+      element.set('text', this.get('controller.isDowngrade') ? Em.I18n.t('admin.stackUpgrade.dialog.resume.downgrade')
: Em.I18n.t('admin.stackUpgrade.dialog.resume'));
+      element.set('isDisabled', this.get('controller.requestInProgress'));
     }
     return element;
   }.property(
@@ -230,8 +223,7 @@ App.UpgradeVersionBoxView = Em.View.extend({
     'controller.isDowngrade',
     'isUpgrading',
     'controller.requestInProgress',
-    'parentView.repoVersions.@each.status',
-    'App.router.mainAdminStackAndUpgradeController.isSuspended'
+    'parentView.repoVersions.@each.status'
   ),
 
   didInsertElement: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4e64b2f/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 ed22325..8cfac65 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
@@ -246,11 +246,7 @@ App.upgradeWizardView = Em.View.extend({
         labelKey = 'admin.stackUpgrade.state.completed';
         break;
       case 'ABORTED':
-        if (this.get('controller.isSuspended')) {
-          labelKey = 'admin.stackUpgrade.state.paused';
-        } else {
-          labelKey = 'admin.stackUpgrade.state.aborted';
-        }
+        labelKey = 'admin.stackUpgrade.state.paused';
         break;
       case 'TIMEDOUT':
       case 'FAILED':
@@ -266,7 +262,7 @@ App.upgradeWizardView = Em.View.extend({
     } else {
       return "";
     }
-  }.property('controller.upgradeData.Upgrade.request_status', 'controller.isDowngrade', 'controller.isSuspended'),
+  }.property('controller.upgradeData.Upgrade.request_status', 'controller.isDowngrade'),
 
   /**
    * load versions page

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4e64b2f/ambari-web/test/app_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/app_test.js b/ambari-web/test/app_test.js
index dd58d46..4c4595f 100644
--- a/ambari-web/test/app_test.js
+++ b/ambari-web/test/app_test.js
@@ -576,36 +576,20 @@ describe('App', function () {
     var cases = [
       {
         upgradeState: 'INIT',
-        isSuspended: false,
         upgradeAborted: false
       },
       {
         upgradeState: 'INIT',
-        isSuspended: true,
-        upgradeAborted: false
-      },
-      {
-        upgradeState: 'ABORTED',
-        isSuspended: true,
         upgradeAborted: false
       },
       {
         upgradeState: 'ABORTED',
-        isSuspended: false,
         upgradeAborted: true
       }
     ];
 
-    beforeEach(function () {
-      this.mock = sinon.stub(App.router, 'get');
-    });
-    afterEach(function () {
-      this.mock.restore();
-    });
-
     cases.forEach(function (item) {
-      it(item.upgradeState + ", " + item.isSuspended, function () {
-        this.mock.returns(item.isSuspended);
+      it(item.upgradeState + ", ", function () {
         App.set('upgradeState', item.upgradeState);
         App.propertyDidChange('upgradeAborted');
         expect(App.get('upgradeAborted')).to.equal(item.upgradeAborted);

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4e64b2f/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 d1d5761..a9557cf 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
@@ -74,17 +74,15 @@ describe('App.MainAdminStackAndUpgradeController', function() {
   });
 
   describe("#requestStatus", function() {
-    it("isSuspended false", function() {
-      controller.set('isSuspended', false);
+    it("state ABORTED", function() {
       controller.set('upgradeData', { Upgrade: {request_status: 'ABORTED'}});
       controller.propertyDidChange('requestStatus');
-      expect(controller.get('requestStatus')).to.equal('ABORTED');
+      expect(controller.get('requestStatus')).to.equal('SUSPENDED');
     });
-    it("isSuspended true", function() {
-      controller.set('isSuspended', true);
-      controller.set('upgradeData', { Upgrade: {request_status: 'ABORTED'}});
+    it("state not ABORTED", function() {
+      controller.set('upgradeData', { Upgrade: {request_status: 'INIT'}});
       controller.propertyDidChange('requestStatus');
-      expect(controller.get('requestStatus')).to.equal('SUSPENDED');
+      expect(controller.get('requestStatus')).to.equal('INIT');
     });
   });
 
@@ -1352,9 +1350,7 @@ describe('App.MainAdminStackAndUpgradeController', function() {
       controller.suspendUpgrade();
       expect(controller.abortUpgrade.calledOnce).to.be.true;
       expect(App.get('upgradeState')).to.equal('ABORTED');
-      expect(controller.get('isSuspended')).to.be.true;
       expect(controller.setDBProperty.calledWith('upgradeState', 'ABORTED')).to.be.true;
-      expect(controller.setDBProperty.calledWith('isSuspended', true)).to.be.true;
       expect(App.clusterStatus.setClusterStatus.calledOnce).to.be.true;
     });
   });
@@ -1378,9 +1374,7 @@ describe('App.MainAdminStackAndUpgradeController', function() {
       controller.resumeUpgrade();
       expect(controller.retryUpgrade.calledOnce).to.be.true;
       expect(App.get('upgradeState')).to.equal('PENDING');
-      expect(controller.get('isSuspended')).to.be.false;
       expect(controller.setDBProperty.calledWith('upgradeState', 'PENDING')).to.be.true;
-      expect(controller.setDBProperty.calledWith('isSuspended', false)).to.be.true;
       expect(App.clusterStatus.setClusterStatus.calledOnce).to.be.true;
     });
   });

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4e64b2f/ambari-web/test/models/upgrade_entity_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/models/upgrade_entity_test.js b/ambari-web/test/models/upgrade_entity_test.js
index 05f1278..0aa9248c 100644
--- a/ambari-web/test/models/upgrade_entity_test.js
+++ b/ambari-web/test/models/upgrade_entity_test.js
@@ -144,10 +144,19 @@ describe('App.upgradeEntity', function () {
       {
         input: {
           type: 'GROUP',
-          status: 'ABORTED',
+          status: 'PENDING',
           hasExpandableItems: true
         },
         upgradeGroupStatus: 'SUBITEM_FAILED',
+        title: 'pending upgrade group with expandable items'
+      },
+      {
+        input: {
+          type: 'GROUP',
+          status: 'ABORTED',
+          hasExpandableItems: true
+        },
+        upgradeGroupStatus: 'SUSPENDED',
         title: 'aborted upgrade group with expandable items'
       },
       {

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4e64b2f/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
index 9bf8a71..87a11f8 100644
--- a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
+++ b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
@@ -784,8 +784,8 @@ describe('App.UpgradeVersionBoxView', function () {
         expected: {
           status: 'UPGRADING',
           isButton: true,
-          action: 'confirmRetryUpgrade',
-          text: Em.I18n.t('common.reUpgrade'),
+          action: 'resumeUpgrade',
+          text: Em.I18n.t('admin.stackUpgrade.dialog.resume'),
           isDisabled: false
         },
         title: 'upgrade aborted'
@@ -804,8 +804,8 @@ describe('App.UpgradeVersionBoxView', function () {
         expected: {
           status: 'UPGRADE_FAILED',
           isButton: true,
-          action: 'confirmRetryDowngrade',
-          text: Em.I18n.t('common.reDowngrade'),
+          action: 'resumeUpgrade',
+          text: Em.I18n.t('admin.stackUpgrade.dialog.resume.downgrade'),
           isDisabled: true
         },
         title: 'downgrade aborted, request in progress'

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4e64b2f/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js
index 7505282..42a9b42 100644
--- a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js
+++ b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js
@@ -592,7 +592,7 @@ describe('App.upgradeWizardView', function () {
           status: 'ABORTED',
           isDowngrade: false
         },
-        result: Em.I18n.t('admin.stackUpgrade.state.aborted')
+        result: Em.I18n.t('admin.stackUpgrade.state.paused')
       },
       {
         data: {
@@ -669,15 +669,7 @@ describe('App.upgradeWizardView', function () {
           status: 'ABORTED',
           isDowngrade: true
         },
-        result: Em.I18n.t('admin.stackUpgrade.state.aborted.downgrade')
-      },
-      {
-        data: {
-          status: 'ABORTED',
-          isDowngrade: false,
-          isSuspended: true
-        },
-        result: Em.I18n.t('admin.stackUpgrade.state.paused')
+        result: Em.I18n.t('admin.stackUpgrade.state.paused.downgrade')
       },
       {
         data: {


Mime
View raw message