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
db2204d9
Commit
db2204d9
authored
Jan 10, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
template
parent
c38ed6a2
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
15 deletions
+22
-15
basi-check.component.html
...ain/webapp/app/modal/basi-check/basi-check.component.html
+2
-0
basi-check.component.ts
src/main/webapp/app/modal/basi-check/basi-check.component.ts
+15
-8
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+1
-1
basic.component.ts
src/main/webapp/app/overAll/basic/basic.component.ts
+1
-1
template.component.html
src/main/webapp/app/overAll/template/template.component.html
+2
-4
template.component.ts
src/main/webapp/app/overAll/template/template.component.ts
+1
-1
No files found.
src/main/webapp/app/modal/basi-check/basi-check.component.html
View file @
db2204d9
...
...
@@ -33,6 +33,7 @@
<nz-form-explain
*
ngIf=
"validateForm.get('type').dirty && validateForm.get('type').errors"
>
请选择监测点类型!
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<ng-container
*
ngIf=
"isInterface"
>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"interfaceid"
>
主机接口
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
...
...
@@ -43,6 +44,7 @@
<nz-form-explain
*
ngIf=
"validateForm.get('interfaceid').dirty && validateForm.get('interfaceid').errors"
>
请选择主机接口!
</nz-form-explain>
</nz-form-control>
</nz-form-item>
</ng-container>
<ng-container
*
ngIf=
"validateForm.value.type == 1 || validateForm.value.type == 4 || validateForm.value.type == 6"
>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"snmp_oid"
>
SNMP OID
</nz-form-label>
...
...
src/main/webapp/app/modal/basi-check/basi-check.component.ts
View file @
db2204d9
...
...
@@ -35,6 +35,7 @@ export class BasiCheckComponent implements OnInit {
title
;
isCheck
=
false
;
isInterface
=
true
;
nzSize
=
'large'
;
hostId
;
//主机ID
hostName
;
//主机name
...
...
@@ -71,10 +72,8 @@ export class BasiCheckComponent implements OnInit {
value_type
:
[
null
,
[
Validators
.
required
]],
type
:
[
null
,
[
Validators
.
required
]],
units
:
[
null
],
// formula: [null, [Validators.required]],
history
:
[
'3600'
],
trends
:
[
null
],
// valuemapid: ['0'],
delay
:
[
null
,
[
Validators
.
required
]],
snmp_oid
:
[
'interfaces.ifTable.ifEntry.ifInOctets.1'
],
snmp_community
:
[
'public'
],
...
...
@@ -88,17 +87,25 @@ export class BasiCheckComponent implements OnInit {
}
//新增
showAddModal
(
hostId
,
hostName
)
{
this
.
title
=
'添加监测点'
;
this
.
isCheck
=
true
;
this
.
hostId
=
hostId
;
this
.
hostName
=
hostName
;
showAddModal
(
hostId
,
hostName
,
title
)
{
this
.
title
=
title
;
if
(
this
.
title
==
'添加监测点'
){
//主机接口
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
this
.
interfaceList
=
res
.
data
[
0
].
interfaces
;
}
);
this
.
isInterface
=
true
;
this
.
validateForm
.
get
(
'interfaceid'
).
setValidators
(
Validators
.
email
);
}
if
(
this
.
title
==
'添加模版监测点'
){
this
.
isInterface
=
false
;
this
.
validateForm
.
get
(
'interfaceid'
).
clearValidators
();
}
this
.
isCheck
=
true
;
this
.
hostId
=
hostId
;
this
.
hostName
=
hostName
;
this
.
getItemType
();
}
...
...
@@ -171,7 +178,7 @@ export class BasiCheckComponent implements OnInit {
}
this
.
validateForm
.
value
.
applications
=
[
this
.
validateForm
.
value
.
applications
];
this
.
validateForm
.
value
.
hostid
=
this
.
hostId
;
if
(
this
.
title
==
'添加监测点'
)
{
if
(
this
.
title
==
'添加监测点'
||
this
.
title
==
"添加模版监测点"
)
{
this
.
create
();
}
if
(
this
.
title
==
'编辑监测点'
)
{
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
db2204d9
...
...
@@ -626,7 +626,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//添加监测点
showCheckModal
()
{
this
.
smartCheck
.
showAddModal
(
this
.
hostId
,
this
.
realName
);
this
.
smartCheck
.
showAddModal
(
this
.
hostId
,
this
.
realName
,
'添加监测点'
);
}
//编辑监测点
...
...
src/main/webapp/app/overAll/basic/basic.component.ts
View file @
db2204d9
...
...
@@ -213,7 +213,7 @@ export class BasicComponent implements OnInit {
//添加监测点
showBasicCheckModal
(
hostid
,
host
)
{
this
.
smartCheck
.
showAddModal
(
hostid
,
host
);
this
.
smartCheck
.
showAddModal
(
hostid
,
host
,
'添加监测点'
);
}
//列表
...
...
src/main/webapp/app/overAll/template/template.component.html
View file @
db2204d9
...
...
@@ -77,14 +77,13 @@
<span
(
click
)="
showDeleteGroupConfirm
(
item
)"
>
删除
</span>
</ng-container>
<ng-container
*
ngIf=
"item.level"
>
<span
(
click
)="
showBasicCheckModal
(
item
.
host
id
,
item
.
host
)"
>
添加监测点
</span>
<span
(
click
)="
showBasicCheckModal
(
item
.
template
id
,
item
.
host
)"
>
添加监测点
</span>
<span
(
click
)="
showTempEditModal
(
item
)"
>
编辑
</span>
<span
(
click
)="
showDeleteConfirm
(
item
)"
>
删除
</span>
<nz-dropdown
[
nzTrigger
]="'
click
'"
class=
"table-dropdown"
>
<a
nz-dropdown
>
更多
<i
class=
"anticon anticon-down"
></i>
</a>
<ul
nz-menu
nzSelectable
>
<li
*
ngIf=
"!item.monitorTask"
(
click
)="
showTempStop
(
item
)"
nz-menu-item
><a>
临时暂停
</a></li>
<li
nz-menu-item
(
click
)="
goDetail
(
item
)"
><a>
查看监测点
</a></li>
<li
(
click
)="
showAlarm
(
item
)"
nz-menu-item
><a>
添加告警
</a></li>
</ul>
...
...
@@ -107,14 +106,13 @@
</td>
<td></td>
<td
class=
"handle main-color"
>
<span
(
click
)="
showBasicCheckModal
(
item
.
host
id
,
item
.
host
)"
>
添加监测点
</span>
<span
(
click
)="
showBasicCheckModal
(
item
.
template
id
,
item
.
host
)"
>
添加监测点
</span>
<span
(
click
)="
editBasicModal
(
item
)"
>
编辑
</span>
<span
(
click
)="
showDeleteConfirm
(
item
)"
>
删除
</span>
<nz-dropdown
[
nzTrigger
]="'
click
'"
class=
"table-dropdown"
>
<a
nz-dropdown
>
更多
<i
class=
"anticon anticon-down"
></i>
</a>
<ul
nz-menu
nzSelectable
>
<li
(
click
)="
showTempStop
(
item
)"
nz-menu-item
><a>
临时暂停
</a></li>
<li
nz-menu-item
(
click
)="
goDetail
(
item
)"
><a>
查看监测点
</a></li>
<li
(
click
)="
showAlarm
(
item
)"
nz-menu-item
><a>
添加告警
</a></li>
</ul>
...
...
src/main/webapp/app/overAll/template/template.component.ts
View file @
db2204d9
...
...
@@ -175,7 +175,7 @@ export class TemplateComponent implements OnInit {
//添加监测点
showBasicCheckModal
(
hostid
,
host
)
{
this
.
smartCheck
.
showAddModal
(
hostid
,
host
);
this
.
smartCheck
.
showAddModal
(
hostid
,
host
,
"添加模版监测点"
);
}
toTree
(
index
)
{
...
...
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