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
f4fae93f
Commit
f4fae93f
authored
Nov 02, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
6e87ad81
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
140 additions
and
205 deletions
+140
-205
basi-check.component.html
...ain/webapp/app/modal/basi-check/basi-check.component.html
+0
-1
basi-check.component.ts
src/main/webapp/app/modal/basi-check/basi-check.component.ts
+5
-21
basic-edit.component.ts
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
+0
-20
threshold.component.html
src/main/webapp/app/modal/threshold/threshold.component.html
+1
-1
threshold.component.ts
src/main/webapp/app/modal/threshold/threshold.component.ts
+50
-78
basic-detail.component.html
...pp/overAll/basic/basic-detail/basic-detail.component.html
+4
-3
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+60
-57
basic.component.html
src/main/webapp/app/overAll/basic/basic.component.html
+1
-5
basic.component.ts
src/main/webapp/app/overAll/basic/basic.component.ts
+8
-6
overAll.service.ts
src/main/webapp/app/overAll/overAll.service.ts
+3
-3
item-list.component.ts
...pp/overAll/template/list/item-list/item-list.component.ts
+1
-3
power.component.html
src/main/webapp/app/system/power/power.component.html
+2
-2
power.component.ts
src/main/webapp/app/system/power/power.component.ts
+5
-5
No files found.
src/main/webapp/app/modal/basi-check/basi-check.component.html
View file @
f4fae93f
...
...
@@ -22,7 +22,6 @@
<nz-form-control
[
nzSpan
]="
14
"
>
<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>
...
...
src/main/webapp/app/modal/basi-check/basi-check.component.ts
View file @
f4fae93f
...
...
@@ -88,32 +88,19 @@ export class BasiCheckComponent implements OnInit {
this
.
isCheck
=
true
;
this
.
hostId
=
hostId
;
this
.
hostName
=
hostName
;
// this.getItemType();
}
//编辑
showEditModal
(
hostId
,
id
,
hostName
,
templateid
,
title
)
{
showEditModal
(
item
,
hostId
,
id
,
hostName
,
templateid
,
title
)
{
this
.
title
=
title
;
this
.
hostId
=
hostId
;
this
.
templateid
=
templateid
;
this
.
isCheck
=
true
;
this
.
itemId
=
id
;
this
.
hostName
=
hostName
;
this
.
overAllSer
.
findItemDetail
(
id
).
subscribe
(
(
res
)
=>
{
const
data
=
res
.
data
[
0
];
data
.
type
+=
''
;
data
.
valueType
+=
''
;
// if(data.applications){
// data.applications = data.applications.map(e=>{
// return e.applicationid;
// });
// }
this
.
validateForm
.
patchValue
(
data
);
}
);
// this.getItemType();
item
.
type
+=
''
;
item
.
valueType
+=
''
;
this
.
validateForm
.
patchValue
(
item
);
}
//获取监测点分类
...
...
@@ -176,7 +163,7 @@ export class BasiCheckComponent implements OnInit {
this
.
validateForm
.
patchValue
({
templateid
:
this
.
templateid
})
this
.
validateForm
.
addControl
(
'i
temi
d'
,
new
FormControl
(
this
.
itemId
));
this
.
validateForm
.
addControl
(
'id'
,
new
FormControl
(
this
.
itemId
));
this
.
overAllSer
.
itemUpdata
(
this
.
validateForm
.
value
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
...
...
@@ -187,9 +174,6 @@ export class BasiCheckComponent implements OnInit {
this
.
isCheck
=
false
;
}
this
.
isOkLoading
=
false
;
},
(
err
)
=>
{
this
.
message
.
error
(
'系统错误'
);
}
);
}
...
...
src/main/webapp/app/modal/basic-edit/basic-edit.component.ts
View file @
f4fae93f
...
...
@@ -405,26 +405,6 @@ export class BasicEditComponent implements OnInit {
}
}
//只能一个默认
changeMain
(
index
)
{
let
d
=
[];
this
.
interfaceslist
.
map
(
e
=>
{
if
(
e
.
type
==
this
.
interfaceslist
[
index
].
type
)
{
d
.
push
(
e
);
}
});
if
(
d
.
length
>
1
)
{
this
.
interfaceslist
.
forEach
(
res
=>
{
if
(
res
.
type
==
this
.
interfaceslist
[
index
].
type
)
{
res
.
main
=
'0'
;
}
});
}
console
.
log
(
d
);
this
.
interfaceslist
[
index
].
main
=
'1'
;
}
//新增宏
addMacro1
()
{
const
data
=
{
...
...
src/main/webapp/app/modal/threshold/threshold.component.html
View file @
f4fae93f
...
...
@@ -3,7 +3,7 @@
<nz-form-item
nzFlex
>
<nz-form-control
[
nzOffset
]="
4
"
[
nzSpan
]="
14
"
>
<nz-radio-group
[(
ngModel
)]="
conditionType
"
>
<label
nz-radio-button
nzValue=
"commonly"
><span>
常规
</span></label
>
<!-- <label nz-radio-button nzValue="commonly"><span>常规</span></label>--
>
<label
nz-radio-button
nzValue=
"high"
><span>
高级
</span></label>
</nz-radio-group>
</nz-form-control>
...
...
src/main/webapp/app/modal/threshold/threshold.component.ts
View file @
f4fae93f
...
...
@@ -17,7 +17,7 @@ export class ThresholdComponent implements OnInit {
itemId
;
//监控项ID
hostName
;
//主机name
itemObj
;
//监控项对象
conditionType
=
'
commonly
'
;
conditionType
=
'
high
'
;
faultConditionList
=
[];
//故障阈值
conditionList
=
[];
//危险阈值
...
...
@@ -78,14 +78,15 @@ export class ThresholdComponent implements OnInit {
}
//新增
showAddModal
(
title
,
itemId
,
hostName
)
{
showAddModal
(
item
,
title
,
itemId
,
hostName
)
{
this
.
title
=
title
;
this
.
itemId
=
itemId
;
this
.
isVisiable
=
true
;
this
.
hostName
=
hostName
;
this
.
itemObj
=
item
;
this
.
overAllSer
.
findItemDetail
(
this
.
itemId
).
subscribe
(
(
res
)
=>
{
this
.
itemObj
=
res
.
data
[
0
]
;
this
.
itemObj
=
res
.
data
;
}
);
}
...
...
@@ -98,54 +99,15 @@ export class ThresholdComponent implements OnInit {
this
.
hostName
=
hostName
;
this
.
overAllSer
.
findItemDetail
(
this
.
itemId
).
subscribe
(
(
res
)
=>
{
this
.
itemObj
=
res
.
data
[
0
];
this
.
itemObj
=
res
.
data
;
this
.
itemObj
.
triggers
.
forEach
((
value
)
=>
{
let
str
=
value
.
expression
;
let
equal
=
[];
let
arr
=
[];
let
con
=
''
;
let
a
=
str
.
split
(
' '
);
a
.
forEach
((
e
)
=>
{
// 符号数组
let
index1
=
e
.
indexOf
(
'}'
);
if
(
e
==
'and'
||
e
==
'or'
)
{
equal
.
push
(
e
);
}
if
(
index1
>
-
1
)
{
let
f
=
e
.
substring
(
index1
+
1
,
e
.
length
);
con
+=
'{'
+
this
.
hostName
+
':'
+
this
.
itemObj
.
key_
+
'.last()}'
+
f
+
' '
;
}
else
{
con
+=
e
+
' '
;
}
});
let
c
=
str
.
replace
(
/and/g
,
''
).
replace
(
/or/g
,
''
).
split
(
' '
);
c
.
forEach
((
val
,
index
)
=>
{
let
index1
=
val
.
indexOf
(
'}'
);
let
d
=
val
.
substring
(
index1
+
1
,
val
.
length
);
let
data
;
if
(
index
>
0
)
{
data
=
{
and
:
' '
+
equal
[
index
-
1
]
+
' '
,
equal
:
d
[
0
],
value
:
d
.
substring
(
1
,
d
.
length
),
};
}
else
{
data
=
{
equal
:
d
[
0
],
value
:
d
.
substring
(
1
,
d
.
length
),
};
}
arr
.
push
(
data
);
});
if
(
value
.
priority
==
2
||
value
.
priority
==
3
)
{
//危险
this
.
conditionList
=
arr
;
this
.
triggerObj
.
condition
=
con
;
this
.
triggerConditionId
=
value
.
triggerid
;
this
.
triggerObj
.
condition
=
value
.
expression
;
this
.
triggerConditionId
=
value
.
id
;
}
if
(
value
.
priority
==
4
||
value
.
priority
==
5
)
{
//故障
this
.
faultConditionList
=
arr
;
this
.
triggerObj
.
faultCondition
=
con
;
this
.
triggerFaultConditionId
=
value
.
triggerid
;
this
.
triggerObj
.
faultCondition
=
value
.
expression
;
this
.
triggerFaultConditionId
=
value
.
id
;
}
});
}
...
...
@@ -163,19 +125,19 @@ export class ThresholdComponent implements OnInit {
if
(
!
res
.
and
)
{
res
.
and
=
''
;
}
data
.
condition
+=
res
.
and
+
'{'
+
this
.
hostName
+
':'
+
this
.
itemObj
.
key
_
+
'.last()}'
+
res
.
equal
+
''
+
res
.
value
;
data
.
condition
+=
res
.
and
+
'{'
+
this
.
hostName
+
':'
+
this
.
itemObj
.
key
+
'.last()}'
+
res
.
equal
+
''
+
res
.
value
;
});
this
.
faultConditionList
.
forEach
(
res
=>
{
if
(
!
res
.
and
)
{
res
.
and
=
''
;
}
data
.
faultCondition
+=
res
.
and
+
'{'
+
this
.
hostName
+
':'
+
this
.
itemObj
.
key
_
+
'.last()}'
+
res
.
equal
+
''
+
res
.
value
;
data
.
faultCondition
+=
res
.
and
+
'{'
+
this
.
hostName
+
':'
+
this
.
itemObj
.
key
+
'.last()}'
+
res
.
equal
+
''
+
res
.
value
;
});
}
else
{
//高级
data
.
condition
=
this
.
triggerObj
.
condition
;
data
.
faultCondition
=
this
.
triggerObj
.
faultCondition
;
}
if
(
!
this
.
checkFun
())
{
if
(
!
this
.
checkFun
()
&&
!
this
.
triggerObj
.
condition
&&
!
this
.
triggerObj
.
faultCondition
)
{
this
.
message
.
error
(
'请输入阈值'
);
return
false
;
}
...
...
@@ -183,13 +145,13 @@ export class ThresholdComponent implements OnInit {
this
.
isOkLoading
=
true
;
if
(
this
.
title
==
'添加阈值'
)
{
if
(
this
.
conditionList
.
length
==
0
&&
this
.
faultConditionList
.
length
==
0
)
{
this
.
isVisiable
=
false
;
this
.
initForm
();
return
false
;
}
else
{
this
.
createTrigger
(
data
);
}
//
if (this.conditionList.length == 0 && this.faultConditionList.length == 0) {
//
this.isVisiable = false;
//
this.initForm();
//
return false;
//
}else{
this
.
createTrigger
(
data
);
//
}
}
if
(
this
.
title
==
'编辑阈值'
)
{
this
.
updateTrigger
(
data
);
...
...
@@ -220,7 +182,8 @@ export class ThresholdComponent implements OnInit {
const
res
=
{
itemName
:
this
.
itemObj
.
name
,
faultCondition
:
data
.
faultCondition
,
condition
:
data
.
condition
condition
:
data
.
condition
,
itemid
:
this
.
itemId
};
this
.
overAllSer
.
createTrigger
(
res
).
subscribe
(
(
response
)
=>
{
...
...
@@ -239,27 +202,36 @@ export class ThresholdComponent implements OnInit {
//2.修改阈值
updateTrigger
(
data
)
{
const
res
=
{
faultCondition
:
{
//故障阈值
itemName
:
this
.
itemObj
.
name
,
condition
:
data
.
faultCondition
,
triggerid
:
this
.
triggerFaultConditionId
},
condition
:
{
//危险阈值
itemName
:
this
.
itemObj
.
name
,
condition
:
data
.
condition
,
triggerid
:
this
.
triggerConditionId
}
const
condition
=
{
id
:
this
.
triggerConditionId
,
itemid
:
this
.
itemId
,
expression
:
data
.
condition
,
};
this
.
overAllSer
.
updateTrigger
(
res
).
subscribe
(
res
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
success
(
'修改阈值成功'
);
this
.
initForm
();
this
.
done
.
emit
();
this
.
isVisiable
=
false
;
}
this
.
isOkLoading
=
false
;
});
const
faultCondition
=
{
id
:
this
.
triggerFaultConditionId
,
itemid
:
this
.
itemId
,
expression
:
data
.
faultCondition
,
};
if
(
this
.
triggerConditionId
)
{
this
.
overAllSer
.
updateTrigger
(
condition
).
subscribe
(
res
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
initForm
();
this
.
done
.
emit
();
this
.
isOkLoading
=
false
;
this
.
isVisiable
=
false
;
}
});
}
if
(
this
.
triggerFaultConditionId
)
{
this
.
overAllSer
.
updateTrigger
(
faultCondition
).
subscribe
(
res
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
initForm
();
this
.
done
.
emit
();
this
.
isVisiable
=
false
;
}
this
.
isOkLoading
=
false
;
});
}
}
//取消
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.html
View file @
f4fae93f
...
...
@@ -131,7 +131,8 @@
<label
*
ngFor=
"let item of itemTypeList"
(
click
)="
changeType
(
item
)"
nz-radio-button
[
nzValue
]="
item
.
applicationid
"
>
{{item.name}}
</label>
</nz-radio-group>
</div>
<nz-table
#
checkTable
[
nzData
]="
checkList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageIndex
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
change
($
event
)"
[
nzLoading
]="
loading
"
>
<nz-table
#
checkTable
[
nzData
]="
checkList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageIndex
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
change
($
event
)"
[
nzLoading
]="
loading
"
>
<thead>
<tr>
<th
nzWidth=
"20%"
>
监测点名称
</th>
...
...
@@ -172,8 +173,8 @@
<span
(
click
)="
showEditModal
(
data
)"
>
编辑监测点
</span>
<span
(
click
)="
deleteCheckItem
(
data
)"
>
删除监测点
</span>
<br>
<span
(
click
)="
showAddThresholdModal
(
data
)"
>
添加阈值
</span>
<span
(
click
)="
showEditThresholdModal
(
data
)"
>
编辑阈值
</span>
<span
*
ngIf=
"data?.triggers.length == 0"
(
click
)="
showAddThresholdModal
(
data
)"
>
添加阈值
</span>
<span
*
ngIf=
"data?.triggers.length > 0"
(
click
)="
showEditThresholdModal
(
data
)"
>
编辑阈值
</span>
</ng-container>
<span
*
ngIf=
"data.status == 0 && data.state==0"
(
click
)="
updateItem
(
data
.
itemid
,
1
)"
style=
"color: green"
>
已启用
</span>
<span
*
ngIf=
"data.status == 0 && data.state==1"
(
click
)="
updateItem
(
data
.
itemid
,
1
)"
style=
"color: red"
>
不支持的
</span>
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
f4fae93f
...
...
@@ -21,22 +21,26 @@ import {ThresholdComponent} from '../../../modal/threshold/threshold.component';
left: 233px;
z-index: 989;
}
.time-select{
.time-select {
position: absolute;
top: 55px;
right: 15px;
z-index: 999;
}
.select-border{
.select-border {
border: 1px solid #6097b7;
border-radius: 5px;
padding: 2px;
margin-right: 5px;
}
:host ::ng-deep .tabs-smart .ant-tabs-nav-scroll div.ant-tabs-tab:nth-child(3){
:host ::ng-deep .tabs-smart .ant-tabs-nav-scroll div.ant-tabs-tab:nth-child(3) {
margin-right: 180px !important;
}
:host ::ng-deep .ant-radio-button-wrapper{
:host ::ng-deep .ant-radio-button-wrapper {
margin: 4px;
}
`
...
...
@@ -47,8 +51,8 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
@
ViewChild
(
'smartThreshold'
)
smartThreshold
:
ThresholdComponent
;
@
ViewChild
(
'thirdTabs'
)
thirdTabs
:
ElementRef
;
@
ViewChild
(
'warnList'
)
warnList
:
WarnListComponent
;
@
ViewChild
(
'colorEle'
)
colorEle
:
ElementRef
;
@
ViewChild
(
'checkEle'
)
checkEle
:
ElementRef
;
@
ViewChild
(
'colorEle'
)
colorEle
:
ElementRef
;
@
ViewChild
(
'checkEle'
)
checkEle
:
ElementRef
;
color
=
color
;
loading
=
false
;
hostId
:
string
;
...
...
@@ -69,7 +73,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
secondOptionRight
;
dataSet
:
any
[];
panel1
=
{
active
:
true
,
name
:
'响应时间与丢包率'
,
disabled
:
false
};
panel2
=
{
active
:
true
,
name
:
'CPU使用率及内存使用率'
,
disabled
:
false
};
panel2
=
{
active
:
true
,
name
:
'CPU使用率及内存使用率'
,
disabled
:
false
};
panel3
=
{
active
:
true
,
name
:
'磁盘使用情况'
,
disabled
:
false
};
//监控点
...
...
@@ -123,17 +127,17 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
units
;
//图表单位
constructor
(
private
routerInfo
:
ActivatedRoute
,
private
message
:
NzMessageService
,
private
overAllSer
:
OverAllService
,
private
renderer
:
Renderer
,
private
router
:
Router
,
private
fb
:
FormBuilder
,
private
modalService
:
NzModalService
,
private
datePipe
:
DatePipe
)
{
private
overAllSer
:
OverAllService
,
private
renderer
:
Renderer
,
private
router
:
Router
,
private
fb
:
FormBuilder
,
private
modalService
:
NzModalService
,
private
datePipe
:
DatePipe
)
{
this
.
routerInfo
.
queryParams
.
subscribe
(
queryParams
=>
{
this
.
hostId
=
queryParams
.
hostId
;
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
let
data
=
res
.
data
;
this
.
hostName
=
data
.
name
;
//显示名
this
.
realName
=
data
.
host
;
//主机名
}
)
)
;
});
}
...
...
@@ -146,18 +150,18 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
// this.inOutInfo();
//监测点
this
.
getList
();
this
.
getList
();
//历史告警
const
obj
=
{
hostid
:
this
.
hostId
hostid
:
this
.
hostId
};
this
.
warnList
.
getList
(
obj
);
// this.disks();
}
ngAfterViewInit
()
{
this
.
checkEle
.
nativeElement
.
children
[
1
].
children
[
0
].
children
[
0
].
children
[
2
].
children
[
0
].
children
[
0
].
children
[
2
].
style
.
marginRight
=
this
.
colorEle
.
nativeElement
.
offsetWidth
+
'px'
;
this
.
checkEle
.
nativeElement
.
children
[
1
].
children
[
0
].
children
[
0
].
children
[
2
].
children
[
0
].
children
[
0
].
children
[
2
].
style
.
marginRight
=
this
.
colorEle
.
nativeElement
.
offsetWidth
+
'px'
;
}
//平均响应时间
...
...
@@ -475,10 +479,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
data
:
res
.
data
.
disks
.
map
((
item
)
=>
{
return
item
.
name
;
}),
axisLabel
:
res
.
data
.
disks
.
map
((
item
)
=>
{
axisLabel
:
res
.
data
.
disks
.
map
((
item
)
=>
{
let
data
=
item
.
name
;
if
(
data
.
length
>
5
)
{
data
=
data
.
substring
(
0
,
4
)
+
".."
;
if
(
data
.
length
>
5
)
{
data
=
data
.
substring
(
0
,
4
)
+
'..'
;
}
return
data
;
}),
...
...
@@ -505,7 +509,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
},
},
data
:
res
.
data
.
disks
.
map
((
item
)
=>
{
const
pre
=
(
(
item
.
used
/
item
.
total
)
*
100
).
toFixed
(
2
);
//已使用百分比
const
pre
=
(
(
item
.
used
/
item
.
total
)
*
100
).
toFixed
(
2
);
//已使用百分比
return
pre
;
})
},
...
...
@@ -530,7 +534,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
},
},
data
:
res
.
data
.
disks
.
map
((
item
)
=>
{
const
pre
=
(
(
item
.
total
-
item
.
used
)
/
(
item
.
total
)
*
100
).
toFixed
(
2
);
//剩余百分比
const
pre
=
(
(
item
.
total
-
item
.
used
)
/
(
item
.
total
)
*
100
).
toFixed
(
2
);
//剩余百分比
return
pre
;
})
},
...
...
@@ -549,12 +553,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
const
arr
=
[
{
name
:
"已使用"
,
value
:
used
,
name
:
'已使用'
,
value
:
used
,
},
{
name
:
"未使用"
,
value
:
total
,
name
:
'未使用'
,
value
:
total
,
}
];
...
...
@@ -567,7 +571,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
trigger
:
'item'
,
formatter
:
'{a} <br/>{b} : {c} ({d}%)'
},
color
:
[
'#3194e0'
,
'#bfbfbf'
],
color
:
[
'#3194e0'
,
'#bfbfbf'
],
series
:
[
{
name
:
''
,
...
...
@@ -600,7 +604,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
);
}
extension
(){
extension
()
{
}
...
...
@@ -616,12 +620,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
inOutInfo
()
{
this
.
inOutLoading
=
false
;
const
data
=
{
obj
:{
hostid
:
Number
(
this
.
hostId
)
obj
:
{
hostid
:
Number
(
this
.
hostId
)
},
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
}
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
}
;
this
.
overAllSer
.
inOutInfoSnmp
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
...
...
@@ -634,33 +638,33 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
//进出口流量 翻页
changeInoutInfo
(
e
){
changeInoutInfo
(
e
)
{
this
.
pageNum
=
e
;
// this.inOutInfo();
}
//添加监测点
showCheckModal
()
{
this
.
smartCheck
.
showAddModal
(
this
.
hostId
,
this
.
realName
,
'添加监测点'
);
this
.
smartCheck
.
showAddModal
(
this
.
hostId
,
this
.
realName
,
'添加监测点'
);
}
//编辑监测点
showEditModal
(
item
){
this
.
smartCheck
.
showEditModal
(
this
.
hostId
,
item
.
itemid
,
this
.
realName
,
item
.
templateid
,
'编辑监测点'
);
showEditModal
(
item
)
{
this
.
smartCheck
.
showEditModal
(
item
,
this
.
hostId
,
item
.
id
,
item
.
name
,
item
.
templateid
,
'编辑监测点'
);
}
//添加阈值
showAddThresholdModal
(
item
){
this
.
smartThreshold
.
showAddModal
(
"添加阈值"
,
item
.
id
,
item
.
name
);
showAddThresholdModal
(
item
)
{
this
.
smartThreshold
.
showAddModal
(
item
,
'添加阈值'
,
item
.
id
,
item
.
name
);
}
//编辑阈值
showEditThresholdModal
(
item
){
this
.
smartThreshold
.
showEditModal
(
"编辑阈值"
,
item
.
itemid
,
this
.
hostId
,
this
.
realN
ame
);
showEditThresholdModal
(
item
)
{
this
.
smartThreshold
.
showEditModal
(
'编辑阈值'
,
item
.
id
,
this
.
hostId
,
item
.
n
ame
);
}
//添加or编辑监测点 之后
getList
(){
getList
()
{
this
.
getCheckList
();
// this.findItemType();
}
...
...
@@ -680,11 +684,11 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
const
data
=
{
pageNum
:
this
.
pageIndex
,
pageCount
:
pageSize
,
obj
:{
obj
:
{
applicationid
:
this
.
applicationId
,
hostid
:
this
.
hostId
,
priorityName
:
this
.
changeStates
,
name
:
this
.
searchName
priorityName
:
this
.
changeStates
,
name
:
this
.
searchName
}
};
this
.
overAllSer
.
findCheckByType
(
data
).
subscribe
(
...
...
@@ -696,7 +700,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
);
}
changeState
(
state
){
changeState
(
state
)
{
this
.
tabNum
=
1
;
this
.
changeStates
=
state
;
this
.
getCheckList
();
...
...
@@ -710,7 +714,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
changeType
(
item
)
{
this
.
pageIndex
=
1
;
if
(
item
.
name
==
"全部"
)
{
if
(
item
.
name
==
'全部'
)
{
this
.
changeStates
=
null
;
}
this
.
applicationId
=
item
.
applicationid
;
...
...
@@ -721,7 +725,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
getCheckStatus
()
{
this
.
overAllSer
.
findItemCount
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
checkStatus
=
res
.
data
;
}
}
...
...
@@ -737,8 +741,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
nzOkType
:
'danger'
,
nzOnOk
:
()
=>
{
const
data
=
{
itemids
:[
item
.
itemid
],
templateid
:
item
.
templateid
ids
:
[
item
.
id
],
};
this
.
overAllSer
.
deleteItem
(
data
).
subscribe
(
(
res
)
=>
{
...
...
@@ -763,9 +766,9 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
//获取图表数据
getGraphDate
(){
getGraphDate
()
{
const
data
=
{
date
:
this
.
datePipe
.
transform
(
this
.
imageSelectDate
,
'yyyy-MM-dd'
),
date
:
this
.
datePipe
.
transform
(
this
.
imageSelectDate
,
'yyyy-MM-dd'
),
itemid
:
this
.
selectGraphadata
.
itemid
};
this
.
overAllSer
.
findGraphData
(
data
).
subscribe
(
...
...
@@ -788,9 +791,9 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
splitLine
:
{
show
:
false
},
axisLabel
:{
//Y轴数据
formatter
:
(
value
)
=>
{
return
value
+
" "
+
this
.
selectGraphadata
.
units
;
//负数取绝对值变正数
axisLabel
:
{
//Y轴数据
formatter
:
(
value
)
=>
{
return
value
+
' '
+
this
.
selectGraphadata
.
units
;
//负数取绝对值变正数
},
},
},
...
...
@@ -802,7 +805,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
series
:
{
type
:
'line'
,
data
:
result
.
map
((
item
)
=>
{
return
item
.
value
;
return
item
.
value
;
}),
}
...
...
@@ -827,10 +830,10 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
(
res
)
=>
{
this
.
itemTypeList
=
res
.
data
;
const
data
=
{
applicationid
:
''
,
name
:
'全部'
applicationid
:
''
,
name
:
'全部'
};
if
(
null
!=
res
.
data
)
{
if
(
null
!=
res
.
data
)
{
this
.
itemTypeList
.
unshift
(
data
);
}
this
.
itemTypeValue
=
''
;
...
...
@@ -874,7 +877,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
nzOkType
:
'danger'
,
nzOnOk
:
()
=>
{
const
data
=
{
hostids
:[]
hostids
:
[]
};
data
.
hostids
.
push
(
this
.
hostId
);
this
.
overAllSer
.
deleteHostPost
(
data
).
subscribe
(
...
...
src/main/webapp/app/overAll/basic/basic.component.html
View file @
f4fae93f
...
...
@@ -86,9 +86,6 @@
</button>
</div>
<div
nz-col
nzSpan=
"7"
class=
"text-right button"
>
<button
(
click
)="
batchDeleteConfirm
()"
nz-button
nzType=
"default"
>
<i
class=
"anticon anticon-close-circle-o"
></i>
删除资源
</button>
</div>
</div>
<nz-table
#
nzTable
[
nzData
]="
dataSet
"
[
nzLoading
]="
loading
"
[
nzFrontPagination
]="
false
"
[
nzShowPagination
]="
true
"
...
...
@@ -148,8 +145,7 @@
<span
(
click
)="
editBasicModal
(
item
)"
>
编辑
</span>
<span
(
click
)="
showDeleteConfirm
(
item
)"
>
删除
</span>
<span
(
click
)="
openHost
(
item
)"
>
<ng-container
*
ngIf=
"item.status == 1"
>
开启
</ng-container>
<ng-container
*
ngIf=
"item.status == 0"
>
停止
</ng-container>
监控
<ng-container
*
ngIf=
"item.status == 1"
>
开启
</ng-container><ng-container
*
ngIf=
"item.status == 0"
>
停止
</ng-container>
监控
</span>
</td>
</tr>
...
...
src/main/webapp/app/overAll/basic/basic.component.ts
View file @
f4fae93f
...
...
@@ -230,15 +230,17 @@ export class BasicComponent implements OnInit {
const
data
=
{
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
,
name
:
this
.
searchName
,
waringName
:
this
.
status
,
equipmentTypeid
:
this
.
equipmentTypeid
,
groupids
:
[]
obj
:{
name
:
this
.
searchName
,
waringName
:
this
.
status
,
equipmentTypeid
:
this
.
equipmentTypeid
,
groupids
:
[]
}
};
if
(
this
.
groupid
)
{
data
.
groupids
.
push
(
this
.
groupid
);
data
.
obj
.
groupids
.
push
(
this
.
groupid
);
}
else
{
data
.
groupids
=
[];
data
.
obj
.
groupids
=
[];
}
this
.
overAllSer
.
findHostPageNew
(
data
).
subscribe
(
(
res
)
=>
{
...
...
src/main/webapp/app/overAll/overAll.service.ts
View file @
f4fae93f
...
...
@@ -167,7 +167,7 @@ export class OverAllService {
//查询监控项
findItemDetail
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/item/
details
/'
+
params
);
return
this
.
http
.
get
(
SERVER_API_URL
+
'/item/
find
/'
+
params
);
}
//监控项分类
...
...
@@ -196,7 +196,7 @@ export class OverAllService {
}
itemUpdata
(
data
):
Observable
<
any
>
{
return
this
.
http
.
put
(
SERVER_API_URL
+
'/item/updat
a/
'
,
data
);
return
this
.
http
.
put
(
SERVER_API_URL
+
'/item/updat
e
'
,
data
);
}
//临时暂停
...
...
@@ -317,7 +317,7 @@ export class OverAllService {
//修改触发器
updateTrigger
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/
item/updateItemTrigger
'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/
trigger/update
'
,
data
);
}
//查看映射值
...
...
src/main/webapp/app/overAll/template/list/item-list/item-list.component.ts
View file @
f4fae93f
...
...
@@ -167,7 +167,6 @@ export class ItemListComponent implements OnInit {
//编辑监测点
showEditModal
(
item
){
this
.
smartBasiCheck
.
showEditModal
(
this
.
hostId
,
item
.
itemid
,
this
.
tempName
,
item
.
templateid
,
'编辑模版监测点'
);
}
//删除监测点
...
...
@@ -179,8 +178,7 @@ export class ItemListComponent implements OnInit {
nzOkType
:
'danger'
,
nzOnOk
:
()
=>
{
const
data
=
{
itemids
:[
item
.
itemid
],
templateid
:
item
.
templateid
itemids
:[
item
.
id
],
};
this
.
overAllSer
.
deleteItem
(
data
).
subscribe
(
(
res
)
=>
{
...
...
src/main/webapp/app/system/power/power.component.html
View file @
f4fae93f
...
...
@@ -20,8 +20,8 @@
<div
nz-row
class=
"search-form"
>
<div
nz-col
nzSpan=
"16"
>
<button
(
click
)="
showSeparationModal
()"
nz-button
nzType=
"default"
>
三员分立
</button
>
<button
(
click
)="
showAddRoleModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus-circle-o"
></i>
新增角色
<!-- <button (click)="showSeparationModal()" nz-button nzType="default">三员分立</button>--
>
<!-- <button (click)="showAddRoleModal()" nz-button nzType="default"><i class="anticon anticon-plus-circle-o"></i>新增角色-->
</button>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
...
...
src/main/webapp/app/system/power/power.component.ts
View file @
f4fae93f
...
...
@@ -27,11 +27,11 @@ export class PowerComponent implements OnInit {
ngOnInit
()
{
this
.
getRole
();
this
.
systemSer
.
userFind
().
subscribe
(
(
res
)
=>
{
this
.
isAdmin
=
res
.
data
.
isAdmin
;
}
)
//
this.systemSer.userFind().subscribe(
//
(res)=>{
//
this.isAdmin = res.data.isAdmin;
//
}
//
)
}
getRole
()
{
...
...
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