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
e93e9045
Commit
e93e9045
authored
7 years ago
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 删掉没用的组件
parent
0cc695d2
master
dependabot/npm_and_yarn/handlebars-4.5.3
dependabot/npm_and_yarn/sshpk-1.16.1
dev
gengmei
koko
manual
v52
v54
1.5.6
1.5.5
1.5.4
1.5.3
1.5.2
1.5.1
1.5.0
1.4.10
1.4.9
1.4.8
1.4.7
1.4.6
1.4.5
1.4.4
1.4.3
1.4.2
1.4.1
1.4.0
1.3.3
1.3.2
1.3.1
1.3.0
1.0.0
v1.4.7
v1.4.4
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
81 additions
and
588 deletions
+81
-588
elements.component.ts
src/app/elements/elements.component.ts
+0
-4
elfinder.component.html
src/app/elements/elfinder/elfinder.component.html
+0
-1
elfinder.component.scss
src/app/elements/elfinder/elfinder.component.scss
+0
-0
elfinder.component.spec.ts
src/app/elements/elfinder/elfinder.component.spec.ts
+0
-25
elfinder.component.ts
src/app/elements/elfinder/elfinder.component.ts
+0
-18
settings.component.html
src/app/elements/settings/settings.component.html
+0
-3
settings.component.scss
src/app/elements/settings/settings.component.scss
+0
-0
settings.component.spec.ts
src/app/elements/settings/settings.component.spec.ts
+0
-25
settings.component.ts
src/app/elements/settings/settings.component.ts
+0
-17
term.component.ts
src/app/elements/term/term.component.ts
+2
-3
globals.ts
src/app/globals.ts
+4
-4
json.component.ts
src/app/pages/replay/json/json.component.ts
+21
-18
mp4.component.html
src/app/pages/replay/mp4/mp4.component.html
+2
-2
mp4.component.ts
src/app/pages/replay/mp4/mp4.component.ts
+6
-7
replay.component.html
src/app/pages/replay/replay.component.html
+2
-2
replay.component.ts
src/app/pages/replay/replay.component.ts
+33
-32
replay.model.ts
src/app/pages/replay/replay.model.ts
+11
-0
basic.component.html
src/app/pages/setting/basic/basic.component.html
+0
-20
basic.component.scss
src/app/pages/setting/basic/basic.component.scss
+0
-12
basic.component.spec.ts
src/app/pages/setting/basic/basic.component.spec.ts
+0
-25
basic.component.ts
src/app/pages/setting/basic/basic.component.ts
+0
-15
email.component.html
src/app/pages/setting/email/email.component.html
+0
-58
email.component.scss
src/app/pages/setting/email/email.component.scss
+0
-12
email.component.spec.ts
src/app/pages/setting/email/email.component.spec.ts
+0
-25
email.component.ts
src/app/pages/setting/email/email.component.ts
+0
-39
ldap.component.html
src/app/pages/setting/ldap/ldap.component.html
+0
-3
ldap.component.scss
src/app/pages/setting/ldap/ldap.component.scss
+0
-0
ldap.component.spec.ts
src/app/pages/setting/ldap/ldap.component.spec.ts
+0
-25
ldap.component.ts
src/app/pages/setting/ldap/ldap.component.ts
+0
-15
s3.component.html
src/app/pages/setting/s3/s3.component.html
+0
-3
s3.component.scss
src/app/pages/setting/s3/s3.component.scss
+0
-0
s3.component.spec.ts
src/app/pages/setting/s3/s3.component.spec.ts
+0
-25
s3.component.ts
src/app/pages/setting/s3/s3.component.ts
+0
-15
setting.component.html
src/app/pages/setting/setting.component.html
+0
-20
setting.component.scss
src/app/pages/setting/setting.component.scss
+0
-10
setting.component.spec.ts
src/app/pages/setting/setting.component.spec.ts
+0
-25
setting.component.ts
src/app/pages/setting/setting.component.ts
+0
-15
settings.module.ts
src/app/pages/setting/settings.module.ts
+0
-22
terminal.component.html
src/app/pages/setting/terminal/terminal.component.html
+0
-3
terminal.component.scss
src/app/pages/setting/terminal/terminal.component.scss
+0
-0
terminal.component.spec.ts
src/app/pages/setting/terminal/terminal.component.spec.ts
+0
-25
terminal.component.ts
src/app/pages/setting/terminal/terminal.component.ts
+0
-15
No files found.
src/app/elements/elements.component.ts
View file @
e93e9045
...
@@ -10,8 +10,6 @@ import {ElementPopupComponent} from './popup/popup.component';
...
@@ -10,8 +10,6 @@ import {ElementPopupComponent} from './popup/popup.component';
import
{
ElementRdpComponent
}
from
'./rdp/rdp.component'
;
import
{
ElementRdpComponent
}
from
'./rdp/rdp.component'
;
import
{
ElementServerMenuComponent
}
from
'./server-menu/server-menu.component'
;
import
{
ElementServerMenuComponent
}
from
'./server-menu/server-menu.component'
;
import
{
ElementIframeComponent
}
from
'./iframe/iframe.component'
;
import
{
ElementIframeComponent
}
from
'./iframe/iframe.component'
;
import
{
ElementElfinderComponent
}
from
'./elfinder/elfinder.component'
;
import
{
ElementSettingsComponent
}
from
'./settings/settings.component'
;
import
{
ElementDialogAlertComponent
}
from
'./dialog/dialog.service'
;
import
{
ElementDialogAlertComponent
}
from
'./dialog/dialog.service'
;
import
{
ElementGuacamoleComponent
}
from
'./guacamole/guacamole.component'
;
import
{
ElementGuacamoleComponent
}
from
'./guacamole/guacamole.component'
;
import
{
AssetTreeDialogComponent
,
ElementAssetTreeComponent
}
from
'./asset-tree/asset-tree.component'
;
import
{
AssetTreeDialogComponent
,
ElementAssetTreeComponent
}
from
'./asset-tree/asset-tree.component'
;
...
@@ -28,8 +26,6 @@ export const ElementComponents = [
...
@@ -28,8 +26,6 @@ export const ElementComponents = [
ElementRdpComponent
,
ElementRdpComponent
,
ElementServerMenuComponent
,
ElementServerMenuComponent
,
ElementIframeComponent
,
ElementIframeComponent
,
ElementElfinderComponent
,
ElementSettingsComponent
,
ElementDialogAlertComponent
,
ElementDialogAlertComponent
,
ElementGuacamoleComponent
,
ElementGuacamoleComponent
,
ElementAssetTreeComponent
,
ElementAssetTreeComponent
,
...
...
This diff is collapsed.
Click to expand it.
src/app/elements/elfinder/elfinder.component.html
deleted
100644 → 0
View file @
0cc695d2
<div
id=
"elfinder"
></div>
This diff is collapsed.
Click to expand it.
src/app/elements/elfinder/elfinder.component.scss
deleted
100644 → 0
View file @
0cc695d2
This diff is collapsed.
Click to expand it.
src/app/elements/elfinder/elfinder.component.spec.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
ElementElfinderComponent
}
from
'./elfinder.component'
;
describe
(
'ElementElfinderComponent'
,
()
=>
{
let
component
:
ElementElfinderComponent
;
let
fixture
:
ComponentFixture
<
ElementElfinderComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
ElementElfinderComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
ElementElfinderComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
This diff is collapsed.
Click to expand it.
src/app/elements/elfinder/elfinder.component.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
Component
,
OnInit
}
from
'@angular/core'
;
// import * as elfinder from 'elfinder/js/elfinder.min.js';
@
Component
({
selector
:
'elements-elfinder'
,
templateUrl
:
'./elfinder.component.html'
,
styleUrls
:
[
'./elfinder.component.scss'
]
})
export
class
ElementElfinderComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{
// elfinder(document.getElementById('elfinder'), {});
}
}
This diff is collapsed.
Click to expand it.
src/app/elements/settings/settings.component.html
deleted
100644 → 0
View file @
0cc695d2
<p>
settings works!
</p>
This diff is collapsed.
Click to expand it.
src/app/elements/settings/settings.component.scss
deleted
100644 → 0
View file @
0cc695d2
This diff is collapsed.
Click to expand it.
src/app/elements/settings/settings.component.spec.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
ElementSettingsComponent
}
from
'./settings.component'
;
describe
(
'ElementSettingsComponent'
,
()
=>
{
let
component
:
ElementSettingsComponent
;
let
fixture
:
ComponentFixture
<
ElementSettingsComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
ElementSettingsComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
ElementSettingsComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
This diff is collapsed.
Click to expand it.
src/app/elements/settings/settings.component.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'elements-settings'
,
templateUrl
:
'./settings.component.html'
,
styleUrls
:
[
'./settings.component.scss'
]
})
export
class
ElementSettingsComponent
implements
OnInit
{
@
Input
()
index
:
number
;
constructor
()
{
}
ngOnInit
()
{
}
}
This diff is collapsed.
Click to expand it.
src/app/elements/term/term.component.ts
View file @
e93e9045
import
{
AfterViewInit
,
Component
,
Input
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
AfterViewInit
,
Component
,
Input
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
ElementRef
}
from
'@angular/core'
;
import
{
ElementRef
}
from
'@angular/core'
;
import
{
term
,
TermWS
}
from
'../../globals'
;
import
{
term
,
Terminal
,
TermWS
}
from
'../../globals'
;
import
*
as
Terminal
from
'xterm/dist/xterm'
;
// import { Terminal } from 'xterm';
// import { Terminal } from 'xterm';
import
{
NavList
}
from
'../../pages/control/control/control.component'
;
import
{
NavList
}
from
'../../pages/control/control/control.component'
;
import
*
as
jQuery
from
'jquery/dist/jquery.min.js'
;
import
*
as
jQuery
from
'jquery/dist/jquery.min.js'
;
...
@@ -32,7 +31,7 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
...
@@ -32,7 +31,7 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
ngOnInit
()
{
ngOnInit
()
{
this
.
secret
=
this
.
_uuid
.
gen
();
this
.
secret
=
this
.
_uuid
.
gen
();
this
.
term
=
new
Terminal
({
this
.
term
=
Terminal
({
cols
:
80
,
cols
:
80
,
rows
:
24
,
rows
:
24
,
useStyle
:
true
,
useStyle
:
true
,
...
...
This diff is collapsed.
Click to expand it.
src/app/globals.ts
View file @
e93e9045
'use strict'
;
'use strict'
;
import
*
as
T
erminal
from
'xterm/dist/xterm'
;
import
*
as
t
erminal
from
'xterm/dist/xterm'
;
import
*
as
io
from
'socket.io-client'
;
import
*
as
io
from
'socket.io-client'
;
//
export function Terminal(xargs: any) {
export
function
Terminal
(
xargs
:
any
)
{
//
return terminal(xargs);
return
terminal
(
xargs
);
//
}
}
export
const
TermWS
=
io
.
connect
(
'/ssh'
);
export
const
TermWS
=
io
.
connect
(
'/ssh'
);
export
let
term
:
{
export
let
term
:
{
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/replay/json/json.component.ts
View file @
e93e9045
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
Video
,
term
}
from
'../../../globals'
;
import
{
term
}
from
'../../../globals'
;
import
{
HttpService
,
LogService
}
from
'../../../app.service'
;
import
{
HttpService
,
LogService
}
from
'../../../app.service'
;
import
{
Video
}
from
'../replay.model'
;
@
Component
({
@
Component
({
selector
:
'app-replay-json'
,
selector
:
'app-replay-json'
,
...
@@ -18,21 +19,23 @@ export class JsonComponent implements OnInit {
...
@@ -18,21 +19,23 @@ export class JsonComponent implements OnInit {
pos
=
0
;
pos
=
0
;
scrubber
:
number
;
scrubber
:
number
;
@
Input
()
video
:
Video
;
constructor
(
private
_http
:
HttpService
,
constructor
(
private
_http
:
HttpService
,
private
_logger
:
LogService
)
{
private
_logger
:
LogService
)
{
}
}
ngOnInit
()
{
ngOnInit
()
{
if
(
V
ideo
.
src
!==
'READY'
)
{
if
(
this
.
v
ideo
.
src
!==
'READY'
)
{
this
.
_http
.
get_replay_data
(
V
ideo
.
src
)
this
.
_http
.
get_replay_data
(
this
.
v
ideo
.
src
)
.
subscribe
(
.
subscribe
(
data
=>
{
data
=>
{
V
ideo
.
json
=
data
;
this
.
v
ideo
.
json
=
data
;
Video
.
timelist
=
Object
.
keys
(
V
ideo
.
json
).
map
(
Number
);
this
.
video
.
timelist
=
Object
.
keys
(
this
.
v
ideo
.
json
).
map
(
Number
);
Video
.
timelist
=
V
ideo
.
timelist
.
sort
(
function
(
a
,
b
)
{
this
.
video
.
timelist
=
this
.
v
ideo
.
timelist
.
sort
(
function
(
a
,
b
)
{
return
a
-
b
;
return
a
-
b
;
});
});
Video
.
totalTime
=
Video
.
timelist
[
V
ideo
.
timelist
.
length
-
1
]
*
1000
;
this
.
video
.
totalTime
=
this
.
video
.
timelist
[
this
.
v
ideo
.
timelist
.
length
-
1
]
*
1000
;
},
},
err
=>
{
err
=>
{
alert
(
'无法下载'
);
alert
(
'无法下载'
);
...
@@ -85,26 +88,26 @@ export class JsonComponent implements OnInit {
...
@@ -85,26 +88,26 @@ export class JsonComponent implements OnInit {
}
}
advance
(
that
)
{
advance
(
that
)
{
that
.
scrubber
=
Math
.
ceil
((
that
.
time
/
V
ideo
.
totalTime
)
*
100
);
that
.
scrubber
=
Math
.
ceil
((
that
.
time
/
this
.
v
ideo
.
totalTime
)
*
100
);
// document.getElementById('beforeScrubberText').innerHTML = this.buildTimeString(this.time);
// document.getElementById('beforeScrubberText').innerHTML = this.buildTimeString(this.time);
for
(;
that
.
pos
<
V
ideo
.
timelist
.
length
;
that
.
pos
++
)
{
for
(;
that
.
pos
<
this
.
v
ideo
.
timelist
.
length
;
that
.
pos
++
)
{
if
(
V
ideo
.
timelist
[
that
.
pos
]
*
1000
<=
that
.
time
)
{
if
(
this
.
v
ideo
.
timelist
[
that
.
pos
]
*
1000
<=
that
.
time
)
{
term
.
term
.
write
(
Video
.
json
[
V
ideo
.
timelist
[
that
.
pos
].
toString
()]);
term
.
term
.
write
(
this
.
video
.
json
[
this
.
v
ideo
.
timelist
[
that
.
pos
].
toString
()]);
}
else
{
}
else
{
break
;
break
;
}
}
}
}
if
(
that
.
pos
>=
V
ideo
.
timelist
.
length
)
{
if
(
that
.
pos
>=
this
.
v
ideo
.
timelist
.
length
)
{
this
.
toggle
=
!
this
.
toggle
;
this
.
toggle
=
!
this
.
toggle
;
clearInterval
(
that
.
timer
);
clearInterval
(
that
.
timer
);
}
}
if
(
Video
.
timelist
[
that
.
pos
]
-
V
ideo
.
timelist
[
that
.
pos
-
1
]
>
5
)
{
if
(
this
.
video
.
timelist
[
that
.
pos
]
-
this
.
v
ideo
.
timelist
[
that
.
pos
-
1
]
>
5
)
{
that
.
time
+=
5000
;
that
.
time
+=
5000
;
}
}
that
.
time
+=
that
.
TIMESTEP
;
that
.
time
+=
that
.
TIMESTEP
;
that
.
setPercent
=
that
.
time
/
V
ideo
.
totalTime
*
100
;
that
.
setPercent
=
that
.
time
/
this
.
v
ideo
.
totalTime
*
100
;
}
}
stop
()
{
stop
()
{
...
@@ -116,14 +119,14 @@ export class JsonComponent implements OnInit {
...
@@ -116,14 +119,14 @@ export class JsonComponent implements OnInit {
this
.
pos
=
0
;
this
.
pos
=
0
;
term
.
term
.
reset
();
term
.
term
.
reset
();
this
.
toggle
=
false
;
this
.
toggle
=
false
;
for
(;
this
.
pos
<
V
ideo
.
timelist
.
length
;
this
.
pos
++
)
{
for
(;
this
.
pos
<
this
.
v
ideo
.
timelist
.
length
;
this
.
pos
++
)
{
if
(
Video
.
timelist
[
this
.
pos
]
*
1000
<=
this
.
setPercent
/
100
*
V
ideo
.
totalTime
)
{
if
(
this
.
video
.
timelist
[
this
.
pos
]
*
1000
<=
this
.
setPercent
/
100
*
this
.
v
ideo
.
totalTime
)
{
term
.
term
.
write
(
Video
.
json
[
V
ideo
.
timelist
[
this
.
pos
].
toString
()]);
term
.
term
.
write
(
this
.
video
.
json
[
this
.
v
ideo
.
timelist
[
this
.
pos
].
toString
()]);
}
else
{
}
else
{
break
;
break
;
}
}
}
}
this
.
time
=
V
ideo
.
totalTime
*
this
.
setPercent
/
100
;
this
.
time
=
this
.
v
ideo
.
totalTime
*
this
.
setPercent
/
100
;
}
}
}
}
This diff is collapsed.
Click to expand it.
src/app/pages/replay/mp4/mp4.component.html
View file @
e93e9045
<div
[
ngStyle
]="{'
width
.
px
'
:
Video
.
width
,'
height
.
px
'
:V
ideo
.
height
}"
>
<div
[
ngStyle
]="{'
width
.
px
'
:
video
.
width
,'
height
.
px
'
:v
ideo
.
height
}"
>
<video
controls
>
<video
controls
>
<source
[
src
]="
V
ideo
.
src
"
type=
"video/mp4"
>
<source
[
src
]="
v
ideo
.
src
"
type=
"video/mp4"
>
Your browser does not support the video tag.
Your browser does not support the video tag.
<br>
<br>
您的浏览器不支持,请升级
您的浏览器不支持,请升级
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/replay/mp4/mp4.component.ts
View file @
e93e9045
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
Video
}
from
'../
../../globals
'
;
import
{
Video
}
from
'../
replay.model
'
;
@
Component
({
@
Component
({
selector
:
'app-replay-mp4'
,
selector
:
'app-replay-mp4'
,
...
@@ -7,17 +7,16 @@ import {Video} from '../../../globals';
...
@@ -7,17 +7,16 @@ import {Video} from '../../../globals';
styleUrls
:
[
'./mp4.component.css'
]
styleUrls
:
[
'./mp4.component.css'
]
})
})
export
class
Mp4Component
implements
OnInit
{
export
class
Mp4Component
implements
OnInit
{
Video
=
Video
;
@
Input
()
video
:
Video
;
constructor
()
{
constructor
()
{
}
}
ngOnInit
()
{
ngOnInit
()
{
if
(
this
.
V
ideo
.
height
===
0
)
{
if
(
this
.
v
ideo
.
height
===
0
)
{
this
.
V
ideo
.
height
=
600
;
this
.
v
ideo
.
height
=
600
;
}
}
if
(
this
.
V
ideo
.
width
===
0
)
{
if
(
this
.
v
ideo
.
width
===
0
)
{
this
.
V
ideo
.
width
=
800
;
this
.
v
ideo
.
width
=
800
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/replay/replay.component.html
View file @
e93e9045
<app-replay-json
*
ngIf=
"V
ideo.type=='json'"
></app-replay-json>
<app-replay-json
[
video
]="
video
"
*
ngIf=
"v
ideo.type=='json'"
></app-replay-json>
<app-replay-mp4
*
ngIf=
"V
ideo.type=='mp4'"
></app-replay-mp4>
<app-replay-mp4
[
video
]="
video
"
*
ngIf=
"v
ideo.type=='mp4'"
></app-replay-mp4>
This diff is collapsed.
Click to expand it.
src/app/pages/replay/replay.component.ts
View file @
e93e9045
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ActivatedRoute
,
Params
}
from
'@angular/router'
;
import
{
ActivatedRoute
,
Params
}
from
'@angular/router'
;
import
{
HttpService
,
LogService
}
from
'../../app.service'
;
import
{
HttpService
,
LogService
}
from
'../../app.service'
;
import
{
Video
,
DataStore
}
from
'../../globals'
;
import
{
DataStore
}
from
'../../globals'
;
import
{
Video
}
from
'./replay.model'
;
@
Component
({
@
Component
({
selector
:
'pages-replay'
,
selector
:
'pages-replay'
,
...
@@ -9,13 +10,13 @@ import {Video, DataStore} from '../../globals';
...
@@ -9,13 +10,13 @@ import {Video, DataStore} from '../../globals';
styleUrls
:
[
'./replay.component.css'
]
styleUrls
:
[
'./replay.component.css'
]
})
})
export
class
PagesReplayComponent
implements
OnInit
{
export
class
PagesReplayComponent
implements
OnInit
{
video
:
Video
;
constructor
(
private
activatedRoute
:
ActivatedRoute
,
constructor
(
private
activatedRoute
:
ActivatedRoute
,
private
_http
:
HttpService
,
private
_http
:
HttpService
,
private
_logger
:
LogService
)
{
private
_logger
:
LogService
)
{
// this.video = {'type': 'none'};
// this.video = {'type': 'none'};
DataStore
.
NavShow
=
false
;
DataStore
.
NavShow
=
false
;
}
}
ngOnInit
()
{
ngOnInit
()
{
...
@@ -23,36 +24,36 @@ export class PagesReplayComponent implements OnInit {
...
@@ -23,36 +24,36 @@ export class PagesReplayComponent implements OnInit {
this
.
activatedRoute
.
params
.
subscribe
((
params
:
Params
)
=>
{
this
.
activatedRoute
.
params
.
subscribe
((
params
:
Params
)
=>
{
token
=
params
[
'token'
];
token
=
params
[
'token'
];
});
});
this
.
_http
.
get_replay_json
(
token
)
//
this._http.get_replay_json(token)
.
subscribe
(
//
.subscribe(
data
=>
{
//
data => {
Video
.
type
=
data
[
'type'
];
//
Video.type = data['type'];
Video
.
src
=
data
[
'src'
];
//
Video.src = data['src'];
Video
.
id
=
data
[
'id'
];
//
Video.id = data['id'];
// Video.width = data['width'];
//
// Video.width = data['width'];
// Video.height = data['height'];
//
// Video.height = data['height'];
},
//
},
err
=>
{
//
err => {
this
.
_http
.
get_replay
(
token
)
//
this._http.get_replay(token)
.
subscribe
(
//
.subscribe(
data
=>
{
//
data => {
Video
.
type
=
'json'
;
//
Video.type = 'json';
Video
.
json
=
data
;
//
Video.json = data;
Video
.
src
=
'READY'
;
//
Video.src = 'READY';
Video
.
timelist
=
Object
.
keys
(
Video
.
json
).
map
(
Number
);
//
Video.timelist = Object.keys(Video.json).map(Number);
Video
.
timelist
=
Video
.
timelist
.
sort
(
function
(
a
,
b
)
{
//
Video.timelist = Video.timelist.sort(function (a, b) {
return
a
-
b
;
//
return a - b;
});
//
});
Video
.
totalTime
=
Video
.
timelist
[
Video
.
timelist
.
length
-
1
]
*
1000
;
//
Video.totalTime = Video.timelist[Video.timelist.length - 1] * 1000;
//
},
err2
=>
{
//
}, err2 => {
alert
(
'无法下载'
);
//
alert('无法下载');
this
.
_logger
.
error
(
err2
);
//
this._logger.error(err2);
},
//
},
);
//
);
//
}
//
}
);
//
);
}
}
}
}
This diff is collapsed.
Click to expand it.
src/app/pages/replay/replay.model.ts
0 → 100644
View file @
e93e9045
export
class
Video
{
id
:
string
;
src
:
string
;
type
:
string
;
height
:
number
;
width
:
number
;
json
:
object
;
timelist
:
Array
<
number
>
;
totalTime
:
number
;
}
This diff is collapsed.
Click to expand it.
src/app/pages/setting/basic/basic.component.html
deleted
100644 → 0
View file @
0cc695d2
<div
class=
"basic-form"
>
<br/>
<mat-form-field
hintLabel=
"http://jumpserver.abc.com:8080"
>
<input
matInput
#
input
maxlength=
"10"
placeholder=
"{{'Current SITE URL'|trans}}"
>
</mat-form-field>
<br/>
<mat-form-field
hintLabel=
"{{'User first login update profile done redirect to it'|trans}}"
>
<input
matInput
#
input
maxlength=
"10"
placeholder=
"{{'User Guide URL'|trans}}"
>
</mat-form-field>
<br/>
<mat-form-field
hintLabel=
""
>
<input
matInput
#
input
maxlength=
"10"
placeholder=
"{{'Email Subject Prefix'|trans}}"
>
</mat-form-field>
<br/>
<div
class=
"button-row"
>
<button
mat-raised-button
>
{{ 'Reset' | trans }}
</button>
<button
mat-raised-button
color=
"primary"
>
{{ 'Submit' | trans }}
</button>
</div>
<br/>
</div>
This diff is collapsed.
Click to expand it.
src/app/pages/setting/basic/basic.component.scss
deleted
100644 → 0
View file @
0cc695d2
.basic-form
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
max-width
:
400px
;
margin
:
auto
;
font-size
:
14pt
;
}
.basic-form
>
*
{
width
:
100%
;
}
This diff is collapsed.
Click to expand it.
src/app/pages/setting/basic/basic.component.spec.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
SettingPageBasicComponent
}
from
'./basic.component'
;
describe
(
'SettingPageBasicComponent'
,
()
=>
{
let
component
:
SettingPageBasicComponent
;
let
fixture
:
ComponentFixture
<
SettingPageBasicComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
SettingPageBasicComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
SettingPageBasicComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
This diff is collapsed.
Click to expand it.
src/app/pages/setting/basic/basic.component.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-sp-basic'
,
templateUrl
:
'./basic.component.html'
,
styleUrls
:
[
'./basic.component.scss'
]
})
export
class
SettingPageBasicComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{
}
}
This diff is collapsed.
Click to expand it.
src/app/pages/setting/email/email.component.html
deleted
100644 → 0
View file @
0cc695d2
<div
class=
"email-form"
>
<mat-form-field
hintLabel=
""
>
<input
matInput
#
input
maxlength=
"10"
placeholder=
"{{'SMTP host'|trans}}"
>
</mat-form-field>
<mat-form-field
hintLabel=
""
>
<input
matInput
#
input
maxlength=
"10"
placeholder=
"{{'SMTP port'|trans}}"
>
</mat-form-field>
<mat-form-field
hintLabel=
""
>
<input
matInput
#
input
maxlength=
"10"
[
formControl
]="
emailFormControl
"
[
errorStateMatcher
]="
matcher
"
placeholder=
"{{'SMTP user'|trans}}"
>
<mat-error
*
ngIf=
"emailFormControl.hasError('email') && !emailFormControl.hasError('required')"
>
{{'Please enter a valid email address'|trans}}
</mat-error>
<mat-error
*
ngIf=
"emailFormControl.hasError('required')"
>
<strong>
{{'Email is required'|trans}}
</strong>
</mat-error>
</mat-form-field>
<mat-form-field
hintLabel=
"{{'Some provider use token except password'|trans}}"
>
<input
matInput
#
input
maxlength=
"10"
[
type
]="
hide
?
'
password
'
:
'
text
'"
placeholder=
"{{'SMTP password'|trans}}"
>
<mat-icon
matSuffix
(
click
)="
hide =
!hide"
>
{{hide ? 'visibility' : 'visibility_off'}}
</mat-icon>
</mat-form-field>
<mat-form-field
[
hideRequiredMarker
]="
options
.
value
.
hideRequired
"
[
floatLabel
]="
options
.
value
.
floatLabel
"
>
<mat-select
required
>
<mat-option
value=
"yes"
>
{{'Yes'|trans}}
</mat-option>
<mat-option
value=
"no"
>
{{'No'|trans}}
</mat-option>
</mat-select>
<mat-placeholder>
<b>
{{'Use SSL'|trans}}
</b>
</mat-placeholder>
<mat-hint>
{{'If SMTP port is 465, may be select'|trans}}
</mat-hint>
</mat-form-field>
<mat-form-field
[
hideRequiredMarker
]="
options
.
value
.
hideRequired
"
[
floatLabel
]="
options
.
value
.
floatLabel
"
>
<mat-select
required
>
<mat-option
value=
"yes"
>
{{'Yes'|trans}}
</mat-option>
<mat-option
value=
"no"
>
{{'No'|trans}}
</mat-option>
</mat-select>
<mat-placeholder>
<b>
{{'Use TLS'|trans}}
</b>
</mat-placeholder>
<mat-hint>
{{'If SMTP port is 587, may be select'|trans}}
</mat-hint>
</mat-form-field>
<br>
<div
class=
"button-row"
>
<button
mat-raised-button
>
{{ 'Test connection' | trans }}
</button>
<button
mat-raised-button
>
{{ 'Reset' | trans }}
</button>
<button
mat-raised-button
color=
"primary"
>
{{ 'Submit' | trans }}
</button>
</div>
<br/>
</div>
This diff is collapsed.
Click to expand it.
src/app/pages/setting/email/email.component.scss
deleted
100644 → 0
View file @
0cc695d2
.email-form
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
max-width
:
400px
;
margin
:
auto
;
font-size
:
14pt
;
}
.email-form
>
*
{
width
:
100%
;
}
This diff is collapsed.
Click to expand it.
src/app/pages/setting/email/email.component.spec.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
SettingPageEmailComponent
}
from
'./email.component'
;
describe
(
'SettingPageEmailComponent'
,
()
=>
{
let
component
:
SettingPageEmailComponent
;
let
fixture
:
ComponentFixture
<
SettingPageEmailComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
SettingPageEmailComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
SettingPageEmailComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
This diff is collapsed.
Click to expand it.
src/app/pages/setting/email/email.component.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
FormBuilder
,
FormControl
,
FormGroup
,
FormGroupDirective
,
NgForm
,
Validators
}
from
'@angular/forms'
;
import
{
ErrorStateMatcher
}
from
'@angular/material/core'
;
/** Error when invalid control is dirty, touched, or submitted. */
export
class
MyErrorStateMatcher
implements
ErrorStateMatcher
{
isErrorState
(
control
:
FormControl
|
null
,
form
:
FormGroupDirective
|
NgForm
|
null
):
boolean
{
const
isSubmitted
=
form
&&
form
.
submitted
;
return
!!
(
control
&&
control
.
invalid
&&
(
control
.
dirty
||
control
.
touched
||
isSubmitted
));
}
}
@
Component
({
selector
:
'app-sp-email'
,
templateUrl
:
'./email.component.html'
,
styleUrls
:
[
'./email.component.scss'
]
})
export
class
SettingPageEmailComponent
implements
OnInit
{
emailFormControl
=
new
FormControl
(
''
,
[
Validators
.
required
,
Validators
.
email
,
]);
matcher
=
new
MyErrorStateMatcher
();
hide
=
true
;
options
:
FormGroup
;
constructor
(
fb
:
FormBuilder
)
{
this
.
options
=
fb
.
group
({
hideRequired
:
false
,
floatLabel
:
'auto'
,
});
}
ngOnInit
()
{
}
}
This diff is collapsed.
Click to expand it.
src/app/pages/setting/ldap/ldap.component.html
deleted
100644 → 0
View file @
0cc695d2
<p>
ldap works!
</p>
This diff is collapsed.
Click to expand it.
src/app/pages/setting/ldap/ldap.component.scss
deleted
100644 → 0
View file @
0cc695d2
This diff is collapsed.
Click to expand it.
src/app/pages/setting/ldap/ldap.component.spec.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
SettingPageLdapComponent
}
from
'./ldap.component'
;
describe
(
'SettingPageLdapComponent'
,
()
=>
{
let
component
:
SettingPageLdapComponent
;
let
fixture
:
ComponentFixture
<
SettingPageLdapComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
SettingPageLdapComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
SettingPageLdapComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
This diff is collapsed.
Click to expand it.
src/app/pages/setting/ldap/ldap.component.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-sp-ldap'
,
templateUrl
:
'./ldap.component.html'
,
styleUrls
:
[
'./ldap.component.scss'
]
})
export
class
SettingPageLdapComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{
}
}
This diff is collapsed.
Click to expand it.
src/app/pages/setting/s3/s3.component.html
deleted
100644 → 0
View file @
0cc695d2
<p>
s3 works!
</p>
This diff is collapsed.
Click to expand it.
src/app/pages/setting/s3/s3.component.scss
deleted
100644 → 0
View file @
0cc695d2
This diff is collapsed.
Click to expand it.
src/app/pages/setting/s3/s3.component.spec.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
SettingPageS3Component
}
from
'./s3.component'
;
describe
(
'SettingPageS3Component'
,
()
=>
{
let
component
:
SettingPageS3Component
;
let
fixture
:
ComponentFixture
<
SettingPageS3Component
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
SettingPageS3Component
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
SettingPageS3Component
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
This diff is collapsed.
Click to expand it.
src/app/pages/setting/s3/s3.component.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-sp-s3'
,
templateUrl
:
'./s3.component.html'
,
styleUrls
:
[
'./s3.component.scss'
]
})
export
class
SettingPageS3Component
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{
}
}
This diff is collapsed.
Click to expand it.
src/app/pages/setting/setting.component.html
deleted
100644 → 0
View file @
0cc695d2
<div
class=
"pace-done"
>
<elements-leftbar></elements-leftbar>
<mat-card
class=
"content"
>
<mat-tab-group>
<mat-tab
label=
"{{'Basic setting'|trans}}"
>
<app-sp-basic></app-sp-basic>
</mat-tab>
<mat-tab
label=
"{{'Email setting'|trans}}"
>
<app-sp-email></app-sp-email>
</mat-tab>
<mat-tab
label=
"{{'LDAP setting'|trans}}"
>
<app-sp-ldap></app-sp-ldap>
</mat-tab>
<mat-tab
label=
"{{'Terminal setting'|trans}}"
>
<app-sp-terminal></app-sp-terminal>
</mat-tab>
</mat-tab-group>
</mat-card>
<elements-ofooter></elements-ofooter>
</div>
This diff is collapsed.
Click to expand it.
src/app/pages/setting/setting.component.scss
deleted
100644 → 0
View file @
0cc695d2
.pace-done
{
width
:
100%
;
height
:
100%
;
padding
:
0
;
}
.content
{
margin-left
:
220px
;
height
:
100%
;
}
This diff is collapsed.
Click to expand it.
src/app/pages/setting/setting.component.spec.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
PagesSettingComponent
}
from
'./setting.component'
;
describe
(
'SettingPageComponent'
,
()
=>
{
let
component
:
PagesSettingComponent
;
let
fixture
:
ComponentFixture
<
PagesSettingComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
PagesSettingComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
PagesSettingComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
This diff is collapsed.
Click to expand it.
src/app/pages/setting/setting.component.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'pages-setting'
,
templateUrl
:
'./setting.component.html'
,
styleUrls
:
[
'./setting.component.scss'
]
})
export
class
PagesSettingComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{
}
}
This diff is collapsed.
Click to expand it.
src/app/pages/setting/settings.module.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
NgModule
}
from
'@angular/core'
;
import
{
SettingPageS3Component
}
from
'./s3/s3.component'
;
import
{
SettingPageTerminalComponent
}
from
'./terminal/terminal.component'
;
import
{
SettingPageLdapComponent
}
from
'./ldap/ldap.component'
;
import
{
SettingPageEmailComponent
}
from
'./email/email.component'
;
import
{
SettingPageBasicComponent
}
from
'./basic/basic.component'
;
import
{
PagesSettingComponent
}
from
'./setting.component'
;
@
NgModule
({
imports
:
[
],
declarations
:
[
SettingPageS3Component
,
SettingPageTerminalComponent
,
SettingPageLdapComponent
,
SettingPageEmailComponent
,
SettingPageBasicComponent
,
PagesSettingComponent
]
})
export
class
SettingsModule
{
}
This diff is collapsed.
Click to expand it.
src/app/pages/setting/terminal/terminal.component.html
deleted
100644 → 0
View file @
0cc695d2
<p>
terminal works!
</p>
This diff is collapsed.
Click to expand it.
src/app/pages/setting/terminal/terminal.component.scss
deleted
100644 → 0
View file @
0cc695d2
This diff is collapsed.
Click to expand it.
src/app/pages/setting/terminal/terminal.component.spec.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
SettingPageTerminalComponent
}
from
'./terminal.component'
;
describe
(
'SettingPageTerminalComponent'
,
()
=>
{
let
component
:
SettingPageTerminalComponent
;
let
fixture
:
ComponentFixture
<
SettingPageTerminalComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
SettingPageTerminalComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
SettingPageTerminalComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
This diff is collapsed.
Click to expand it.
src/app/pages/setting/terminal/terminal.component.ts
deleted
100644 → 0
View file @
0cc695d2
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-sp-terminal'
,
templateUrl
:
'./terminal.component.html'
,
styleUrls
:
[
'./terminal.component.scss'
]
})
export
class
SettingPageTerminalComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{
}
}
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