Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
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
wangqinghua
smart
Commits
6031f40d
Commit
6031f40d
authored
Nov 22, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网站监测
parent
99408ff1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
55 deletions
+118
-55
media-type.component.html
...bapp/app/alarm/modal/media-type/media-type.component.html
+48
-5
media-type.component.ts
...webapp/app/alarm/modal/media-type/media-type.component.ts
+15
-2
send-set.component.html
src/main/webapp/app/alarm/send-set/send-set.component.html
+1
-1
send-set.component.ts
src/main/webapp/app/alarm/send-set/send-set.component.ts
+54
-47
No files found.
src/main/webapp/app/alarm/modal/media-type/media-type.component.html
View file @
6031f40d
<nz-modal
[(
nzVisible
)]="
isVisible
"
nzTitle=
"{{title}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<nz-modal
[(
nzVisible
)]="
isVisible
"
nzTitle=
"{{title}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<form
nz-form
[
formGroup
]="
validateForm
"
>
<form
nz-form
[
formGroup
]="
validateForm
"
>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
告警组
名称
</nz-form-label>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
名称
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
formControlName=
"name"
placeholder=
"
告警组
名称"
>
<input
type=
"text"
nz-input
formControlName=
"name"
placeholder=
"名称"
>
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
请输入告警组名称
</nz-form-explain>
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
请输入告警组名称
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
>
组描述
</nz-form-label>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
类型
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<nz-form-control
[
nzSpan
]="
12
"
>
<textarea
formControlName=
"description"
nz-input
rows=
"2"
placeholder=
"分组描述"
></textarea>
<input
type=
"text"
nz-input
formControlName=
"name"
placeholder=
"名称"
>
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
请输入告警组名称
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
SMTP服务器
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
formControlName=
"name"
placeholder=
"名称"
>
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
请输入告警组名称
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
SMTP服务器端口
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
formControlName=
"name"
placeholder=
"名称"
>
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
请输入告警组名称
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
SMTP HELO
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
formControlName=
"name"
placeholder=
"名称"
>
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
请输入告警组名称
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
SMTP电邮
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
formControlName=
"name"
placeholder=
"名称"
>
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
请输入告警组名称
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
安全链接
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
formControlName=
"name"
placeholder=
"名称"
>
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
请输入告警组名称
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"name"
>
认证
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<input
type=
"text"
nz-input
formControlName=
"name"
placeholder=
"名称"
>
<nz-form-explain
*
ngIf=
"validateForm.get('name').dirty && validateForm.get('name').errors"
>
请输入告警组名称
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
</form>
</form>
...
...
src/main/webapp/app/alarm/modal/media-type/media-type.component.ts
View file @
6031f40d
...
@@ -16,12 +16,25 @@ export class MediaTypeComponent implements OnInit {
...
@@ -16,12 +16,25 @@ export class MediaTypeComponent implements OnInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
initForm
();
}
initForm
(){
this
.
validateForm
=
this
.
fb
.
group
({
this
.
validateForm
=
this
.
fb
.
group
({
name
:[
null
,[
Validators
.
required
]]
name
:[
null
,[
Validators
.
required
]],
description
:[
null
]
})
})
}
}
showModal
()
{
//新增
showAddModal
(
title
)
{
this
.
title
=
title
;
this
.
isVisible
=
true
;
}
//编辑
showEditModal
(
item
,
title
)
{
this
.
title
=
title
;
this
.
isVisible
=
true
;
this
.
isVisible
=
true
;
}
}
...
...
src/main/webapp/app/alarm/send-set/send-set.component.html
View file @
6031f40d
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
</div>
</div>
</div>
</div>
<div
nz-row
class=
"search-form"
style=
"border-top: none;padding: 0 0 15px 0;"
>
<div
nz-row
class=
"search-form"
style=
"border-top: none;padding: 0 0 15px 0;"
>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
新增发送方式
</button>
<button
(
click
)="
showAddModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
新增发送方式
</button>
</div>
</div>
<nz-table
#
nzTable
[
nzData
]="
sendList
"
[
nzFrontPagination
]="
false
"
>
<nz-table
#
nzTable
[
nzData
]="
sendList
"
[
nzFrontPagination
]="
false
"
>
...
...
src/main/webapp/app/alarm/send-set/send-set.component.ts
View file @
6031f40d
...
@@ -5,62 +5,69 @@ import {MediaTypeComponent} from '../modal/media-type/media-type.component';
...
@@ -5,62 +5,69 @@ import {MediaTypeComponent} from '../modal/media-type/media-type.component';
import
{
color
}
from
'../../app.constants'
;
import
{
color
}
from
'../../app.constants'
;
@
Component
({
@
Component
({
selector
:
'smart-send-set'
,
selector
:
'smart-send-set'
,
templateUrl
:
'./send-set.component.html'
,
templateUrl
:
'./send-set.component.html'
,
styles
:
[]
styles
:
[]
})
})
export
class
SendSetComponent
implements
OnInit
{
export
class
SendSetComponent
implements
OnInit
{
@
ViewChild
(
'smartMediaType'
)
smartMediaType
:
MediaTypeComponent
;
@
ViewChild
(
'smartMediaType'
)
smartMediaType
:
MediaTypeComponent
;
color
=
color
;
color
=
color
;
sendList
=
[];
sendList
=
[];
constructor
(
private
alarmSer
:
AlarmService
,
private
modalSer
:
NzModalService
,
private
message
:
NzMessageService
)
{
}
ngOnInit
()
{
constructor
(
private
alarmSer
:
AlarmService
,
private
modalSer
:
NzModalService
,
this
.
getList
();
private
message
:
NzMessageService
)
{
}
}
ngOnInit
()
{
this
.
getList
();
}
getList
()
{
getList
()
{
this
.
alarmSer
.
mediaTypeFind
({}).
subscribe
(
this
.
alarmSer
.
mediaTypeFind
({}).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
sendList
=
res
.
data
;
this
.
sendList
=
res
.
data
;
}
}
}
}
)
);
}
}
//删除发送方式
//删除发送方式
deleteSend
(
data
){
deleteSend
(
data
)
{
this
.
modalSer
.
confirm
({
this
.
modalSer
.
confirm
({
nzTitle
:
'删除'
,
nzTitle
:
'删除'
,
nzContent
:
'<b style="color: red;">确认删除该发送方式吗?</b>'
,
nzContent
:
'<b style="color: red;">确认删除该发送方式吗?</b>'
,
nzOkText
:
'确定'
,
nzOkText
:
'确定'
,
nzOkType
:
'danger'
,
nzOkType
:
'danger'
,
nzOnOk
:
()
=>
{
nzOnOk
:
()
=>
{
const
arr
=
{
const
arr
=
{
ids
:[]
ids
:
[]
};
};
arr
.
ids
.
push
(
data
.
mediatypeid
);
arr
.
ids
.
push
(
data
.
mediatypeid
);
this
.
alarmSer
.
mediaTypeDelete
(
arr
).
subscribe
(
this
.
alarmSer
.
mediaTypeDelete
(
arr
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
info
(
'删除成功'
);
this
.
message
.
info
(
'删除成功'
);
}
else
{
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
this
.
message
.
info
(
res
.
errMsg
);
}
}
}
}
);
);
},
},
nzCancelText
:
'取消'
,
nzCancelText
:
'取消'
,
nzOnCancel
:
()
=>
console
.
log
(
'Cancel'
)
nzOnCancel
:
()
=>
console
.
log
(
'Cancel'
)
}
}
);
)
}
}
//编辑
//编辑
editSend
(){
showEditModal
()
{
this
.
smartMediaType
.
showEditModal
({},
'编辑发送方式'
);
}
//新增发送方式
showAddModal
()
{
this
.
smartMediaType
.
showAddModal
(
'新增发送方式'
);
}
}
}
}
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