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:50:29 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk f8d9bfb5d -> 40bd722f4


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/40bd722f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/40bd722f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/40bd722f

Branch: refs/heads/trunk
Commit: 40bd722f4591a1447dfd537eb4068406aa404721
Parents: f8d9bfb
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:49:13 2015 -0800

----------------------------------------------------------------------
 ambari-web/app/app.js                           | 11 +++--
 .../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                     | 37 +---------------
 .../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   | 13 +-----
 13 files changed, 60 insertions(+), 137 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/40bd722f/ambari-web/app/app.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js
index 9009c00..e80f57b 100644
--- a/ambari-web/app/app.js
+++ b/ambari-web/app/app.js
@@ -79,8 +79,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
@@ -96,15 +96,14 @@ module.exports = Em.Application.create({
   wizardIsNotFinished: function () {
     return this.get('upgradeIsRunning') ||
            this.get('upgradeAborted') ||
-           App.router.get('wizardWatcherController.isNonWizardUser') ||
-           App.router.get('mainAdminStackAndUpgradeController.isSuspended');
-  }.property('upgradeIsRunning', 'upgradeAborted', 'router.wizardWatcherController.isNonWizardUser',
'router.mainAdminStackAndUpgradeController.isSuspended'),
+           App.router.get('wizardWatcherController.isNonWizardUser');
+  }.property('upgradeIsRunning', 'upgradeAborted', 'router.wizardWatcherController.isNonWizardUser'),
 
   isAuthorized: function(authRoles, options) {
     var result = false;
     authRoles = $.map(authRoles.split(","), $.trim);
 
-    if (!App.router.get('mainAdminStackAndUpgradeController.isSuspended') &&
+    if (!(this.get('upgradeState') == "ABORTED") &&
         !App.get('supports.opsDuringRollingUpgrade') &&
         !['INIT', 'COMPLETED'].contains(this.get('upgradeState')) ||
         !App.auth){

http://git-wip-us.apache.org/repos/asf/ambari/blob/40bd722f/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 87727f2..50638d0 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'
   ],
 
   /**
@@ -251,14 +250,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();
@@ -1523,9 +1522,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
@@ -1541,9 +1538,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/40bd722f/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 0afce4b..ed1f3c6 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1469,6 +1469,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>.",
@@ -1559,7 +1560,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/40bd722f/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 953f1eb..89709b2 100644
--- a/ambari-web/app/models/upgrade_entity.js
+++ b/ambari-web/app/models/upgrade_entity.js
@@ -79,11 +79,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/40bd722f/ambari-web/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/application.hbs b/ambari-web/app/templates/application.hbs
index 9da0da5..fd6e7e1 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -135,19 +135,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/40bd722f/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 9c8b4fd..798c157 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
@@ -269,43 +269,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/40bd722f/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 5edb75c..9835af2 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
@@ -152,7 +152,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]);
@@ -212,15 +211,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(
@@ -228,8 +221,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/40bd722f/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 2f2b4dd..d853bd8 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
@@ -217,11 +217,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':
@@ -237,7 +233,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'),
 
   /**
    * toggle details box

http://git-wip-us.apache.org/repos/asf/ambari/blob/40bd722f/ambari-web/test/app_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/app_test.js b/ambari-web/test/app_test.js
index 3cc3081..dea2464 100644
--- a/ambari-web/test/app_test.js
+++ b/ambari-web/test/app_test.js
@@ -463,36 +463,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);
@@ -501,43 +485,25 @@ describe('App', function () {
   });
 
   describe('#wizardIsNotFinished', function () {
-
-    beforeEach(function () {
-      this.mock = sinon.stub(App.router, 'get');
-    });
-    afterEach(function () {
-      this.mock.restore();
-    });
-
     var cases = [
       {
         upgradeState: 'INIT',
-        isSuspended: false,
         wizardIsNotFinished: false
       },
       {
         upgradeState: 'IN_PROGRESS',
-        isSuspended: false,
         wizardIsNotFinished: true
       },
       {
         upgradeState: 'HOLDING',
-        isSuspended: false,
         wizardIsNotFinished: true
       },
       {
         upgradeState: 'HOLDING_TIMEDOUT',
-        isSuspended: false,
-        wizardIsNotFinished: true
-      },
-      {
-        upgradeState: 'ABORTED',
-        isSuspended: false,
         wizardIsNotFinished: true
       },
       {
         upgradeState: 'ABORTED',
-        isSuspended: true,
         wizardIsNotFinished: true
       }
     ];
@@ -545,7 +511,6 @@ describe('App', function () {
     cases.forEach(function (item) {
       it(item.upgradeState, function () {
         App.set('upgradeState', item.upgradeState);
-        this.mock.returns(item.isSuspended);
         App.propertyDidChange('wizardIsNotFinished');
         expect(App.get('wizardIsNotFinished')).to.equal(item.wizardIsNotFinished);
       });

http://git-wip-us.apache.org/repos/asf/ambari/blob/40bd722f/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 945ec93..630d0b2 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');
     });
   });
 
@@ -1351,9 +1349,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;
     });
   });
@@ -1377,9 +1373,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/40bd722f/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/40bd722f/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 2c58be3..5277744 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
@@ -793,8 +793,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'
@@ -813,8 +813,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/40bd722f/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 1014bd7..bc50a51 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
@@ -494,7 +494,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: {
@@ -571,15 +571,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: {
@@ -619,7 +611,6 @@ describe('App.upgradeWizardView', function () {
     ].forEach(function (test) {
         it('status = ' + test.data.status + ", isDowngrade = " + test.data.isDowngrade, function
() {
           view.set('controller.isDowngrade', test.data.isDowngrade);
-          view.set('controller.isSuspended', test.data.isSuspended);
           view.set('controller.upgradeData.Upgrade.request_status', test.data.status);
           view.propertyDidChange('upgradeStatusLabel');
           expect(view.get('upgradeStatusLabel')).to.equal(test.result);


Mime
View raw message