You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/11/09 18:15:07 UTC
[2/2] ambari git commit: AMBARI-13790. "Username" and "Password"
inputs are inactive after Sign Out during deploy
AMBARI-13790. "Username" and "Password" inputs are inactive after Sign Out during deploy
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0936c435
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0936c435
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0936c435
Branch: refs/heads/branch-2.1
Commit: 0936c4357a48074f281634bd3425738877ede497
Parents: 84fc9cd
Author: Alex Antonenko <hi...@gmail.com>
Authored: Mon Nov 9 19:14:54 2015 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Mon Nov 9 19:14:54 2015 +0200
----------------------------------------------------------------------
ambari-web/app/router.js | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0936c435/ambari-web/app/router.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index f3bcbfe..15b4c14 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -112,13 +112,10 @@ App.Router = Em.Router.extend({
* @param wizardType one of <code>installer</code>, <code>addHost</code>, <code>addServices</code>
*/
getWizardCurrentStep: function (wizardType) {
- var loginName = this.getLoginName();
var currentStep = App.db.getWizardCurrentStep(wizardType);
- console.log('getWizardCurrentStep: loginName=' + loginName + ", currentStep=" + currentStep);
if (!currentStep) {
currentStep = wizardType === 'installer' ? '0' : '1';
}
- console.log('returning currentStep=' + currentStep);
return currentStep;
},
@@ -192,12 +189,10 @@ App.Router = Em.Router.extend({
if (data.status === 403) {
this.setAuthenticated(false);
} else {
- console.log('error in getAuthenticated');
}
},
setAuthenticated: function (authenticated) {
- console.log("TRACE: Entering router:setAuthenticated function");
App.db.setAuthenticated(authenticated);
this.set('loggedIn', authenticated);
},
@@ -276,7 +271,7 @@ App.Router = Em.Router.extend({
},
loginSuccessCallback: function(data, opt, params) {
- console.log('login success');
+ App.router.set('loginController.isSubmitDisabled', false);
App.usersMapper.map({"items": [data]});
this.setUserLoggedIn(decodeURIComponent(params.loginName));
var requestData = {
@@ -299,7 +294,6 @@ App.Router = Em.Router.extend({
loginErrorCallback: function(request, ajaxOptions, error, opt) {
var controller = this.get('loginController');
- console.log("login error: " + error);
this.setAuthenticated(false);
if (request.status == 403) {
var responseMessage = request.responseText;
@@ -458,7 +452,6 @@ App.Router = Em.Router.extend({
});
this.set('loggedIn', false);
this.clearAllSteps();
- console.log("Log off: " + App.router.getClusterName());
this.set('loginController.loginName', '');
this.set('loginController.password', '');
// When logOff is called by Sign Out button, context contains event object. As it is only case we should send logoff request, we are checking context below.
@@ -477,13 +470,11 @@ App.Router = Em.Router.extend({
},
logOffSuccessCallback: function () {
- console.log("invoked logout on the server successfully");
var applicationController = App.router.get('applicationController');
applicationController.set('isPollerRunning', false);
},
logOffErrorCallback: function () {
- console.log("failed to invoke logout on the server");
},
/**
@@ -527,11 +518,8 @@ App.Router = Em.Router.extend({
// If the path is not relative, silently ignore it - if the path is an absolute URL, the user
// may be routed to a different server where the possibility exists for a phishing attack.
if ((preferredPath.startsWith('/') || preferredPath.startsWith('#')) && !preferredPath.contains('#/login')) {
- console.log("INFO: Routing to preferred path: " + preferredPath);
window.location = preferredPath;
isRestored = true;
- } else {
- console.log("WARNING: Ignoring preferred path since it is not a relative URL: " + preferredPath);
}
// Unset preferedPath
this.set('preferedPath', null);
@@ -549,7 +537,6 @@ App.Router = Em.Router.extend({
if (user) {
if (user.admin) {
App.set('isAdmin', true);
- console.log('Administrator logged in');
}
if (user.operator) {
App.set('isOperator', true);
@@ -580,7 +567,6 @@ App.Router = Em.Router.extend({
router.getAuthenticated().done(function (loggedIn) {
if (loggedIn) {
Ember.run.next(function () {
- console.log(router.getLoginName() + ' already authenticated. Redirecting...');
router.getSection(function (route) {
router.transitionTo(route, context);
});
@@ -594,8 +580,6 @@ App.Router = Em.Router.extend({
connectOutlets: function (router, context) {
$('title').text(Em.I18n.t('app.name'));
- console.log('/login:connectOutlet');
- console.log('currentStep is: ' + router.getInstallerCurrentStep());
router.get('applicationController').connectOutlet('login');
}
}),
@@ -642,7 +626,6 @@ App.Router = Em.Router.extend({
if (App.isAccessible('upgrade_ONLY_ADMIN')) {
App.router.get('experimentalController').loadSupports().complete(function () {
$('title').text(Em.I18n.t('app.name.subtitle.experimental'));
- console.log('/experimental:connectOutlet');
router.get('applicationController').connectOutlet('experimental');
});
}