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
c5af5b3c
Commit
c5af5b3c
authored
Jan 02, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
0fdd9f98
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
109 additions
and
100 deletions
+109
-100
alarm-list.component.html
...ain/webapp/app/alarm/alarm-list/alarm-list.component.html
+2
-2
basic.component.html
src/main/webapp/app/overAll/basic/basic.component.html
+7
-4
basic.component.ts
src/main/webapp/app/overAll/basic/basic.component.ts
+88
-85
type-asets.component.ts
.../webapp/app/work/modal/type-asets/type-asets.component.ts
+2
-2
event.component.ts
...main/webapp/app/work/work-handle/Event/event.component.ts
+6
-2
handle-detail.component.html
...rk/work-handle/handle-detail/handle-detail.component.html
+3
-3
handle-detail.component.ts
...work/work-handle/handle-detail/handle-detail.component.ts
+0
-1
work.service.ts
src/main/webapp/app/work/work.service.ts
+1
-1
No files found.
src/main/webapp/app/alarm/alarm-list/alarm-list.component.html
View file @
c5af5b3c
...
...
@@ -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.equipmentType}}"
></nz-option>
<nz-option
nzLabel=
"{{item.equipmentType}}"
nzValue=
"{{item.equipmentType
Id
}}"
></nz-option>
</ng-container>
</nz-select>
</div>
...
...
@@ -61,7 +61,7 @@
</div>
</div>
<div
nz-row
class=
"search-form"
style=
"border-top: none;padding: 0 0 15px 0;"
>
<input
[(
ngModel
)]="
obj
.
name
"
nz-input
placeholder=
"告警信息"
>
<input
style=
"width: 15%;"
[(
ngModel
)]="
obj
.
name
"
nz-input
placeholder=
"告警信息"
>
<button
(
click
)="
searchValue
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
搜索
</button>
</div>
...
...
src/main/webapp/app/overAll/basic/basic.component.html
View file @
c5af5b3c
...
...
@@ -117,7 +117,7 @@
</ng-container>
</td>
<td>
<td
class=
"cursor"
>
<span
(
click
)="
goTOInventory
(
item
?.
inventory
?.
id
)"
>
{{item?.inventory?.name}}
</span>
</td>
<!--<td class="round-tag tag-form" >-->
...
...
@@ -227,7 +227,9 @@
</ng-container>
</td>
<td>
{{item?.inventory?.name}}
</td>
<td
class=
"cursor"
>
<span
(
click
)="
goTOInventory
(
item
?.
inventory
?.
id
)"
>
{{item?.inventory?.name}}
</span>
</td>
<!--<nz-tag *ngIf="item.status == 0" [nzColor]="color.green"></nz-tag>-->
<!--<nz-tag *ngIf="item.status == 1" [nzColor]="color.gray"></nz-tag>-->
<td
class=
"default"
>
...
...
@@ -323,8 +325,9 @@
</ng-container>
</td>
<td>
{{item?.inventory?.name}}
</td>
<td
class=
"cursor"
>
<span
(
click
)="
goTOInventory
(
item
?.
inventory
?.
id
)"
>
{{item?.inventory?.name}}
</span>
</td>
<td
class=
"default"
>
<ng-container
*
ngIf=
"item.available == 0"
>
<nz-tag>
AGENT
</nz-tag>
...
...
src/main/webapp/app/overAll/basic/basic.component.ts
View file @
c5af5b3c
...
...
@@ -30,7 +30,7 @@ export interface TreeNodeInterface {
selector
:
'jhi-basic'
,
templateUrl
:
'./basic.component.html'
,
styles
:
[
`:host ::ng-deep .table-dropdown a
{
`:host ::ng-deep .table-dropdown a
{
font-weight: 300;
}`
]
...
...
@@ -41,8 +41,8 @@ export class BasicComponent implements OnInit {
@
ViewChild
(
'basicEdit'
)
basicEdit
:
BasicEditComponent
;
@
ViewChild
(
'smartCheck'
)
smartCheck
:
BasiCheckComponent
;
@
ViewChild
(
'smartCreateGroup'
)
smartCreateGroup
:
CreateGroupComponent
;
@
ViewChild
(
'smartPause'
)
smartPause
:
PauseComponent
;
@
ViewChild
(
'smartAlarmModal'
)
smartAlarmModal
:
AlarmModalComponent
;
@
ViewChild
(
'smartPause'
)
smartPause
:
PauseComponent
;
@
ViewChild
(
'smartAlarmModal'
)
smartAlarmModal
:
AlarmModalComponent
;
color
=
color
;
...
...
@@ -76,8 +76,7 @@ export class BasicComponent implements OnInit {
searchData
;
constructor
(
private
fb
:
FormBuilder
,
private
overAllSer
:
OverAllService
,
private
router
:
Router
,
private
modalService
:
NzModalService
,
private
message
:
NzMessageService
,
private
main
:
JhiMainComponent
)
{
private
modalService
:
NzModalService
,
private
message
:
NzMessageService
,
private
main
:
JhiMainComponent
)
{
}
dataSet
:
any
[];
...
...
@@ -98,17 +97,17 @@ export class BasicComponent implements OnInit {
}
}
showInFullScreen
(){
showInFullScreen
()
{
this
.
main
.
fullScreen
();
}
convertTreeToList
(
root
:
any
,
groupId
:
string
,
index
):
TreeNodeInterface
[]
{
convertTreeToList
(
root
:
any
,
groupId
:
string
,
index
):
TreeNodeInterface
[]
{
const
stack
=
[];
const
array
=
[];
const
hashMap
=
{};
if
(
root
.
host
==
index
)
{
if
(
root
.
host
==
index
)
{
stack
.
push
({...
root
,
level
:
0
,
expand
:
true
});
}
else
{
}
else
{
stack
.
push
({...
root
,
level
:
0
,
expand
:
false
});
}
while
(
stack
.
length
!==
0
)
{
...
...
@@ -140,66 +139,66 @@ export class BasicComponent implements OnInit {
}
//搜索
search
(
status
){
search
(
status
)
{
this
.
loading
=
true
;
this
.
searchStatus
=
true
;
this
.
frontPagination
=
false
;
const
data
=
{
search
:{
status
:
status
,
name
:
this
.
searchName
}
search
:
{
status
:
status
,
name
:
this
.
searchName
}
};
this
.
overAllSer
.
find
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
searchData
=
res
.
data
;
}
this
.
loading
=
false
;
}
)
)
;
}
//backList
backList
(){
backList
()
{
this
.
searchStatus
=
false
;
this
.
frontPagination
=
true
;
}
//查询设备状态
findOpStatus
(){
findOpStatus
()
{
this
.
overAllSer
.
findHostCountByStatus
(
0
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
green
=
res
.
data
.
size
;
}
else
{
}
else
{
this
.
message
.
info
(
res
.
Msg
);
}
}
)
)
;
this
.
overAllSer
.
findHostCountByStatus
(
1
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
gray
=
res
.
data
.
size
;
}
)
)
;
this
.
overAllSer
.
findWarningByAll
(
1
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
yellow
=
res
.
data
.
size
;
}
else
{
}
else
{
this
.
message
.
info
(
res
.
Msg
);
}
}
)
)
;
this
.
overAllSer
.
findWarningByAll
(
0
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
red
=
res
.
data
.
size
;
}
else
{
}
else
{
this
.
message
.
info
(
res
.
Msg
);
}
}
)
)
;
}
//添加资源
...
...
@@ -213,8 +212,8 @@ export class BasicComponent implements OnInit {
}
//添加监测点
showBasicCheckModal
(
hostid
,
host
)
{
this
.
smartCheck
.
showAddModal
(
hostid
,
host
);
showBasicCheckModal
(
hostid
,
host
)
{
this
.
smartCheck
.
showAddModal
(
hostid
,
host
);
}
//列表
...
...
@@ -292,7 +291,7 @@ export class BasicComponent implements OnInit {
nzOkType
:
'danger'
,
nzOnOk
:
()
=>
{
const
data
=
{
hostids
:[]
hostids
:
[]
};
data
.
hostids
.
push
(
item
.
hostid
);
this
.
overAllSer
.
deleteHostPost
(
data
).
subscribe
(
...
...
@@ -312,8 +311,8 @@ export class BasicComponent implements OnInit {
}
//批量删除资源
batchDeleteConfirm
(){
if
(
this
.
batchDelList
.
length
==
0
)
{
batchDeleteConfirm
()
{
if
(
this
.
batchDelList
.
length
==
0
)
{
this
.
message
.
info
(
'请选择需要删除的设备'
);
return
false
;
}
...
...
@@ -324,7 +323,7 @@ export class BasicComponent implements OnInit {
nzOkType
:
'danger'
,
nzOnOk
:
()
=>
{
const
data
=
{
hostids
:
this
.
batchDelList
hostids
:
this
.
batchDelList
};
this
.
overAllSer
.
deleteHostPost
(
data
).
subscribe
(
(
res
)
=>
{
...
...
@@ -349,8 +348,8 @@ export class BasicComponent implements OnInit {
}
//编辑分组
updateGroup
(
item
){
this
.
smartCreateGroup
.
showEditModal
(
'修改分组'
,
item
);
updateGroup
(
item
)
{
this
.
smartCreateGroup
.
showEditModal
(
'修改分组'
,
item
);
}
//删除分组
...
...
@@ -380,7 +379,7 @@ export class BasicComponent implements OnInit {
}
//添加告警
showAlarm
(){
showAlarm
()
{
this
.
smartAlarmModal
.
showAddModal
(
'添加告警'
);
}
...
...
@@ -390,10 +389,10 @@ export class BasicComponent implements OnInit {
//获取下级list
getChildren
(
item
)
{
if
(
item
.
list
)
{
if
(
item
.
expand
)
{
if
(
item
.
list
)
{
if
(
item
.
expand
)
{
item
.
expand
=
false
;
}
else
{
}
else
{
item
.
expand
=
true
;
}
return
false
;
...
...
@@ -407,10 +406,10 @@ export class BasicComponent implements OnInit {
};
this
.
overAllSer
.
findDetail
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
dataSet
[
item
.
host
].
list
=
res
.
data
;
this
.
toTree
(
item
.
host
);
}
else
{
}
else
{
this
.
message
.
info
(
'该分组下无资源'
);
}
this
.
loading
=
false
;
...
...
@@ -419,25 +418,25 @@ export class BasicComponent implements OnInit {
}
//根据设备类型查询主机资源
getChildrenType
(
item
){
if
(
item
.
list
)
{
if
(
item
.
expand
)
{
getChildrenType
(
item
)
{
if
(
item
.
list
)
{
if
(
item
.
expand
)
{
item
.
expand
=
false
;
}
else
{
}
else
{
item
.
expand
=
true
;
}
return
false
;
}
this
.
loading
=
true
;
const
data
=
{
type
:
item
.
equipmentTypeId
type
:
item
.
equipmentTypeId
};
this
.
overAllSer
.
findHostByType
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
dataSet
[
item
.
host
].
list
=
res
.
data
;
this
.
toTree
(
item
.
host
);
}
else
{
}
else
{
this
.
message
.
info
(
'该分组下无资源'
);
}
this
.
loading
=
false
;
...
...
@@ -446,21 +445,21 @@ export class BasicComponent implements OnInit {
}
//查看详情
goDetail
(
item
){
goDetail
(
item
)
{
let
type
=
0
;
if
(
item
.
hostExtend
)
{
if
(
item
.
hostExtend
.
equipmentType
==
'交换机'
)
{
if
(
item
.
hostExtend
)
{
if
(
item
.
hostExtend
.
equipmentType
==
'交换机'
)
{
type
=
1
;
}
}
this
.
router
.
navigate
([
'app/main/basic-detail'
],{
queryParams
:{
hostId
:
item
.
hostid
,
type
:
type
,
name
:
item
.
name
,
hostName
:
item
.
host
this
.
router
.
navigate
([
'app/main/basic-detail'
],
{
queryParams
:
{
hostId
:
item
.
hostid
,
type
:
type
,
name
:
item
.
name
,
hostName
:
item
.
host
}
})
})
;
}
//监控设备数
...
...
@@ -473,38 +472,38 @@ export class BasicComponent implements OnInit {
}
//临时暂停
showTempStop
(
item
){
this
.
smartPause
.
showModal
(
item
.
hostid
,
'基础资源'
);
showTempStop
(
item
)
{
this
.
smartPause
.
showModal
(
item
.
hostid
,
'基础资源'
);
}
//选择
selectChecked
(
event
,
item
)
{
if
(
event
)
{
if
(
item
.
hostid
)
{
selectChecked
(
event
,
item
)
{
if
(
event
)
{
if
(
item
.
hostid
)
{
this
.
batchDelList
.
push
(
item
.
hostid
);
}
}
else
{
if
(
item
.
hostid
)
{
}
else
{
if
(
item
.
hostid
)
{
const
index
=
this
.
batchDelList
.
indexOf
(
item
.
hostid
);
this
.
batchDelList
.
splice
(
index
,
1
)
this
.
batchDelList
.
splice
(
index
,
1
);
}
}
}
//开启or停止监控
openHost
(
item
){
openHost
(
item
)
{
this
.
modalService
.
confirm
({
nzTitle
:
'监控'
,
nzContent
:
'确定开启监控设备'
+
item
.
name
+
'?'
,
nzContent
:
'确定开启监控设备'
+
item
.
name
+
'?'
,
nzOkText
:
'确定'
,
nzCancelText
:
'取消'
,
nzOnOk
:
()
=>
{
let
params1
=
0
;
if
(
item
.
status
==
0
)
{
if
(
item
.
status
==
0
)
{
params1
=
1
;
}
const
params2
=
item
.
hostid
;
this
.
overAllSer
.
stopOrOpen
(
params1
,
params2
).
subscribe
(
this
.
overAllSer
.
stopOrOpen
(
params1
,
params2
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
info
(
'修改成功'
);
...
...
@@ -520,21 +519,21 @@ export class BasicComponent implements OnInit {
}
//批量开启or停止监控
openBatchHost
(
status
,
operation
)
{
if
(
this
.
batchDelList
.
length
==
0
)
{
this
.
message
.
info
(
'请选择需要'
+
operation
+
'的设备'
);
openBatchHost
(
status
,
operation
)
{
if
(
this
.
batchDelList
.
length
==
0
)
{
this
.
message
.
info
(
'请选择需要'
+
operation
+
'的设备'
);
return
false
;
}
this
.
modalService
.
confirm
({
nzTitle
:
'监控'
,
nzContent
:
'确定批量'
+
operation
+
'监控设备?'
,
nzContent
:
'确定批量'
+
operation
+
'监控设备?'
,
nzOkText
:
'确定'
,
nzCancelText
:
'取消'
,
nzOnOk
:
()
=>
{
const
data
=
{
status
:
status
,
hostids
:
this
.
batchDelList
}
status
:
status
,
hostids
:
this
.
batchDelList
}
;
this
.
overAllSer
.
batchStopOrOpen
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
...
...
@@ -553,7 +552,11 @@ export class BasicComponent implements OnInit {
}
//资产页面
goTOInventory
(
id
){
goTOInventory
(
id
)
{
this
.
router
.
navigate
([
'app/main/assetsDetail'
],
{
queryParams
:
{
invertoryId
:
id
}
});
}
}
src/main/webapp/app/work/modal/type-asets/type-asets.component.ts
View file @
c5af5b3c
...
...
@@ -81,8 +81,8 @@ export class TypeAsetsComponent implements OnInit {
this
.
workSer
.
findType
(
id
).
subscribe
(
(
res
)
=>
{
if
(
res
.
data
.
parentid
){
this
.
isParent
=
'
primary
'
;
this
.
isChildren
=
'
default
'
;
this
.
isParent
=
'
default
'
;
this
.
isChildren
=
'
primary
'
;
}
this
.
validateForm
.
patchValue
(
res
.
data
);
}
...
...
src/main/webapp/app/work/work-handle/Event/event.component.ts
View file @
c5af5b3c
...
...
@@ -103,7 +103,9 @@ export class EventComponent implements OnInit {
this
.
message
.
error
(
"请选择人员"
);
return
false
;
}
this
.
validateForm
.
value
.
operators
=
this
.
operatorsList
;
this
.
validateForm
.
patchValue
({
operators
:
this
.
operatorsList
});
for
(
let
i
in
this
.
validateForm
.
controls
)
{
this
.
validateForm
.
controls
[
i
].
markAsDirty
();
this
.
validateForm
.
controls
[
i
].
updateValueAndValidity
();
...
...
@@ -132,7 +134,9 @@ export class EventComponent implements OnInit {
this
.
fileList
.
forEach
((
file
:
any
)
=>
{
formData
.
append
(
'file'
,
file
);
});
this
.
validateForm
.
value
.
operators
=
this
.
operatorsList
;
this
.
validateForm
.
patchValue
({
operators
:
this
.
operatorsList
});
if
(
this
.
operatorsList
.
length
==
0
){
this
.
message
.
error
(
"请选择人员"
);
...
...
src/main/webapp/app/work/work-handle/handle-detail/handle-detail.component.html
View file @
c5af5b3c
...
...
@@ -75,9 +75,9 @@
<div
nz-col
nzSpan=
"4"
>
关联资产
</div>
<div
nz-col
nzSpan=
"1"
></div>
<div
nz-col
nzSpan=
"19"
>
<p
*
ngFor=
"let item of
linkList
;"
>
<span
>
资产编号
</span>
<span>
{{item.name}}
</span>
<p
*
ngFor=
"let item of
event?.inventorys
;"
>
<span
style=
"margin-right: 5px"
>
{{item.inventoryNo}}
</span>
<span
style=
"margin-right: 5px"
>
{{item.name}}
</span>
<span>
{{item.typeName}}
</span>
</p>
</div>
...
...
src/main/webapp/app/work/work-handle/handle-detail/handle-detail.component.ts
View file @
c5af5b3c
...
...
@@ -26,7 +26,6 @@ export class HandleDetailComponent implements OnInit {
eventId
;
event
;
linkList
;
transforsList
;
constructor
(
private
workSer
:
WorkService
,
private
message
:
NzMessageService
,
...
...
src/main/webapp/app/work/work.service.ts
View file @
c5af5b3c
...
...
@@ -31,7 +31,7 @@ export class WorkService {
//根据事件编号查询
findByNo
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/sysevent/find/'
+
params
);
return
this
.
http
.
get
(
SERVER_API_URL
+
'/sysevent/find
TransferAndInventory
/'
+
params
);
}
//添加事件
...
...
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