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
1c0a45ba
Commit
1c0a45ba
authored
Dec 12, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
a03d9f45
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
169 additions
and
83 deletions
+169
-83
alarm-list.component.ts
src/main/webapp/app/alarm/alarm-list/alarm-list.component.ts
+0
-1
basi-check.component.html
...ain/webapp/app/modal/basi-check/basi-check.component.html
+25
-15
basi-check.component.ts
src/main/webapp/app/modal/basi-check/basi-check.component.ts
+32
-11
basic-edit.component.html
...ain/webapp/app/modal/basic-edit/basic-edit.component.html
+12
-13
basic-edit.component.ts
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
+51
-37
pause.component.ts
src/main/webapp/app/modal/pause/pause.component.ts
+13
-2
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+1
-1
basic.component.html
src/main/webapp/app/overAll/basic/basic.component.html
+4
-3
network-check.component.ts
...bapp/app/overAll/network-check/network-check.component.ts
+30
-0
power.component.html
src/main/webapp/app/system/power/power.component.html
+1
-0
No files found.
src/main/webapp/app/alarm/alarm-list/alarm-list.component.ts
View file @
1c0a45ba
...
...
@@ -132,7 +132,6 @@ export class AlarmListComponent implements OnInit {
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
this
.
dateBegin
,
'yyyy-MM-dd HH:mm:ss'
);
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
this
.
dateEnd
,
'yyyy-MM-dd HH:mm:ss'
);
}
console
.
log
(
this
.
obj
);
this
.
warnList
.
getList
(
this
.
obj
);
}
}
src/main/webapp/app/modal/basi-check/basi-check.component.html
View file @
1c0a45ba
...
...
@@ -160,10 +160,16 @@
</nz-form-control>
</nz-form-item>
<ng-container
*
ngIf=
"conditionType == 'commonly'"
>
<nz-form-item
class=
"form-select"
*
ngFor=
"let fault of faultConditionList;let i = index;"
>
<nz-form-label
[
nzSpan
]="
3
"
>
<span
*
ngIf=
"i == 0"
>
危险阈值
</span>
</nz-form-label>
<nz-form-control
[
nzSpan
]="
18
"
class=
"form-select"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<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"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
fault
.
and
"
*
ngIf=
"i>0"
>
<nz-option
nzValue=
" and "
nzLabel=
"并且"
></nz-option>
...
...
@@ -180,21 +186,26 @@
<nz-option
nzValue=
"<"
nzLabel=
"<"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<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
]="
3
"
>
<button
*
ngIf=
"i == 0"
nz-button
nzType=
"primary"
(
click
)="
addFault
()"
>
添加条件
</button>
<button
*
ngIf=
"i > 0"
nz-button
nzType=
"primary"
(
click
)="
deleteFault
(
i
)"
><i
class=
"anticon anticon-close-circle-o"
></i></button>
<nz-form-control
nz-col
[
nzSpan
]="
2
"
>
<button
nz-button
nzType=
"primary"
(
click
)="
deleteFault
(
i
)"
><i
class=
"anticon anticon-close-circle-o"
></i></button>
</nz-form-control>
</div>
</nz-form-control>
</nz-form-item>
<nz-form-item
class=
"form-select"
*
ngFor=
"let fault of conditionList;let i = index;"
>
<nz-form-label
[
nzSpan
]="
3
"
><span
*
ngIf=
"i == 0;"
>
故障阈值
</span></nz-form-label>
<nz-form-control
[
nzSpan
]="
18
"
class=
"form-select"
>
<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"
[(
ngModel
)]="
fault
.
and
"
*
ngIf=
"i>0"
>
<nz-option
nzValue=
" and "
nzLabel=
"并且"
></nz-option>
...
...
@@ -211,12 +222,11 @@
<nz-option
nzValue=
"<"
nzLabel=
"<"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<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
]="
3
"
>
<button
*
ngIf=
"i == 0"
nz-button
nzType=
"primary"
(
click
)="
addcondition
()"
>
添加条件
</button>
<button
*
ngIf=
"i > 0"
nz-button
nzType=
"primary"
(
click
)="
deleteCondition
(
i
)"
><i
class=
"anticon anticon-close-circle-o"
></i></button>
<nz-form-control
nz-col
[
nzSpan
]="
2
"
>
<button
nz-button
nzType=
"primary"
(
click
)="
deleteCondition
(
i
)"
><i
class=
"anticon anticon-close-circle-o"
></i></button>
</nz-form-control>
</div>
</nz-form-control>
...
...
src/main/webapp/app/modal/basi-check/basi-check.component.ts
View file @
1c0a45ba
...
...
@@ -45,18 +45,10 @@ export class BasiCheckComponent implements OnInit {
interval
;
//间隔时长
conditionType
=
'commonly'
;
faultConditionList
=
[
{
and
:
' and '
,
equal
:
'='
,
value
:
''
,
}
];
//危险阀值list
conditionList
=
[
{
and
:
' and '
,
equal
:
'='
,
value
:
''
,
}
];
//故障list
tabNum
:
number
;
triggerObj
=
{
...
...
@@ -356,7 +348,6 @@ export class BasiCheckComponent implements OnInit {
if
(
!
res
.
and
){
res
.
and
=
""
;
}
console
.
log
(
res
);
data
.
condition
+=
res
.
and
+
'{'
+
this
.
hostName
+
':'
+
this
.
validateForm
.
value
.
key_
+
'.last()}'
+
res
.
equal
+
''
+
res
.
value
;
});
this
.
faultConditionList
.
forEach
(
res
=>
{
...
...
@@ -369,6 +360,15 @@ export class BasiCheckComponent implements OnInit {
data
.
condition
=
this
.
triggerObj
.
condition
;
data
.
faultCondition
=
this
.
triggerObj
.
faultCondition
;
}
if
(
!
this
.
checkFun
()){
this
.
message
.
error
(
"请输入阈值"
);
return
false
;
}
if
(
this
.
conditionList
.
length
==
0
&&
this
.
faultConditionList
.
length
==
0
){
this
.
isCheck
=
false
;
this
.
initForm
();
return
false
;
}
if
(
this
.
title
==
'添加监测点'
)
{
this
.
createTrigger
(
data
);
}
...
...
@@ -377,6 +377,27 @@ export class BasiCheckComponent implements OnInit {
}
}
//校验是否填值
checkFun
(){
let
error
=
true
;
this
.
conditionList
.
map
(
e
=>
{
if
(
e
.
value
.
length
>
0
){
console
.
log
(
e
.
value
)
}
else
{
error
=
false
;
}
});
this
.
faultConditionList
.
map
(
e
=>
{
if
(
e
.
value
.
length
>
0
){
console
.
log
(
e
.
value
)
}
else
{
error
=
false
;
}
});
return
error
;
}
//1.创建阈值
createTrigger
(
data
)
{
const
res
=
{
...
...
src/main/webapp/app/modal/basic-edit/basic-edit.component.html
View file @
1c0a45ba
...
...
@@ -336,7 +336,6 @@
<button
nz-button
(
click
)="
handleEditCancel
()"
nzType=
"primary"
>
取消
</button>
<button
nz-button
(
click
)="
tabsChange
(
0
)"
nzType=
"primary"
>
上一步
</button>
<button
nz-button
(
click
)="
tabsChange
(
2
)"
nzType=
"primary"
>
下一步
</button>
<button
nz-button
(
click
)="
handEditleOk
()"
nzType=
"primary"
>
完成
</button>
</div>
</nz-tab>
...
...
@@ -409,7 +408,7 @@
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
nzFor=
"equipmentTypeid"
>
资产名称
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
nz-input
placeholder=
"资产名称"
name=
"name"
[(
ngModel
)]="
validateForm
.
name
"
>
<input
nz-input
placeholder=
"资产名称"
name=
"name"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
name
"
>
</nz-form-control>
</nz-form-item>
</div>
...
...
@@ -418,7 +417,7 @@
<nz-form-item
nzFlex
>
<nz-form-label
[
nzSpan
]="
6
"
>
负责人
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
nz-input
placeholder=
"负责人"
>
<input
nz-input
placeholder=
"负责人"
name=
"person"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
person
"
>
</nz-form-control>
</nz-form-item>
</div>
...
...
@@ -430,14 +429,14 @@
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
nzFor=
"secondLevelType"
>
资产数量
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
nz-input
placeholder=
"资产数量"
>
<input
nz-input
placeholder=
"资产数量"
name=
"inventorycount"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
inventorycount
"
>
</nz-form-control>
</nz-form-item>
</div>
<div
nz-col
[
nzSpan
]="
12
"
>
<nz-form-item
nzFlex
>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"
serialnoA
"
>
品牌
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"
invertoryname
"
>
品牌
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
nz-input
placeholder=
"品牌"
name=
"invertoryname"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
invertoryname
"
>
</nz-form-control>
...
...
@@ -450,7 +449,7 @@
<nz-form-item
nzFlex
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
>
库存
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
nz-input
placeholder=
"库存"
>
<input
nz-input
placeholder=
"库存"
name=
"stock"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
stock
"
>
</nz-form-control>
</nz-form-item>
</div>
...
...
@@ -459,7 +458,7 @@
<nz-form-item
nzFlex
>
<nz-form-label
[
nzSpan
]="
6
"
>
型号
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
nz-input
placeholder=
"型号"
name=
"serialnoA"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
serialnoA
"
>
<input
nz-input
placeholder=
"型号"
name=
"serialnoA"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
serialnoA
"
>
</nz-form-control>
</nz-form-item>
</div>
...
...
@@ -470,7 +469,7 @@
<nz-form-item
nzFlex
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
>
使用
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
nz-input
placeholder=
"使用"
>
<input
nz-input
placeholder=
"使用"
name=
"usedcount"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
usedcount
"
>
</nz-form-control>
</nz-form-item>
</div>
...
...
@@ -489,7 +488,7 @@
<nz-form-item
nzFlex
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
>
借出
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
nz-input
placeholder=
"借出"
>
<input
nz-input
placeholder=
"借出"
name=
"lendcount"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
lendcount
"
>
</nz-form-control>
</nz-form-item>
</div>
...
...
@@ -509,7 +508,7 @@
<nz-form-item
nzFlex
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
>
维修
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
nz-input
placeholder=
"维修"
>
<input
nz-input
placeholder=
"维修"
name=
"repaircount"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
repaircount
"
>
</nz-form-control>
</nz-form-item>
</div>
...
...
@@ -518,7 +517,7 @@
<nz-form-item
nzFlex
>
<nz-form-label
[
nzSpan
]="
6
"
>
存放地点
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
nz-input
placeholder=
"存放地点"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
storageLocation
"
>
<input
nz-input
placeholder=
"存放地点"
name=
"storageLocation"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
storageLocation
"
>
</nz-form-control>
</nz-form-item>
</div>
...
...
@@ -529,7 +528,7 @@
<nz-form-item
nzFlex
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
>
报废
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
nz-input
placeholder=
"报废"
>
<input
nz-input
placeholder=
"报废"
name=
"scrapcount"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
scrapcount
"
>
</nz-form-control>
</nz-form-item>
</div>
...
...
@@ -539,7 +538,7 @@
<div
class=
"modal-footer-btn"
>
<button
nz-button
(
click
)="
handleEditCancel
()"
nzType=
"primary"
>
取消
</button>
<button
nz-button
(
click
)="
tabsChange
(
1
)"
nzType=
"primary"
>
上一步
</button>
<button
nz-button
(
click
)="
hand
leEditCancel
()"
nzType=
"primary"
>
完成
</button>
<button
nz-button
(
click
)="
hand
EditleOk
()"
nzType=
"primary"
>
完成
</button>
</div>
</nz-tab>
</nz-tabset>
...
...
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
View file @
1c0a45ba
...
...
@@ -59,7 +59,7 @@ export class BasicEditComponent implements OnInit {
}
//获取分组
getGroup
(){
getGroup
()
{
this
.
groupList
=
[];
this
.
overAllSer
.
findGroup
().
subscribe
(
(
res
)
=>
{
...
...
@@ -100,15 +100,12 @@ export class BasicEditComponent implements OnInit {
this
.
validateForm
.
tls_issuer
=
data
.
tls_issuer
+
''
;
this
.
validateForm
.
tls_subject
=
data
.
tls_subject
+
''
;
this
.
validateForm
.
tls_psk
=
data
.
tls_psk
+
''
;
this
.
validateForm
.
inventoryExtend
=
data
.
inventoryExtend
;
this
.
validateForm
.
hostExtend
.
equipmentTypeid
=
data
.
hostExtend
.
equipmentTypeid
+
''
;
this
.
validateForm
.
hostExtend
.
secondLevelTypeid
=
data
.
hostExtend
.
secondLevelTypeid
+
''
;
this
.
validateForm
.
hostExtend
.
serviceid
=
data
.
hostExtend
.
serviceid
+
''
;
this
.
validateForm
.
inventoryExtend
=
data
.
inventory
;
this
.
validateForm
.
hostExtend
=
data
.
hostExtend
;
this
.
validateForm
.
groups
=
data
.
groups
;
if
(
data
.
parentTemplates
)
{
if
(
data
.
parentTemplates
)
{
let
tempArr
=
[];
tempArr
=
data
.
parentTemplates
.
map
(
res
=>
{
tempArr
=
data
.
parentTemplates
.
map
(
res
=>
{
return
res
.
templateid
;
});
this
.
validateForm
.
templates
=
tempArr
;
...
...
@@ -120,6 +117,13 @@ export class BasicEditComponent implements OnInit {
res
.
type
=
res
.
type
+
''
;
});
this
.
hostTypeChildrenList
=
[];
this
.
hostTypeList
.
forEach
(
res
=>
{
if
(
this
.
validateForm
.
hostExtend
.
equipmentTypeid
==
res
.
id
)
{
this
.
hostTypeChildrenList
=
res
.
childs
;
}
});
if
(
data
.
macros
)
{
this
.
macroList1
=
data
.
macros
;
}
...
...
@@ -136,21 +140,20 @@ export class BasicEditComponent implements OnInit {
}
//确定
handEditleOk
(){
if
(
!
this
.
validateForm
.
hostExtend
.
equipmentTypeid
)
{
handEditleOk
()
{
if
(
!
this
.
validateForm
.
hostExtend
.
equipmentTypeid
)
{
this
.
message
.
info
(
'请选择选择设备类型'
);
return
false
;
}
if
(
!
this
.
validateForm
.
hostExtend
.
secondLevelTypeid
)
{
if
(
!
this
.
validateForm
.
hostExtend
.
secondLevelTypeid
)
{
this
.
message
.
info
(
'请选择选择二级类型'
);
return
false
;
}
if
(
!
this
.
validateForm
.
name
)
{
if
(
!
this
.
validateForm
.
name
)
{
this
.
message
.
info
(
'请输入显示名'
);
return
false
;
}
if
(
!
this
.
validateForm
.
host
)
{
if
(
!
this
.
validateForm
.
host
)
{
this
.
message
.
info
(
'请输入IP地址'
);
return
false
;
}
...
...
@@ -163,12 +166,12 @@ export class BasicEditComponent implements OnInit {
groupArr
.
push
(
groupid
);
}
}
this
.
interfaceslist
.
forEach
(
res
=>
{
if
(
res
.
bulk
)
{
res
.
bulk
=
'1'
;
}
else
{
res
.
bulk
=
'0'
;
}
this
.
interfaceslist
.
forEach
(
res
=>
{
if
(
res
.
bulk
)
{
res
.
bulk
=
'1'
;
}
else
{
res
.
bulk
=
'0'
;
}
});
this
.
validateForm
.
groups
=
groupArr
;
...
...
@@ -191,8 +194,10 @@ export class BasicEditComponent implements OnInit {
this
.
initForm
();
this
.
getGroup
();
this
.
done
.
emit
();
this
.
message
.
success
(
"创建成功"
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
this
.
message
.
info
(
res
.
errMsg
);
},
(
err
)
=>
{
this
.
message
.
info
(
'系统错误'
);
...
...
@@ -205,8 +210,8 @@ export class BasicEditComponent implements OnInit {
//比较监控模版是否发生变化
const
clearArr
=
[];
this
.
templatesResoure
.
forEach
(
res
=>
{
if
(
this
.
validateForm
.
templates
.
indexOf
(
res
)
==
-
1
)
{
this
.
templatesResoure
.
forEach
(
res
=>
{
if
(
this
.
validateForm
.
templates
.
indexOf
(
res
)
==
-
1
)
{
clearArr
.
push
(
res
);
}
});
...
...
@@ -225,8 +230,10 @@ export class BasicEditComponent implements OnInit {
this
.
done
.
emit
();
this
.
initForm
();
this
.
getGroup
();
this
.
message
.
success
(
"修改成功"
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
this
.
message
.
info
(
res
.
errMsg
);
},
(
err
)
=>
{
this
.
message
.
info
(
'系统错误'
);
...
...
@@ -256,27 +263,27 @@ export class BasicEditComponent implements OnInit {
}
//获取设备类型
getTree
(){
getTree
()
{
this
.
overAllSer
.
findTree
().
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
hostTypeList
=
res
.
data
;
}
else
{
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
}
}
)
)
;
}
//
getChildren
(
item
){
//
二级类型的list
getChildren
(
item
)
{
this
.
hostTypeChildrenList
=
[];
this
.
validateForm
.
hostExtend
.
secondLevelTypeid
=
null
;
this
.
hostTypeList
.
forEach
(
res
=>
{
if
(
item
==
res
.
id
)
{
this
.
hostTypeChildrenList
=
res
.
childs
;
}
})
this
.
hostTypeList
.
forEach
(
res
=>
{
if
(
item
==
res
.
id
)
{
this
.
hostTypeChildrenList
=
res
.
childs
;
}
});
}
//接口add
...
...
@@ -400,7 +407,14 @@ export class BasicEditComponent implements OnInit {
mac
:
null
,
storageLocation
:
null
,
maintenanceExpiration
:
null
,
name
:
null
name
:
null
,
person
:
null
,
ip
:
null
,
usedcount
:
null
,
stock
:
null
,
lendcount
:
null
,
repaircount
:
null
,
scrapcount
:
null
,
},
templates
:
null
,
name
:
null
,
...
...
src/main/webapp/app/modal/pause/pause.component.ts
View file @
1c0a45ba
...
...
@@ -26,6 +26,13 @@ export class PauseComponent implements OnInit {
ngOnInit
()
{
}
initForm
(){
this
.
data
=
{
startTime
:
null
,
time
:
''
};
}
showModal
(
id
,
type
)
{
this
.
id
=
id
;
this
.
typeTitle
=
type
;
...
...
@@ -48,15 +55,18 @@ export class PauseComponent implements OnInit {
basic
(){
const
data
=
{
hostId
:
Number
(
this
.
id
),
startTime
:
this
.
datePipe
.
transform
(
this
.
data
.
startTime
,
'yyyy-MM-dd HH:
MM
:ss'
),
startTime
:
this
.
datePipe
.
transform
(
this
.
data
.
startTime
,
'yyyy-MM-dd HH:
mm
:ss'
),
time
:
Number
(
this
.
data
.
time
)
};
this
.
overAllSer
.
tempStop
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
isShow
=
false
;
this
.
initForm
();
this
.
message
.
success
(
"临时暂停成功"
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
this
.
message
.
info
(
res
.
errMsg
);
}
);
}
...
...
@@ -71,6 +81,7 @@ export class PauseComponent implements OnInit {
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
isShow
=
false
;
this
.
done
.
emit
()
this
.
done
.
emit
();
}
this
.
message
.
info
(
res
.
errMsg
);
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
1c0a45ba
...
...
@@ -615,7 +615,6 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//添加or编辑监测点 之后
getList
(){
this
.
getCheckList
();
this
.
getCheckStatus
();
this
.
findItemType
();
}
...
...
@@ -647,6 +646,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//监测点列表
getCheckList
()
{
this
.
getCheckStatus
();
this
.
loading
=
true
;
const
data
=
{
pageNum
:
this
.
pageIndex
,
...
...
src/main/webapp/app/overAll/basic/basic.component.html
View file @
1c0a45ba
...
...
@@ -107,8 +107,8 @@
<td
class=
"round-tag"
>
<nz-tag
*
ngIf=
"item.maxLevel == 4 || item.maxLevel == 5"
[
nzColor
]="
color
.
red
"
></nz-tag>
<nz-tag
*
ngIf=
"item.maxLevel == 2 || item.maxLevel == 3"
[
nzColor
]="
col
.
yellow
"
></nz-tag>
<nz-tag
*
ngIf=
"item.maxLevel < 2"
[
nzColor
]="
col
.
green
"
></nz-tag>
<nz-tag
*
ngIf=
"item.maxLevel == 2 || item.maxLevel == 3"
[
nzColor
]="
col
or
.
yellow
"
></nz-tag>
<nz-tag
*
ngIf=
"item.maxLevel < 2"
[
nzColor
]="
col
or
.
green
"
></nz-tag>
</td>
<td>
<span
(
click
)="
goTOInventory
(
item
?.
inventory
?.
id
)"
>
{{item?.inventory?.name}}
</span>
...
...
@@ -386,6 +386,6 @@
<!--添加分组-->
<smart-create-group
#
smartCreateGroup
(
add
)="
handleOk
($
event
)"
></smart-create-group>
<!--临时暂停-->
<smart-pause
#
smartPause
></smart-pause>
<smart-pause
#
smartPause
(
done
)="
handleOk
($
event
)"
></smart-pause>
<!--添加告警-->
<smart-alarm-modal
#
smartAlarmModal
></smart-alarm-modal>
\ No newline at end of file
src/main/webapp/app/overAll/network-check/network-check.component.ts
View file @
1c0a45ba
...
...
@@ -184,6 +184,36 @@ export class NetworkCheckComponent implements OnInit {
});
}
//单个删除
showDeleteConfirm
(
item
){
this
.
modalService
.
confirm
({
nzTitle
:
'删除'
,
nzContent
:
'<b style="color: red;">确认要删除该网站监测吗?</b>'
,
nzOkText
:
'确定'
,
nzOkType
:
'danger'
,
nzOnOk
:
()
=>
{
let
arr
=
[];
arr
.
push
(
item
.
httptestid
);
const
data
=
{
ids
:
arr
}
this
.
overAllSer
.
deleteBatch
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
info
(
'删除成功'
);
this
.
batchSelectList
=
[];
this
.
getwebList
();
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
}
}
);
},
nzCancelText
:
'取消'
,
nzOnCancel
:
()
=>
console
.
log
(
'Cancel'
)
});
}
//临时暂停
showTempStop
(
item
){
this
.
smartPause
.
showModal
(
item
.
httptestid
,
'网站监测'
);
...
...
src/main/webapp/app/system/power/power.component.html
View file @
1c0a45ba
...
...
@@ -20,6 +20,7 @@
<div
nz-row
class=
"search-form"
>
<div
nz-col
nzSpan=
"16"
>
<button
(
click
)="
showAddRoleModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
sanyuanfenli
</button>
<button
(
click
)="
showAddRoleModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
新增角色
</button>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
...
...
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