Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
luna
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
luna
Commits
5d9f823f
Commit
5d9f823f
authored
Mar 06, 2018
by
zheng liu
Browse files
Options
Browse Files
Download
Plain Diff
Merged in dev (pull request #56)
fix: update
parents
b0e14f76
7898bbfb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
iframe.component.ts
src/app/elements/iframe/iframe.component.ts
+4
-4
globals.ts
src/app/globals.ts
+1
-1
No files found.
src/app/elements/iframe/iframe.component.ts
View file @
5d9f823f
...
...
@@ -2,7 +2,7 @@ import {Component, Input, OnInit} from '@angular/core';
import
{
DomSanitizer
}
from
'@angular/platform-browser'
;
import
{
NavList
}
from
'../../ControlPage/control/control.component'
;
import
{
User
,
guacamole
_token
}
from
'../../globals'
;
import
{
User
,
guacamole
}
from
'../../globals'
;
import
{
HttpService
,
LogService
}
from
'../../app.service'
;
@
Component
({
...
...
@@ -24,15 +24,15 @@ export class ElementIframeComponent implements OnInit {
ngOnInit
()
{
// /guacamole/api/tokens will redirect to http://guacamole/api/tokens
const
base
=
window
.
btoa
(
this
.
host
.
hostname
+
'
\
0'
+
'c'
+
'
\
0'
+
'jumpserver'
);
if
(
guacamole
_
token
)
{
this
.
target
=
document
.
location
.
origin
+
'/guacamole/#/client/'
+
base
+
'?token='
+
guacamole
_
token
;
if
(
guacamole
.
token
)
{
this
.
target
=
document
.
location
.
origin
+
'/guacamole/#/client/'
+
base
+
'?token='
+
guacamole
.
token
;
}
else
{
this
.
_http
.
get_guacamole_token
(
User
.
name
,
this
.
host
.
id
,
this
.
userid
).
subscribe
(
data
=>
{
// /guacamole/client will redirect to http://guacamole/#/client
this
.
target
=
document
.
location
.
origin
+
'/guacamole/#/client/'
+
base
+
'?token='
+
data
[
'authToken'
];
guacamole
_
token
=
data
[
'authToken'
];
guacamole
.
token
=
data
[
'authToken'
];
},
error2
=>
{
this
.
_logger
.
error
(
error2
);
...
...
src/app/globals.ts
View file @
5d9f823f
...
...
@@ -147,4 +147,4 @@ export let wsEvent: {
export
const
i18n
=
new
Map
();
export
let
guacamole
_token
:
string
;
export
let
guacamole
:
{
token
:
string
}
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment