You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2012/12/09 13:11:50 UTC
svn commit: r1418906 - in /incubator/ambari/branches/AMBARI-666:
AMBARI-666-CHANGES.txt ambari-web/app/router.js
ambari-web/app/routes/installer.js
Author: yusaku
Date: Sun Dec 9 12:11:49 2012
New Revision: 1418906
URL: http://svn.apache.org/viewvc?rev=1418906&view=rev
Log:
AMBARI-992. Logout does not clean application state properly. (yusaku)
Modified:
incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js
incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js
Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1418906&r1=1418905&r2=1418906&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Sun Dec 9 12:11:49 2012
@@ -442,6 +442,8 @@ AMBARI-666 branch (unreleased changes)
BUG FIXES
+ AMBARI-992. Logout does not clean application state properly. (yusaku)
+
AMBARI-957. Adding a host whose hostname is the same as the one the user
is accessing Ambari Web with breaks the Installer. (yusaku)
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js?rev=1418906&r1=1418905&r2=1418906&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/router.js Sun Dec 9 12:11:49 2012
@@ -32,20 +32,11 @@ App.Router = Em.Router.extend({
var previousStep = parseInt(this.getInstallerCurrentStep());
this.set('isFwdNavigation', newStep >= previousStep);
},
+
clearAllSteps: function() {
- this.get('installerController.content').set('cluster',null);
- this.get('wizardStep2Controller').set('hasSubmitted',false);
- /*this.get('installerController.content').set({
- cluster: null,
- hosts: null,
- services: null,
- hostsInfo: null,
- slaveComponentHosts: null,
- hostSlaveComponents: null,
- masterComponentHosts: null,
- hostToMasterComponent : null,
- serviceConfigProperties: null
- });*/
+ this.set('installerController.content', []);
+ this.set('installerController.currentStep', 0);
+ this.set('wizardStep2Controller.hasSubmitted', false);
},
/**
@@ -234,8 +225,11 @@ App.Router = Em.Router.extend({
logoff: function (router, context) {
console.log('logging off');
- router.clearAllSteps();
+ // App.db.cleanUp() must be called before router.clearAllSteps().
+ // otherwise, this.set('installerController.currentStep, 0) would have no effect
+ // since it's a computed property but we are not setting it as a dependent of App.db.
App.db.cleanUp();
+ router.clearAllSteps();
console.log("Log off: " + App.db.getClusterName());
router.set('loginController.loginName', '');
router.set('loginController.password', '');
Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js?rev=1418906&r1=1418905&r2=1418906&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/routes/installer.js Sun Dec 9 12:11:49 2012
@@ -28,7 +28,7 @@ module.exports = Em.Route.extend({
if (router.getAuthenticated()) {
router.get('mainController').stopLoadOperationsPeriodically();
console.log('In installer with successful authenticated');
-
+ console.log('current step=' + router.get('installerController.currentStep'));
Ember.run.next(function () {
var installerController = router.get('installerController');
router.transitionTo('step' + installerController.get('currentStep'));