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