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
beb6688c
Commit
beb6688c
authored
Jan 09, 2018
by
zheng liu
Browse files
Options
Browse Files
Download
Plain Diff
Merged in dev (pull request #26)
Dev
parents
2a74f068
0bd95e3d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
92 additions
and
57 deletions
+92
-57
mock.py
mock.py
+10
-2
package-lock.json
package-lock.json
+3
-0
cleftbar.component.css
src/app/ControlPage/cleftbar/cleftbar.component.css
+9
-1
cleftbar.component.html
src/app/ControlPage/cleftbar/cleftbar.component.html
+2
-2
cleftbar.component.ts
src/app/ControlPage/cleftbar/cleftbar.component.ts
+8
-2
nav.component.html
src/app/elements/nav/nav.component.html
+1
-1
term.component.ts
src/app/elements/term/term.component.ts
+17
-16
json.component.css
src/app/replay-page/json/json.component.css
+4
-0
json.component.html
src/app/replay-page/json/json.component.html
+32
-29
json.component.ts
src/app/replay-page/json/json.component.ts
+5
-2
replay-page.component.html
src/app/replay-page/replay-page.component.html
+1
-2
No files found.
mock.py
View file @
beb6688c
...
@@ -108,7 +108,7 @@ def asset_groups_assets():
...
@@ -108,7 +108,7 @@ def asset_groups_assets():
"hostname"
:
"192.168.1.6"
,
"hostname"
:
"192.168.1.6"
,
"ip"
:
"192.168.2.6"
,
"ip"
:
"192.168.2.6"
,
"port"
:
22
,
"port"
:
22
,
"
system"
:
"l
inux"
,
"
plantform"
:
"L
inux"
,
"system_users_granted"
:
[
"system_users_granted"
:
[
{
{
"id"
:
1
,
"id"
:
1
,
...
@@ -117,6 +117,14 @@ def asset_groups_assets():
...
@@ -117,6 +117,14 @@ def asset_groups_assets():
"protocol"
:
"ssh"
,
"protocol"
:
"ssh"
,
"auth_method"
:
"P"
,
"auth_method"
:
"P"
,
"auto_push"
:
True
"auto_push"
:
True
},
{
"id"
:
2
,
"name"
:
"liuzheng"
,
"username"
:
"liuzheng"
,
"protocol"
:
"ssh"
,
"auth_method"
:
"P"
,
"auto_push"
:
True
}
}
]
]
},
},
...
@@ -125,7 +133,7 @@ def asset_groups_assets():
...
@@ -125,7 +133,7 @@ def asset_groups_assets():
"hostname"
:
"windows server"
,
"hostname"
:
"windows server"
,
"ip"
:
"123.57.183.135"
,
"ip"
:
"123.57.183.135"
,
"port"
:
3389
,
"port"
:
3389
,
"
system"
:
"w
indows"
,
"
plantform"
:
"W
indows"
,
"assets_granted"
:
[
"assets_granted"
:
[
{
{
"id"
:
1
,
"id"
:
1
,
...
...
package-lock.json
View file @
beb6688c
...
@@ -6170,6 +6170,9 @@
...
@@ -6170,6 +6170,9 @@
"graceful-fs"
:
"4.1.11"
"graceful-fs"
:
"4.1.11"
}
}
},
},
"layui-layer"
:
{
"version"
:
"git+https://github.com/jumpserver/layer.git#c568876741b64556df9916ed678a6106e1e82899"
},
"lazy-cache"
:
{
"lazy-cache"
:
{
"version"
:
"0.2.7"
,
"version"
:
"0.2.7"
,
"resolved"
:
"https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz"
,
"resolved"
:
"https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz"
,
...
...
src/app/ControlPage/cleftbar/cleftbar.component.css
View file @
beb6688c
...
@@ -34,7 +34,7 @@ label {
...
@@ -34,7 +34,7 @@ label {
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.filetree
>
li
input
:checked
~
ul
{
.filetree
>
li
input
:checked
~
ul
,
.filetree
>
li
ul
.insearch
{
height
:
auto
;
height
:
auto
;
}
}
...
@@ -75,3 +75,11 @@ label {
...
@@ -75,3 +75,11 @@ label {
.fa.fa-undefined
:before
{
.fa.fa-undefined
:before
{
content
:
"\f26c"
;
content
:
"\f26c"
;
}
}
.fa.fa-Linux
:before
{
content
:
"\f17c"
;
}
.fa.fa-Windows
:before
{
content
:
"\f17a"
;
}
src/app/ControlPage/cleftbar/cleftbar.component.html
View file @
beb6688c
...
@@ -8,9 +8,9 @@
...
@@ -8,9 +8,9 @@
<li
*
ngFor=
"let hostGroup of HostGroups | SearchFilter: q; let i = index "
>
<li
*
ngFor=
"let hostGroup of HostGroups | SearchFilter: q; let i = index "
>
<input
type=
"checkbox"
id=
"hostgroup-{{i}}"
>
<input
type=
"checkbox"
id=
"hostgroup-{{i}}"
>
<label
for=
"hostgroup-{{i}}"
>
{{hostGroup.name}}
</label>
<label
for=
"hostgroup-{{i}}"
>
{{hostGroup.name}}
</label>
<ul>
<ul
[
ngClass
]="{'
insearch
'
:
q
}"
>
<li
*
ngFor=
"let host of hostGroup.assets_granted | SearchFilter: q"
(
click
)="
Connect
(
host
)"
>
<li
*
ngFor=
"let host of hostGroup.assets_granted | SearchFilter: q"
(
click
)="
Connect
(
host
)"
>
<i
class=
"fa"
[
ngClass
]="'
fa-
'+
host
.
syste
m
"
id=
"fa-{{i}}"
></i>
<i
class=
"fa"
[
ngClass
]="'
fa-
'+
host
.
plantfor
m
"
id=
"fa-{{i}}"
></i>
{{host.hostname}}
{{host.hostname}}
</li>
</li>
</ul>
</ul>
...
...
src/app/ControlPage/cleftbar/cleftbar.component.ts
View file @
beb6688c
...
@@ -98,6 +98,7 @@ export class CleftbarComponent implements OnInit {
...
@@ -98,6 +98,7 @@ export class CleftbarComponent implements OnInit {
Connect
(
host
)
{
Connect
(
host
)
{
// console.log(host);
// console.log(host);
let
userid
:
string
;
let
userid
:
string
;
const
that
=
this
;
if
(
host
.
system_users_granted
.
length
>
1
)
{
if
(
host
.
system_users_granted
.
length
>
1
)
{
let
options
=
''
;
let
options
=
''
;
for
(
let
u
of
host
.
system_users_granted
)
{
for
(
let
u
of
host
.
system_users_granted
)
{
...
@@ -112,6 +113,7 @@ export class CleftbarComponent implements OnInit {
...
@@ -112,6 +113,7 @@ export class CleftbarComponent implements OnInit {
content
:
'<select id="selectuser">'
+
options
+
'</select>'
,
content
:
'<select id="selectuser">'
+
options
+
'</select>'
,
yes
:
function
(
index
,
layero
)
{
yes
:
function
(
index
,
layero
)
{
userid
=
jQuery
(
'#selectuser'
).
val
();
userid
=
jQuery
(
'#selectuser'
).
val
();
that
.
login
(
host
,
userid
);
layer
.
close
(
index
);
layer
.
close
(
index
);
},
},
btn2
:
function
(
index
,
layero
)
{
btn2
:
function
(
index
,
layero
)
{
...
@@ -123,15 +125,19 @@ export class CleftbarComponent implements OnInit {
...
@@ -123,15 +125,19 @@ export class CleftbarComponent implements OnInit {
});
});
}
else
if
(
host
.
system_users_granted
.
length
===
1
)
{
}
else
if
(
host
.
system_users_granted
.
length
===
1
)
{
userid
=
host
.
system_users_granted
[
0
].
id
;
userid
=
host
.
system_users_granted
[
0
].
id
;
this
.
login
(
host
,
userid
);
}
}
}
login
(
host
,
userid
)
{
if
(
userid
===
''
)
{
if
(
userid
===
''
)
{
return
;
return
;
}
}
if
(
host
.
system
===
'l
inux'
)
{
if
(
host
.
plantform
===
'L
inux'
)
{
jQuery
(
'app-ssh'
).
show
();
jQuery
(
'app-ssh'
).
show
();
jQuery
(
'app-rdp'
).
hide
();
jQuery
(
'app-rdp'
).
hide
();
this
.
_term
.
TerminalConnect
(
host
,
userid
);
this
.
_term
.
TerminalConnect
(
host
,
userid
);
}
else
if
(
host
.
system
===
'w
indows'
)
{
}
else
if
(
host
.
plantform
===
'W
indows'
)
{
jQuery
(
'app-ssh'
).
hide
();
jQuery
(
'app-ssh'
).
hide
();
jQuery
(
'app-rdp'
).
show
();
jQuery
(
'app-rdp'
).
show
();
this
.
_rdp
.
Connect
(
host
,
userid
);
this
.
_rdp
.
Connect
(
host
,
userid
);
...
...
src/app/elements/nav/nav.component.html
View file @
beb6688c
<div
class=
"nav"
>
<div
class=
"nav"
>
<ul>
<ul>
<li><a
[
routerLink
]="['
Index
']"
><img
src=
"static/imgs/logo.png"
height=
"26px"
/></a>
<li><a
[
routerLink
]="['']"
><img
src=
"static/imgs/logo.png"
height=
"26px"
/></a>
</li>
</li>
<li
*
ngFor=
"let v of DataStore.Nav"
[
ngClass
]="{'
dropdown
'
:
v
.
children
}"
>
<li
*
ngFor=
"let v of DataStore.Nav"
[
ngClass
]="{'
dropdown
'
:
v
.
children
}"
>
<a>
{{v.name}}
</a>
<a>
{{v.name}}
</a>
...
...
src/app/elements/term/term.component.ts
View file @
beb6688c
...
@@ -2,7 +2,6 @@ import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';
...
@@ -2,7 +2,6 @@ import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';
import
{
ElementRef
,
Renderer2
}
from
'@angular/core'
;
import
{
ElementRef
,
Renderer2
}
from
'@angular/core'
;
import
{
term
}
from
'../../globals'
;
import
{
term
}
from
'../../globals'
;
import
{
Terminal
}
from
'../../globals'
;
import
{
Terminal
}
from
'../../globals'
;
import
*
as
jQuery
from
'jquery/dist/jquery.min.js'
;
@
Component
({
@
Component
({
selector
:
'app-element-term'
,
selector
:
'app-element-term'
,
...
@@ -21,8 +20,10 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
...
@@ -21,8 +20,10 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
}
}
ngAfterViewInit
()
{
ngAfterViewInit
()
{
term
.
col
=
Math
.
floor
(
jQuery
(
this
.
el
.
nativeElement
).
width
()
/
jQuery
(
'#liuzheng'
).
width
()
*
8
)
-
3
;
// term.col = Math.floor(jQuery(this.el.nativeElement).width() / jQuery('#liuzheng').width() * 8) - 3;
term
.
row
=
Math
.
floor
(
jQuery
(
this
.
el
.
nativeElement
).
height
()
/
jQuery
(
'#liuzheng'
).
height
())
-
5
;
// term.row = Math.floor(jQuery(this.el.nativeElement).height() / jQuery('#liuzheng').height()) - 5;
term
.
col
=
90
;
term
.
row
=
90
;
term
.
term
=
Terminal
({
term
.
term
=
Terminal
({
cols
:
term
.
col
,
cols
:
term
.
col
,
rows
:
term
.
row
,
rows
:
term
.
row
,
...
@@ -30,19 +31,19 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
...
@@ -30,19 +31,19 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
screenKeys
:
true
,
screenKeys
:
true
,
});
});
term
.
term
.
open
(
this
.
el
.
nativeElement
,
true
);
term
.
term
.
open
(
this
.
el
.
nativeElement
,
true
);
const
that
=
this
;
//
const that = this;
window
.
onresize
=
function
()
{
//
window.onresize = function () {
term
.
col
=
Math
.
floor
(
jQuery
(
that
.
el
.
nativeElement
).
width
()
/
jQuery
(
'#liuzheng'
).
width
()
*
8
)
-
3
;
//
term.col = Math.floor(jQuery(that.el.nativeElement).width() / jQuery('#liuzheng').width() * 8) - 3;
term
.
row
=
Math
.
floor
(
jQuery
(
that
.
el
.
nativeElement
).
height
()
/
jQuery
(
'#liuzheng'
).
height
())
-
5
;
//
term.row = Math.floor(jQuery(that.el.nativeElement).height() / jQuery('#liuzheng').height()) - 5;
//
if
(
term
.
col
<
80
)
{
//
if (term.col < 80) {
term
.
col
=
80
;
//
term.col = 80;
}
//
}
if
(
term
.
row
<
24
)
{
//
if (term.row < 24) {
term
.
row
=
24
;
//
term.row = 24;
}
//
}
term
.
term
.
resize
(
term
.
col
,
term
.
row
);
//
term.term.resize(term.col, term.row);
};
//
};
}
}
}
}
src/app/replay-page/json/json.component.css
View file @
beb6688c
...
@@ -21,3 +21,7 @@
...
@@ -21,3 +21,7 @@
#term
.terminal
div
span
{
#term
.terminal
div
span
{
min-width
:
12px
;
min-width
:
12px
;
}
}
app-element-term
{
position
:
absolute
;
}
src/app/replay-page/json/json.component.html
View file @
beb6688c
<!--<button type="button" class="btn">-->
<div>
<!--<i class="fa fa-stop" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-step-backward" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-backward" aria-hidden="true"></i>-->
<!--</button>-->
<button
type=
"button"
class=
"btn"
(
click
)="
pause
()"
>
<i
class=
"fa"
aria-hidden=
"true"
[
ngClass
]="{'
fa-play
'
:
!
toggle
,'
fa-pause
'
:
toggle
}"
></i>
</button>
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-forward" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-step-forward" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-expand" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-compress" aria-hidden="true"></i>-->
<!--</button>-->
<button
type=
"button"
class=
"btn"
(
click
)="
restart
()"
>
<i
class=
"fa fa-repeat"
aria-hidden=
"true"
></i>
</button>
<input
id=
"scrubber"
type=
"range"
[(
ngModel
)]="
setPercent
"
min=
0
max=
100
(
mousedown
)="
stop
()"
(
mouseup
)="
rununil
()"
/>
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-stop" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-step-backward" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-backward" aria-hidden="true"></i>-->
<!--</button>-->
<button
type=
"button"
class=
"btn"
(
click
)="
pause
()"
>
<i
class=
"fa"
aria-hidden=
"true"
[
ngClass
]="{'
fa-play
'
:
!
toggle
,'
fa-pause
'
:
toggle
}"
></i>
</button>
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-forward" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-step-forward" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-expand" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-compress" aria-hidden="true"></i>-->
<!--</button>-->
<button
type=
"button"
class=
"btn"
(
click
)="
restart
()"
>
<i
class=
"fa fa-repeat"
aria-hidden=
"true"
></i>
</button>
{{time | utcDate | date:"HH:mm:ss"}}
<input
id=
"scrubber"
type=
"range"
[(
ngModel
)]="
setPercent
"
min=
0
max=
100
(
mousedown
)="
stop
()"
(
mouseup
)="
rununil
()"
/>
{{time | utcDate | date:"HH:mm:ss"}}
</div>
<app-element-term></app-element-term>
<app-element-term></app-element-term>
<!--<asciinema-player></asciinema-player>-->
<!--<asciinema-player></asciinema-player>-->
src/app/replay-page/json/json.component.ts
View file @
beb6688c
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
AfterViewInit
,
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Video
}
from
'../../globals'
;
import
{
Video
}
from
'../../globals'
;
import
{
term
}
from
'../../globals'
;
import
{
term
}
from
'../../globals'
;
...
@@ -9,7 +9,7 @@ import * as jQuery from 'jquery/dist/jquery.min.js';
...
@@ -9,7 +9,7 @@ import * as jQuery from 'jquery/dist/jquery.min.js';
templateUrl
:
'./json.component.html'
,
templateUrl
:
'./json.component.html'
,
styleUrls
:
[
'./json.component.css'
]
styleUrls
:
[
'./json.component.css'
]
})
})
export
class
JsonComponent
implements
OnInit
{
export
class
JsonComponent
implements
OnInit
,
AfterViewInit
{
speed
=
1
;
speed
=
1
;
setPercent
=
0
;
setPercent
=
0
;
toggle
=
false
;
toggle
=
false
;
...
@@ -24,6 +24,9 @@ export class JsonComponent implements OnInit {
...
@@ -24,6 +24,9 @@ export class JsonComponent implements OnInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
}
ngAfterViewInit
()
{
this
.
restart
();
this
.
restart
();
}
}
...
...
src/app/replay-page/replay-page.component.html
View file @
beb6688c
<app-mp4
*
ngIf=
'Video.type=="mp4"'
></app-mp4>
<app-json></app-json>
<app-json
*
ngIf=
'Video.type=="json"'
></app-json>
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