ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject [1/3] ambari git commit: AMBARI-12354. Check that all wizards correctly save their statuses on close (onechiporenko)
Date Thu, 09 Jul 2015 15:29:29 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk e9daaaa79 -> bef904722


AMBARI-12354. Check that all wizards correctly save their statuses on close (onechiporenko)


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

Branch: refs/heads/trunk
Commit: c952878e286ad3838757f8428b370958a8e9ebde
Parents: e9daaaa
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Thu Jul 9 17:17:06 2015 +0300
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Thu Jul 9 18:24:32 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/application.js              | 13 +++++++++++++
 .../add_alert_definition_controller.js                 |  1 -
 .../controllers/main/service/reassign_controller.js    |  1 -
 ambari-web/app/templates/application.hbs               |  2 +-
 4 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c952878e/ambari-web/app/controllers/application.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/application.js b/ambari-web/app/controllers/application.js
index 439e995..23ff4dc 100644
--- a/ambari-web/app/controllers/application.js
+++ b/ambari-web/app/controllers/application.js
@@ -49,6 +49,19 @@ App.ApplicationController = Em.Controller.extend(App.UserPref, {
     return App.router.get('clusterInstallCompleted') && this.get('isClusterDataLoaded');
   }.property('App.router.clusterInstallCompleted', 'isClusterDataLoaded'),
 
+  /**
+   * Determines if "Exit" menu-item should be shown
+   * It should if cluster isn't installed
+   * If cluster is installer, <code>isClusterDataLoaded</code> is checked
+   * @type {boolean}
+   */
+  showExitLink: function () {
+    if (App.router.get('clusterInstallCompleted')) {
+      return this.get('isClusterDataLoaded');
+    }
+    return true;
+  }.property('App.router.clusterInstallCompleted', 'isClusterDataLoaded'),
+
   init: function(){
     this._super();
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/c952878e/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
b/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
index 194b4a3..c59df4a 100644
--- a/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
+++ b/ambari-web/app/controllers/main/alerts/add_alert_definition/add_alert_definition_controller.js
@@ -45,7 +45,6 @@ App.AddAlertDefinitionController = App.WizardController.extend({
 
   finish: function() {
     this.clear();
-    this.setCurrentStep('1');
   }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/c952878e/ambari-web/app/controllers/main/service/reassign_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign_controller.js b/ambari-web/app/controllers/main/service/reassign_controller.js
index b234143..1827bf5 100644
--- a/ambari-web/app/controllers/main/service/reassign_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign_controller.js
@@ -352,7 +352,6 @@ App.ReassignMasterController = App.WizardController.extend({
    * Clear all temporary data
    */
   finish: function () {
-    this.setCurrentStep('1');
     this.clearAllSteps();
     this.clearStorageData();
     this.resetDbNamespace();

http://git-wip-us.apache.org/repos/asf/ambari/blob/c952878e/ambari-web/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/application.hbs b/ambari-web/app/templates/application.hbs
index d59bd82..3afd13c 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -81,7 +81,7 @@
                     <li><a href="" {{action showSettingsPopup target="controller"}}>{{t
app.settings}}</a></li>
                   {{/isAccessible}}
                 {{/if}}
-                {{#if isClusterDataLoaded}}
+                {{#if showExitLink}}
                   <li class="break"></li>
                   <li><a href="" id="sign-out" {{action logoff}}>{{t app.signout}}</a></li>
                 {{/if}}


Mime
View raw message