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