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
04ac48ac
Commit
04ac48ac
authored
Nov 16, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log
parent
4fac573e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
14 deletions
+60
-14
alarm-set.component.html
src/main/webapp/app/alarm/alarm-set/alarm-set.component.html
+6
-3
alarm-set.component.ts
src/main/webapp/app/alarm/alarm-set/alarm-set.component.ts
+7
-0
media-type.component.html
...bapp/app/alarm/modal/media-type/media-type.component.html
+18
-3
media-type.component.ts
...webapp/app/alarm/modal/media-type/media-type.component.ts
+22
-7
send-set.component.html
src/main/webapp/app/alarm/send-set/send-set.component.html
+4
-0
send-set.component.ts
src/main/webapp/app/alarm/send-set/send-set.component.ts
+3
-1
No files found.
src/main/webapp/app/alarm/alarm-set/alarm-set.component.html
View file @
04ac48ac
...
...
@@ -37,7 +37,7 @@
</div>
<div
nz-row
class=
"search-form"
>
<div
nz-col
nzSpan=
"16"
>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search
"
></i>
新增告警推送
</button>
<button
(
click
)="
showAlarmModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus
"
></i>
新增告警推送
</button>
</div>
</div>
<nz-table
#
nzTable
[
nzData
]="
setList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageCount
"
(
nzPageIndexChange
)="
change
($
event
)"
>
...
...
@@ -72,4 +72,7 @@
</nz-table>
<!--告警组-->
<smart-alarm-group
#
smartAlarmGroup
(
add
)="
getGroupAlarm
()"
></smart-alarm-group>
\ No newline at end of file
<smart-alarm-group
#
smartAlarmGroup
(
add
)="
getGroupAlarm
()"
></smart-alarm-group>
<!--新增告警推送-->
<smart-alarm-modal
#
smartAlarmModal
></smart-alarm-modal>
\ No newline at end of file
src/main/webapp/app/alarm/alarm-set/alarm-set.component.ts
View file @
04ac48ac
...
...
@@ -3,6 +3,7 @@ import {AlarmService} from '../alarm.service';
import
{
pageSize
}
from
'../../app.constants'
;
import
{
AlarmGroupComponent
}
from
'../modal/alarm-group/alarm-group.component'
;
import
{
NzMessageService
,
NzModalService
}
from
'ng-zorro-antd'
;
import
{
AlarmModalComponent
}
from
'../../modal/alarm-modal/alarm-modal.component'
;
@
Component
({
selector
:
'smart-alarm-set'
,
...
...
@@ -11,6 +12,7 @@ import {NzMessageService, NzModalService} from 'ng-zorro-antd';
})
export
class
AlarmSetComponent
implements
OnInit
{
@
ViewChild
(
'smartAlarmGroup'
)
smartAlarmGroup
:
AlarmGroupComponent
;
@
ViewChild
(
'smartAlarmModal'
)
smartAlarmModal
:
AlarmModalComponent
;
setList
=
[];
alertGroupId
;
groupList
=
[];
...
...
@@ -105,4 +107,9 @@ export class AlarmSetComponent implements OnInit {
}
change
(
e
){}
//新增告警推送
showAlarmModal
(){
this
.
smartAlarmModal
.
showModal
(
null
);
}
}
src/main/webapp/app/alarm/modal/media-type/media-type.component.html
View file @
04ac48ac
<p>
media-type works!
</p>
<nz-modal
[(
nzVisible
)]="
isVisible
"
nzTitle=
"{{title}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<form
nz-form
[
formGroup
]="
validateForm
"
>
<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
"
>
组描述
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<textarea
formControlName=
"description"
nz-input
rows=
"2"
placeholder=
"分组描述"
></textarea>
</nz-form-control>
</nz-form-item>
</form>
</nz-modal>
\ No newline at end of file
src/main/webapp/app/alarm/modal/media-type/media-type.component.ts
View file @
04ac48ac
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'smart-media-type'
,
templateUrl
:
'./media-type.component.html'
,
styles
:
[]
selector
:
'smart-media-type'
,
templateUrl
:
'./media-type.component.html'
,
styles
:
[]
})
export
class
MediaTypeComponent
implements
OnInit
{
constructor
()
{
}
isVisible
=
false
;
ngOnInit
()
{
}
constructor
()
{
}
ngOnInit
()
{
}
showModal
()
{
this
.
isVisible
=
true
;
}
handleCancel
()
{
this
.
isVisible
=
false
;
}
handleOk
()
{
this
.
isVisible
=
false
;
}
}
src/main/webapp/app/alarm/send-set/send-set.component.html
View file @
04ac48ac
...
...
@@ -56,3 +56,6 @@
</tr>
</tbody>
</nz-table>
<!--新增发送方式-->
<smart-media-type
#
smartMediaType
></smart-media-type>
\ No newline at end of file
src/main/webapp/app/alarm/send-set/send-set.component.ts
View file @
04ac48ac
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
AlarmService
}
from
'../alarm.service'
;
import
{
NzMessageService
,
NzModalService
}
from
'ng-zorro-antd'
;
import
{
MediaTypeComponent
}
from
'../modal/media-type/media-type.component'
;
@
Component
({
selector
:
'smart-send-set'
,
...
...
@@ -8,6 +9,7 @@ import {NzMessageService, NzModalService} from 'ng-zorro-antd';
styles
:
[]
})
export
class
SendSetComponent
implements
OnInit
{
@
ViewChild
(
'smartMediaType'
)
smartMediaType
:
MediaTypeComponent
;
sendList
=
[];
constructor
(
private
alarmSer
:
AlarmService
,
private
modalSer
:
NzModalService
,
...
...
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