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-13802. Update message content for Finalize Upgrade Pre-Check.(xiwang)
Date Mon, 16 Nov 2015 21:37:34 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 b2910e1cb -> 2867330fc


AMBARI-13802. Update message content for Finalize Upgrade Pre-Check.(xiwang)


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

Branch: refs/heads/branch-2.1
Commit: 2867330fcc3e2a2c1740688100dc366695c952a6
Parents: b2910e1
Author: Xi Wang <xiwang@apache.org>
Authored: Fri Nov 13 10:50:55 2015 -0800
Committer: Xi Wang <xiwang@apache.org>
Committed: Mon Nov 16 13:07:33 2015 -0800

----------------------------------------------------------------------
 ambari-web/app/messages.js                      |  3 +-
 .../stack_upgrade/stack_upgrade_wizard.hbs      | 70 +++++++++++---------
 .../admin/stack_upgrade/upgrade_wizard_view.js  |  8 ++-
 3 files changed, 45 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2867330f/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 429f1ca..af3f156 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1529,6 +1529,7 @@ Em.I18n.translations = {
   'admin.stackUpgrade.failedHosts.options': "Your options:",
   'admin.stackUpgrade.failedHosts.options.first': "<b>Pause Upgrade</b>, delete
the unhealthy hosts and return to the Upgrade Wizard to Proceed.",
   'admin.stackUpgrade.failedHosts.options.second': "Perform a <b>Downgrade</b>,
which will revert all hosts to the previous stack version.",
+  'admin.stackUpgrade.failedHosts.options.third': "Ignore these failures and <b>Proceed</b>
for now (reconcile the failures later).",
   'admin.stackUpgrade.failedHosts.header': "Failed Hosts",
   'admin.stackUpgrade.failedHosts.subHeader': "Upgrade failed on {0} hosts",
   'admin.stackUpgrade.failedHosts.details': "Open Details",
@@ -1559,8 +1560,6 @@ Em.I18n.translations = {
   'admin.stackUpgrade.dialog.keepRunning': "Keep running Upgrade in background",
   'admin.stackUpgrade.dialog.failed': "Failed on:",
   'admin.stackUpgrade.dialog.manual.slaveComponentFailures.title': "Slave Component Failures",
-  'admin.stackUpgrade.dialog.manual.slaveComponentFailures.msg1': "The following hosts failed
to upgrade but were skipped:",
-  'admin.stackUpgrade.dialog.manual.slaveComponentFailures.msg2': "Before proceeding, Pause
Upgrade and remove these hosts or manually upgrade them before proceeding.",
   'admin.stackUpgrade.dialog.manual.serviceCheckFailures.title': "Service Check Failures",
   'admin.stackUpgrade.dialog.manual.serviceCheckFailures.msg1': "The following service checks
failed but were skipped:",
   'admin.stackUpgrade.dialog.manual.serviceCheckFailures.msg2': "You have the option to Pause
Upgrade and fix the above issue(s) before proceeding.",

http://git-wip-us.apache.org/repos/asf/ambari/blob/2867330f/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 c8a1412..3a025d2 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
@@ -58,39 +58,41 @@
           </div>
         {{/if}}
         {{#if view.failedItem}}
-          <div class="box details-box">
-            <div class="row-fluid">
-              <div class="pull-left">{{t admin.stackUpgrade.dialog.failed}}&nbsp;{{view.failedItem.text}}</div>
-              {{#if view.isDetailsOpened}}
-                  <a href="#" class="pull-right" {{action toggleDetails target="view"}}>{{t
admin.stackUpgrade.dialog.details.hide}}</a>
-                {{#if view.failedItem.isTasksLoaded}}
-                  <div class="clear">
-                    {{view App.upgradeTaskView contentBinding="view.taskDetails" outsideViewBinding="view.outsideView"}}
-                  </div>
+          {{#unless view.isSlaveComponentFailuresItem}}
+            <div class="box details-box">
+              <div class="row-fluid">
+                <div class="pull-left">{{t admin.stackUpgrade.dialog.failed}}&nbsp;{{view.failedItem.text}}</div>
+                {{#if view.isDetailsOpened}}
+                    <a href="#" class="pull-right" {{action toggleDetails target="view"}}>{{t
admin.stackUpgrade.dialog.details.hide}}</a>
+                  {{#if view.failedItem.isTasksLoaded}}
+                    <div class="clear">
+                      {{view App.upgradeTaskView contentBinding="view.taskDetails" outsideViewBinding="view.outsideView"}}
+                    </div>
+                  {{else}}
+                    <div class="clear spinner"></div>
+                  {{/if}}
                 {{else}}
-                  <div class="clear spinner"></div>
+                    <a href="#" class="pull-right" {{action toggleDetails target="view"}}>{{t
admin.stackUpgrade.dialog.details.open}}</a>
                 {{/if}}
-               {{else}}
-                <a href="#" class="pull-right" {{action toggleDetails target="view"}}>{{t
admin.stackUpgrade.dialog.details.open}}</a>
+              </div>
+              {{#if view.isHoldingState}}
+                <div class="button-row">
+                  {{#if view.isDowngradeAvailable}}
+                    <button class="btn btn-danger" {{bindAttr disabled="controller.requestInProgress"}}
{{action confirmDowngrade view.failedItem target="controller"}}>{{t common.downgrade}}</button>
+                  {{/if}}
+                  {{#if isDowngrade}}
+                    <button class="btn" {{action closeWizard target="view.parentView"}}>{{t
admin.stackUpgrade.pauseDowngrade}}</button>
+                  {{else}}
+                    <button class="btn" {{action pauseUpgrade target="view"}}>{{t admin.stackUpgrade.pauseUpgrade}}</button>
+                  {{/if}}
+                  {{#if view.failedItem.skippable}}
+                    <button class="btn btn-warning" {{bindAttr disabled="controller.requestInProgress"}}
{{action continue view.failedItem target="view"}}>{{t admin.stackUpgrade.dialog.continue}}</button>
+                  {{/if}}
+                    <button class="btn" {{bindAttr disabled="controller.requestInProgress"}}
{{action retry view.failedItem target="view"}}>{{t common.retry}}</button>
+                </div>
               {{/if}}
             </div>
-            {{#if view.isHoldingState}}
-              <div class="button-row">
-                {{#if view.isDowngradeAvailable}}
-                  <button class="btn btn-danger" {{bindAttr disabled="controller.requestInProgress"}}
{{action confirmDowngrade view.failedItem target="controller"}}>{{t common.downgrade}}</button>
-                {{/if}}
-                {{#if isDowngrade}}
-                  <button class="btn" {{action closeWizard target="view.parentView"}}>{{t
admin.stackUpgrade.pauseDowngrade}}</button>
-                {{else}}
-                  <button class="btn" {{action pauseUpgrade target="view"}}>{{t admin.stackUpgrade.pauseUpgrade}}</button>
-                {{/if}}
-                {{#if view.failedItem.skippable}}
-                  <button class="btn btn-warning" {{bindAttr disabled="controller.requestInProgress"}}
{{action continue view.failedItem target="view"}}>{{t admin.stackUpgrade.dialog.continue}}</button>
-                {{/if}}
-                <button class="btn" {{bindAttr disabled="controller.requestInProgress"}}
{{action retry view.failedItem target="view"}}>{{t common.retry}}</button>
-              </div>
-            {{/if}}
-          </div>
+          {{/unless}}
         {{/if}}
         {{#if view.plainManualItem}}
           <div class="box details-box">
@@ -197,7 +199,6 @@
           <div class="box details-box">
             <p class="manual-steps-title"><strong>{{t admin.stackUpgrade.dialog.manual}}</strong></p>
             <div class="slave-failures-info">
-              <p class="slave-failures-title"><strong>{{t admin.stackUpgrade.dialog.manual.slaveComponentFailures.title}}</strong></p>
               <p>
                 {{#if areSlaveComponentFailuresHostsLoaded}}
                   {{t admin.stackUpgrade.failedHosts.message}}
@@ -214,10 +215,12 @@
               </ul>
               </p>
             </div>
+            {{#unless view.isHoldingState}}
               <label class="message">
                 {{view Em.Checkbox checkedBinding="view.isManualDone"}}
                 {{t admin.stackUpgrade.dialog.manualDone}}
               </label>
+            {{/unless}}
               <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>
@@ -225,11 +228,15 @@
                 {{#if isDowngrade}}
                   <button class="btn" {{action closeWizard target="view.parentView"}}>{{t
admin.stackUpgrade.pauseDowngrade}}</button>
                 {{else}}
-                    <button class="btn" {{action pauseUpgrade target="view"}}>{{t admin.stackUpgrade.pauseUpgrade}}</button>
+                  <button class="btn" {{action pauseUpgrade target="view"}}>{{t admin.stackUpgrade.pauseUpgrade}}</button>
                 {{/if}}
+                {{#if view.isHoldingState}}
+                  <button class="btn" {{bindAttr disabled="controller.requestInProgress"}}
{{action retry view.failedItem target="view"}}>{{t common.retry}}</button>
+                {{else}}
                   <button class="btn btn-success" {{bindAttr disabled="view.isManualProceedDisabled"}}
{{action complete view.manualItem target="view"}}>
                     {{t common.proceed}}
                   </button>
+                {{/if}}
               </div>
           </div>
         {{/if}}
@@ -261,6 +268,7 @@
                     {{t admin.stackUpgrade.failedHosts.options}}
                   <ul>
                     <li>{{t admin.stackUpgrade.failedHosts.options.first}}</li>
+                    <li>{{t admin.stackUpgrade.failedHosts.options.third}}</li>
                     <li>{{t admin.stackUpgrade.failedHosts.options.second}}</li>
                   </ul>
                   </p>

http://git-wip-us.apache.org/repos/asf/ambari/blob/2867330f/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 0f24f35..ae5eed8 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
@@ -187,8 +187,9 @@ App.upgradeWizardView = Em.View.extend({
    * @type {boolean}
    */
   isSlaveComponentFailuresItem: function () {
-    return this.get('manualItem.context') === this.get("controller.slaveFailuresContext");
-  }.property('manualItem.context'),
+    var item = this.get('activeGroup.upgradeItems') && this.get('activeGroup.upgradeItems').findProperty('context',
this.get("controller.slaveFailuresContext"));
+    return item && ['HOLDING', 'HOLDING_FAILED'].contains(item.get('status'));
+  }.property('activeGroup.upgradeItems.@each.status', 'activeGroup.upgradeItems.@each.context'),
 
   /**
    * manualItem: indicate whether the step is "Service check failures", a dialog with instructions
will show up for manual steps
@@ -349,7 +350,8 @@ App.upgradeWizardView = Em.View.extend({
     var controller = this.get('controller');
     if (this.get('isSlaveComponentFailuresItem')) {
       if (!this.get('controller.areSlaveComponentFailuresHostsLoaded')) {
-        controller.getUpgradeItem(this.get('manualItem'), 'getSlaveComponentItemSuccessCallback').complete(function
() {
+        var item = this.get('activeGroup.upgradeItems') && this.get('activeGroup.upgradeItems').findProperty('context',
this.get("controller.slaveFailuresContext"));
+        controller.getUpgradeItem(item, 'getSlaveComponentItemSuccessCallback').complete(function
() {
           controller.set('areSlaveComponentFailuresHostsLoaded', true);
         });
       }


Mime
View raw message