ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [04/21] ambari git commit: AMBARI-21709 Finalize Warns that it is Permanent Even For PATCH Upgrades. (atkach)
Date Thu, 17 Aug 2017 18:58:53 GMT
AMBARI-21709 Finalize Warns that it is Permanent Even For PATCH Upgrades. (atkach)


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

Branch: refs/heads/branch-2.6
Commit: 0aba12139d749224f69529a30b57f88da7c9e1d6
Parents: fad21fb
Author: Andrii Tkach <atkach@apache.org>
Authored: Fri Aug 11 16:48:47 2017 +0300
Committer: Andrii Tkach <atkach@apache.org>
Committed: Fri Aug 11 16:48:47 2017 +0300

----------------------------------------------------------------------
 ambari-web/app/messages.js                          |  2 ++
 .../admin/stack_upgrade/stack_upgrade_wizard.hbs    |  6 +++++-
 .../main/admin/stack_upgrade/upgrade_wizard_view.js | 16 ++++++++++++++++
 3 files changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0aba1213/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 219438e..a0dcf8c 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1812,6 +1812,8 @@ Em.I18n.translations = {
     "Click on <b>Finalize</b> when you are ready to finalize the downgrade and
commit to the new version." +
     " You are strongly encouraged to run tests on your cluster to ensure it is fully operational
before finalizing." +
     " <b>You cannot go back to the original version once the downgrade is finalized.</b>",
+  'admin.stackUpgrade.finalize.message.revertible': "The <b>{0}</b> upgrade to
<b>{1}</b> is ready to be completed." +
+  " After finalization, the patch can be reverted from the Stacks and Versions page if it
is no longer required.",
   'admin.stackUpgrade.finalize.message.autoStart': "Please remember to re-enable Auto Start
if you disabled it for upgrade.",
   'admin.stackUpgrade.finalize.message.skippedServiceChecks': "During the upgrade, checks
for the following services failed and were skipped:",
   'admin.stackUpgrade.finalize.message.testServices': "You are strongly recommended to test
these services before finalizing upgrade.",

http://git-wip-us.apache.org/repos/asf/ambari/blob/0aba1213/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 37727bb..693d5e4 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
@@ -128,7 +128,11 @@
             {{#if isDowngrade}}
               <p class="manual-steps-content">{{t admin.stackUpgrade.finalize.message.downgrade}}</p>
             {{else}}
-              <p class="manual-steps-content">{{t admin.stackUpgrade.finalize.message.upgrade}}</p>
+                {{#if view.isRevertibleUpgrade}}
+                  <p class="manual-steps-content">{{{view.revertibleFinalizeMessage}}}</p>
+                {{else}}
+                  <p class="manual-steps-content">{{t admin.stackUpgrade.finalize.message.upgrade}}</p>
+                {{/if}}
             {{/if}}
               <p class="manual-steps-content"><strong>{{t admin.stackUpgrade.finalize.message.autoStart}}</strong></p>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0aba1213/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 3b269a0..e3f7cb7 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
@@ -208,6 +208,22 @@ App.upgradeWizardView = Em.View.extend({
   isFinalizeItem: Em.computed.equalProperties('manualItem.context', 'controller.finalizeContext'),
 
   /**
+   * Upgrade of PATCH or MAINT version is revertible
+   */
+  isRevertibleUpgrade: function() {
+    var associatedVersion = this.get('controller.upgradeData.Upgrade.associated_version');
+    var upgradeVersion = App.RepositoryVersion.find().findProperty('repositoryVersion', associatedVersion);
+    return ['PATCH', 'MAINT'].contains(upgradeVersion.get('type'));
+  }.property('controller.upgradeData.Upgrade.associated_version'),
+
+  revertibleFinalizeMessage: function() {
+    var associatedVersion = this.get('controller.upgradeData.Upgrade.associated_version');
+    var upgradeVersion = App.RepositoryVersion.find().findProperty('repositoryVersion', associatedVersion);
+    return Em.I18n.t('admin.stackUpgrade.finalize.message.revertible')
+      .format(upgradeVersion.get('type'), upgradeVersion.get('displayName'));
+  }.property('controller.upgradeData.Upgrade.associated_version'),
+
+  /**
    * label of Upgrade status
    * @type {string}
    */


Mime
View raw message