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
06dfddbc
Unverified
Commit
06dfddbc
authored
Jan 19, 2018
by
liuzheng712
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update
parent
b4f28ca7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
12 deletions
+9
-12
cleftbar.component.ts
src/app/ControlPage/cleftbar/cleftbar.component.ts
+3
-3
control.component.css
src/app/ControlPage/control/control.component.css
+3
-0
control.component.html
src/app/ControlPage/control/control.component.html
+0
-4
control.component.ts
src/app/ControlPage/control/control.component.ts
+3
-1
controlnav.component.ts
...pp/ControlPage/control/controlnav/controlnav.component.ts
+0
-4
No files found.
src/app/ControlPage/cleftbar/cleftbar.component.ts
View file @
06dfddbc
...
...
@@ -9,13 +9,13 @@
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Logger
}
from
'angular2-logger/core'
;
import
{
AppService
,
HttpService
}
from
'../../app.service'
;
import
{
SearchComponent
}
from
'../search/search.component'
;
import
{
DataStore
}
from
'../../globals'
;
import
{
version
}
from
'../../../environments/environment'
;
import
*
as
jQuery
from
'jquery/dist/jquery.min.js'
;
import
*
as
layer
from
'layui-layer/src/layer.js'
;
import
*
as
UUID
from
'uuid-js/lib/uuid.js'
;
import
{
ElementServerMenuComponent
}
from
'../../elements/server-menu/server-menu.component'
;
import
{
NavList
,
View
}
from
'../control/control.component'
;
...
...
@@ -119,9 +119,9 @@ export class CleftbarComponent implements OnInit {
Connect
(
host
)
{
// console.log(host);
let
user
:
any
;
let
options
=
''
;
const
that
=
this
;
if
(
host
.
system_users_granted
.
length
>
1
)
{
let
options
=
''
;
user
=
this
.
checkPriority
(
host
.
system_users_granted
);
if
(
user
)
{
this
.
login
(
host
,
user
);
...
...
@@ -162,8 +162,8 @@ export class CleftbarComponent implements OnInit {
}
login
(
host
,
user
)
{
const
id
=
NavList
.
List
.
length
-
1
;
if
(
user
)
{
const
id
=
NavList
.
List
.
length
-
1
;
NavList
.
List
[
id
].
nick
=
host
.
hostname
;
NavList
.
List
[
id
].
connected
=
true
;
NavList
.
List
[
id
].
edit
=
false
;
...
...
src/app/ControlPage/control/control.component.css
View file @
06dfddbc
div
,
app-element-term
,
app-element-guacamole
{
height
:
100%
;
}
div
{
display
:
none
;
}
...
...
src/app/ControlPage/control/control.component.html
View file @
06dfddbc
<app-controlnav></app-controlnav>
<!--<app-ssh></app-ssh>-->
<!--<app-rdp></app-rdp>-->
<div
*
ngFor=
"let m of NavList.List;let i=index"
[
ngClass
]="{'
active
'
:i=
=NavList.Active}"
>
<app-element-term
[
host
]="
m
.
host
"
[
userid
]="
m
.
user
.
id
"
[
index
]="
i
"
[
ngClass
]="{'
active
'
:i=
=NavList.Active}"
*
ngIf=
"m.type=='ssh'"
>
</app-element-term>
<app-element-guacamole
[
host
]="
m
.
host
"
[
userid
]="
m
.
user
.
id
"
[
index
]="
i
"
[
ngClass
]="{'
active
'
:i=
=NavList.Active}"
*
ngIf=
"m.type=='rdp'"
>
</app-element-guacamole>
...
...
src/app/ControlPage/control/control.component.ts
View file @
06dfddbc
...
...
@@ -65,7 +65,6 @@ export class ControlComponent implements OnInit {
}
static
TerminalDisconnect
(
id
)
{
console
.
log
(
id
);
if
(
NavList
.
List
[
id
].
connected
)
{
NavList
.
List
[
id
].
connected
=
false
;
NavList
.
List
[
id
].
Term
.
write
(
'
\
r
\
n
\
x1b[31mBye Bye!
\
x1b[m
\
r
\
n'
);
...
...
@@ -90,4 +89,7 @@ export class ControlComponent implements OnInit {
ngOnInit
()
{
}
// trackByFn(index: number, item: View) {
// return item.id;
// }
}
src/app/ControlPage/control/controlnav/controlnav.component.ts
View file @
06dfddbc
...
...
@@ -42,12 +42,8 @@ export class ControlnavComponent implements OnInit {
NavList
.
List
[
index
].
hide
=
false
;
NavList
.
Active
=
index
;
if
(
NavList
.
List
[
index
].
type
===
'ssh'
)
{
jQuery
(
'app-ssh'
).
show
();
jQuery
(
'app-rdp'
).
hide
();
NavList
.
List
[
index
].
Term
.
focus
();
}
else
if
(
NavList
.
List
[
index
].
type
===
'rdp'
)
{
jQuery
(
'app-ssh'
).
hide
();
jQuery
(
'app-rdp'
).
show
();
}
}
...
...
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