mirror of https://github.com/rancher/ui.git
Redirect /login to /dashboard
This commit is contained in:
parent
5dc88c4dd0
commit
17429b9ab2
|
|
@ -34,10 +34,19 @@ export default Controller.extend({
|
|||
resetPassword: false,
|
||||
code: null,
|
||||
showLocal: null,
|
||||
showLogin: false,
|
||||
|
||||
promptPasswordReset: alias('resetPassword'),
|
||||
isForbidden: equal('errorCode', '403'),
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
const isDevelopment = get(this, 'app.environment') === 'development';
|
||||
|
||||
this.set('showLogin', isDevelopment);
|
||||
},
|
||||
|
||||
actions: {
|
||||
started() {
|
||||
setProperties(this, {
|
||||
|
|
|
|||
|
|
@ -85,7 +85,14 @@ export default Route.extend({
|
|||
},
|
||||
|
||||
activate() {
|
||||
// Redirect to /dashboard in a production build
|
||||
if (get(this, 'app.environment') !== 'development') {
|
||||
const url = `${ window.location.origin }/dashboard`;
|
||||
|
||||
window.location.replace(url);
|
||||
} else {
|
||||
$('BODY').addClass('container-farm'); // eslint-disable-line
|
||||
}
|
||||
},
|
||||
|
||||
deactivate() {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
{{#if showLogin}}
|
||||
<div class="login">
|
||||
<h1>
|
||||
{{t
|
||||
|
|
@ -148,3 +149,4 @@
|
|||
{{/if}}
|
||||
</section>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue