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
6e71d866
Commit
6e71d866
authored
Mar 13, 2018
by
zheng liu
Browse files
Options
Browse Files
Download
Plain Diff
Merged in dev (pull request #88)
Dev
parents
bff1f3d4
f452cf6b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
6 deletions
+3
-6
app.service.ts
src/app/app.service.ts
+0
-2
connect-page.component.ts
src/app/connect-page/connect-page.component.ts
+1
-0
guacamole.component.ts
src/app/elements/guacamole/guacamole.component.ts
+2
-4
No files found.
src/app/app.service.ts
View file @
6e71d866
...
@@ -107,8 +107,6 @@ export class HttpService {
...
@@ -107,8 +107,6 @@ export class HttpService {
const
params
=
new
HttpParams
()
const
params
=
new
HttpParams
()
.
set
(
'asset_token'
,
assetToken
)
.
set
(
'asset_token'
,
assetToken
)
.
set
(
'token'
,
token
);
.
set
(
'token'
,
token
);
// 原有:/api/session/ext/jumpserver/asset/token/add?asset_token=<asset_token>&token=<token>
// 改为:/api/ext/jumpserver/asset/token/add?asset_token=<asset_token>&token=<token>
return
this
.
http
.
get
(
return
this
.
http
.
get
(
'/guacamole/api/ext/jumpserver/asset/token/add'
,
'/guacamole/api/ext/jumpserver/asset/token/add'
,
{
{
...
...
src/app/connect-page/connect-page.component.ts
View file @
6e71d866
...
@@ -39,6 +39,7 @@ export class ConnectPageComponent implements OnInit {
...
@@ -39,6 +39,7 @@ export class ConnectPageComponent implements OnInit {
.
subscribe
(
.
subscribe
(
data
=>
{
data
=>
{
this
.
_localStorage
.
set
(
'user-'
+
this
.
token
,
data
[
'user'
]);
this
.
_localStorage
.
set
(
'user-'
+
this
.
token
,
data
[
'user'
]);
this
.
userid
=
data
[
'user'
];
this
.
getAuthToken
();
this
.
getAuthToken
();
}
}
);
);
...
...
src/app/elements/guacamole/guacamole.component.ts
View file @
6e71d866
import
{
Component
,
ElementRef
,
Input
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
Component
,
ElementRef
,
Input
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
CookieService
}
from
'ngx-cookie-service'
;
import
{
CookieService
}
from
'ngx-cookie-service'
;
import
{
HttpService
,
Lo
calStorageService
,
Lo
gService
}
from
'../../app.service'
;
import
{
HttpService
,
LogService
}
from
'../../app.service'
;
import
{
DataStore
,
User
}
from
'../../globals'
;
import
{
DataStore
,
User
}
from
'../../globals'
;
import
{
DomSanitizer
}
from
'@angular/platform-browser'
;
import
{
DomSanitizer
}
from
'@angular/platform-browser'
;
import
{
environment
}
from
'../../../environments/environment'
;
import
{
environment
}
from
'../../../environments/environment'
;
...
@@ -22,8 +22,7 @@ export class ElementGuacamoleComponent implements OnInit {
...
@@ -22,8 +22,7 @@ export class ElementGuacamoleComponent implements OnInit {
constructor
(
private
sanitizer
:
DomSanitizer
,
constructor
(
private
sanitizer
:
DomSanitizer
,
private
_http
:
HttpService
,
private
_http
:
HttpService
,
private
_cookie
:
CookieService
,
private
_cookie
:
CookieService
,
private
_logger
:
LogService
,
private
_logger
:
LogService
)
{
private
_localStorage
:
LocalStorageService
)
{
}
}
ngOnInit
()
{
ngOnInit
()
{
...
@@ -54,7 +53,6 @@ export class ElementGuacamoleComponent implements OnInit {
...
@@ -54,7 +53,6 @@ export class ElementGuacamoleComponent implements OnInit {
this
.
_logger
.
error
(
error2
);
this
.
_logger
.
error
(
error2
);
}
}
);
);
// '/guacamole/#/client/' + base + '?token=' + data['authToken'];
},
},
error2
=>
{
error2
=>
{
this
.
_logger
.
error
(
error2
);
this
.
_logger
.
error
(
error2
);
...
...
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