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
df387ba8
Commit
df387ba8
authored
Oct 24, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
4da4012d
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
405 additions
and
557 deletions
+405
-557
alarm-list.component.html
...ain/webapp/app/alarm/alarm-list/alarm-list.component.html
+1
-1
alarm-list.component.ts
src/main/webapp/app/alarm/alarm-list/alarm-list.component.ts
+1
-1
alarm.service.ts
src/main/webapp/app/alarm/alarm.service.ts
+51
-51
now-alarm.component.ts
src/main/webapp/app/alarm/now-alarm/now-alarm.component.ts
+1
-1
alarm-modal.component.ts
...ain/webapp/app/modal/alarm-modal/alarm-modal.component.ts
+0
-12
basi-check.component.html
...ain/webapp/app/modal/basi-check/basi-check.component.html
+28
-73
basi-check.component.ts
src/main/webapp/app/modal/basi-check/basi-check.component.ts
+16
-66
basic-edit.component.html
...ain/webapp/app/modal/basic-edit/basic-edit.component.html
+181
-186
basic-edit.component.ts
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
+23
-38
warn-list.component.ts
src/main/webapp/app/modal/warn-list/warn-list.component.ts
+1
-1
basic-detail.component.html
...pp/overAll/basic/basic-detail/basic-detail.component.html
+81
-81
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+10
-10
basic.component.html
src/main/webapp/app/overAll/basic/basic.component.html
+2
-27
basic.component.ts
src/main/webapp/app/overAll/basic/basic.component.ts
+3
-3
overAll.service.ts
src/main/webapp/app/overAll/overAll.service.ts
+6
-6
No files found.
src/main/webapp/app/alarm/alarm-list/alarm-list.component.html
View file @
df387ba8
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<div
nz-col
nzSpan=
"3"
>
<div
nz-col
nzSpan=
"3"
>
<nz-select
style=
"width: 100%;"
nzShowSearch
nzAllowClear
nzPlaceHolder=
"选择设备类型"
[(
ngModel
)]="
obj
.
equipmentType
"
>
<nz-select
style=
"width: 100%;"
nzShowSearch
nzAllowClear
nzPlaceHolder=
"选择设备类型"
[(
ngModel
)]="
obj
.
equipmentType
"
>
<ng-container
*
ngFor=
"let item of warnCountList;"
>
<ng-container
*
ngFor=
"let item of warnCountList;"
>
<nz-option
nzLabel=
"{{item.equipmentType}}"
nzValue=
"{{item.equipmentTypeId}}
"
></nz-option>
<nz-option
[
nzLabel
]="
item
.
name
"
[
nzValue
]="
item
.
id
"
></nz-option>
</ng-container>
</ng-container>
</nz-select>
</nz-select>
</div>
</div>
...
...
src/main/webapp/app/alarm/alarm-list/alarm-list.component.ts
View file @
df387ba8
...
@@ -72,7 +72,7 @@ export class AlarmListComponent implements OnInit {
...
@@ -72,7 +72,7 @@ export class AlarmListComponent implements OnInit {
this
.
overAllSer
.
findGroup
().
subscribe
(
this
.
overAllSer
.
findGroup
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
groupList
=
res
.
data
;
this
.
groupList
=
res
.
data
.
data
;
}
}
}
}
);
);
...
...
src/main/webapp/app/alarm/alarm.service.ts
View file @
df387ba8
import
{
HttpClient
}
from
"@angular/common/http"
;
import
{
HttpClient
}
from
'@angular/common/http'
;
import
{
Observable
}
from
"rxjs/Rx"
;
import
{
Observable
}
from
'rxjs/Rx'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
SERVER_API_URL
}
from
"../app.constants"
;
import
{
SERVER_API_URL
}
from
'../app.constants'
;
@
Injectable
()
@
Injectable
()
export
class
AlarmService
{
export
class
AlarmService
{
...
@@ -10,127 +10,127 @@ export class AlarmService {
...
@@ -10,127 +10,127 @@ export class AlarmService {
}
}
//告警list
//告警list
eventFind
(
data
):
Observable
<
any
>
{
eventFind
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/
event/find'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/
alertLog/page'
,
data
);
}
}
//告警推送日志
//告警推送日志
alertFind
(
data
):
Observable
<
any
>
{
alertFind
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/alert/find'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/alert/find'
,
data
);
}
}
//删除告警推送日志
//删除告警推送日志
alertDelete
(
data
):
Observable
<
any
>
{
alertDelete
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/alert/delete'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/alert/delete'
,
data
);
}
}
//查询告警推送设置
//查询告警推送设置
actionFind
(
data
):
Observable
<
any
>
{
actionFind
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/find'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/find'
,
data
);
}
}
//查询单个告警推送设置
//查询单个告警推送设置
getAction
(
params
):
Observable
<
any
>
{
getAction
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/action/find/'
+
params
);
return
this
.
http
.
get
(
SERVER_API_URL
+
'/action/find/'
+
params
);
}
}
//查找所有zabbix用户
//查找所有zabbix用户
zUserFind
(
data
):
Observable
<
any
>
{
zUserFind
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/zuser/find'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/zuser/find'
,
data
);
}
}
//修改告警推送设置
//修改告警推送设置
actionUpdate
(
data
):
Observable
<
any
>
{
actionUpdate
(
data
):
Observable
<
any
>
{
return
this
.
http
.
put
(
SERVER_API_URL
+
'/action/update'
,
data
);
return
this
.
http
.
put
(
SERVER_API_URL
+
'/action/update'
,
data
);
}
}
//创建告警推送设置
//创建告警推送设置
actionCreate
(
data
):
Observable
<
any
>
{
actionCreate
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/create'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/create'
,
data
);
}
}
//单个启用或禁用告警推送设置
//单个启用或禁用告警推送设置
actionStatus
(
params1
,
params2
):
Observable
<
any
>
{
actionStatus
(
params1
,
params2
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/status/'
+
params1
+
'/'
+
params2
,
null
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/status/'
+
params1
+
'/'
+
params2
,
null
);
}
}
//批量启用或禁用告警设置
//批量启用或禁用告警设置
actionStatusBatch
(
data
):
Observable
<
any
>
{
actionStatusBatch
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/status-batch'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/status-batch'
,
data
);
}
}
//批量删除告警推送设置
//批量删除告警推送设置
actionDelete
(
data
):
Observable
<
any
>
{
actionDelete
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/delete'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/delete'
,
data
);
}
}
//查询所有告警组
//查询所有告警组
alertGroupFind
():
Observable
<
any
>
{
alertGroupFind
():
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/alertGroup/findAll'
);
return
this
.
http
.
get
(
SERVER_API_URL
+
'/alertGroup/findAll'
);
}
}
//创建告警组
//创建告警组
alertGroupCreate
(
data
):
Observable
<
any
>
{
alertGroupCreate
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/alertGroup/create'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/alertGroup/create'
,
data
);
}
}
//修改告警组
//修改告警组
alertGroupUpdate
(
data
):
Observable
<
any
>
{
alertGroupUpdate
(
data
):
Observable
<
any
>
{
return
this
.
http
.
put
(
SERVER_API_URL
+
'/alertGroup/update'
,
data
);
return
this
.
http
.
put
(
SERVER_API_URL
+
'/alertGroup/update'
,
data
);
}
}
//删除告警组
//删除告警组
alertGroupDelete
(
data
):
Observable
<
any
>
{
alertGroupDelete
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/alertGroup/delete'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/alertGroup/delete'
,
data
);
}
}
//发送方式列表
//发送方式列表
mediaTypeFind
(
data
):
Observable
<
any
>
{
mediaTypeFind
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/mediaType/find'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/mediaType/find'
,
data
);
}
}
//添加发送方式
//添加发送方式
mediaTypeCreate
(
data
):
Observable
<
any
>
{
mediaTypeCreate
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/mediaType/create'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/mediaType/create'
,
data
);
}
}
//删除发送方式
//删除发送方式
mediaTypeDelete
(
data
):
Observable
<
any
>
{
mediaTypeDelete
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/mediaType/delete'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/mediaType/delete'
,
data
);
}
}
//修改发送方式
//修改发送方式
mediaTypeUpdate
(
data
):
Observable
<
any
>
{
mediaTypeUpdate
(
data
):
Observable
<
any
>
{
return
this
.
http
.
put
(
SERVER_API_URL
+
'/mediaType/update'
,
data
);
return
this
.
http
.
put
(
SERVER_API_URL
+
'/mediaType/update'
,
data
);
}
}
//单个启用或禁用发送方式
//单个启用或禁用发送方式
mediaTypeStatus
(
params1
,
params2
):
Observable
<
any
>
{
mediaTypeStatus
(
params1
,
params2
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/mediaType/status/'
+
params1
+
'/'
+
params2
,
null
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/mediaType/status/'
+
params1
+
'/'
+
params2
,
null
);
}
}
//批量启用或禁用发送方式
//批量启用或禁用发送方式
mediaTypeStatusBatch
(
data
):
Observable
<
any
>
{
mediaTypeStatusBatch
(
data
):
Observable
<
any
>
{
return
this
.
http
.
put
(
SERVER_API_URL
+
'/mediaType/status-batch'
,
data
);
return
this
.
http
.
put
(
SERVER_API_URL
+
'/mediaType/status-batch'
,
data
);
}
}
//查询发送方式详情
//查询发送方式详情
getMediaType
(
params
):
Observable
<
any
>
{
getMediaType
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/mediaType/find/'
+
params
);
return
this
.
http
.
get
(
SERVER_API_URL
+
'/mediaType/find/'
+
params
);
}
}
//查找告警目标
//查找告警目标
findAlertTarget
():
Observable
<
any
>
{
findAlertTarget
():
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/action/findAlertTarget'
);
return
this
.
http
.
get
(
SERVER_API_URL
+
'/action/findAlertTarget'
);
}
}
//导出当前告警列表
//导出当前告警列表
getExportUrlEvent
(
data
):
Observable
<
any
>
{
getExportUrlEvent
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/event/getExportUrl'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/event/getExportUrl'
,
data
);
}
}
//告警推送日志导出
//告警推送日志导出
getExportUrlAlert
(
data
):
Observable
<
any
>
{
getExportUrlAlert
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/alert/getExportUrl'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/alert/getExportUrl'
,
data
);
}
}
}
}
src/main/webapp/app/alarm/now-alarm/now-alarm.component.ts
View file @
df387ba8
...
@@ -62,7 +62,7 @@ export class NowAlarmComponent implements OnInit, OnDestroy {
...
@@ -62,7 +62,7 @@ export class NowAlarmComponent implements OnInit, OnDestroy {
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
getType
();
//
this.getType();
this
.
search
();
this
.
search
();
this
.
time_
=
setInterval
(()
=>
{
this
.
time_
=
setInterval
(()
=>
{
this
.
search
();
this
.
search
();
...
...
src/main/webapp/app/modal/alarm-modal/alarm-modal.component.ts
View file @
df387ba8
...
@@ -58,7 +58,6 @@ export class AlarmModalComponent implements OnInit {
...
@@ -58,7 +58,6 @@ export class AlarmModalComponent implements OnInit {
this
.
getSendFun
();
this
.
getSendFun
();
this
.
getACtion
();
this
.
getACtion
();
this
.
getGroup
();
this
.
getGroup
();
this
.
getZabbixObj
();
this
.
getEventType
();
this
.
getEventType
();
}
}
...
@@ -195,17 +194,6 @@ export class AlarmModalComponent implements OnInit {
...
@@ -195,17 +194,6 @@ export class AlarmModalComponent implements OnInit {
);
);
}
}
//获取发送对象 zabbix
getZabbixObj
()
{
this
.
alarmSer
.
zUserFind
({}).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
objList
=
res
.
data
;
}
}
);
}
//添加发送方式
//添加发送方式
addOption
()
{
addOption
()
{
const
data
=
{
const
data
=
{
...
...
src/main/webapp/app/modal/basi-check/basi-check.component.html
View file @
df387ba8
...
@@ -11,98 +11,55 @@
...
@@ -11,98 +11,55 @@
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"type"
>
类型
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"type"
>
类型
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"type"
name=
"type"
nzPlaceHolder=
"选择类型"
formControlName=
"type"
>
<nz-select
name=
"type"
name=
"type"
nzPlaceHolder=
"选择类型"
formControlName=
"type"
>
<nz-option
nzValue=
"0"
nzLabel=
"Agent客户端"
></nz-option>
<nz-option
nzValue=
"0"
nzLabel=
"非自动发现监控项"
></nz-option>
<nz-option
nzValue=
"7"
nzLabel=
"Agent客户端(主动式)"
></nz-option>
<nz-option
nzValue=
"1"
nzLabel=
"自动发现监控项"
></nz-option>
<nz-option
nzValue=
"3"
nzLabel=
"简单检查"
></nz-option>
<nz-option
nzValue=
"1"
nzLabel=
"SNMPv1 客户端"
></nz-option>
<nz-option
nzValue=
"4"
nzLabel=
"SNMPv2 客户端"
></nz-option>
<nz-option
nzValue=
"6"
nzLabel=
"SNMPv3 客户端"
></nz-option>
<nz-option
nzValue=
"5"
nzLabel=
"Agent内部"
></nz-option>
<nz-option
nzValue=
"2"
nzLabel=
"Agent采集器"
></nz-option>
<nz-option
nzValue=
"8"
nzLabel=
"Agent整合"
></nz-option>
<nz-option
nzValue=
"10"
nzLabel=
"外部检查"
></nz-option>
<nz-option
nzValue=
"11"
nzLabel=
"数据库监控"
></nz-option>
<nz-option
nzValue=
"12"
nzLabel=
"IPMI客户端"
></nz-option>
<nz-option
nzValue=
"13"
nzLabel=
"SSH 客户端"
></nz-option>
<nz-option
nzValue=
"14"
nzLabel=
"TELNET客户端"
></nz-option>
<nz-option
nzValue=
"16"
nzLabel=
"JMX agent代理程序"
></nz-option>
<nz-option
nzValue=
"15"
nzLabel=
"可计算的"
></nz-option>
<nz-option
nzValue=
"18"
nzLabel=
"相关项目"
></nz-option>
</nz-select>
</nz-select>
<nz-form-explain
*
ngIf=
"validateForm.get('type').dirty && validateForm.get('type').errors"
>
请选择监测点类型!
</nz-form-explain>
<nz-form-explain
*
ngIf=
"validateForm.get('type').dirty && validateForm.get('type').errors"
>
请选择监测点类型!
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</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-item>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"interfaceid"
>
主机接口
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"snmpCommunity"
>
SNMP community
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"interfaceid"
formControlName=
"interfaceid"
nzPlaceHolder=
"选择主机接口"
>
<input
id=
"snmpCommunity"
name=
"snmpCommunity"
type=
"text"
nz-input
<nz-option
*
ngFor=
"let item of interfaceList"
nzValue=
"{{item.interfaceid}}"
formControlName=
"snmpCommunity"
>
nzLabel=
"{{item.ip}}:{{item.port}}"
></nz-option>
</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
*
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>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"snmp_oid"
name=
"snmp_oid"
type=
"text"
nz-input
formControlName=
"snmp_oid"
>
<!--<nz-form-explain *ngIf="validateForm.get('note').dirty && validateForm.get('note').errors">Please input your username!</nz-form-explain>-->
<!--<nz-form-explain *ngIf="validateForm.get('note').dirty && validateForm.get('note').errors">Please input your username!</nz-form-explain>-->
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"snmp_community"
>
SNMP community
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"key"
>
键值
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"snmp_community"
name=
"units"
type=
"text"
nz-input
<input
id=
"key"
style=
"width: 85%;display: inline-block"
placeholder=
"输入键值"
type=
"text"
name=
"key"
formControlName=
"snmp_community"
>
nz-input
formControlName=
"key"
>
<!--<nz-form-explain *ngIf="validateForm.get('note').dirty && validateForm.get('note').errors">Please input your username!</nz-form-explain>-->
<!-- <button nz-button nzType="primary" (click)="showKeymodal()">选择</button>-->
<nz-form-explain
*
ngIf=
"validateForm.get('key').dirty && validateForm.get('key').errors"
>
请选择键值!
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
</ng-container>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"
key_"
>
键值
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"
valueType"
>
信息类型
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"key_"
disabled
style=
"width: 85%;display: inline-block"
placeholder=
"输入键值"
type=
"text"
name=
"key_"
<nz-select
name=
"valueType"
formControlName=
"valueType"
nzPlaceHolder=
"请选择信息类型"
>
nz-input
formControlName=
"key_"
>
<nz-option
nzValue=
"0"
nzLabel=
"数字"
></nz-option>
<button
nz-button
nzType=
"primary"
(
click
)="
showKeymodal
()"
>
选择
</button>
<nz-option
nzValue=
"1"
nzLabel=
"文本"
></nz-option>
<nz-form-explain
*
ngIf=
"validateForm.get('key_').dirty && validateForm.get('key_').errors"
>
请选择键值!
</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"value_type"
>
信息类型
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"value_type"
formControlName=
"value_type"
nzPlaceHolder=
"请选择信息类型"
>
<nz-option
nzValue=
"0"
nzLabel=
"浮点数"
></nz-option>
<nz-option
nzValue=
"1"
nzLabel=
"字符"
></nz-option>
<nz-option
nzValue=
"2"
nzLabel=
"日志"
></nz-option>
<nz-option
nzValue=
"3"
nzLabel=
"整数"
></nz-option>
<nz-option
nzValue=
"4"
nzLabel=
"文本"
></nz-option>
</nz-select>
</nz-select>
<nz-form-explain
*
ngIf=
"validateForm.get('value
_type').dirty && validateForm.get('value_t
ype').errors"
>
请选择信息类型!
</nz-form-explain>
<nz-form-explain
*
ngIf=
"validateForm.get('value
Type').dirty && validateForm.get('valueT
ype').errors"
>
请选择信息类型!
</nz-form-explain>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"units"
>
单位
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
nz
Required
nz
For=
"units"
>
单位
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"units"
name=
"units"
type=
"text"
nz-input
formControlName=
"units"
>
<input
id=
"units"
name=
"units"
type=
"text"
nz-input
formControlName=
"units"
>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item
>
<!-- <nz-form-item>--
>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"itemtype"
>
监测点分类
</nz-form-label
>
<!-- <nz-form-label [nzSpan]="6" nzFor="itemtype">监测点分类</nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<nz-select
style=
"width: 80%;display: inline-block"
nzPlaceHolder=
"选择监测点分类"
name=
"itemtype"
[
nzSize
]="
nzSize
"
nzMode=
"tags"
formControlName=
"applications"
>
<!-- <nz-select style="width: 80%;display: inline-block" nzPlaceHolder="选择监测点分类" name="itemtype" [nzSize]="nzSize" nzMode="tags" formControlName="applications">--
>
<nz-option
*
ngFor=
"let item of checkList"
[
nzValue
]="
item
.
applicationid
"
<!-- <nz-option *ngFor="let item of checkList" [nzValue]="item.applicationid"-->
[
nzLabel
]="
item
.
name
"
></nz-option
>
<!-- [nzLabel]="item.name"></nz-option>--
>
</nz-select
>
<!-- </nz-select>--
>
<button
nz-button
nzType=
"primary"
(
click
)="
showTypeModal
()"
>
新建分类
</button
>
<!-- <button nz-button nzType="primary" (click)="showTypeModal()">新建分类</button>--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"delay"
>
数据更新间隔(秒)
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"delay"
>
数据更新间隔(秒)
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-form-control
[
nzSpan
]="
14
"
>
...
@@ -119,9 +76,9 @@
...
@@ -119,9 +76,9 @@
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
>
趋势数据存储周期(单位天)
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
>
监控项描述
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-form-control
[
nzSpan
]="
14
"
>
<
input
type=
"text"
name=
"trends"
nz-input
formControlName=
"trends"
>
<
textarea
nz-input
id=
"description"
name=
"description"
formControlName=
"description"
placeholder=
"监控项描述"
[
nzAutosize
]="{
minRows:
2
,
maxRows:
6
}"
></textarea
>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
...
@@ -139,8 +96,6 @@
...
@@ -139,8 +96,6 @@
</form>
</form>
</nz-modal>
</nz-modal>
<!--键值查询-->
<smart-basic-key
(
keyValue
)="
getKey
($
event
)"
#
basicKey
></smart-basic-key>
<!--新建分类-->
<!--新建分类-->
<smart-new-type
(
data
)="
addItemType
($
event
)"
#
newType
></smart-new-type>
<smart-new-type
(
data
)="
addItemType
($
event
)"
#
newType
></smart-new-type>
...
...
src/main/webapp/app/modal/basi-check/basi-check.component.ts
View file @
df387ba8
...
@@ -5,7 +5,6 @@ import {
...
@@ -5,7 +5,6 @@ import {
FormGroup
,
FormGroup
,
Validators
Validators
}
from
'@angular/forms'
;
}
from
'@angular/forms'
;
import
{
BasicKeyComponent
}
from
'../basic-key/basic-key.component'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
NewTypeComponent
}
from
'../new-type/new-type.component'
;
import
{
NewTypeComponent
}
from
'../new-type/new-type.component'
;
...
@@ -29,19 +28,16 @@ import {NewTypeComponent} from '../new-type/new-type.component';
...
@@ -29,19 +28,16 @@ import {NewTypeComponent} from '../new-type/new-type.component';
]
]
})
})
export
class
BasiCheckComponent
implements
OnInit
{
export
class
BasiCheckComponent
implements
OnInit
{
@
ViewChild
(
'basicKey'
)
basicKey
:
BasicKeyComponent
;
@
ViewChild
(
'newType'
)
newType
:
NewTypeComponent
;
@
ViewChild
(
'newType'
)
newType
:
NewTypeComponent
;
@
Output
()
done
=
new
EventEmitter
<
any
>
();
@
Output
()
done
=
new
EventEmitter
<
any
>
();
title
;
title
;
isCheck
=
false
;
isCheck
=
false
;
isOkLoading
=
false
;
isOkLoading
=
false
;
isInterface
=
true
;
//添加模版监测点的时候不需要主机接口
nzSize
=
'large'
;
nzSize
=
'large'
;
hostId
;
//主机ID
hostId
;
//主机ID
hostName
;
//主机name
hostName
;
//主机name
itemId
;
//监控项id
itemId
;
//监控项id
interfaceList
:
any
[];
valueMapList
=
[];
valueMapList
=
[];
validateForm
:
FormGroup
;
validateForm
:
FormGroup
;
checkList
;
//监测点分类
checkList
;
//监测点分类
...
@@ -61,7 +57,6 @@ export class BasiCheckComponent implements OnInit {
...
@@ -61,7 +57,6 @@ export class BasiCheckComponent implements OnInit {
ngOnInit
()
{
ngOnInit
()
{
this
.
initForm
();
this
.
initForm
();
this
.
getValuemap
();
}
}
initForm
()
{
initForm
()
{
...
@@ -69,18 +64,16 @@ export class BasiCheckComponent implements OnInit {
...
@@ -69,18 +64,16 @@ 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
],
key
:
[
null
,
[
Validators
.
required
]],
key_
:
[
null
,
[
Validators
.
required
]],
valueType
:
[
null
,
[
Validators
.
required
]],
value_type
:
[
null
,
[
Validators
.
required
]],
type
:
[
null
,
[
Validators
.
required
]],
type
:
[
null
,
[
Validators
.
required
]],
units
:
[
null
],
units
:
[
null
,
[
Validators
.
required
]
],
history
:
[
'3600'
],
history
:
[
'3600'
],
trends
:
[
null
],
snmpCommunity
:
[
'public'
],
delay
:
[
null
,
[
Validators
.
required
]],
delay
:
[
null
,
[
Validators
.
required
]],
snmp_oid
:
[
'interfaces.ifTable.ifEntry.ifInOctets.1'
],
interfaceid
:
[
null
],
snmp_community
:
[
'public'
],
applications
:
[
null
],
templateid
:[
null
],
templateid
:[
null
],
description
:[
null
],
});
});
this
.
triggerObj
=
{
this
.
triggerObj
=
{
condition
:
''
,
condition
:
''
,
...
@@ -95,34 +88,7 @@ export class BasiCheckComponent implements OnInit {
...
@@ -95,34 +88,7 @@ export class BasiCheckComponent implements OnInit {
this
.
isCheck
=
true
;
this
.
isCheck
=
true
;
this
.
hostId
=
hostId
;
this
.
hostId
=
hostId
;
this
.
hostName
=
hostName
;
this
.
hostName
=
hostName
;
if
(
this
.
title
==
'添加监测点'
){
// this.getItemType();
//主机接口
this
.
overAllSer
.
findInterface
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
this
.
interfaceList
=
res
.
data
;
}
);
this
.
isInterface
=
true
;
}
if
(
this
.
title
==
'添加模版监测点'
){
this
.
isInterface
=
false
;
this
.
validateForm
.
get
(
'interfaceid'
).
clearValidators
();
}
this
.
getItemType
();
}
//映射值
getValuemap
()
{
// this.overAllSer.findValuemap().subscribe(
// (res) => {
// if (res.errCode == 10000) {
// this.valueMapList = res.data;
// } else {
// this.message.error(res.errMsg);
// }
// }
// );
}
}
//编辑
//编辑
...
@@ -133,32 +99,21 @@ export class BasiCheckComponent implements OnInit {
...
@@ -133,32 +99,21 @@ export class BasiCheckComponent implements OnInit {
this
.
isCheck
=
true
;
this
.
isCheck
=
true
;
this
.
itemId
=
id
;
this
.
itemId
=
id
;
this
.
hostName
=
hostName
;
this
.
hostName
=
hostName
;
if
(
this
.
title
==
'编辑模版监测点'
){
this
.
isInterface
=
false
;
this
.
validateForm
.
get
(
'interfaceid'
).
clearValidators
();
}
this
.
overAllSer
.
findItemDetail
(
id
).
subscribe
(
this
.
overAllSer
.
findItemDetail
(
id
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
const
data
=
res
.
data
[
0
];
const
data
=
res
.
data
[
0
];
data
.
type
+=
''
;
data
.
type
+=
''
;
data
.
interfaceid
+=
''
;
data
.
valueType
+=
''
;
data
.
value_type
+=
''
;
// if(data.applications){
if
(
data
.
applications
){
// data.applications = data.applications.map(e=>{
data
.
applications
=
data
.
applications
.
map
(
e
=>
{
// return e.applicationid;
return
e
.
applicationid
;
// });
});
// }
}
this
.
validateForm
.
patchValue
(
data
);
this
.
validateForm
.
patchValue
(
data
);
}
}
);
);
//主机接口
// this.getItemType();
this
.
overAllSer
.
findInterface
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
this
.
interfaceList
=
res
.
data
;
}
);
this
.
getItemType
();
}
}
//获取监测点分类
//获取监测点分类
...
@@ -244,11 +199,6 @@ export class BasiCheckComponent implements OnInit {
...
@@ -244,11 +199,6 @@ export class BasiCheckComponent implements OnInit {
this
.
initForm
();
this
.
initForm
();
}
}
//键值查询
showKeymodal
()
{
this
.
basicKey
.
showKeyModal
();
}
//新增分类
//新增分类
showTypeModal
()
{
showTypeModal
()
{
this
.
newType
.
showModal
(
'新建分类'
);
this
.
newType
.
showModal
(
'新建分类'
);
...
@@ -264,7 +214,7 @@ export class BasiCheckComponent implements OnInit {
...
@@ -264,7 +214,7 @@ export class BasiCheckComponent implements OnInit {
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
success
(
'添加成功'
);
this
.
message
.
success
(
'添加成功'
);
this
.
getItemType
();
//
this.getItemType();
}
}
}
}
);
);
...
@@ -272,7 +222,7 @@ export class BasiCheckComponent implements OnInit {
...
@@ -272,7 +222,7 @@ export class BasiCheckComponent implements OnInit {
getKey
(
keyValue
):
void
{
getKey
(
keyValue
):
void
{
const
d
=
{
const
d
=
{
key
_
:
keyValue
key
:
keyValue
};
};
this
.
validateForm
.
patchValue
(
d
);
this
.
validateForm
.
patchValue
(
d
);
}
}
...
...
src/main/webapp/app/modal/basic-edit/basic-edit.component.html
View file @
df387ba8
...
@@ -60,14 +60,9 @@
...
@@ -60,14 +60,9 @@
<nz-form-control
nz-col
[
nzSpan
]="
4
"
>
<nz-form-control
nz-col
[
nzSpan
]="
4
"
>
<input
type=
"text"
placeholder=
"IP地址"
nz-input
name=
"ip"
[(
ngModel
)]="
item
.
ip
"
>
<input
type=
"text"
placeholder=
"IP地址"
nz-input
name=
"ip"
[(
ngModel
)]="
item
.
ip
"
>
</nz-form-control>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
4
"
>
<input
type=
"text"
placeholder=
"DNS名称"
nz-input
name=
"dns"
[(
ngModel
)]="
item
.
dns
"
>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<nz-form-control
nz-col
[
nzSpan
]="
5
"
>
<nz-select
name=
"type"
nzPlaceHolder=
"连接类型"
[(
ngModel
)]="
item
.
type
"
(
ngModelChange
)="
changePort
(
i
)"
>
<nz-select
name=
"type"
nzPlaceHolder=
"连接类型"
[(
ngModel
)]="
item
.
type
"
(
ngModelChange
)="
changePort
(
i
)"
>
<nz-option
nzValue=
"1"
nzLabel=
"agent代理程序接口"
></nz-option>
<nz-option
nzValue=
"2"
nzLabel=
"SNMP接口"
></nz-option>
<nz-option
nzValue=
"2"
nzLabel=
"SNMP接口"
></nz-option>
<nz-option
nzValue=
"3"
nzLabel=
"IPMI接口"
></nz-option>
<nz-option
nzValue=
"4"
nzLabel=
"JMX接口"
></nz-option>
<nz-option
nzValue=
"4"
nzLabel=
"JMX接口"
></nz-option>
</nz-select>
</nz-select>
</nz-form-control>
</nz-form-control>
...
@@ -101,7 +96,7 @@
...
@@ -101,7 +96,7 @@
<nz-select
name=
"templates"
style=
"width: 100%"
[(
ngModel
)]="
validateForm
.
templates
"
<nz-select
name=
"templates"
style=
"width: 100%"
[(
ngModel
)]="
validateForm
.
templates
"
[
nzSize
]="
nzSize
"
nzMode=
"tags"
nzPlaceHolder=
"选择监控策略"
>
[
nzSize
]="
nzSize
"
nzMode=
"tags"
nzPlaceHolder=
"选择监控策略"
>
<nz-option
*
ngFor=
"let option of tempList"
[
nzLabel
]="
option
.
name
"
<nz-option
*
ngFor=
"let option of tempList"
[
nzLabel
]="
option
.
name
"
[
nzValue
]="
option
.
template
id
"
></nz-option>
[
nzValue
]="
option
.
id
"
></nz-option>
</nz-select>
</nz-select>
</nz-form-control>
</nz-form-control>
</nz-form-item>
</nz-form-item>
...
@@ -327,185 +322,185 @@
...
@@ -327,185 +322,185 @@
<!--<button nz-button (click)="handEditleOk()" nzType="primary">完成</button>-->
<!--<button nz-button (click)="handEditleOk()" nzType="primary">完成</button>-->
<!--</div>-->
<!--</div>-->
<!--</nz-tab>-->
<!--</nz-tab>-->
<nz-tab
nzTitle=
"资产登记"
>
<!-- <nz-tab nzTitle="资产登记">--
>
<div
nz-form
class=
"ant-advanced-search-form form-select"
>
<!-- <div nz-form class="ant-advanced-search-form form-select">--
>
<div
nz-row
[
nzGutter
]="
24
"
>
<!-- <div nz-row [nzGutter]="24">--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
nzFor=
"equipmentTypeid"
>
登记资产
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="equipmentTypeid">登记资产-->
</nz-form-label
>
<!-- </nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<button
nz-button
nzSize=
"small"
[
nzType
]="
isYesInVentory
"
(
click
)="
checkChange
('
no
')"
>
不需要
</button
>
<!-- <button nz-button nzSize="small" [nzType]="isYesInVentory" (click)="checkChange('no')">不需要</button>--
>
<button
nz-button
nzSize=
"small"
[
nzType
]="
isNOInVentory
"
(
click
)="
checkChange
('
yes
')"
>
需要
</button
>
<!-- <button nz-button nzSize="small" [nzType]="isNOInVentory" (click)="checkChange('yes')">需要</button>--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
<ng-container
*
ngIf=
"isInVentory"
>
<!-- <ng-container *ngIf="isInVentory">--
>
<div
nz-row
[
nzGutter
]="
24
"
>
<!-- <div nz-row [nzGutter]="24">--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
nzFor=
"equipmentTypeid"
>
资产名称
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="equipmentTypeid">资产名称-->
</nz-form-label
>
<!-- </nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<input
nz-input
placeholder=
"资产名称"
name=
"name"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
name
"
>
<!-- <input nz-input placeholder="资产名称" name="name" [(ngModel)]="validateForm.inventoryExtend.name">--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzSpan
]="
6
"
>
负责人
</nz-form-label
>
<!-- <nz-form-label [nzSpan]="6">负责人</nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<input
nz-input
placeholder=
"负责人"
name=
"person"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
person
"
>
<!-- <input nz-input placeholder="负责人" name="person" [(ngModel)]="validateForm.inventoryExtend.person">--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
<div
nz-row
[
nzGutter
]="
24
"
>
<!-- <div nz-row [nzGutter]="24">--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzRequired
>
父分类
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired >父分类-->
</nz-form-label
>
<!-- </nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<nz-select
name=
"secondLevelType"
nzPlaceHolder=
"选择父分类"
[(
ngModel
)]="
inventoryParentId
"
(
ngModelChange
)="
getTypeByParent
($
event
)"
>
<!-- <nz-select name="secondLevelType" nzPlaceHolder="选择父分类" [(ngModel)]="inventoryParentId" (ngModelChange)="getTypeByParent($event)">--
>
<ng-container
*
ngFor=
"let item of parentTypeList"
>
<!-- <ng-container *ngFor="let item of parentTypeList">--
>
<nz-option
[
nzLabel
]="
item
.
name
"
[
nzValue
]="
item
.
id
"
></nz-option
>
<!-- <nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>--
>
</ng-container
>
<!-- </ng-container>--
>
</nz-select
>
<!-- </nz-select>--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
>
子分类
<!-- <nz-form-label [nzSpan]="6" nzRequired >子分类-->
</nz-form-label
>
<!-- </nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<nz-select
name=
"secondLevelType"
nzPlaceHolder=
"选择子分类"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
inventoryTypeid
"
>
<!-- <nz-select name="secondLevelType" nzPlaceHolder="选择子分类" [(ngModel)]="validateForm.inventoryExtend.inventoryTypeid">--
>
<ng-container
*
ngFor=
"let item of typeList"
>
<!-- <ng-container *ngFor="let item of typeList">--
>
<nz-option
[
nzLabel
]="
item
.
name
"
[
nzValue
]="
item
.
id
"
></nz-option
>
<!-- <nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>--
>
</ng-container
>
<!-- </ng-container>--
>
</nz-select
>
<!-- </nz-select>--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
<div
nz-row
[
nzGutter
]="
24
"
>
<!-- <div nz-row [nzGutter]="24">--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
nzFor=
"secondLevelType"
>
资产数量
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="secondLevelType">资产数量-->
</nz-form-label
>
<!-- </nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<input
nz-input
placeholder=
"资产数量"
name=
"inventorycount"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
inventorycount
"
>
<!-- <input nz-input placeholder="资产数量" name="inventorycount" [(ngModel)]="validateForm.inventoryExtend.inventorycount">--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"invertoryname"
>
品牌
</nz-form-label
>
<!-- <nz-form-label [nzSpan]="6" nzFor="invertoryname">品牌</nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<input
nz-input
placeholder=
"品牌"
name=
"invertoryname"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
invertoryname
"
>
<!-- <input nz-input placeholder="品牌" name="invertoryname" [(ngModel)]="validateForm.inventoryExtend.invertoryname">--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
<div
nz-row
[
nzGutter
]="
24
"
>
<!-- <div nz-row [nzGutter]="24">--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
>
库存
</nz-form-label
>
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" >库存</nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<input
nz-input
placeholder=
"库存"
name=
"stock"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
stock
"
>
<!-- <input nz-input placeholder="库存" name="stock" [(ngModel)]="validateForm.inventoryExtend.stock">--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzSpan
]="
6
"
>
型号
</nz-form-label
>
<!-- <nz-form-label [nzSpan]="6" >型号</nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <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-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
<div
nz-row
[
nzGutter
]="
24
"
>
<!-- <div nz-row [nzGutter]="24">--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
>
使用
</nz-form-label
>
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" >使用</nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<input
nz-input
placeholder=
"使用"
name=
"usedcount"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
usedcount
"
>
<!-- <input nz-input placeholder="使用" name="usedcount" [(ngModel)]="validateForm.inventoryExtend.usedcount">--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzSpan
]="
6
"
>
MAC地址
</nz-form-label
>
<!-- <nz-form-label [nzSpan]="6" >MAC地址</nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<input
nz-input
placeholder=
"MAC地址"
name=
"mac"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
mac
"
>
<!-- <input nz-input placeholder="MAC地址" name="mac" [(ngModel)]="validateForm.inventoryExtend.mac">--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
<div
nz-row
[
nzGutter
]="
24
"
>
<!-- <div nz-row [nzGutter]="24">--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
>
借出
</nz-form-label
>
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" >借出</nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<input
nz-input
placeholder=
"借出"
name=
"lendcount"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
lendcount
"
>
<!-- <input nz-input placeholder="借出" name="lendcount" [(ngModel)]="validateForm.inventoryExtend.lendcount">--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzSpan
]="
6
"
>
维保到期
</nz-form-label
>
<!-- <nz-form-label [nzSpan]="6">维保到期</nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<input
nz-input
placeholder=
"维保到期"
name=
"maintenanceExpiration"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
maintenanceExpiration
"
>
<!-- <input nz-input placeholder="维保到期" name="maintenanceExpiration" [(ngModel)]="validateForm.inventoryExtend.maintenanceExpiration" >--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
<div
nz-row
[
nzGutter
]="
24
"
>
<!-- <div nz-row [nzGutter]="24">--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
>
维修
</nz-form-label
>
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" >维修</nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<input
nz-input
placeholder=
"维修"
name=
"repaircount"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
repaircount
"
>
<!-- <input nz-input placeholder="维修" name="repaircount" [(ngModel)]="validateForm.inventoryExtend.repaircount">--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzSpan
]="
6
"
>
存放地点
</nz-form-label
>
<!-- <nz-form-label [nzSpan]="6">存放地点</nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<input
nz-input
placeholder=
"存放地点"
name=
"storageLocation"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
storageLocation
"
>
<!-- <input nz-input placeholder="存放地点" name="storageLocation" [(ngModel)]="validateForm.inventoryExtend.storageLocation">--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
<div
nz-row
[
nzGutter
]="
24
"
>
<!-- <div nz-row [nzGutter]="24">--
>
<div
nz-col
[
nzSpan
]="
12
"
>
<!-- <div nz-col [nzSpan]="12">--
>
<nz-form-item
nzFlex
>
<!-- <nz-form-item nzFlex>--
>
<nz-form-label
[
nzOffset
]="
4
"
[
nzSpan
]="
6
"
>
报废
</nz-form-label
>
<!-- <nz-form-label [nzOffset]="4" [nzSpan]="6" >报废</nz-form-label>--
>
<nz-form-control
[
nzSpan
]="
14
"
>
<!-- <nz-form-control [nzSpan]="14">--
>
<input
nz-input
placeholder=
"报废"
name=
"scrapcount"
[(
ngModel
)]="
validateForm
.
inventoryExtend
.
scrapcount
"
>
<!-- <input nz-input placeholder="报废" name="scrapcount" [(ngModel)]="validateForm.inventoryExtend.scrapcount">--
>
</nz-form-control
>
<!-- </nz-form-control>--
>
</nz-form-item
>
<!-- </nz-form-item>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
</ng-container
>
<!-- </ng-container>--
>
</div
>
<!-- </div>--
>
</nz-tab
>
<!-- </nz-tab>--
>
</nz-tabset>
</nz-tabset>
</nz-modal>
</nz-modal>
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
View file @
df387ba8
...
@@ -56,6 +56,7 @@ export class BasicEditComponent implements OnInit {
...
@@ -56,6 +56,7 @@ export class BasicEditComponent implements OnInit {
isYesInVentory
=
'primary'
;
isYesInVentory
=
'primary'
;
isNOInVentory
=
'default'
;
isNOInVentory
=
'default'
;
inventoryParentId
;
inventoryParentId
;
equipmentTypeid
;
constructor
(
private
fb
:
FormBuilder
,
private
overAllSer
:
OverAllService
,
constructor
(
private
fb
:
FormBuilder
,
private
overAllSer
:
OverAllService
,
private
emitService
:
EmitService
,
private
emitService
:
EmitService
,
...
@@ -80,13 +81,15 @@ export class BasicEditComponent implements OnInit {
...
@@ -80,13 +81,15 @@ export class BasicEditComponent implements OnInit {
//获取分组
//获取分组
getGroup
()
{
getGroup
()
{
this
.
groupList
=
[];
this
.
groupList
=
[];
this
.
overAllSer
.
getEditGroups
(
0
).
subscribe
(
this
.
overAllSer
.
findGroup
(
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
for
(
let
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
if
(
res
.
errCode
==
10000
)
{
const
gObj
=
{
res
.
data
.
data
.
forEach
(
e
=>
{
label
:
res
.
data
[
i
].
name
,
value
:
res
.
data
[
i
].
groupid
,
checked
:
false
e
.
label
=
e
.
name
;
};
e
.
value
=
e
.
id
;
this
.
groupList
.
push
(
gObj
);
e
.
checked
=
false
;
});
this
.
groupList
=
res
.
data
.
data
;
}
}
}
}
);
);
...
@@ -130,14 +133,6 @@ export class BasicEditComponent implements OnInit {
...
@@ -130,14 +133,6 @@ export class BasicEditComponent implements OnInit {
const
data
=
res
.
data
[
0
];
const
data
=
res
.
data
[
0
];
this
.
validateForm
.
name
=
data
.
name
;
this
.
validateForm
.
name
=
data
.
name
;
this
.
validateForm
.
host
=
data
.
host
;
this
.
validateForm
.
host
=
data
.
host
;
this
.
validateForm
.
ipmi_authtype
=
data
.
ipmi_authtype
+
''
;
this
.
validateForm
.
ipmi_username
=
data
.
ipmi_username
+
''
;
this
.
validateForm
.
ipmi_privilege
=
data
.
ipmi_privilege
+
''
;
this
.
validateForm
.
ipmi_password
=
data
.
ipmi_password
+
''
;
this
.
validateForm
.
tls_psk_identity
=
data
.
tls_psk_identity
+
''
;
this
.
validateForm
.
tls_issuer
=
data
.
tls_issuer
+
''
;
this
.
validateForm
.
tls_subject
=
data
.
tls_subject
+
''
;
this
.
validateForm
.
tls_psk
=
data
.
tls_psk
+
''
;
//分组对象
//分组对象
if
(
data
.
groups
)
{
if
(
data
.
groups
)
{
...
@@ -249,12 +244,9 @@ export class BasicEditComponent implements OnInit {
...
@@ -249,12 +244,9 @@ export class BasicEditComponent implements OnInit {
const
interfaceArr
=
[];
const
interfaceArr
=
[];
this
.
interfaceslist
.
forEach
(
res
=>
{
this
.
interfaceslist
.
forEach
(
res
=>
{
const
a
=
{
const
a
=
{
main
:
res
.
main
,
ip
:
res
.
ip
,
ip
:
res
.
ip
,
dns
:
res
.
dns
,
type
:
res
.
type
,
type
:
res
.
type
,
port
:
res
.
port
,
port
:
res
.
port
,
useip
:
res
.
useip
,
bulk
:
''
bulk
:
''
};
};
if
(
res
.
type
==
'2'
)
{
if
(
res
.
type
==
'2'
)
{
...
@@ -275,7 +267,14 @@ export class BasicEditComponent implements OnInit {
...
@@ -275,7 +267,14 @@ export class BasicEditComponent implements OnInit {
if
(
!
this
.
isInVentory
)
{
if
(
!
this
.
isInVentory
)
{
this
.
validateForm
.
inventoryExtend
=
null
;
this
.
validateForm
.
inventoryExtend
=
null
;
}
}
console
.
log
(
this
.
validateForm
);
let
clearArr
=
[];
this
.
validateForm
.
templates
.
forEach
(
e
=>
{
const
d
=
{
id
:
e
};
clearArr
.
push
(
d
);
});
this
.
validateForm
.
templates
=
clearArr
;
this
.
overAllSer
.
createHost
(
this
.
validateForm
).
subscribe
(
this
.
overAllSer
.
createHost
(
this
.
validateForm
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
...
@@ -297,12 +296,9 @@ export class BasicEditComponent implements OnInit {
...
@@ -297,12 +296,9 @@ export class BasicEditComponent implements OnInit {
const
interfaceArr
=
[];
const
interfaceArr
=
[];
this
.
interfaceslist
.
forEach
(
res
=>
{
this
.
interfaceslist
.
forEach
(
res
=>
{
const
a
=
{
const
a
=
{
main
:
res
.
main
,
ip
:
res
.
ip
,
ip
:
res
.
ip
,
dns
:
res
.
dns
,
type
:
res
.
type
,
type
:
res
.
type
,
port
:
res
.
port
,
port
:
res
.
port
,
useip
:
res
.
useip
,
bulk
:
''
,
bulk
:
''
,
hostid
:
this
.
hostId
,
hostid
:
this
.
hostId
,
interfaceid
:
res
.
interfaceid
interfaceid
:
res
.
interfaceid
...
@@ -326,9 +322,13 @@ export class BasicEditComponent implements OnInit {
...
@@ -326,9 +322,13 @@ export class BasicEditComponent implements OnInit {
}
}
this
.
templatesResoure
.
forEach
(
res
=>
{
this
.
templatesResoure
.
forEach
(
res
=>
{
if
(
this
.
validateForm
.
templates
.
indexOf
(
res
)
==
-
1
)
{
if
(
this
.
validateForm
.
templates
.
indexOf
(
res
)
==
-
1
)
{
clearArr
.
push
(
res
);
const
d
=
{
id
:
res
};
clearArr
.
push
(
d
);
}
}
});
});
this
.
validateForm
.
clearTemplateids
=
clearArr
;
this
.
validateForm
.
clearTemplateids
=
clearArr
;
if
(
this
.
macroTYpe
==
'macroExpand'
)
{
if
(
this
.
macroTYpe
==
'macroExpand'
)
{
...
@@ -397,12 +397,9 @@ export class BasicEditComponent implements OnInit {
...
@@ -397,12 +397,9 @@ export class BasicEditComponent implements OnInit {
//接口add
//接口add
addInterfaces
()
{
addInterfaces
()
{
const
demo
=
{
const
demo
=
{
main
:
'0'
,
ip
:
''
,
ip
:
''
,
dns
:
''
,
type
:
'2'
,
type
:
'1'
,
port
:
'10050'
,
port
:
'10050'
,
useip
:
1
,
bulk
:
true
,
bulk
:
true
,
};
};
this
.
interfaceslist
.
push
(
demo
);
this
.
interfaceslist
.
push
(
demo
);
...
@@ -519,12 +516,9 @@ export class BasicEditComponent implements OnInit {
...
@@ -519,12 +516,9 @@ export class BasicEditComponent implements OnInit {
];
];
this
.
interfaceslist
=
[
//接口list
this
.
interfaceslist
=
[
//接口list
{
{
main
:
'1'
,
ip
:
''
,
ip
:
''
,
dns
:
''
,
type
:
'1'
,
type
:
'1'
,
port
:
'10050'
,
port
:
'10050'
,
useip
:
1
,
bulk
:
true
,
bulk
:
true
,
}
}
];
];
...
@@ -534,7 +528,6 @@ export class BasicEditComponent implements OnInit {
...
@@ -534,7 +528,6 @@ export class BasicEditComponent implements OnInit {
hostExtend
:
{
hostExtend
:
{
equipmentTypeid
:
null
,
equipmentTypeid
:
null
,
secondLevelTypeid
:
null
,
secondLevelTypeid
:
null
,
// serviceid: ''
},
},
macros
:
this
.
macroList1
,
macros
:
this
.
macroList1
,
interfaces
:
null
,
//接口
interfaces
:
null
,
//接口
...
@@ -556,14 +549,6 @@ export class BasicEditComponent implements OnInit {
...
@@ -556,14 +549,6 @@ export class BasicEditComponent implements OnInit {
templates
:
null
,
templates
:
null
,
name
:
null
,
name
:
null
,
host
:
null
,
host
:
null
,
ipmi_authtype
:
null
,
ipmi_username
:
null
,
ipmi_privilege
:
null
,
ipmi_password
:
null
,
tls_psk_identity
:
null
,
tls_issuer
:
null
,
tls_subject
:
null
,
tls_psk
:
null
,
};
};
}
}
}
}
src/main/webapp/app/modal/warn-list/warn-list.component.ts
View file @
df387ba8
...
@@ -45,7 +45,7 @@ export class WarnListComponent implements OnInit {
...
@@ -45,7 +45,7 @@ export class WarnListComponent implements OnInit {
const
data
=
{
const
data
=
{
pageNum
:
this
.
pageNum
,
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
,
pageCount
:
this
.
pageCount
,
obj
:
obj
//
obj: obj
};
};
this
.
alarmSer
.
eventFind
(
data
).
subscribe
(
this
.
alarmSer
.
eventFind
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.html
View file @
df387ba8
...
@@ -31,96 +31,96 @@
...
@@ -31,96 +31,96 @@
<div
#
colorEle
class=
"checkTags tag-form"
>
<div
#
colorEle
class=
"checkTags tag-form"
>
<span
[
ngClass
]="{'
select-border
'
:
changeStates =
=
'正常'}"
(
click
)="
changeState
('正常')"
>
<span
[
ngClass
]="{'
select-border
'
:
changeStates =
=
'正常'}"
(
click
)="
changeState
('正常')"
>
<nz-tag
class=
"tag-green"
[
nzColor
]="
color
.
green
"
></nz-tag>
<nz-tag
class=
"tag-green"
[
nzColor
]="
color
.
green
"
></nz-tag>
<i
*
ngIf=
"!checkStatus.normal && checkStatus.normal !=0"
<i
*
ngIf=
"!checkStatus['0'] && checkStatus['0'] != 0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
{{checkStatus.normal}}
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
{{checkStatus['0']}}
</span>
<span
[
ngClass
]="{'
select-border
'
:
changeStates =
=
'告警'}"
(
click
)="
changeState
('告警')"
>
<nz-tag
class=
"tag-yellow"
[
nzColor
]="
color
.
yellow
"
></nz-tag>
<i
*
ngIf=
"!checkStatus.warning && checkStatus.warning !=0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
{{checkStatus.warning}}
</span>
</span>
<!-- <span [ngClass]="{'select-border': changeStates == '告警'}" (click)="changeState('告警')"> <nz-tag class="tag-yellow" [nzColor]="color.yellow"></nz-tag>-->
<!-- <i *ngIf="!checkStatus.warning"-->
<!-- class="anticon anticon-spin anticon-loading" style="font-size: 15px;"></i>-->
<!-- {{checkStatus.warning}}-->
<!-- </span>-->
<span
[
ngClass
]="{'
select-border
'
:
changeStates =
=
'严重'}"
(
click
)="
changeState
('严重')"
>
<nz-tag
class=
"tag-red"
[
nzColor
]="
color
.
red
"
></nz-tag>
<span
[
ngClass
]="{'
select-border
'
:
changeStates =
=
'严重'}"
(
click
)="
changeState
('严重')"
>
<nz-tag
class=
"tag-red"
[
nzColor
]="
color
.
red
"
></nz-tag>
<i
*
ngIf=
"!checkStatus
.high && checkStatus.high !=
0"
class=
"anticon anticon-spin anticon-loading"
<i
*
ngIf=
"!checkStatus
['1'] && checkStatus['1'] !=
0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
style=
"font-size: 15px;"
></i>
{{checkStatus
.high
}}
{{checkStatus
['1']
}}
</span>
</span>
<span
[
ngClass
]="{'
select-border
'
:
changeStates =
=
'禁用'}"
(
click
)="
changeState
('禁用')"
>
<nz-tag
class=
"tag-gray"
[
nzColor
]="
color
.
gray
"
></nz-tag>
<span
[
ngClass
]="{'
select-border
'
:
changeStates =
=
'禁用'}"
(
click
)="
changeState
('禁用')"
>
<nz-tag
class=
"tag-gray"
[
nzColor
]="
color
.
gray
"
></nz-tag>
<i
*
ngIf=
"!checkStatus
.disabled && checkStatus.disabled !=
0"
<i
*
ngIf=
"!checkStatus
['2'] && checkStatus['2'] !=
0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
{{checkStatus
.disabled
}}
{{checkStatus
['2']
}}
</span>
</span>
</div>
</div>
<nz-tabset
[
nzType
]="'
card
'"
[
nzSelectedIndex
]="
tabNum
"
class=
"tabs-smart"
>
<nz-tabset
[
nzType
]="'
card
'"
[
nzSelectedIndex
]="
tabNum
"
class=
"tabs-smart"
>
<nz-tab
nzTitle=
"资源详情"
>
<!-- <nz-tab nzTitle="资源详情">--
>
<section
>
<!-- <section>--
>
<p
class=
"padding-8-0"
>
{{hostName}}
</p
>
<!-- <p class="padding-8-0">{{hostName}}</p>--
>
<div
nz-row
nzGutter=
"24"
>
<!-- <div nz-row nzGutter="24">--
>
<div
nz-col
nzSpan=
"12"
>
<!-- <div nz-col nzSpan="12">--
>
<nz-collapse
>
<!-- <nz-collapse>--
>
<nz-collapse-panel
[
nzHeader
]="
panel1
.
name
"
[
nzActive
]="
panel1
.
active
"
<!-- <nz-collapse-panel [nzHeader]="panel1.name" [nzActive]="panel1.active"-->
[
nzDisabled
]="
panel1
.
disabled
"
>
<!-- [nzDisabled]="panel1.disabled">--
>
<div
nz-row
>
<!-- <div nz-row>--
>
<div
class=
"releative"
nz-col
nzSpan=
"12"
>
<!-- <div class="releative" nz-col nzSpan="12">--
>
<div
echarts
[
options
]="
chartOption1
"
<!-- <div echarts [options]="chartOption1"-->
style=
"height: 220px;width: 100%"
></div
>
<!-- style="height: 220px;width: 100%"></div>--
>
<div
class=
"posiabsolutStr"
>
<!-- <div class="posiabsolutStr">--
>
<p>
{{responseTimeStr}}
</p
>
<!-- <p>{{responseTimeStr}}</p>--
>
<p>
ms
</p
>
<!-- <p>ms</p>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
<div
class=
"releative"
nz-col
nzSpan=
"12"
>
<!-- <div class="releative" nz-col nzSpan="12">--
>
<div
echarts
[
options
]="
chartOption2
"
<!-- <div echarts [options]="chartOption2"-->
style=
"height: 220px;width: 100%;"
></div
>
<!-- style="height: 220px;width: 100%;"></div>--
>
<div
class=
"posiabsolutStr"
>
<!-- <div class="posiabsolutStr">--
>
<p>
{{losedStr}}
</p
>
<!-- <p>{{losedStr}}</p>--
>
<p>
%
</p
>
<!-- <p>%</p>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
</nz-collapse-panel
>
<!-- </nz-collapse-panel>--
>
</nz-collapse
>
<!-- </nz-collapse>--
>
</div
>
<!-- </div>--
>
<div
nz-col
nzSpan=
"12"
>
<!-- <div nz-col nzSpan="12">--
>
<nz-collapse
>
<!-- <nz-collapse>--
>
<nz-collapse-panel
[
nzHeader
]="
panel2
.
name
"
[
nzActive
]="
panel2
.
active
"
<!-- <nz-collapse-panel [nzHeader]="panel2.name" [nzActive]="panel2.active"-->
[
nzDisabled
]="
panel2
.
disabled
"
>
<!-- [nzDisabled]="panel2.disabled">--
>
<div
nz-row
>
<!-- <div nz-row>--
>
<div
class=
"releative"
nz-col
nzSpan=
"12"
>
<!-- <div class="releative" nz-col nzSpan="12">--
>
<div
echarts
[
options
]="
chartOption3
"
<!-- <div echarts [options]="chartOption3"-->
style=
"height: 220px;width: 100%;"
></div
>
<!-- style="height: 220px;width: 100%;"></div>--
>
<div
class=
"posiabsolutStr"
>
<!-- <div class="posiabsolutStr">--
>
<p>
{{cpuUsedStr}}
</p
>
<!-- <p>{{cpuUsedStr}}</p>--
>
<p>
%
</p
>
<!-- <p>%</p>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
<div
class=
"releative"
nz-col
nzSpan=
"12"
>
<!-- <div class="releative" nz-col nzSpan="12">--
>
<div
echarts
[
options
]="
chartOption4
"
<!-- <div echarts [options]="chartOption4"-->
style=
"height: 220px;width: 100%"
></div
>
<!-- style="height: 220px;width: 100%"></div>--
>
<div
class=
"posiabsolutStr"
>
<!-- <div class="posiabsolutStr">--
>
<p>
{{usedStr}}
</p
>
<!-- <p>{{usedStr}}</p>--
>
<p>
%
</p
>
<!-- <p>%</p>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
</nz-collapse-panel
>
<!-- </nz-collapse-panel>--
>
</nz-collapse
>
<!-- </nz-collapse>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
<div
nz-row
style=
"margin: 30px 0;"
>
<!-- <div nz-row style="margin: 30px 0;">--
>
<nz-collapse
>
<!-- <nz-collapse>--
>
<nz-collapse-panel
[
nzHeader
]="
panel3
.
name
"
[
nzActive
]="
panel3
.
active
"
<!-- <nz-collapse-panel [nzHeader]="panel3.name" [nzActive]="panel3.active"-->
[
nzDisabled
]="
panel3
.
disabled
"
>
<!-- [nzDisabled]="panel3.disabled">--
>
<div
nz-col
nzSpan=
"20"
>
<!-- <div nz-col nzSpan="20">--
>
<div
echarts
[
options
]="
secondOptionLeft
"
class=
"demo-chart"
></div
>
<!-- <div echarts [options]="secondOptionLeft" class="demo-chart"></div>--
>
</div
>
<!-- </div>--
>
<!--<div nz-col nzSpan="8">
-->
<!-- <!–<div nz-col nzSpan="8">–>
-->
<!--<div echarts [options]="secondOptionRight" class="demo-chart"></div>
-->
<!-- <!–<div echarts [options]="secondOptionRight" class="demo-chart"></div>–>
-->
<!--</div>
-->
<!-- <!–</div>–>
-->
</nz-collapse-panel
>
<!-- </nz-collapse-panel>--
>
</nz-collapse
>
<!-- </nz-collapse>--
>
</div
>
<!-- </div>--
>
</section
>
<!-- </section>--
>
</nz-tab
>
<!-- </nz-tab>--
>
<nz-tab
nzTitle=
"监测点列表"
>
<nz-tab
nzTitle=
"监测点列表"
>
<div
class=
"padding-8-0"
>
<div
class=
"padding-8-0"
>
<input
(
keyup
.
enter
)="
getCheckList
()"
style=
"width: 200px;"
type=
"text"
nz-input
[(
ngModel
)]="
searchName
"
placeholder=
"输入监测点名称"
>
<input
(
keyup
.
enter
)="
getCheckList
()"
style=
"width: 200px;"
type=
"text"
nz-input
[(
ngModel
)]="
searchName
"
placeholder=
"输入监测点名称"
>
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
df387ba8
...
@@ -129,7 +129,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -129,7 +129,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
this
.
hostId
=
queryParams
.
hostId
;
this
.
hostId
=
queryParams
.
hostId
;
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
let
data
=
res
.
data
[
0
]
let
data
=
res
.
data
;
this
.
hostName
=
data
.
name
;
//显示名
this
.
hostName
=
data
.
name
;
//显示名
this
.
realName
=
data
.
host
;
//主机名
this
.
realName
=
data
.
host
;
//主机名
}
}
...
@@ -138,11 +138,11 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -138,11 +138,11 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
isSpinning
=
tru
e
;
this
.
isSpinning
=
fals
e
;
this
.
responseTime
();
//
this.responseTime();
this
.
losed
();
//
this.losed();
this
.
cpused
();
//
this.cpused();
this
.
used
();
//
this.used();
// this.inOutInfo();
// this.inOutInfo();
//监测点
//监测点
...
@@ -153,7 +153,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -153,7 +153,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
hostid
:
this
.
hostId
hostid
:
this
.
hostId
};
};
this
.
warnList
.
getList
(
obj
);
this
.
warnList
.
getList
(
obj
);
this
.
disks
();
//
this.disks();
}
}
ngAfterViewInit
()
{
ngAfterViewInit
()
{
...
@@ -614,7 +614,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -614,7 +614,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//进出口流量-SNMP
//进出口流量-SNMP
inOutInfo
()
{
inOutInfo
()
{
this
.
inOutLoading
=
tru
e
;
this
.
inOutLoading
=
fals
e
;
const
data
=
{
const
data
=
{
obj
:{
obj
:{
hostid
:
Number
(
this
.
hostId
)
hostid
:
Number
(
this
.
hostId
)
...
@@ -662,7 +662,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -662,7 +662,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//添加or编辑监测点 之后
//添加or编辑监测点 之后
getList
(){
getList
(){
this
.
getCheckList
();
this
.
getCheckList
();
this
.
findItemType
();
//
this.findItemType();
}
}
handleKeyCancel
()
{
handleKeyCancel
()
{
...
@@ -676,7 +676,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
...
@@ -676,7 +676,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//监测点列表
//监测点列表
getCheckList
()
{
getCheckList
()
{
this
.
getCheckStatus
();
this
.
getCheckStatus
();
this
.
loading
=
tru
e
;
this
.
loading
=
fals
e
;
const
data
=
{
const
data
=
{
pageNum
:
this
.
pageIndex
,
pageNum
:
this
.
pageIndex
,
pageCount
:
pageSize
,
pageCount
:
pageSize
,
...
...
src/main/webapp/app/overAll/basic/basic.component.html
View file @
df387ba8
...
@@ -139,18 +139,6 @@
...
@@ -139,18 +139,6 @@
<span
(
click
)="
goEquip
(
item
)"
>
{{item?.equipmentType}}
</span>
<span
(
click
)="
goEquip
(
item
)"
>
{{item?.equipmentType}}
</span>
</td>
</td>
<td
class=
"default"
>
<td
class=
"default"
>
<ng-container
*
ngIf=
"!item.available || item.available == 0"
>
<nz-tag>
AGENT
</nz-tag>
</ng-container>
<ng-container
*
ngIf=
"item.available == 1"
>
<nz-tag
[
nzColor
]="'#
3bae6a
'"
>
AGENT
</nz-tag>
</ng-container>
<ng-container
*
ngIf=
"item.available == 2"
>
<nz-tooltip
[
nzTitle
]="
item
.
error
"
>
<nz-tag
nz-tooltip
[
nzColor
]="'#
d44f51
'"
>
AGENT
</nz-tag>
</nz-tooltip>
</ng-container>
<ng-container
*
ngIf=
" !item.snmp_available || item.snmp_available == 0"
>
<ng-container
*
ngIf=
" !item.snmp_available || item.snmp_available == 0"
>
<nz-tooltip
[
nzTitle
]="
item
?.
snmp_error
"
>
<nz-tooltip
[
nzTitle
]="
item
?.
snmp_error
"
>
<nz-tag>
SNMP
</nz-tag>
<nz-tag>
SNMP
</nz-tag>
...
@@ -176,18 +164,6 @@
...
@@ -176,18 +164,6 @@
<nz-tag
nz-tooltip
[
nzColor
]="'#
d44f51
'"
>
JMX
</nz-tag>
<nz-tag
nz-tooltip
[
nzColor
]="'#
d44f51
'"
>
JMX
</nz-tag>
</nz-tooltip>
</nz-tooltip>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"!item.ipmi_available || item.ipmi_available == 0"
>
<nz-tag>
IPMI
</nz-tag>
</ng-container>
<ng-container
*
ngIf=
"item.ipmi_available == 1"
>
<nz-tag
[
nzColor
]="'#
3bae6a
'"
>
IPMI
</nz-tag>
</ng-container>
<ng-container
*
ngIf=
"item.ipmi_available == 2"
>
<nz-tooltip
[
nzTitle
]="
item
.
ipmi_error
"
>
<nz-tag
nz-tooltip
[
nzColor
]="'#
d44f51
'"
>
IPMI
</nz-tag>
</nz-tooltip>
</ng-container>
</td>
</td>
<td
class=
"handle main-color"
>
<td
class=
"handle main-color"
>
<span
(
click
)="
showBasicCheckModal
(
item
.
hostid
,
item
.
host
)"
>
添加监测点
</span>
<span
(
click
)="
showBasicCheckModal
(
item
.
hostid
,
item
.
host
)"
>
添加监测点
</span>
...
@@ -203,8 +179,7 @@
...
@@ -203,8 +179,7 @@
<ng-container
*
ngIf=
"item.status == 0"
>
停止
</ng-container>
<ng-container
*
ngIf=
"item.status == 0"
>
停止
</ng-container>
监控
监控
</a></li>
</a></li>
<li
nz-menu-item
(
click
)="
goDetail
(
item
)"
><a>
查看监测点
</a></li>
<!-- <li nz-menu-item (click)="goDetail(item)"><a>查看监测点</a></li>-->
<li
(
click
)="
showAlarm
()"
nz-menu-item
><a>
添加告警
</a></li>
</ul>
</ul>
</nz-dropdown>
</nz-dropdown>
</td>
</td>
...
@@ -223,4 +198,4 @@
...
@@ -223,4 +198,4 @@
<!--临时暂停-->
<!--临时暂停-->
<smart-pause
#
smartPause
(
done
)="
handleOk
($
event
)"
></smart-pause>
<smart-pause
#
smartPause
(
done
)="
handleOk
($
event
)"
></smart-pause>
<!--添加告警-->
<!--添加告警-->
<
smart-alarm-modal
#
smartAlarmModal
></smart-alarm-modal
>
<
!--<smart-alarm-modal #smartAlarmModal></smart-alarm-modal>--
>
src/main/webapp/app/overAll/basic/basic.component.ts
View file @
df387ba8
...
@@ -48,7 +48,7 @@ export class BasicComponent implements OnInit {
...
@@ -48,7 +48,7 @@ export class BasicComponent implements OnInit {
@
ViewChild
(
'smartCheck'
)
smartCheck
:
BasiCheckComponent
;
@
ViewChild
(
'smartCheck'
)
smartCheck
:
BasiCheckComponent
;
@
ViewChild
(
'smartCreateGroup'
)
smartCreateGroup
:
CreateGroupComponent
;
@
ViewChild
(
'smartCreateGroup'
)
smartCreateGroup
:
CreateGroupComponent
;
@
ViewChild
(
'smartPause'
)
smartPause
:
PauseComponent
;
@
ViewChild
(
'smartPause'
)
smartPause
:
PauseComponent
;
@
ViewChild
(
'smartAlarmModal'
)
smartAlarmModal
:
AlarmModalComponent
;
//
@ViewChild('smartAlarmModal') smartAlarmModal: AlarmModalComponent;
color
=
color
;
color
=
color
;
...
@@ -171,7 +171,7 @@ export class BasicComponent implements OnInit {
...
@@ -171,7 +171,7 @@ export class BasicComponent implements OnInit {
this
.
overAllSer
.
findGroup
().
subscribe
(
this
.
overAllSer
.
findGroup
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
groupList
=
res
.
data
;
this
.
groupList
=
res
.
data
.
data
;
this
.
search
();
this
.
search
();
}
}
}
}
...
@@ -404,7 +404,7 @@ export class BasicComponent implements OnInit {
...
@@ -404,7 +404,7 @@ export class BasicComponent implements OnInit {
//添加告警
//添加告警
showAlarm
()
{
showAlarm
()
{
this
.
smartAlarmModal
.
showAddModal
(
'添加告警'
,
null
);
//
this.smartAlarmModal.showAddModal('添加告警', null);
}
}
handleOk
(
e
)
{
handleOk
(
e
)
{
...
...
src/main/webapp/app/overAll/overAll.service.ts
View file @
df387ba8
...
@@ -111,7 +111,7 @@ export class OverAllService {
...
@@ -111,7 +111,7 @@ export class OverAllService {
//创建监控点
//创建监控点
create
(
data
):
Observable
<
any
>
{
create
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/item/
creat
e'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/item/
sav
e'
,
data
);
}
}
//删除资源--get
//删除资源--get
...
@@ -131,7 +131,7 @@ export class OverAllService {
...
@@ -131,7 +131,7 @@ export class OverAllService {
//模版信息
//模版信息
templates
():
Observable
<
any
>
{
templates
():
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/template
s
'
);
return
this
.
http
.
get
(
SERVER_API_URL
+
'/template
/list
'
);
}
}
//添加分组
//添加分组
...
@@ -151,7 +151,7 @@ export class OverAllService {
...
@@ -151,7 +151,7 @@ export class OverAllService {
//删除监控项
//删除监控项
deleteItem
(
data
):
Observable
<
any
>
{
deleteItem
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/item/delete
Item
'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/item/delete'
,
data
);
}
}
//监控设备数
//监控设备数
...
@@ -161,7 +161,7 @@ export class OverAllService {
...
@@ -161,7 +161,7 @@ export class OverAllService {
//监测点列表--type
//监测点列表--type
findCheckByType
(
data
):
Observable
<
any
>
{
findCheckByType
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/item/
find/
'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/item/
page
'
,
data
);
}
}
//查询监控项
//查询监控项
...
@@ -181,7 +181,7 @@ export class OverAllService {
...
@@ -181,7 +181,7 @@ export class OverAllService {
//监测点状态统计
//监测点状态统计
findItemCount
(
params
):
Observable
<
any
>
{
findItemCount
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/item/find
ItemStatistic
s/'
+
params
);
return
this
.
http
.
get
(
SERVER_API_URL
+
'/item/find
itemstatu
s/'
+
params
);
}
}
//监测点图形数据
//监测点图形数据
...
@@ -538,6 +538,6 @@ export class OverAllService {
...
@@ -538,6 +538,6 @@ export class OverAllService {
//查询系统信息
//查询系统信息
getSystem
():
Observable
<
any
>
{
getSystem
():
Observable
<
any
>
{
return
this
.
http
.
get
(
'./json/system.json'
);
return
this
.
http
.
get
(
'./json/system.json'
);
}
}
}
}
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