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
74e36911
Commit
74e36911
authored
Dec 16, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workService
parent
3bc9cf2b
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
293 additions
and
3 deletions
+293
-3
app.main.module.ts
src/main/webapp/app/app.main.module.ts
+5
-0
app.route.ts
src/main/webapp/app/app.route.ts
+2
-0
handle-detail.component.html
...rk/work-handle/handle-detail/handle-detail.component.html
+25
-0
handle-detail.component.ts
...work/work-handle/handle-detail/handle-detail.component.ts
+35
-0
handle-event.component.html
...work/work-handle/handle-event/handle-event.component.html
+24
-0
handle-event.component.ts
...p/work/work-handle/handle-event/handle-event.component.ts
+15
-0
handle.component.html
.../webapp/app/work/work-handle/handle/handle.component.html
+138
-0
handle.component.ts
...in/webapp/app/work/work-handle/handle/handle.component.ts
+29
-0
work-handle.component.html
...in/webapp/app/work/work-handle/work-handle.component.html
+7
-2
work-handle.component.ts
...main/webapp/app/work/work-handle/work-handle.component.ts
+13
-1
No files found.
src/main/webapp/app/app.main.module.ts
View file @
74e36911
...
...
@@ -82,6 +82,8 @@ import {AssetsDetailComponent} from './work/asset-part/assets-detail/assets-deta
import
{
AssetsComponent
}
from
'./work/modal/assets/assets.component'
;
import
{
ChildAssetsComponent
}
from
'./work/asset-part/child-assets/child-assets.component'
;
import
{
UploadComponent
}
from
'./work/modal/upload/upload.component'
;
import
{
HandleDetailComponent
}
from
'./work/work-handle/handle-detail/handle-detail.component'
;
import
{
HandleEventComponent
}
from
'./work/work-handle/handle-event/handle-event.component'
;
@
NgModule
({
imports
:
[
...
...
@@ -164,6 +166,9 @@ import {UploadComponent} from './work/modal/upload/upload.component';
AssetsComponent
,
ChildAssetsComponent
,
UploadComponent
,
HandleDetailComponent
,
HandleComponent
,
HandleEventComponent
,
],
providers
:[
OverAllService
,
...
...
src/main/webapp/app/app.route.ts
View file @
74e36911
...
...
@@ -25,6 +25,7 @@ import {InspectPlanComponent} from './work/inspect-plan/inspect-plan.component';
import
{
AssetPartComponent
}
from
'./work/asset-part/asset-part.component'
;
import
{
ChildAssetsComponent
}
from
'./work/asset-part/child-assets/child-assets.component'
;
import
{
AssetsDetailComponent
}
from
'./work/asset-part/assets-detail/assets-detail.component'
;
import
{
HandleDetailComponent
}
from
'./work/work-handle/handle-detail/handle-detail.component'
;
export
const
route
:
Routes
=
[
{
path
:
''
,
component
:
JhiMainComponent
,
canActivate
:[
LoginGuard
]},
...
...
@@ -57,6 +58,7 @@ export const route: Routes = [
{
path
:
'assetPart'
,
component
:
AssetPartComponent
},
{
path
:
'assetChild'
,
component
:
ChildAssetsComponent
},
{
path
:
'assetsDetail'
,
component
:
AssetsDetailComponent
},
{
path
:
'handleDetail'
,
component
:
HandleDetailComponent
},
]
},
]
...
...
src/main/webapp/app/work/work-handle/handle-detail/handle-detail.component.html
0 → 100644
View file @
74e36911
<!--事件详情-->
<div
nz-row
class=
"breadcrumbs"
>
<div
nz-col
nzSpan=
"16"
>
<nz-breadcrumb
class=
"padding-8-0"
>
<nz-breadcrumb-item>
首页
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>
运维工作
</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
事件处置
</nz-breadcrumb-item>
<nz-breadcrumb-item>
事件编号:123456
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-search"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-sync"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-arrows-alt"
></i></button>
</div>
</div>
\ No newline at end of file
src/main/webapp/app/work/work-handle/handle-detail/handle-detail.component.ts
0 → 100644
View file @
74e36911
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
WorkService
}
from
'../../work.service'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
@
Component
({
selector
:
'smart-handle-detail'
,
templateUrl
:
'./handle-detail.component.html'
,
styles
:
[]
})
export
class
HandleDetailComponent
implements
OnInit
{
eventId
;
event
;
constructor
(
private
workSer
:
WorkService
,
private
message
:
NzMessageService
,
private
routrInfo
:
ActivatedRoute
)
{
this
.
routrInfo
.
queryParams
.
subscribe
(
(
res
)
=>
{
this
.
eventId
=
res
.
eventId
;
}
)
}
ngOnInit
()
{
this
.
getDetail
();
}
getDetail
(){
this
.
workSer
.
findByNo
(
this
.
eventId
).
subscribe
(
(
res
)
=>
{
this
.
event
=
res
.
data
;
}
)
}
}
src/main/webapp/app/work/work-handle/handle-event/handle-event.component.html
0 → 100644
View file @
74e36911
<!--处理事件-->
<div
nz-row
class=
"breadcrumbs"
>
<div
nz-col
nzSpan=
"16"
>
<nz-breadcrumb
class=
"padding-8-0"
>
<nz-breadcrumb-item>
首页
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>
运维工作
</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
事件处置
</nz-breadcrumb-item>
<nz-breadcrumb-item>
事件编号:123456
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-search"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-sync"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-arrows-alt"
></i></button>
</div>
</div>
src/main/webapp/app/work/work-handle/handle-event/handle-event.component.ts
0 → 100644
View file @
74e36911
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'smart-handle-event'
,
templateUrl
:
'./handle-event.component.html'
,
styles
:
[]
})
export
class
HandleEventComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{
}
}
src/main/webapp/app/work/work-handle/handle/handle.component.html
0 → 100644
View file @
74e36911
<!--新增事件-->
<!--添加资源-->
<nz-modal
[
nzWidth
]="
1080
"
[(
nzVisible
)]="
isVisible
"
[
nzTitle
]="
title
"
(
nzOnCancel
)="
handleEditCancel
()"
(
nzOnOk
)="
handEditleOk
()"
>
<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
"
>
<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>
</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
"
nzRequired
nzFor=
"secondLevelType"
>
二级类型
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"secondLevelType"
nzPlaceHolder=
"选择二级类型"
[(
ngModel
)]="
validateForm
.
hostExtend
.
secondLevelTypeid
"
>
<ng-container
*
ngFor=
"let item of hostTypeChildrenList"
>
<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
"
nzRequired
nzFor=
"name"
>
显示名
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"name"
nz-input
placeholder=
"显示名"
name=
"name"
[(
ngModel
)]="
validateForm
.
name
"
>
</nz-form-control>
</nz-form-item>
</div>
</div>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
nzRequired
nzFor=
"host"
>
IP地址
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"host"
type=
"text"
nz-input
name=
"host"
[(
ngModel
)]="
validateForm
.
host
"
>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
nzRequired
nzFor=
"groups"
>
所在分组
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-checkbox-group
[(
ngModel
)]="
groupList
"
name=
"groupList"
></nz-checkbox-group>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
nzFor=
"serviceid"
>
关联业务
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"serviceid"
[(
ngModel
)]="
validateForm
.
hostExtend
.
serviceid
"
nzPlaceHolder=
"无关联业务"
>
<nz-option
nzValue=
""
nzLabel=
"无"
></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
>
添加接口
</nz-form-label>
<nz-form-control
[
nzSpan
]="
20
"
>
<ng-container
*
ngFor=
"let item of interfaceslist;let i = index;"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<nz-select
name=
"main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
item
.
main
"
(
ngModelChange
)="
changeMain
(
i
)"
>
<nz-option
nzValue=
"1"
nzLabel=
"默认"
></nz-option>
<nz-option
nzValue=
"0"
nzLabel=
"不默认"
></nz-option>
</nz-select>
</nz-form-control>
<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=
"JMX接口"
></nz-option>
<nz-option
nzValue=
"4"
nzLabel=
"IPMI接口"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
2
"
>
<input
type=
"text"
placeholder=
"端口"
nz-input
name=
"port"
[(
ngModel
)]="
item
.
port
"
>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
4
"
*
ngIf=
"item.type == 2"
>
<label
nz-checkbox
[(
ngModel
)]="
item
.
bulk
"
>
使用大量请求
</label>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
2
"
>
<span
class=
"cursor"
(
click
)="
deleteInterfaces
(
i
)"
>
X
</span>
</nz-form-control>
</div>
</ng-container>
<button
nz-button
(
click
)="
addInterfaces
()"
nzType=
"default"
>
添加
</button>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
nzFor=
"test3"
>
由agent代理程序检测
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"test3"
name=
"test3"
nzPlaceHolder=
"无agen代理程序"
>
<nz-option
nzValue=
""
nzLabel=
"无agen代理程序"
></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
nzFor=
"templates"
>
监控策略
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<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
.
templateid
"
></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
</nz-modal>
src/main/webapp/app/work/work-handle/handle/handle.component.ts
0 → 100644
View file @
74e36911
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'smart-handle'
,
templateUrl
:
'./handle.component.html'
,
styles
:
[]
})
export
class
HandleComponent
implements
OnInit
{
isVisible
=
false
;
title
;
eventId
;
constructor
()
{
}
ngOnInit
()
{
}
showAddModal
(
title
){
this
.
isVisible
=
true
;
this
.
title
=
title
;
}
showEditModal
(
title
,
id
){
this
.
isVisible
=
true
;
this
.
title
=
title
;
this
.
eventId
=
id
;
}
}
src/main/webapp/app/work/work-handle/work-handle.component.html
View file @
74e36911
...
...
@@ -88,9 +88,14 @@
<span
*
ngIf=
"data.status == 1"
>
已结束
</span>
</td>
<td
class=
"handle text-center"
>
<span
(
click
)="
lookEvent
(
data
)"
>
查看
</span>
<span
(
click
)="
showEditModal
(
data
)"
>
编辑
</span>
<span
(
click
)="
deleteSend
(
data
)"
>
删除
</span>
</td>
</tr>
</tbody>
</nz-table>
\ No newline at end of file
</nz-table>
<!--事件转派-->
<nz-modal>
</nz-modal>
\ No newline at end of file
src/main/webapp/app/work/work-handle/work-handle.component.ts
View file @
74e36911
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
WorkService
}
from
'../work.service'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
Router
}
from
'@angular/router'
;
@
Component
({
selector
:
'smart-work-handle'
,
...
...
@@ -27,7 +29,8 @@ export class WorkHandleComponent implements OnInit {
startTime
:
''
,
endTime
:
''
,
};
constructor
(
private
workSer
:
WorkService
)
{
}
constructor
(
private
workSer
:
WorkService
,
private
message
:
NzMessageService
,
private
router
:
Router
)
{
}
ngOnInit
()
{
this
.
getList
();
...
...
@@ -61,4 +64,13 @@ export class WorkHandleComponent implements OnInit {
this
.
getList
();
}
//查看详情
lookEvent
(
item
){
this
.
router
.
navigate
([
'app/main/handleDetail'
],{
queryParams
:{
eventId
:
item
.
id
}
})
}
}
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