Commit 775834f1 authored by zheng liu's avatar zheng liu

Merged in dev (pull request #75)

Dev
parents 3ca0ba5c bcd7c351
......@@ -290,7 +290,7 @@ export class AppService implements OnInit {
err => {
// this._logger.error(err);
User.logined = false;
window.location.href = document.location.origin + '/users/login?next=' + document.location.pathname;
window.location.href = document.location.origin + '/users/login?next=' + document.location.pathname + document.location.search;
// this._router.navigate(['login']);
},
// () => {
......
......@@ -29,6 +29,7 @@ export class ElementGuacamoleComponent implements OnInit {
ngOnInit() {
// /guacamole/api/tokens will redirect to http://guacamole/api/tokens
const base = window.btoa(this.host.id + '\0' + 'c' + '\0' + 'jumpserver');
if (this.token) {
this.userid = this._localStorage.get('user');
this._http.get_guacamole_token(this.userid).subscribe(
......@@ -45,7 +46,6 @@ export class ElementGuacamoleComponent implements OnInit {
);
});
} else {
const base = window.btoa(this.host.id + '\0' + 'c' + '\0' + 'jumpserver');
if (environment.production) {
if (DataStore.guacamole_token) {
this._http.guacamole_add_asset(User.id, this.host.id, this.userid).subscribe(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment