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
4ac7c507
Commit
4ac7c507
authored
Dec 10, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f8da9b2d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
21 deletions
+32
-21
basi-check.component.html
...ain/webapp/app/modal/basi-check/basi-check.component.html
+1
-1
basi-check.component.ts
src/main/webapp/app/modal/basi-check/basi-check.component.ts
+30
-19
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+1
-1
No files found.
src/main/webapp/app/modal/basi-check/basi-check.component.html
View file @
4ac7c507
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
</ng-container>
</ng-container>
<div
class=
"modal-footer-btn"
>
<div
class=
"modal-footer-btn"
>
<button
nz-button
(
click
)="
handEditleOk
()"
nzType=
"primary"
>
完成
</button>
<button
nz-button
(
click
)="
saveTrigger
()"
nzType=
"primary"
>
完成
</button>
</div>
</div>
</nz-tab>
</nz-tab>
</nz-tabset>
</nz-tabset>
...
...
src/main/webapp/app/modal/basi-check/basi-check.component.ts
View file @
4ac7c507
...
@@ -82,7 +82,7 @@ export class BasiCheckComponent implements OnInit {
...
@@ -82,7 +82,7 @@ export class BasiCheckComponent implements OnInit {
data_type
:[
null
,[
Validators
.
required
]],
data_type
:[
null
,[
Validators
.
required
]],
units
:[
null
],
units
:[
null
],
formula
:[
null
,[
Validators
.
required
]],
formula
:[
null
,[
Validators
.
required
]],
history
:[
null
],
history
:[
'3600'
],
trends
:[
null
],
trends
:[
null
],
valuemapid
:[
null
],
valuemapid
:[
null
],
delay
:[
null
,[
Validators
.
required
]],
delay
:[
null
,[
Validators
.
required
]],
...
@@ -90,7 +90,12 @@ export class BasiCheckComponent implements OnInit {
...
@@ -90,7 +90,12 @@ export class BasiCheckComponent implements OnInit {
snmp_community
:[
null
],
snmp_community
:[
null
],
delta
:[
null
],
delta
:[
null
],
applicationids
:[
null
],
applicationids
:[
null
],
})
});
this
.
triggerObj
=
{
condition
:
''
,
faultCondition
:
''
,
itemName
:
''
};
}
}
//新增
//新增
...
@@ -114,16 +119,14 @@ export class BasiCheckComponent implements OnInit {
...
@@ -114,16 +119,14 @@ export class BasiCheckComponent implements OnInit {
this
.
hostId
=
hostId
;
this
.
hostId
=
hostId
;
this
.
isCheck
=
true
;
this
.
isCheck
=
true
;
this
.
itemId
=
id
;
this
.
itemId
=
id
;
this
.
overAllSer
.
findItemDetail
(
id
).
subscribe
(
this
.
overAllSer
.
findItemDetail
(
id
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
validateForm
=
res
.
data
[
0
];
const
data
=
res
.
data
[
0
];
this
.
validateForm
.
patchValue
(
res
.
date
[
0
]);
data
.
type
+=
''
;
// this.validateForm.type = this.validateForm.type +'';
data
.
interfaceid
+=
""
;
// this.validateForm.interfaceid = this.validateForm.interfaceid +"";
data
.
value_type
+=
""
;
// this.validateForm.value_type = this.validateForm.value_type +"";
data
.
data_type
+=
""
;
// this.validateForm.data_type = this.validateForm.data_type +"";
this
.
validateForm
.
patchValue
(
data
);
// this.validateForm.applicationids = this.validateForm.applications[0].applicationid +"";
}
}
);
);
...
@@ -172,12 +175,11 @@ export class BasiCheckComponent implements OnInit {
...
@@ -172,12 +175,11 @@ export class BasiCheckComponent implements OnInit {
this
.
overAllSer
.
create
(
this
.
validateForm
.
value
).
subscribe
(
this
.
overAllSer
.
create
(
this
.
validateForm
.
value
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
// this.isCheck = false;
this
.
message
.
success
(
"创建监测点成功"
);
// this.initForm();
// this.done.emit();
this
.
tabNum
=
1
;
this
.
tabNum
=
1
;
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
this
.
message
.
info
(
res
.
errMsg
);
},
},
(
err
)
=>
{
(
err
)
=>
{
this
.
message
.
info
(
'系统错误'
);
this
.
message
.
info
(
'系统错误'
);
...
@@ -188,8 +190,7 @@ export class BasiCheckComponent implements OnInit {
...
@@ -188,8 +190,7 @@ export class BasiCheckComponent implements OnInit {
//修改监控项
//修改监控项
update
(){
update
(){
this
.
validateForm
.
addControl
(
'itemid'
,
new
FormControl
(
this
.
itemId
));
this
.
validateForm
.
addControl
(
'itemid'
,
new
FormControl
(
this
.
itemId
));
// data.itemid = this.itemId;
this
.
overAllSer
.
itemUpdata
(
this
.
validateForm
.
value
).
subscribe
(
this
.
overAllSer
.
itemUpdata
(
this
.
validateForm
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
isCheck
=
false
;
this
.
isCheck
=
false
;
...
@@ -287,8 +288,8 @@ export class BasiCheckComponent implements OnInit {
...
@@ -287,8 +288,8 @@ export class BasiCheckComponent implements OnInit {
data
.
faultCondition
+=
'{'
+
this
.
hostName
+
':'
+
this
.
validateForm
.
value
.
key_
+
'.last()}'
+
res
.
equal
+
''
+
res
.
value
;
data
.
faultCondition
+=
'{'
+
this
.
hostName
+
':'
+
this
.
validateForm
.
value
.
key_
+
'.last()}'
+
res
.
equal
+
''
+
res
.
value
;
});
});
}
else
{
//高级
}
else
{
//高级
data
.
condition
=
this
.
validateForm
.
value
.
condition_high
;
data
.
condition
=
this
.
triggerObj
.
condition
;
data
.
faultCondition
=
this
.
validateForm
.
value
.
faultCondition_high
;
data
.
faultCondition
=
this
.
triggerObj
.
faultCondition
;
}
}
if
(
this
.
title
==
"添加监测点"
){
if
(
this
.
title
==
"添加监测点"
){
this
.
createTrigger
(
data
);
this
.
createTrigger
(
data
);
...
@@ -308,6 +309,9 @@ export class BasiCheckComponent implements OnInit {
...
@@ -308,6 +309,9 @@ export class BasiCheckComponent implements OnInit {
(
response
)
=>
{
(
response
)
=>
{
if
(
response
.
errCode
==
10000
){
if
(
response
.
errCode
==
10000
){
this
.
message
.
success
(
"创建阈值成功"
);
this
.
message
.
success
(
"创建阈值成功"
);
this
.
done
.
emit
();
this
.
initForm
();
this
.
isCheck
=
false
;
}
else
{
}
else
{
this
.
message
.
error
(
response
.
errMsg
);
this
.
message
.
error
(
response
.
errMsg
);
}
}
...
@@ -324,7 +328,14 @@ export class BasiCheckComponent implements OnInit {
...
@@ -324,7 +328,14 @@ export class BasiCheckComponent implements OnInit {
condition
:
data
.
condition
condition
:
data
.
condition
};
};
this
.
overAllSer
.
updateTrigger
(
data
).
subscribe
(
res
=>
{
this
.
overAllSer
.
updateTrigger
(
data
).
subscribe
(
res
=>
{
if
(
res
.
errCode
==
10000
){
this
.
message
.
success
(
"修改阈值成功"
);
this
.
done
.
emit
();
this
.
initForm
();
this
.
isCheck
=
false
;
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
})
})
}
}
//阈值--end
//阈值--end
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
4ac7c507
...
@@ -591,7 +591,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -591,7 +591,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//添加监测点
//添加监测点
showCheckModal
()
{
showCheckModal
()
{
this
.
smartCheck
.
showAddModal
(
this
.
hostId
);
this
.
smartCheck
.
showAddModal
(
this
.
hostId
,
this
.
hostName
);
}
}
//编辑监测点
//编辑监测点
...
...
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