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
2da51acc
Commit
2da51acc
authored
Jan 10, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
template
parent
0ea9cfa4
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
14 deletions
+29
-14
app.route.ts
src/main/webapp/app/app.route.ts
+1
-0
basi-check.component.html
...ain/webapp/app/modal/basi-check/basi-check.component.html
+4
-0
basi-check.component.ts
src/main/webapp/app/modal/basi-check/basi-check.component.ts
+14
-10
discovery.component.ts
src/main/webapp/app/modal/discovery/discovery.component.ts
+1
-1
check-list.component.ts
...p/app/overAll/template/check-list/check-list.component.ts
+3
-0
discovery-list.component.html
...All/template/discovery-list/discovery-list.component.html
+1
-1
discovery-list.component.ts
...erAll/template/discovery-list/discovery-list.component.ts
+2
-2
trigger-list.component.ts
...p/overAll/template/trigger-list/trigger-list.component.ts
+3
-0
No files found.
src/main/webapp/app/app.route.ts
View file @
2da51acc
...
...
@@ -75,6 +75,7 @@ export const route: Routes = [
{
path
:
'operationWork'
,
component
:
OperationWorkComponent
,
data
:
{
breadcrumb
:
'运维工作'
},},
{
path
:
'resourceAlarm'
,
component
:
ResourceAlarmComponent
,
data
:
{
breadcrumb
:
'资源告警统计'
},},
{
path
:
'params'
,
component
:
PararmsComponent
,
data
:
{
breadcrumb
:
'参数配置'
},},
{
path
:
'template'
,
component
:
TemplateComponent
,
data
:
{
breadcrumb
:
'模版配置'
},},
{
path
:
'discoveryList'
,
component
:
DiscoveryListComponent
,
data
:
{
breadcrumb
:
'自动发现列表'
},},
{
path
:
'checkList'
,
component
:
CheckListComponent
,
data
:
{
breadcrumb
:
'监控项原型'
},},
{
path
:
'triggerList'
,
component
:
TriggerListComponent
,
data
:
{
breadcrumb
:
'触发器原型'
},},
...
...
src/main/webapp/app/modal/basi-check/basi-check.component.html
View file @
2da51acc
...
...
@@ -34,6 +34,9 @@
</nz-form-control>
</nz-form-item>
<ng-container
*
ngIf=
"isInterface"
>
<ng-container
*
ngIf=
" validateForm.value.type == '0' || validateForm.value.type == '1' || validateForm.value.type == '3' ||
validateForm.value.type == '4' || validateForm.value.type == '6' || validateForm.value.type == '10' || validateForm.value.type == '12' ||
validateForm.value.type == '13' || validateForm.value.type == '14' || validateForm.value.type == '16' || validateForm.value.type == '17'"
>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"interfaceid"
>
主机接口
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
...
...
@@ -45,6 +48,7 @@
</nz-form-control>
</nz-form-item>
</ng-container>
</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 @
2da51acc
...
...
@@ -35,7 +35,7 @@ export class BasiCheckComponent implements OnInit {
title
;
isCheck
=
false
;
isInterface
=
true
;
isInterface
=
true
;
//添加模版监测点的时候不需要主机接口
nzSize
=
'large'
;
hostId
;
//主机ID
hostName
;
//主机name
...
...
@@ -67,7 +67,7 @@ export class BasiCheckComponent implements OnInit {
this
.
validateForm
=
this
.
fb
.
group
({
hostid
:
[
this
.
hostId
],
name
:
[
null
,
[
Validators
.
required
]],
interfaceid
:
[
null
,
[
Validators
.
required
]
],
interfaceid
:
[
null
],
key_
:
[
null
,
[
Validators
.
required
]],
value_type
:
[
null
,
[
Validators
.
required
]],
type
:
[
null
,
[
Validators
.
required
]],
...
...
@@ -89,23 +89,23 @@ export class BasiCheckComponent implements OnInit {
//新增
showAddModal
(
hostId
,
hostName
,
title
)
{
this
.
title
=
title
;
this
.
isCheck
=
true
;
this
.
hostId
=
hostId
;
this
.
hostName
=
hostName
;
if
(
this
.
title
==
'添加监测点'
){
//主机接口
this
.
overAllSer
.
find
Detailed
(
this
.
hostId
).
subscribe
(
this
.
overAllSer
.
find
Interface
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
this
.
interfaceList
=
res
.
data
[
0
].
interfaces
;
this
.
interfaceList
=
res
.
data
;
}
);
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
();
}
...
...
@@ -145,9 +145,9 @@ export class BasiCheckComponent implements OnInit {
);
//主机接口
this
.
overAllSer
.
find
Detailed
(
this
.
hostId
).
subscribe
(
this
.
overAllSer
.
find
Interface
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
this
.
interfaceList
=
res
.
data
[
0
].
interfaces
;
this
.
interfaceList
=
res
.
data
;
}
);
this
.
getItemType
();
...
...
@@ -168,6 +168,10 @@ export class BasiCheckComponent implements OnInit {
//添加
handleCheckOk
()
{
const
list
=
[
'0'
,
'1'
,
'3'
,
'4'
,
'6'
,
'10'
,
'12'
,
'13'
,
'14'
,
'16'
,
'17'
];
if
(
list
.
indexOf
(
this
.
validateForm
.
value
.
type
)
>
-
1
){
this
.
validateForm
.
get
(
'type'
).
setValidators
(
Validators
.
required
);
}
for
(
let
i
in
this
.
validateForm
.
controls
)
{
this
.
validateForm
.
controls
[
i
].
markAsDirty
();
this
.
validateForm
.
controls
[
i
].
updateValueAndValidity
();
...
...
src/main/webapp/app/modal/discovery/discovery.component.ts
View file @
2da51acc
...
...
@@ -47,7 +47,7 @@ export class DiscoveryComponent implements OnInit {
snmp_oid
:
[
'interfaces.ifTable.ifEntry.ifInOctets.1'
],
snmp_community
:
[
'public'
],
port
:
[
this
.
hostId
],
interfaceid
:
[
null
,
[
Validators
.
required
]
],
interfaceid
:
[
null
,],
delay
:
[
null
,
[
Validators
.
required
]],
description
:
[
null
],
lifetime
:
[
null
],
...
...
src/main/webapp/app/overAll/template/check-list/check-list.component.ts
View file @
2da51acc
...
...
@@ -7,6 +7,9 @@ import { Component, OnInit } from '@angular/core';
})
export
class
CheckListComponent
implements
OnInit
{
tempName
;
disName
;
constructor
()
{
}
ngOnInit
()
{
...
...
src/main/webapp/app/overAll/template/discovery-list/discovery-list.component.html
View file @
2da51acc
...
...
@@ -11,7 +11,7 @@
模版配置
</nz-breadcrumb-item>
<nz-breadcrumb-item>
模版:{{
n
ame}}
模版:{{
tempN
ame}}
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
...
...
src/main/webapp/app/overAll/template/discovery-list/discovery-list.component.ts
View file @
2da51acc
...
...
@@ -20,7 +20,7 @@ export class DiscoveryListComponent implements OnInit {
hostId
;
childrenList
;
n
ame
;
tempN
ame
;
allChecked
=
false
;
selectList
=
[];
...
...
@@ -33,7 +33,7 @@ export class DiscoveryListComponent implements OnInit {
this
.
routerInfo
.
queryParams
.
subscribe
(
(
res
)
=>
{
this
.
hostId
=
res
.
hostId
;
this
.
n
ame
=
res
.
name
this
.
tempN
ame
=
res
.
name
}
);
}
...
...
src/main/webapp/app/overAll/template/trigger-list/trigger-list.component.ts
View file @
2da51acc
...
...
@@ -7,6 +7,9 @@ import { Component, OnInit } from '@angular/core';
})
export
class
TriggerListComponent
implements
OnInit
{
tempName
;
disName
;
constructor
()
{
}
ngOnInit
()
{
...
...
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