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
51d5f055
Commit
51d5f055
authored
May 21, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改token
parent
e0613f81
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
21 deletions
+27
-21
guacamole.component.ts
src/app/elements/guacamole/guacamole.component.ts
+26
-20
control.component.ts
src/app/pages/control/control/control.component.ts
+1
-1
No files found.
src/app/elements/guacamole/guacamole.component.ts
View file @
51d5f055
...
...
@@ -26,6 +26,30 @@ export class ElementGuacamoleComponent implements OnInit {
private
_logger
:
LogService
)
{
}
registerHost
()
{
if
(
this
.
remoteAppId
)
{
this
.
_http
.
guacamole_add_remote_app
(
User
.
id
,
this
.
remoteAppId
).
subscribe
(
data
=>
{
const
base
=
data
.
result
;
this
.
target
=
document
.
location
.
origin
+
'/guacamole/#/client/'
+
base
+
'?token='
+
DataStore
.
guacamole_token
;
},
error
=>
{
this
.
_logger
.
error
(
error
);
}
);
}
else
{
this
.
_http
.
guacamole_add_asset
(
User
.
id
,
this
.
host
.
id
,
this
.
userid
).
subscribe
(
data
=>
{
const
base
=
data
.
result
;
this
.
target
=
document
.
location
.
origin
+
'/guacamole/#/client/'
+
base
+
'?token='
+
DataStore
.
guacamole_token
;
},
error2
=>
{
this
.
_logger
.
error
(
error2
);
}
);
}
}
ngOnInit
()
{
// /guacamole/api/tokens will redirect to http://guacamole/api/tokens
if
(
this
.
target
)
{
...
...
@@ -43,6 +67,7 @@ export class ElementGuacamoleComponent implements OnInit {
data
=>
{
// /guacamole/client will redirect to http://guacamole/#/client
DataStore
.
guacamole_token
=
data
[
'authToken'
];
this
.
registerHost
();
},
error
=>
{
this
.
_logger
.
error
(
error
);
...
...
@@ -50,27 +75,8 @@ export class ElementGuacamoleComponent implements OnInit {
return
null
;
}
);
}
if
(
this
.
remoteAppId
!==
''
)
{
this
.
_http
.
guacamole_add_remote_app
(
User
.
id
,
this
.
remoteAppId
).
subscribe
(
data
=>
{
const
base
=
data
.
result
;
this
.
target
=
document
.
location
.
origin
+
'/guacamole/#/client/'
+
base
+
'?token='
+
DataStore
.
guacamole_token
;
},
error
=>
{
this
.
_logger
.
error
(
error
);
}
);
}
else
{
this
.
_http
.
guacamole_add_asset
(
User
.
id
,
this
.
host
.
id
,
this
.
userid
).
subscribe
(
data
=>
{
const
base
=
data
.
result
;
this
.
target
=
document
.
location
.
origin
+
'/guacamole/#/client/'
+
base
+
'?token='
+
DataStore
.
guacamole_token
;
},
error2
=>
{
this
.
_logger
.
error
(
error2
);
}
);
this
.
registerHost
();
}
NavList
.
List
[
this
.
index
].
Rdp
=
this
.
el
.
nativeElement
;
...
...
src/app/pages/control/control/control.component.ts
View file @
51d5f055
...
...
@@ -19,7 +19,7 @@ export class View {
closed
:
boolean
;
host
:
any
;
user
:
any
;
remoteApp
:
any
;
remoteApp
:
string
;
room
:
string
;
Rdp
:
any
;
Term
:
any
;
...
...
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