Repository: ambari
Updated Branches:
  refs/heads/trunk 294bba803 -> 1ad65df0b


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

Branch: refs/heads/trunk
Commit: 1ad65df0b5e47b7b83542eb78451b8f2cbcbd142
Parents: 294bba8
Author: Andrii Tkach <atk...@hortonworks.com>
Authored: Fri Sep 18 13:45:40 2015 +0300
Committer: Andrii Tkach <atk...@hortonworks.com>
Committed: Fri Sep 18 13:45:59 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/1ad65df0/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 2e468a1..28fe063 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);
@@ -372,7 +372,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'),

Reply via email to