You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2015/09/18 12:42:09 UTC

ambari git commit: AMBARI-13054 Pre-Req Endpoint Should Be Used For Determining Upgrade Button Visibility, second patch. (atkach)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.1.2 b056638f8 -> b31e270e7


AMBARI-13054 Pre-Req Endpoint Should Be Used For Determining Upgrade Button Visibility, second patch. (atkach)


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

Branch: refs/heads/branch-2.1.2
Commit: b31e270e74e9b47050c7fc47284202a1ccb3c2fd
Parents: b056638f
Author: Andrii Tkach <at...@hortonworks.com>
Authored: Fri Sep 18 13:40:59 2015 +0300
Committer: Andrii Tkach <at...@hortonworks.com>
Committed: Fri Sep 18 13:41:49 2015 +0300

----------------------------------------------------------------------
 .../views/main/admin/stack_upgrade/upgrade_version_box_view.js   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b31e270e/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 d7bbea2..ed9c53b 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
@@ -144,7 +144,7 @@ App.UpgradeVersionBoxView = Em.View.extend({
       element.set('action', 'showProgressPopup');
     }
     else if ((status === 'INSTALLED' && !this.get('isUpgrading')) ||
-             (status === 'INSTALL_FAILED' && this.get('isUpgradeAvailable'))) {
+             (['INSTALL_FAILED', 'OUT_OF_SYNC'].contains(status) && this.get('isUpgradeAvailable'))) {
       if (stringUtils.compareVersions(this.get('content.repositoryVersion'), Em.get(currentVersion, 'repository_version')) === 1) {
         var isDisabled = !App.isAccessible('ADMIN') || this.get('controller.requestInProgress') || isInstalling;
         element.set('isButtonGroup', true);
@@ -357,7 +357,7 @@ App.UpgradeVersionBoxView = Em.View.extend({
    * when version in INSTALL_FAILED state it still could be upgraded if check passed
    */
   checkUpgradeAvailability: function () {
-    if (this.get('content.status') === 'INSTALL_FAILED') {
+    if (['INSTALL_FAILED', 'OUT_OF_SYNC'].contains(this.get('content.status'))) {
       this.runUpgradeCheck();
     }
   }.observes('content.status'),