ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject ambari git commit: AMBARI-20841. Pause Button Appears After Successful Downgrade (alexantonenko)
Date Tue, 25 Apr 2017 15:13:53 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 2bd95deb0 -> 8a7bba3e4


AMBARI-20841. Pause Button Appears After Successful Downgrade (alexantonenko)


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

Branch: refs/heads/branch-2.5
Commit: 8a7bba3e4e914037fc47f3ecde5c787e3ba01910
Parents: 2bd95de
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Tue Apr 25 13:02:35 2017 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Tue Apr 25 18:13:47 2017 +0300

----------------------------------------------------------------------
 ambari-web/app/app.js                                          | 6 ++++++
 .../app/controllers/main/admin/stack_and_upgrade_controller.js | 5 +++++
 ambari-web/app/styles/stack_versions.less                      | 1 +
 .../main/admin/stack_upgrade/stack_upgrade_wizard.hbs          | 6 ++++--
 4 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8a7bba3e/ambari-web/app/app.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js
index 18d0cba..fcc770c 100644
--- a/ambari-web/app/app.js
+++ b/ambari-web/app/app.js
@@ -71,6 +71,12 @@ module.exports = Em.Application.create({
   upgradeInProgress: Em.computed.equal('upgradeState', 'IN_PROGRESS'),
 
   /**
+   * Checks if update process is completed
+   * @type {boolean}
+   */
+  upgradeCompleted: Em.computed.equal('upgradeState', 'COMPLETED'),
+
+  /**
    * flag is true when upgrade process is waiting for user action
    * to proceed, retry, perform manual steps etc.
    * @returns {boolean}

http://git-wip-us.apache.org/repos/asf/ambari/blob/8a7bba3e/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 4fd6f79..f0a222c 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
@@ -63,6 +63,11 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
 
   /**
    * @type {boolean}
+   */
+  showPauseButton: Em.computed.and('!App.upgradeSuspended', '!App.upgradeCompleted'),
+
+  /**
+   * @type {boolean}
    * @default true
    */
   downgradeAllowed: true,

http://git-wip-us.apache.org/repos/asf/ambari/blob/8a7bba3e/ambari-web/app/styles/stack_versions.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/stack_versions.less b/ambari-web/app/styles/stack_versions.less
index a721596..09073d8 100644
--- a/ambari-web/app/styles/stack_versions.less
+++ b/ambari-web/app/styles/stack_versions.less
@@ -356,6 +356,7 @@
     padding: 5px;
     margin-left: 15px;
     margin-right: 95px;
+    margin-top: 10px;
     .button-row {
       text-align: right;
       padding: 5px;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8a7bba3e/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 26daaca..37727bb 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
@@ -39,7 +39,8 @@
     {{#if view.isLoaded}}
       <div>
         <div class="row">
-          {{#unless App.upgradeSuspended}}
+          {{#if showPauseButton}}
+            <div class="span12">
               {{#if isDowngrade}}
                 <button
                   class="btn btn-default" {{action confirmPauseDowngrade target="view"}}>{{t
admin.stackUpgrade.pauseDowngrade}}</button>
@@ -47,7 +48,8 @@
                 <button
                   class="btn btn-default" {{action confirmPauseUpgrade target="view"}}>{{t
admin.stackUpgrade.pauseUpgrade}}</button>
               {{/if}}
-          {{/unless}}
+            </div>
+          {{/if}}
         </div>
         {{#if view.runningItem}}
           <div class="box details-box">


Mime
View raw message