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
9fc847fa
Commit
9fc847fa
authored
Jan 23, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
72775e8f
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
132 additions
and
104 deletions
+132
-104
media-type.component.html
...bapp/app/alarm/modal/media-type/media-type.component.html
+1
-1
media-type.component.ts
...webapp/app/alarm/modal/media-type/media-type.component.ts
+6
-0
create-group.component.html
...webapp/app/modal/create-group/create-group.component.html
+1
-1
create-group.component.ts
...n/webapp/app/modal/create-group/create-group.component.ts
+4
-0
discovery.component.html
src/main/webapp/app/modal/discovery/discovery.component.html
+1
-1
discovery.component.ts
src/main/webapp/app/modal/discovery/discovery.component.ts
+5
-1
modify-password.component.html
.../app/modal/modify-password/modify-password.component.html
+1
-1
modify-password.component.ts
...pp/app/modal/modify-password/modify-password.component.ts
+3
-0
new-type.component.html
src/main/webapp/app/modal/new-type/new-type.component.html
+1
-1
new-type.component.ts
src/main/webapp/app/modal/new-type/new-type.component.ts
+1
-0
pause.component.html
src/main/webapp/app/modal/pause/pause.component.html
+1
-1
pause.component.ts
src/main/webapp/app/modal/pause/pause.component.ts
+7
-1
threshold.component.html
src/main/webapp/app/modal/threshold/threshold.component.html
+95
-96
threshold.component.ts
src/main/webapp/app/modal/threshold/threshold.component.ts
+5
-0
No files found.
src/main/webapp/app/alarm/modal/media-type/media-type.component.html
View file @
9fc847fa
<nz-modal
[
nzWidth
]="
880
"
[(
nzVisible
)]="
isVisible
"
nzTitle=
"{{title}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()
"
>
<nz-modal
[
nzWidth
]="
880
"
[(
nzVisible
)]="
isVisible
"
[
nzTitle
]="
title
"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
[
nzOkLoading
]="
isOkLoading
"
>
<form
nz-form
[
formGroup
]="
validateForm
"
>
<form
nz-form
[
formGroup
]="
validateForm
"
>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"description"
>
名称
</nz-form-label>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"description"
>
名称
</nz-form-label>
...
...
src/main/webapp/app/alarm/modal/media-type/media-type.component.ts
View file @
9fc847fa
...
@@ -11,6 +11,7 @@ import {NzMessageService} from 'ng-zorro-antd';
...
@@ -11,6 +11,7 @@ import {NzMessageService} from 'ng-zorro-antd';
export
class
MediaTypeComponent
implements
OnInit
{
export
class
MediaTypeComponent
implements
OnInit
{
@
Output
()
done
=
new
EventEmitter
<
any
>
();
@
Output
()
done
=
new
EventEmitter
<
any
>
();
isVisible
=
false
;
isVisible
=
false
;
isOkLoading
=
false
;
title
;
title
;
validateForm
:
FormGroup
;
validateForm
:
FormGroup
;
...
@@ -128,6 +129,7 @@ export class MediaTypeComponent implements OnInit {
...
@@ -128,6 +129,7 @@ export class MediaTypeComponent implements OnInit {
return
false
;
return
false
;
}
}
this
.
isOkLoading
=
true
;
if
(
this
.
title
==
'新增发送方式'
)
{
if
(
this
.
title
==
'新增发送方式'
)
{
this
.
create
();
this
.
create
();
}
}
...
@@ -148,6 +150,7 @@ export class MediaTypeComponent implements OnInit {
...
@@ -148,6 +150,7 @@ export class MediaTypeComponent implements OnInit {
}
else
{
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
this
.
message
.
error
(
res
.
errMsg
);
}
}
this
.
isOkLoading
=
false
;
}
}
);
);
}
}
...
@@ -161,7 +164,10 @@ export class MediaTypeComponent implements OnInit {
...
@@ -161,7 +164,10 @@ export class MediaTypeComponent implements OnInit {
this
.
initForm
();
this
.
initForm
();
this
.
message
.
info
(
'修改成功'
);
this
.
message
.
info
(
'修改成功'
);
this
.
done
.
emit
();
this
.
done
.
emit
();
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
this
.
isOkLoading
=
false
;
}
}
);
);
}
}
...
...
src/main/webapp/app/modal/create-group/create-group.component.html
View file @
9fc847fa
<nz-modal
[(
nzVisible
)]="
isCreate
"
nzTitle=
"{{title}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<nz-modal
[(
nzVisible
)]="
isCreate
"
nzTitle=
"{{title}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
[
nzOkLoading
]="
isOkLoading
"
>
<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>
...
...
src/main/webapp/app/modal/create-group/create-group.component.ts
View file @
9fc847fa
...
@@ -22,6 +22,7 @@ export class CreateGroupComponent implements OnInit {
...
@@ -22,6 +22,7 @@ export class CreateGroupComponent implements OnInit {
title
;
title
;
isCreate
=
false
;
isCreate
=
false
;
isOkLoading
=
false
;
validateForm
:
FormGroup
;
validateForm
:
FormGroup
;
groupid
;
groupid
;
...
@@ -54,6 +55,7 @@ export class CreateGroupComponent implements OnInit {
...
@@ -54,6 +55,7 @@ export class CreateGroupComponent implements OnInit {
if
(
this
.
validateForm
.
invalid
){
if
(
this
.
validateForm
.
invalid
){
return
false
;
return
false
;
}
}
this
.
isOkLoading
=
true
;
if
(
this
.
title
==
'添加分组'
||
this
.
title
==
'添加模版组'
){
if
(
this
.
title
==
'添加分组'
||
this
.
title
==
'添加模版组'
){
this
.
create
();
this
.
create
();
...
@@ -73,6 +75,7 @@ export class CreateGroupComponent implements OnInit {
...
@@ -73,6 +75,7 @@ export class CreateGroupComponent implements OnInit {
}
else
{
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
this
.
message
.
info
(
res
.
errMsg
);
}
}
this
.
isOkLoading
=
false
;
}
}
);
);
}
}
...
@@ -93,6 +96,7 @@ export class CreateGroupComponent implements OnInit {
...
@@ -93,6 +96,7 @@ export class CreateGroupComponent implements OnInit {
}
else
{
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
this
.
message
.
info
(
res
.
errMsg
);
}
}
this
.
isOkLoading
=
false
;
}
}
);
);
}
}
...
...
src/main/webapp/app/modal/discovery/discovery.component.html
View file @
9fc847fa
<nz-modal
[
nzWidth
]="
880
"
[(
nzVisible
)]="
isVisiable
"
[
nzTitle
]="
title
"
(
nzOnCancel
)="
handleCheckCancel
()"
<nz-modal
[
nzWidth
]="
880
"
[(
nzVisible
)]="
isVisiable
"
[
nzTitle
]="
title
"
(
nzOnCancel
)="
handleCheckCancel
()"
(
nzOnOk
)="
handleCheckOk
()"
>
(
nzOnOk
)="
handleCheckOk
()"
[
nzOkLoading
]="
isOkLoading
"
>
<form
[
formGroup
]="
validateForm
"
nz-form
>
<form
[
formGroup
]="
validateForm
"
nz-form
>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"checkName"
>
名称
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"checkName"
>
名称
</nz-form-label>
...
...
src/main/webapp/app/modal/discovery/discovery.component.ts
View file @
9fc847fa
...
@@ -17,6 +17,7 @@ export class DiscoveryComponent implements OnInit {
...
@@ -17,6 +17,7 @@ export class DiscoveryComponent implements OnInit {
title
;
title
;
isVisiable
=
false
;
isVisiable
=
false
;
isOkLoading
=
false
;
nzSize
=
'large'
;
nzSize
=
'large'
;
hostId
;
//主机ID
hostId
;
//主机ID
itemId
;
//监控项id
itemId
;
//监控项id
...
@@ -87,7 +88,8 @@ export class DiscoveryComponent implements OnInit {
...
@@ -87,7 +88,8 @@ export class DiscoveryComponent implements OnInit {
this
.
validateForm
.
patchValue
({
this
.
validateForm
.
patchValue
({
status
:
d
,
status
:
d
,
hostid
:
this
.
hostId
hostid
:
this
.
hostId
})
});
this
.
isOkLoading
=
true
;
if
(
this
.
title
==
'添加自动发现'
)
{
if
(
this
.
title
==
'添加自动发现'
)
{
this
.
create
();
this
.
create
();
}
}
...
@@ -106,6 +108,7 @@ export class DiscoveryComponent implements OnInit {
...
@@ -106,6 +108,7 @@ export class DiscoveryComponent implements OnInit {
}
else
{
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
this
.
message
.
error
(
res
.
errMsg
);
}
}
this
.
isOkLoading
=
false
;
},
},
(
err
)
=>
{
(
err
)
=>
{
this
.
message
.
error
(
'系统错误'
);
this
.
message
.
error
(
'系统错误'
);
...
@@ -125,6 +128,7 @@ export class DiscoveryComponent implements OnInit {
...
@@ -125,6 +128,7 @@ export class DiscoveryComponent implements OnInit {
}
else
{
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
this
.
message
.
error
(
res
.
errMsg
);
}
}
this
.
isOkLoading
=
false
;
},
},
(
err
)
=>
{
(
err
)
=>
{
this
.
message
.
error
(
'系统错误'
);
this
.
message
.
error
(
'系统错误'
);
...
...
src/main/webapp/app/modal/modify-password/modify-password.component.html
View file @
9fc847fa
<nz-modal
[(
nzVisible
)]="
isVisible
"
[
nzTitle
]="
title
"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<nz-modal
[(
nzVisible
)]="
isVisible
"
[
nzTitle
]="
title
"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
[
nzOkLoading
]="
isOkLoading
"
>
<form
nz-form
[
formGroup
]="
validateForm
"
>
<form
nz-form
[
formGroup
]="
validateForm
"
>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"oldPassword"
>
旧密码
</nz-form-label>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"oldPassword"
>
旧密码
</nz-form-label>
...
...
src/main/webapp/app/modal/modify-password/modify-password.component.ts
View file @
9fc847fa
...
@@ -13,6 +13,7 @@ import {LoginService} from '../../shared';
...
@@ -13,6 +13,7 @@ import {LoginService} from '../../shared';
export
class
ModifyPasswordComponent
implements
OnInit
{
export
class
ModifyPasswordComponent
implements
OnInit
{
isVisible
=
false
;
isVisible
=
false
;
isOkLoading
=
false
;
title
=
'修改密码'
;
title
=
'修改密码'
;
validateForm
:
FormGroup
;
validateForm
:
FormGroup
;
...
@@ -41,6 +42,7 @@ export class ModifyPasswordComponent implements OnInit {
...
@@ -41,6 +42,7 @@ export class ModifyPasswordComponent implements OnInit {
this
.
message
.
error
(
"两次输入密码不一致"
);
this
.
message
.
error
(
"两次输入密码不一致"
);
return
false
;
return
false
;
}
}
this
.
isOkLoading
=
true
;
this
.
update
();
this
.
update
();
}
}
...
@@ -58,6 +60,7 @@ export class ModifyPasswordComponent implements OnInit {
...
@@ -58,6 +60,7 @@ export class ModifyPasswordComponent implements OnInit {
}
else
{
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
this
.
message
.
error
(
res
.
errMsg
);
}
}
this
.
isOkLoading
=
false
;
}
}
);
);
}
}
...
...
src/main/webapp/app/modal/new-type/new-type.component.html
View file @
9fc847fa
<nz-modal
[(
nzVisible
)]="
isNew
"
nzTitle=
"{{modalTitle}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<nz-modal
[(
nzVisible
)]="
isNew
"
nzTitle=
"{{modalTitle}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
[
nzOkLoading
]="
isOkLoading
"
>
<form
nz-form
>
<form
nz-form
>
<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>
...
...
src/main/webapp/app/modal/new-type/new-type.component.ts
View file @
9fc847fa
...
@@ -12,6 +12,7 @@ import { Component, OnInit, EventEmitter, Output } from '@angular/core';
...
@@ -12,6 +12,7 @@ import { Component, OnInit, EventEmitter, Output } from '@angular/core';
export
class
NewTypeComponent
implements
OnInit
{
export
class
NewTypeComponent
implements
OnInit
{
@
Output
()
data
=
new
EventEmitter
<
any
>
();
@
Output
()
data
=
new
EventEmitter
<
any
>
();
isNew
=
false
;
isNew
=
false
;
isOkLoading
=
false
;
modalTitle
;
modalTitle
;
name
;
//名称
name
;
//名称
modalMsg
=
false
;
//message
modalMsg
=
false
;
//message
...
...
src/main/webapp/app/modal/pause/pause.component.html
View file @
9fc847fa
<nz-modal
[(
nzVisible
)]="
isShow
"
nzTitle=
"{{modalTitle}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
>
<nz-modal
[(
nzVisible
)]="
isShow
"
nzTitle=
"{{modalTitle}}"
(
nzOnCancel
)="
handleCancel
()"
(
nzOnOk
)="
handleOk
()"
[
nzOkLoading
]="
isOkLoading
"
>
<form
nz-form
>
<form
nz-form
>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"startTime"
>
开始时间
</nz-form-label>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"startTime"
>
开始时间
</nz-form-label>
...
...
src/main/webapp/app/modal/pause/pause.component.ts
View file @
9fc847fa
...
@@ -14,6 +14,7 @@ export class PauseComponent implements OnInit {
...
@@ -14,6 +14,7 @@ export class PauseComponent implements OnInit {
modalTitle
=
'临时暂停(服务器时间)'
;
modalTitle
=
'临时暂停(服务器时间)'
;
typeTitle
;
typeTitle
;
isShow
=
false
;
isShow
=
false
;
isOkLoading
=
false
;
data
=
{
data
=
{
startTime
:
null
,
startTime
:
null
,
time
:
''
time
:
''
...
@@ -44,6 +45,7 @@ export class PauseComponent implements OnInit {
...
@@ -44,6 +45,7 @@ export class PauseComponent implements OnInit {
}
}
handleOk
()
{
handleOk
()
{
this
.
isOkLoading
=
true
;
if
(
this
.
typeTitle
==
'基础资源'
){
if
(
this
.
typeTitle
==
'基础资源'
){
this
.
basic
();
this
.
basic
();
}
}
...
@@ -68,6 +70,7 @@ export class PauseComponent implements OnInit {
...
@@ -68,6 +70,7 @@ export class PauseComponent implements OnInit {
}
else
{
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
this
.
message
.
error
(
res
.
errMsg
);
}
}
this
.
isOkLoading
=
false
;
}
}
);
);
}
}
...
@@ -83,8 +86,11 @@ export class PauseComponent implements OnInit {
...
@@ -83,8 +86,11 @@ export class PauseComponent implements OnInit {
if
(
res
.
errCode
==
10000
){
if
(
res
.
errCode
==
10000
){
this
.
isShow
=
false
;
this
.
isShow
=
false
;
this
.
done
.
emit
();
this
.
done
.
emit
();
this
.
message
.
success
(
"临时暂停成功"
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
this
.
message
.
info
(
res
.
errMsg
)
;
this
.
isOkLoading
=
false
;
}
}
);
);
}
}
...
...
src/main/webapp/app/modal/threshold/threshold.component.html
View file @
9fc847fa
<section>
<nz-modal
[
nzWidth
]="
880
"
[(
nzVisible
)]="
isVisiable
"
[
nzTitle
]="
title
"
[
nzOkLoading
]="
isOkLoading
"
<nz-modal
[
nzWidth
]="
880
"
[(
nzVisible
)]="
isVisiable
"
[
nzTitle
]="
title
"
(
nzOnCancel
)="
handleCheckCancel
()"
(
nzOnOk
)="
saveTrigger
()"
>
(
nzOnCancel
)="
handleCheckCancel
()"
<nz-form-item
nzFlex
>
(
nzOnOk
)="
saveTrigger
()"
>
<nz-form-control
[
nzOffset
]="
4
"
[
nzSpan
]="
14
"
>
<nz-radio-group
[(
ngModel
)]="
conditionType
"
>
<label
nz-radio-button
nzValue=
"commonly"
><span>
常规
</span></label>
<label
nz-radio-button
nzValue=
"high"
><span>
高级
</span></label>
</nz-radio-group>
</nz-form-control>
</nz-form-item>
<ng-container
*
ngIf=
"conditionType == 'commonly'"
>
<nz-form-item
class=
"form-select"
>
<nz-form-control
class=
"form-select"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<nz-form-control
nz-col
[
nzPush
]="
3
"
[
nzSpan
]="
6
"
>
<button
nz-button
nzType=
"primary"
nzSize=
"small"
(
click
)="
addcondition
()"
>
添加条件
</button>
<span>
危险阈值
</span>
</nz-form-control>
</div>
<div
nz-row
[
nzGutter
]="
12
"
*
ngFor=
"let fault of conditionList;let i = index;"
>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
></nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<nz-select
name=
"interfaces_main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
fault
.
and
"
*
ngIf=
"i>0"
>
<nz-option
nzValue=
" and "
nzLabel=
"并且"
></nz-option>
<nz-option
nzValue=
" or "
nzLabel=
"或"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
4
"
>
<button
class=
"tag-button"
nz-button
nzType=
"default"
>
返回值
</button>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<nz-select
name=
"interfaces_main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
fault
.
equal
"
>
<nz-option
nzValue=
"="
nzLabel=
"="
></nz-option>
<nz-option
nzValue=
">"
nzLabel=
">"
></nz-option>
<nz-option
nzValue=
"<"
nzLabel=
"<"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<input
type=
"text"
placeholder=
"值"
nz-input
name=
"value"
[(
ngModel
)]="
fault
.
value
"
>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
2
"
>
<button
nz-button
nzType=
"primary"
(
click
)="
deleteCondition
(
i
)"
><i
style=
"color: #fff"
class=
"anticon anticon-close-circle-o"
></i>
</button>
</nz-form-control>
</div>
</nz-form-control>
</nz-form-item>
<nz-form-item
class=
"form-select"
>
<nz-form-control
class=
"form-select"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<nz-form-control
nz-col
[
nzPush
]="
3
"
[
nzSpan
]="
6
"
>
<button
nz-button
nzType=
"primary"
nzSize=
"small"
(
click
)="
addFault
()"
>
添加条件
</button>
<span>
故障阈值
</span>
</nz-form-control>
</div>
<div
nz-row
[
nzGutter
]="
12
"
*
ngFor=
"let fault of faultConditionList;let i = index;"
>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
></nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<nz-select
name=
"interfaces_main"
[(
ngModel
)]="
fault
.
and
"
*
ngIf=
"i>0"
>
<nz-option
nzValue=
" and "
nzLabel=
"并且"
></nz-option>
<nz-option
nzValue=
" or "
nzLabel=
"或"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
4
"
>
<button
class=
"tag-button"
nz-button
nzType=
"default"
>
返回值
</button>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<nz-select
name=
"interfaces_main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
fault
.
equal
"
>
<nz-option
nzValue=
"="
nzLabel=
"="
></nz-option>
<nz-option
nzValue=
">"
nzLabel=
">"
></nz-option>
<nz-option
nzValue=
"<"
nzLabel=
"<"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<input
type=
"text"
placeholder=
"值"
nz-input
name=
"value"
[(
ngModel
)]="
fault
.
value
"
>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
2
"
>
<button
nz-button
nzType=
"primary"
(
click
)="
deleteFault
(
i
)"
><i
style=
"color: #fff"
class=
"anticon anticon-close-circle-o"
></i>
</button>
</nz-form-control>
</div>
</nz-form-control>
</nz-form-item>
</ng-container>
<ng-container
*
ngIf=
"conditionType == 'high'"
>
<nz-form-item
nzFlex
>
<nz-form-item
nzFlex
>
<nz-form-control
[
nzOffset
]="
4
"
[
nzSpan
]="
14
"
>
<nz-form-control
[
nzOffset
]="
4
"
[
nzSpan
]="
14
"
>
<
nz-radio-group
[(
ngModel
)]="
conditionType
"
>
<
p>
危险阈值
</p
>
<label
nz-radio-button
nzValue=
"commonly"
><span>
常规
</span></label
>
<textarea
rows=
"4"
nz-input
[(
ngModel
)]="
triggerObj
.
condition
"
></textarea
>
<label
nz-radio-button
nzValue=
"high"
><span>
高级
</span></label
>
<p>
故障阈值
</p
>
<
/nz-radio-group
>
<
textarea
rows=
"4"
nz-input
[(
ngModel
)]="
triggerObj
.
faultCondition
"
></textarea
>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<ng-container
*
ngIf=
"conditionType == 'commonly'"
>
</ng-container>
<nz-form-item
class=
"form-select"
>
</nz-modal>
<nz-form-control
class=
"form-select"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<nz-form-control
nz-col
[
nzPush
]="
3
"
[
nzSpan
]="
6
"
>
<button
nz-button
nzType=
"primary"
nzSize=
"small"
(
click
)="
addcondition
()"
>
添加条件
</button>
<span>
危险阈值
</span>
</nz-form-control>
</div>
<div
nz-row
[
nzGutter
]="
12
"
*
ngFor=
"let fault of conditionList;let i = index;"
>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
></nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<nz-select
name=
"interfaces_main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
fault
.
and
"
*
ngIf=
"i>0"
>
<nz-option
nzValue=
" and "
nzLabel=
"并且"
></nz-option>
<nz-option
nzValue=
" or "
nzLabel=
"或"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
4
"
>
<button
class=
"tag-button"
nz-button
nzType=
"default"
>
返回值
</button>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<nz-select
name=
"interfaces_main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
fault
.
equal
"
>
<nz-option
nzValue=
"="
nzLabel=
"="
></nz-option>
<nz-option
nzValue=
">"
nzLabel=
">"
></nz-option>
<nz-option
nzValue=
"<"
nzLabel=
"<"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<input
type=
"text"
placeholder=
"值"
nz-input
name=
"value"
[(
ngModel
)]="
fault
.
value
"
>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
2
"
>
<button
nz-button
nzType=
"primary"
(
click
)="
deleteCondition
(
i
)"
><i
style=
"color: #fff"
class=
"anticon anticon-close-circle-o"
></i></button>
</nz-form-control>
</div>
</nz-form-control>
</nz-form-item>
<nz-form-item
class=
"form-select"
>
<nz-form-control
class=
"form-select"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<nz-form-control
nz-col
[
nzPush
]="
3
"
[
nzSpan
]="
6
"
>
<button
nz-button
nzType=
"primary"
nzSize=
"small"
(
click
)="
addFault
()"
>
添加条件
</button>
<span>
故障阈值
</span>
</nz-form-control>
</div>
<div
nz-row
[
nzGutter
]="
12
"
*
ngFor=
"let fault of faultConditionList;let i = index;"
>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
></nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<nz-select
name=
"interfaces_main"
[(
ngModel
)]="
fault
.
and
"
*
ngIf=
"i>0"
>
<nz-option
nzValue=
" and "
nzLabel=
"并且"
></nz-option>
<nz-option
nzValue=
" or "
nzLabel=
"或"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
4
"
>
<button
class=
"tag-button"
nz-button
nzType=
"default"
>
返回值
</button>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<nz-select
name=
"interfaces_main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
fault
.
equal
"
>
<nz-option
nzValue=
"="
nzLabel=
"="
></nz-option>
<nz-option
nzValue=
">"
nzLabel=
">"
></nz-option>
<nz-option
nzValue=
"<"
nzLabel=
"<"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<input
type=
"text"
placeholder=
"值"
nz-input
name=
"value"
[(
ngModel
)]="
fault
.
value
"
>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
2
"
>
<button
nz-button
nzType=
"primary"
(
click
)="
deleteFault
(
i
)"
><i
style=
"color: #fff"
class=
"anticon anticon-close-circle-o"
></i></button>
</nz-form-control>
</div>
</nz-form-control>
</nz-form-item>
</ng-container>
<ng-container
*
ngIf=
"conditionType == 'high'"
>
<nz-form-item
nzFlex
>
<nz-form-control
[
nzOffset
]="
4
"
[
nzSpan
]="
14
"
>
<p>
危险阈值
</p>
<textarea
rows=
"4"
nz-input
[(
ngModel
)]="
triggerObj
.
condition
"
></textarea>
<p>
故障阈值
</p>
<textarea
rows=
"4"
nz-input
[(
ngModel
)]="
triggerObj
.
faultCondition
"
></textarea>
</nz-form-control>
</nz-form-item>
</ng-container>
</nz-modal>
</section>
src/main/webapp/app/modal/threshold/threshold.component.ts
View file @
9fc847fa
...
@@ -12,6 +12,7 @@ export class ThresholdComponent implements OnInit {
...
@@ -12,6 +12,7 @@ export class ThresholdComponent implements OnInit {
@
Output
()
done
=
new
EventEmitter
<
any
>
();
@
Output
()
done
=
new
EventEmitter
<
any
>
();
isVisiable
=
false
;
isVisiable
=
false
;
isOkLoading
=
false
;
title
;
title
;
itemId
;
//监控项ID
itemId
;
//监控项ID
hostName
;
//主机name
hostName
;
//主机name
...
@@ -179,6 +180,8 @@ export class ThresholdComponent implements OnInit {
...
@@ -179,6 +180,8 @@ export class ThresholdComponent implements OnInit {
return
false
;
return
false
;
}
}
this
.
isOkLoading
=
true
;
if
(
this
.
title
==
'添加阈值'
)
{
if
(
this
.
title
==
'添加阈值'
)
{
if
(
this
.
conditionList
.
length
==
0
&&
this
.
faultConditionList
.
length
==
0
)
{
if
(
this
.
conditionList
.
length
==
0
&&
this
.
faultConditionList
.
length
==
0
)
{
this
.
isVisiable
=
false
;
this
.
isVisiable
=
false
;
...
@@ -229,6 +232,7 @@ export class ThresholdComponent implements OnInit {
...
@@ -229,6 +232,7 @@ export class ThresholdComponent implements OnInit {
}
else
{
}
else
{
this
.
message
.
error
(
response
.
errMsg
);
this
.
message
.
error
(
response
.
errMsg
);
}
}
this
.
isOkLoading
=
false
;
}
}
);
);
}
}
...
@@ -256,6 +260,7 @@ export class ThresholdComponent implements OnInit {
...
@@ -256,6 +260,7 @@ export class ThresholdComponent implements OnInit {
}
else
{
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
this
.
message
.
error
(
res
.
errMsg
);
}
}
this
.
isOkLoading
=
false
;
});
});
}
}
...
...
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