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
6a037578
Commit
6a037578
authored
Aug 30, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Plain Diff
[Update] Merge with dev
parents
48dee5e8
70393df3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
7 deletions
+45
-7
content-tab.component.css
src/app/elements/content-tab/content-tab.component.css
+6
-5
nav.component.css
src/app/elements/nav/nav.component.css
+9
-0
nav.component.ts
src/app/elements/nav/nav.component.ts
+13
-0
ssh-term.component.ts
src/app/elements/ssh-term/ssh-term.component.ts
+17
-2
No files found.
src/app/elements/content-tab/content-tab.component.css
View file @
6a037578
...
...
@@ -39,8 +39,9 @@ li span {
padding-right
:
14px
;
line-height
:
26px
;
cursor
:
default
;
width
:
115px
;
height
:
21px
;
/*width: 145px;*/
height
:
26px
;
display
:
block
;
}
li
a
.close
{
...
...
@@ -63,17 +64,17 @@ li.active span {
padding-left
:
12px
;
line-height
:
26px
;
color
:
white
;
height
:
18
px
;
height
:
26
px
;
}
li
input
{
font-family
:
'Roboto'
,
sans-serif
;
font-size
:
13px
;
width
:
1
15
px
;
width
:
1
20
px
;
border
:
none
;
background-color
:
inherit
;
color
:
white
;
padding
:
5px
20px
4px
15px
;
height
:
18
px
;
height
:
26
px
;
}
src/app/elements/nav/nav.component.css
View file @
6a037578
...
...
@@ -99,3 +99,12 @@
cursor
:
default
;
color
:
#c5babc
;
}
.nav
ul
li
.disconnected
{
background-color
:
darkgray
;
}
.nav
ul
li
.active
{
box-sizing
:
border-box
;
border-bottom
:
3px
solid
#19aa8d
!important
;
}
src/app/elements/nav/nav.component.ts
View file @
6a037578
...
...
@@ -92,6 +92,14 @@ export class ElementNavComponent implements OnInit {
}
case
'Disconnect'
:
{
if
(
!
confirm
(
'断开当前连接?'
))
{
return
}
}
case
'Reconnect'
:
{
break
;
}
case
'Disconnect'
:
{
if
(
!
confirm
(
'断开当前连接? (RDP暂不支持)'
))
{
break
;
}
this
.
_navSvc
.
disconnectConnection
();
...
...
@@ -220,6 +228,11 @@ export class ElementNavComponent implements OnInit {
'click'
:
'DisconnectAll'
,
'name'
:
'Disconnect all'
},
{
'id'
:
'Reconnect'
,
'click'
:
'Reconnect'
,
'name'
:
'Reconnect'
},
]
},
{
'id'
:
'FileManager'
,
...
...
src/app/elements/ssh-term/ssh-term.component.ts
View file @
6a037578
...
...
@@ -3,7 +3,7 @@ import {Terminal} from 'xterm';
import
{
View
}
from
'../content/model'
;
import
{
LogService
,
UUIDService
}
from
'../../app.service'
;
import
{
Socket
}
from
'../../utils/socket'
;
import
{
getWsSocket
}
from
'../../globals'
;
import
{
getWsSocket
,
translate
}
from
'../../globals'
;
@
Component
({
...
...
@@ -55,7 +55,17 @@ export class ElementSshTermComponent implements OnInit, OnDestroy {
}
}
connectHost
()
{
reconnect
()
{
if
(
this
.
view
.
connected
===
true
)
{
if
(
!
confirm
(
translate
(
'Are you sure to reconnect it?(RDP not support)'
)))
{
return
;
}
}
this
.
secret
=
this
.
_uuid
.
gen
();
this
.
emitHostAndTokenData
();
}
emitHostAndTokenData
()
{
if
(
this
.
host
)
{
const
data
=
{
uuid
:
this
.
host
.
id
,
...
...
@@ -73,6 +83,10 @@ export class ElementSshTermComponent implements OnInit, OnDestroy {
this
.
_logger
.
debug
(
'On token event trigger'
);
this
.
ws
.
emit
(
'token'
,
data
);
}
}
connectHost
()
{
this
.
emitHostAndTokenData
();
this
.
term
.
on
(
'data'
,
data
=>
{
const
d
=
{
'data'
:
data
,
'room'
:
this
.
roomID
};
...
...
@@ -103,6 +117,7 @@ export class ElementSshTermComponent implements OnInit, OnDestroy {
this
.
_logger
.
debug
(
'On room'
,
data
);
this
.
roomID
=
data
.
room
;
this
.
view
.
room
=
data
.
room
;
this
.
view
.
connected
=
true
;
}
});
}
...
...
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