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
7ec5a6ec
Commit
7ec5a6ec
authored
Nov 02, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f4fae93f
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
38 additions
and
18 deletions
+38
-18
app.constants.ts
src/main/webapp/app/app.constants.ts
+2
-2
basi-check.component.html
...ain/webapp/app/modal/basi-check/basi-check.component.html
+10
-0
basi-check.component.ts
src/main/webapp/app/modal/basi-check/basi-check.component.ts
+13
-10
threshold.component.html
src/main/webapp/app/modal/threshold/threshold.component.html
+4
-0
threshold.component.ts
src/main/webapp/app/modal/threshold/threshold.component.ts
+1
-0
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+4
-2
basic.component.html
src/main/webapp/app/overAll/basic/basic.component.html
+1
-1
basic.component.ts
src/main/webapp/app/overAll/basic/basic.component.ts
+1
-1
item-list.component.ts
...pp/overAll/template/list/item-list/item-list.component.ts
+1
-1
template.component.ts
src/main/webapp/app/overAll/template/template.component.ts
+1
-1
No files found.
src/main/webapp/app/app.constants.ts
View file @
7ec5a6ec
export
const
VERSION
=
process
.
env
.
VERSION
;
export
const
DEBUG_INFO_ENABLED
:
boolean
=
!!
process
.
env
.
DEBUG_INFO_ENABLED
;
export
const
SERVER_API_URL_COMS
=
'/coms'
;
export
const
SERVER_API_URL
=
'/anke'
;
//
export const SERVER_API_URL = '/zhouxi';
//
export const SERVER_API_URL = '/anke';
export
const
SERVER_API_URL
=
'/zhouxi'
;
// export const SERVER_API_URL = '/zabbixBox';
export
const
SERVER_API_URL_MONITOR
=
'/api'
;
export
const
BUILD_TIMESTAMP
=
process
.
env
.
BUILD_TIMESTAMP
;
...
...
src/main/webapp/app/modal/basi-check/basi-check.component.html
View file @
7ec5a6ec
...
...
@@ -18,6 +18,16 @@
</nz-form-control>
</nz-form-item>
<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.id}}"
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>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"snmpCommunity"
>
SNMP community
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"snmpCommunity"
name=
"snmpCommunity"
type=
"text"
nz-input
...
...
src/main/webapp/app/modal/basi-check/basi-check.component.ts
View file @
7ec5a6ec
...
...
@@ -43,6 +43,7 @@ export class BasiCheckComponent implements OnInit {
checkList
;
//监测点分类
interval
;
//间隔时长
templateid
;
//模版id
interfaceList
=
[];
tabNum
:
number
;
triggerObj
=
{
...
...
@@ -72,8 +73,8 @@ export class BasiCheckComponent implements OnInit {
snmpCommunity
:
[
'public'
],
delay
:
[
null
,
[
Validators
.
required
]],
interfaceid
:
[
null
],
templateid
:[
null
],
description
:
[
null
,
[
Validators
.
required
]],
templateid
:
[
null
],
description
:
[
null
,
[
Validators
.
required
]],
});
this
.
triggerObj
=
{
condition
:
''
,
...
...
@@ -83,15 +84,16 @@ export class BasiCheckComponent implements OnInit {
}
//新增
showAddModal
(
host
Id
,
hostName
,
title
)
{
showAddModal
(
host
Obj
,
hostId
,
hostName
,
title
)
{
this
.
title
=
title
;
this
.
isCheck
=
true
;
this
.
hostId
=
hostId
;
this
.
hostName
=
hostName
;
this
.
interfaceList
=
hostObj
.
interfaces
;
}
//编辑
showEditModal
(
item
,
hostId
,
id
,
hostName
,
templateid
,
title
)
{
showEditModal
(
hostObj
,
item
,
hostId
,
id
,
hostName
,
templateid
,
title
)
{
this
.
title
=
title
;
this
.
hostId
=
hostId
;
this
.
templateid
=
templateid
;
...
...
@@ -101,6 +103,7 @@ export class BasiCheckComponent implements OnInit {
item
.
type
+=
''
;
item
.
valueType
+=
''
;
this
.
validateForm
.
patchValue
(
item
);
this
.
interfaceList
=
hostObj
.
interfaces
;
}
//获取监测点分类
...
...
@@ -118,8 +121,8 @@ export class BasiCheckComponent implements OnInit {
//添加
handleCheckOk
()
{
const
list
=
[
'0'
,
'1'
,
'3'
,
'4'
,
'6'
,
'10'
,
'12'
,
'13'
,
'14'
,
'16'
,
'17'
];
if
(
list
.
indexOf
(
this
.
validateForm
.
value
.
type
)
>
-
1
)
{
const
list
=
[
'0'
,
'1'
,
'3'
,
'4'
,
'6'
,
'10'
,
'12'
,
'13'
,
'14'
,
'16'
,
'17'
];
if
(
list
.
indexOf
(
this
.
validateForm
.
value
.
type
)
>
-
1
)
{
this
.
validateForm
.
get
(
'type'
).
setValidators
(
Validators
.
required
);
}
for
(
let
i
in
this
.
validateForm
.
controls
)
{
...
...
@@ -132,10 +135,10 @@ export class BasiCheckComponent implements OnInit {
}
this
.
validateForm
.
value
.
hostid
=
this
.
hostId
;
this
.
isOkLoading
=
true
;
if
(
this
.
title
==
'添加监测点'
||
this
.
title
==
"添加模版监测点"
)
{
if
(
this
.
title
==
'添加监测点'
||
this
.
title
==
'添加模版监测点'
)
{
this
.
create
();
}
if
(
this
.
title
==
'编辑监测点'
||
this
.
title
==
"编辑模版监测点"
)
{
if
(
this
.
title
==
'编辑监测点'
||
this
.
title
==
'编辑模版监测点'
)
{
this
.
update
();
}
}
...
...
@@ -161,8 +164,8 @@ export class BasiCheckComponent implements OnInit {
//修改监控项
update
()
{
this
.
validateForm
.
patchValue
({
templateid
:
this
.
templateid
})
templateid
:
this
.
templateid
})
;
this
.
validateForm
.
addControl
(
'id'
,
new
FormControl
(
this
.
itemId
));
this
.
overAllSer
.
itemUpdata
(
this
.
validateForm
.
value
).
subscribe
(
(
res
)
=>
{
...
...
src/main/webapp/app/modal/threshold/threshold.component.html
View file @
7ec5a6ec
<nz-modal
[
nzWidth
]="
880
"
[(
nzVisible
)]="
isVisiable
"
[
nzTitle
]="
title
"
[
nzOkLoading
]="
isOkLoading
"
(
nzOnCancel
)="
handleCheckCancel
()"
(
nzOnOk
)="
saveTrigger
()"
>
<div
style=
"padding-left: 30px;"
>
<p>
{{demo}}
</p>
<p>
当前监测点id:{{itemId}}
</p>
</div>
<nz-form-item
nzFlex
>
<nz-form-control
[
nzOffset
]="
4
"
[
nzSpan
]="
14
"
>
<nz-radio-group
[(
ngModel
)]="
conditionType
"
>
...
...
src/main/webapp/app/modal/threshold/threshold.component.ts
View file @
7ec5a6ec
...
...
@@ -29,6 +29,7 @@ export class ThresholdComponent implements OnInit {
faultCondition
:
''
,
itemName
:
''
};
demo
=
`示例1.{监测点id}>10 or {监测点id}=1 示例2. {监测点id}<10 and {监测点id}>3`
;
constructor
(
private
overAllSer
:
OverAllService
,
private
fb
:
FormBuilder
,
private
message
:
NzMessageService
)
{
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
7ec5a6ec
...
...
@@ -56,6 +56,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
color
=
color
;
loading
=
false
;
hostId
:
string
;
hostObj
;
tabNum
=
0
;
hostName
;
realName
;
...
...
@@ -134,6 +135,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
let
data
=
res
.
data
;
this
.
hostObj
=
data
;
this
.
hostName
=
data
.
name
;
//显示名
this
.
realName
=
data
.
host
;
//主机名
}
...
...
@@ -645,12 +647,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//添加监测点
showCheckModal
()
{
this
.
smartCheck
.
showAddModal
(
this
.
hostId
,
this
.
realName
,
'添加监测点'
);
this
.
smartCheck
.
showAddModal
(
this
.
host
Obj
,
this
.
host
Id
,
this
.
realName
,
'添加监测点'
);
}
//编辑监测点
showEditModal
(
item
)
{
this
.
smartCheck
.
showEditModal
(
item
,
this
.
hostId
,
item
.
id
,
item
.
name
,
item
.
templateid
,
'编辑监测点'
);
this
.
smartCheck
.
showEditModal
(
this
.
hostObj
,
item
,
this
.
hostId
,
item
.
id
,
item
.
name
,
item
.
templateid
,
'编辑监测点'
);
}
//添加阈值
...
...
src/main/webapp/app/overAll/basic/basic.component.html
View file @
7ec5a6ec
...
...
@@ -141,7 +141,7 @@
</ng-container>
</td>
<td
class=
"handle main-color"
>
<span
(
click
)="
showBasicCheckModal
(
item
.
hostid
,
item
.
host
)"
>
添加监测点
</span
>
<!-- <span (click)="showBasicCheckModal(item.hostid,item.host)">添加监测点</span>--
>
<span
(
click
)="
editBasicModal
(
item
)"
>
编辑
</span>
<span
(
click
)="
showDeleteConfirm
(
item
)"
>
删除
</span>
<span
(
click
)="
openHost
(
item
)"
>
...
...
src/main/webapp/app/overAll/basic/basic.component.ts
View file @
7ec5a6ec
...
...
@@ -292,7 +292,7 @@ export class BasicComponent implements OnInit {
//添加监测点
showBasicCheckModal
(
hostid
,
host
)
{
this
.
smartCheck
.
showAddModal
(
hostid
,
host
,
'添加监测点'
);
//
this.smartCheck.showAddModal(hostid, host, '添加监测点');
}
//列表
...
...
src/main/webapp/app/overAll/template/list/item-list/item-list.component.ts
View file @
7ec5a6ec
...
...
@@ -162,7 +162,7 @@ export class ItemListComponent implements OnInit {
//添加监测点
showAddModal
(){
this
.
smartBasiCheck
.
showAddModal
(
this
.
hostId
,
this
.
tempName
,
"添加模版监测点"
);
//
this.smartBasiCheck.showAddModal(this.hostId,this.tempName,"添加模版监测点");
}
//编辑监测点
...
...
src/main/webapp/app/overAll/template/template.component.ts
View file @
7ec5a6ec
...
...
@@ -181,7 +181,7 @@ export class TemplateComponent implements OnInit {
//模版监测点
showBasicCheckModal
(
hostid
,
host
)
{
this
.
smartCheck
.
showAddModal
(
hostid
,
host
,
'添加模版监测点'
);
//
this.smartCheck.showAddModal(hostid, host, '添加模版监测点');
}
//添加自动发现
...
...
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