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
May 03, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 删掉没用的组件
parent
0cc695d2
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';
import
{
ElementRdpComponent
}
from
'./rdp/rdp.component'
;
import
{
ElementServerMenuComponent
}
from
'./server-menu/server-menu.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
{
ElementGuacamoleComponent
}
from
'./guacamole/guacamole.component'
;
import
{
AssetTreeDialogComponent
,
ElementAssetTreeComponent
}
from
'./asset-tree/asset-tree.component'
;
...
...
@@ -28,8 +26,6 @@ export const ElementComponents = [
ElementRdpComponent
,
ElementServerMenuComponent
,
ElementIframeComponent
,
ElementElfinderComponent
,
ElementSettingsComponent
,
ElementDialogAlertComponent
,
ElementGuacamoleComponent
,
ElementAssetTreeComponent
,
...
...
src/app/elements/elfinder/elfinder.component.html
deleted
100644 → 0
View file @
0cc695d2
<div
id=
"elfinder"
></div>
src/app/elements/elfinder/elfinder.component.scss
deleted
100644 → 0
View file @
0cc695d2
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
();
});
});
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'), {});
}
}
src/app/elements/settings/settings.component.html
deleted
100644 → 0
View file @
0cc695d2
<p>
settings works!
</p>
src/app/elements/settings/settings.component.scss
deleted
100644 → 0
View file @
0cc695d2
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
();
});
});
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
()
{
}
}
src/app/elements/term/term.component.ts
View file @
e93e9045
import
{
AfterViewInit
,
Component
,
Input
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
ElementRef
}
from
'@angular/core'
;
import
{
term
,
TermWS
}
from
'../../globals'
;
import
*
as
Terminal
from
'xterm/dist/xterm'
;
import
{
term
,
Terminal
,
TermWS
}
from
'../../globals'
;
// import { Terminal } from 'xterm';
import
{
NavList
}
from
'../../pages/control/control/control.component'
;
import
*
as
jQuery
from
'jquery/dist/jquery.min.js'
;
...
...
@@ -32,7 +31,7 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
ngOnInit
()
{
this
.
secret
=
this
.
_uuid
.
gen
();
this
.
term
=
new
Terminal
({
this
.
term
=
Terminal
({
cols
:
80
,
rows
:
24
,
useStyle
:
true
,
...
...
src/app/globals.ts
View file @
e93e9045
'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'
;
//
export function Terminal(xargs: any) {
//
return terminal(xargs);
//
}
export
function
Terminal
(
xargs
:
any
)
{
return
terminal
(
xargs
);
}
export
const
TermWS
=
io
.
connect
(
'/ssh'
);
export
let
term
:
{
...
...
src/app/pages/replay/json/json.component.ts
View file @
e93e9045
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
Video
,
term
}
from
'../../../globals'
;
import
{
term
}
from
'../../../globals'
;
import
{
HttpService
,
LogService
}
from
'../../../app.service'
;
import
{
Video
}
from
'../replay.model'
;
@
Component
({
selector
:
'app-replay-json'
,
...
...
@@ -18,21 +19,23 @@ export class JsonComponent implements OnInit {
pos
=
0
;
scrubber
:
number
;
@
Input
()
video
:
Video
;
constructor
(
private
_http
:
HttpService
,
private
_logger
:
LogService
)
{
}
ngOnInit
()
{
if
(
V
ideo
.
src
!==
'READY'
)
{
this
.
_http
.
get_replay_data
(
V
ideo
.
src
)
if
(
this
.
v
ideo
.
src
!==
'READY'
)
{
this
.
_http
.
get_replay_data
(
this
.
v
ideo
.
src
)
.
subscribe
(
data
=>
{
V
ideo
.
json
=
data
;
Video
.
timelist
=
Object
.
keys
(
V
ideo
.
json
).
map
(
Number
);
Video
.
timelist
=
V
ideo
.
timelist
.
sort
(
function
(
a
,
b
)
{
this
.
v
ideo
.
json
=
data
;
this
.
video
.
timelist
=
Object
.
keys
(
this
.
v
ideo
.
json
).
map
(
Number
);
this
.
video
.
timelist
=
this
.
v
ideo
.
timelist
.
sort
(
function
(
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
=>
{
alert
(
'无法下载'
);
...
...
@@ -85,26 +88,26 @@ export class JsonComponent implements OnInit {
}
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);
for
(;
that
.
pos
<
V
ideo
.
timelist
.
length
;
that
.
pos
++
)
{
if
(
V
ideo
.
timelist
[
that
.
pos
]
*
1000
<=
that
.
time
)
{
term
.
term
.
write
(
Video
.
json
[
V
ideo
.
timelist
[
that
.
pos
].
toString
()]);
for
(;
that
.
pos
<
this
.
v
ideo
.
timelist
.
length
;
that
.
pos
++
)
{
if
(
this
.
v
ideo
.
timelist
[
that
.
pos
]
*
1000
<=
that
.
time
)
{
term
.
term
.
write
(
this
.
video
.
json
[
this
.
v
ideo
.
timelist
[
that
.
pos
].
toString
()]);
}
else
{
break
;
}
}
if
(
that
.
pos
>=
V
ideo
.
timelist
.
length
)
{
if
(
that
.
pos
>=
this
.
v
ideo
.
timelist
.
length
)
{
this
.
toggle
=
!
this
.
toggle
;
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
+=
that
.
TIMESTEP
;
that
.
setPercent
=
that
.
time
/
V
ideo
.
totalTime
*
100
;
that
.
setPercent
=
that
.
time
/
this
.
v
ideo
.
totalTime
*
100
;
}
stop
()
{
...
...
@@ -116,14 +119,14 @@ export class JsonComponent implements OnInit {
this
.
pos
=
0
;
term
.
term
.
reset
();
this
.
toggle
=
false
;
for
(;
this
.
pos
<
V
ideo
.
timelist
.
length
;
this
.
pos
++
)
{
if
(
Video
.
timelist
[
this
.
pos
]
*
1000
<=
this
.
setPercent
/
100
*
V
ideo
.
totalTime
)
{
term
.
term
.
write
(
Video
.
json
[
V
ideo
.
timelist
[
this
.
pos
].
toString
()]);
for
(;
this
.
pos
<
this
.
v
ideo
.
timelist
.
length
;
this
.
pos
++
)
{
if
(
this
.
video
.
timelist
[
this
.
pos
]
*
1000
<=
this
.
setPercent
/
100
*
this
.
v
ideo
.
totalTime
)
{
term
.
term
.
write
(
this
.
video
.
json
[
this
.
v
ideo
.
timelist
[
this
.
pos
].
toString
()]);
}
else
{
break
;
}
}
this
.
time
=
V
ideo
.
totalTime
*
this
.
setPercent
/
100
;
this
.
time
=
this
.
v
ideo
.
totalTime
*
this
.
setPercent
/
100
;
}
}
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
>
<source
[
src
]="
V
ideo
.
src
"
type=
"video/mp4"
>
<source
[
src
]="
v
ideo
.
src
"
type=
"video/mp4"
>
Your browser does not support the video tag.
<br>
您的浏览器不支持,请升级
...
...
src/app/pages/replay/mp4/mp4.component.ts
View file @
e93e9045
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
Video
}
from
'../
../../globals
'
;
import
{
Video
}
from
'../
replay.model
'
;
@
Component
({
selector
:
'app-replay-mp4'
,
...
...
@@ -7,17 +7,16 @@ import {Video} from '../../../globals';
styleUrls
:
[
'./mp4.component.css'
]
})
export
class
Mp4Component
implements
OnInit
{
Video
=
Video
;
@
Input
()
video
:
Video
;
constructor
()
{
}
ngOnInit
()
{
if
(
this
.
V
ideo
.
height
===
0
)
{
this
.
V
ideo
.
height
=
600
;
if
(
this
.
v
ideo
.
height
===
0
)
{
this
.
v
ideo
.
height
=
600
;
}
if
(
this
.
V
ideo
.
width
===
0
)
{
this
.
V
ideo
.
width
=
800
;
if
(
this
.
v
ideo
.
width
===
0
)
{
this
.
v
ideo
.
width
=
800
;
}
}
...
...
src/app/pages/replay/replay.component.html
View file @
e93e9045
<app-replay-json
*
ngIf=
"V
ideo.type=='json'"
></app-replay-json>
<app-replay-mp4
*
ngIf=
"V
ideo.type=='mp4'"
></app-replay-mp4>
<app-replay-json
[
video
]="
video
"
*
ngIf=
"v
ideo.type=='json'"
></app-replay-json>
<app-replay-mp4
[
video
]="
video
"
*
ngIf=
"v
ideo.type=='mp4'"
></app-replay-mp4>
src/app/pages/replay/replay.component.ts
View file @
e93e9045
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ActivatedRoute
,
Params
}
from
'@angular/router'
;
import
{
HttpService
,
LogService
}
from
'../../app.service'
;
import
{
Video
,
DataStore
}
from
'../../globals'
;
import
{
DataStore
}
from
'../../globals'
;
import
{
Video
}
from
'./replay.model'
;
@
Component
({
selector
:
'pages-replay'
,
...
...
@@ -9,13 +10,13 @@ import {Video, DataStore} from '../../globals';
styleUrls
:
[
'./replay.component.css'
]
})
export
class
PagesReplayComponent
implements
OnInit
{
video
:
Video
;
constructor
(
private
activatedRoute
:
ActivatedRoute
,
private
_http
:
HttpService
,
private
_logger
:
LogService
)
{
// this.video = {'type': 'none'};
DataStore
.
NavShow
=
false
;
}
ngOnInit
()
{
...
...
@@ -23,36 +24,36 @@ export class PagesReplayComponent implements OnInit {
this
.
activatedRoute
.
params
.
subscribe
((
params
:
Params
)
=>
{
token
=
params
[
'token'
];
});
this
.
_http
.
get_replay_json
(
token
)
.
subscribe
(
data
=>
{
Video
.
type
=
data
[
'type'
];
Video
.
src
=
data
[
'src'
];
Video
.
id
=
data
[
'id'
];
// Video.width = data['width'];
// Video.height = data['height'];
},
err
=>
{
this
.
_http
.
get_replay
(
token
)
.
subscribe
(
data
=>
{
Video
.
type
=
'json'
;
Video
.
json
=
data
;
Video
.
src
=
'READY'
;
Video
.
timelist
=
Object
.
keys
(
Video
.
json
).
map
(
Number
);
Video
.
timelist
=
Video
.
timelist
.
sort
(
function
(
a
,
b
)
{
return
a
-
b
;
});
Video
.
totalTime
=
Video
.
timelist
[
Video
.
timelist
.
length
-
1
]
*
1000
;
},
err2
=>
{
alert
(
'无法下载'
);
this
.
_logger
.
error
(
err2
);
},
);
}
);
//
this._http.get_replay_json(token)
//
.subscribe(
//
data => {
//
Video.type = data['type'];
//
Video.src = data['src'];
//
Video.id = data['id'];
//
// Video.width = data['width'];
//
// Video.height = data['height'];
//
},
//
err => {
//
this._http.get_replay(token)
//
.subscribe(
//
data => {
//
Video.type = 'json';
//
Video.json = data;
//
Video.src = 'READY';
//
Video.timelist = Object.keys(Video.json).map(Number);
//
Video.timelist = Video.timelist.sort(function (a, b) {
//
return a - b;
//
});
//
Video.totalTime = Video.timelist[Video.timelist.length - 1] * 1000;
//
//
}, err2 => {
//
alert('无法下载');
//
this._logger.error(err2);
//
},
//
);
//
//
}
//
);
}
}
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
;
}
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>
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%
;
}
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
();
});
});
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
()
{
}
}
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>
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%
;
}
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
();
});
});
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
()
{
}
}
src/app/pages/setting/ldap/ldap.component.html
deleted
100644 → 0
View file @
0cc695d2
<p>
ldap works!
</p>
src/app/pages/setting/ldap/ldap.component.scss
deleted
100644 → 0
View file @
0cc695d2
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
();
});
});
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
()
{
}
}
src/app/pages/setting/s3/s3.component.html
deleted
100644 → 0
View file @
0cc695d2
<p>
s3 works!
</p>
src/app/pages/setting/s3/s3.component.scss
deleted
100644 → 0
View file @
0cc695d2
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
();
});
});
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
()
{
}
}
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>
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%
;
}
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
();
});
});
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
()
{
}
}
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
{
}
src/app/pages/setting/terminal/terminal.component.html
deleted
100644 → 0
View file @
0cc695d2
<p>
terminal works!
</p>
src/app/pages/setting/terminal/terminal.component.scss
deleted
100644 → 0
View file @
0cc695d2
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
();
});
});
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
()
{
}
}
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