fix: update

parent 74174aff
...@@ -24,7 +24,7 @@ export class ElementIframeComponent implements OnInit { ...@@ -24,7 +24,7 @@ export class ElementIframeComponent implements OnInit {
ngOnInit() { ngOnInit() {
// /guacamole/api/tokens will redirect to http://guacamole/api/tokens // /guacamole/api/tokens will redirect to http://guacamole/api/tokens
const base = window.btoa(this.host.hostname + '\0' + 'c' + '\0' + 'jumpserver'); const base = window.btoa(this.host.hostname + '\0' + 'c' + '\0' + 'jumpserver');
if (guacamole_token.length > 0) { if (guacamole_token) {
this.target = document.location.origin + '/guacamole/#/client/' + base + '?token=' + guacamole_token; this.target = document.location.origin + '/guacamole/#/client/' + base + '?token=' + guacamole_token;
} else { } else {
this._http.get_guacamole_token(User.name, this.host.id, this.userid).subscribe( this._http.get_guacamole_token(User.name, this.host.id, this.userid).subscribe(
......
...@@ -147,4 +147,4 @@ export let wsEvent: { ...@@ -147,4 +147,4 @@ export let wsEvent: {
export const i18n = new Map(); export const i18n = new Map();
export let guacamole_token = ''; export let guacamole_token: string;
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