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
dd2f43a6
Unverified
Commit
dd2f43a6
authored
7 years ago
by
liuzheng712
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: http
parent
e08e02f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
iframe.component.ts
src/app/elements/iframe/iframe.component.ts
+6
-6
No files found.
src/app/elements/iframe/iframe.component.ts
View file @
dd2f43a6
...
...
@@ -2,9 +2,9 @@ import {Component, Input, OnInit} from '@angular/core';
import
{
DomSanitizer
}
from
'@angular/platform-browser'
;
import
{
NavList
}
from
'../../ControlPage/control/control.component'
;
import
{
User
}
from
'../../globals'
;
import
{
HttpService
,
LogService
}
from
'../../app.service'
;
import
{
LogService
}
from
'../../app.service'
;
import
*
as
Base64
from
'base64-js/base64js.min'
;
import
{
Http
,
RequestOptions
}
from
'@angular
/http'
;
import
{
Http
Client
,
HttpHeaders
}
from
'@angular/common
/http'
;
@
Component
({
selector
:
'app-element-iframe'
,
...
...
@@ -18,16 +18,16 @@ export class ElementIframeComponent implements OnInit {
target
:
string
;
constructor
(
private
sanitizer
:
DomSanitizer
,
private
_http
:
Http
,
private
_http
:
Http
Client
,
private
_logger
:
LogService
)
{
}
ngOnInit
()
{
// /guacamole/api/tokens will redirect to http://guacamole/api/tokens
let
options
=
new
RequestOption
s
();
options
.
headers
.
set
(
'Content-Type'
,
'application/x-www-form-urlencoded'
);
const
header
=
new
HttpHeader
s
();
header
.
append
(
'Content-Type'
,
'application/x-www-form-urlencoded'
);
this
.
_http
.
get
(
'/guacamole/api/tokens?username='
+
User
.
name
+
'&password=zheng&asset_id='
+
this
.
host
.
id
+
'&system_user_id='
+
this
.
userid
,
options
this
.
host
.
id
+
'&system_user_id='
+
this
.
userid
,
header
).
map
(
res
=>
res
.
json
())
.
subscribe
(
data
=>
{
...
...
This diff is collapsed.
Click to expand it.
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