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
56fcc208
Commit
56fcc208
authored
Nov 10, 2017
by
liuzheng712
Committed by
i317280
Nov 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update
parent
6b6ce213
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
cleftbar.component.ts
src/app/ControlPage/cleftbar/cleftbar.component.ts
+2
-1
control.component.ts
src/app/ControlPage/control/control.component.ts
+4
-0
rdp.component.ts
src/app/ControlPage/control/rdp/rdp.component.ts
+12
-8
No files found.
src/app/ControlPage/cleftbar/cleftbar.component.ts
View file @
56fcc208
...
...
@@ -38,7 +38,8 @@ export class CleftbarComponent implements OnInit {
name
:
"ops-win"
,
uuid
:
"win-aasdf"
,
type
:
"rdp"
,
token
:
"rdpxxx"
token
:
"rdpxxx"
,
machine
:
"sss"
}
],
}];
...
...
src/app/ControlPage/control/control.component.ts
View file @
56fcc208
...
...
@@ -14,10 +14,13 @@ export class Term {
socket
:
any
;
term
:
any
;
}
export
class
Rdp
{
machine
:
string
;
token
:
string
;
client
:
any
;
}
export
class
View
{
nick
:
string
;
type
:
string
;
...
...
@@ -29,6 +32,7 @@ export class View {
Term
:
Term
;
}
export
let
NavList
:
{
List
:
Array
<
View
>
;
Active
:
number
;
...
...
src/app/ControlPage/control/rdp/rdp.component.ts
View file @
56fcc208
...
...
@@ -26,14 +26,23 @@ export class RdpComponent implements OnInit {
Connect
(
host
)
{
let
id
=
NavList
.
List
.
length
-
1
;
let
canvas
=
Mstsc
.
$
(
"canvas-"
+
id
);
canvas
.
style
.
display
=
'inline'
;
canvas
.
width
=
window
.
innerWidth
;
canvas
.
height
=
window
.
innerHeight
;
NavList
.
List
[
id
].
nick
=
host
.
name
;
NavList
.
List
[
id
].
connected
=
true
;
NavList
.
List
[
id
].
edit
=
false
;
NavList
.
List
[
id
].
closed
=
false
;
NavList
.
List
[
id
].
type
=
"rdp"
;
NavList
.
List
[
id
].
Rdp
=
new
Rdp
;
NavList
.
List
[
id
].
Rdp
.
token
=
"xxx"
;
NavList
.
List
[
id
].
Rdp
.
machine
=
"xxx"
;
NavList
.
List
[
id
].
Rdp
.
token
=
host
.
token
;
NavList
.
List
[
id
].
Rdp
.
machine
=
host
.
machine
;
NavList
.
List
[
id
].
Rdp
.
client
=
Mstsc
.
client
.
create
(
Mstsc
.
$
(
"canvas-"
+
id
));
NavList
.
List
[
id
].
Rdp
.
client
.
connect
(
host
.
token
,
"rdp/socket.io"
);
NavList
.
List
.
push
(
new
View
());
for
(
let
m
in
NavList
.
List
)
{
...
...
@@ -42,12 +51,7 @@ export class RdpComponent implements OnInit {
NavList
.
List
[
id
].
hide
=
false
;
NavList
.
Active
=
id
;
let
client
=
Mstsc
.
client
.
create
(
Mstsc
.
$
(
"canvas-"
+
id
));
let
canvas
=
Mstsc
.
$
(
"canvas-"
+
id
);
canvas
.
style
.
display
=
'inline'
;
canvas
.
width
=
window
.
innerWidth
;
canvas
.
height
=
window
.
innerHeight
;
client
.
connect
(
"xxxx"
,
"rdp/socket.io"
);
}
static
Disconnect
(
host
)
{
...
...
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