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
d050f344
Commit
d050f344
authored
Dec 17, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workService
parent
88afc623
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
708 additions
and
11 deletions
+708
-11
analysis.service.ts
src/main/webapp/app/analysis/analysis.service.ts
+77
-1
analysis-deal.component.html
...operation-work/analysis-deal/analysis-deal.component.html
+50
-0
analysis-deal.component.ts
...s/operation-work/analysis-deal/analysis-deal.component.ts
+88
-0
analysis-event.component.html
...eration-work/analysis-event/analysis-event.component.html
+51
-0
analysis-event.component.ts
...operation-work/analysis-event/analysis-event.component.ts
+87
-0
analysis-status.component.html
...ation-work/analysis-status/analysis-status.component.html
+51
-0
analysis-status.component.ts
...eration-work/analysis-status/analysis-status.component.ts
+88
-0
operation-work.component.html
...app/analysis/operation-work/operation-work.component.html
+44
-3
operation-work.component.ts
...p/app/analysis/operation-work/operation-work.component.ts
+1
-0
resource-alarm.component.html
...app/analysis/resource-alarm/resource-alarm.component.html
+1
-0
resource-usabil.component.html
...p/analysis/resource-usabil/resource-usabil.component.html
+62
-3
resource-usabil.component.ts
...app/analysis/resource-usabil/resource-usabil.component.ts
+94
-2
app.main.module.ts
src/main/webapp/app/app.main.module.ts
+7
-1
app.route.ts
src/main/webapp/app/app.route.ts
+7
-1
No files found.
src/main/webapp/app/analysis/analysis.service.ts
View file @
d050f344
import
{
Injectable
}
from
'@angular/core'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
HttpClient
}
from
'@angular/common/http'
;
import
{
SERVER_API_URL
}
from
'../app.constants'
;
import
{
Observable
}
from
'rxjs/Rx'
;
import
{
CommonService
}
from
'../shared/common/common.service'
;
@
Injectable
()
@
Injectable
()
export
class
AnalysisService
{
export
class
AnalysisService
{
constructor
()
{
}
constructor
(
private
http
:
HttpClient
,
private
commonSer
:
CommonService
)
{
}
//按事件分类导出报表
exportByType
(
data
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/syseventCount/export/type?'
+
this
.
commonSer
.
toQuery
(
data
)
);
}
//按事件处理人导出报表
exportByuser
(
data
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/syseventCount/export/user?'
+
this
.
commonSer
.
toQuery
(
data
));
}
//按事件解决状态导出报表
exportByStatus
(
data
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/syseventCount/export/status?'
+
this
.
commonSer
.
toQuery
(
data
));
}
//按事件分类统计
eventByType
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/syseventCount/type'
,
data
);
}
//按解决状态统计
operateStatus
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/syseventCount/operateStatus'
,
data
);
}
//按处理人统计
operateUser
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/syseventCount/operateUser'
,
data
);
}
//可用性统计
findFailureRate
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/statistics/findFailureRate'
,
data
);
}
//告警总数top10
waringCountTop
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/statistics/waringCountTop'
,
data
);
}
//告警总数趋势
waringTrend
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/statistics/waringTrend'
,
data
);
}
//常发问题TOP10
commonProblemTop
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/statistics/commonProblemTop'
,
data
);
}
//查询异常设备名
findHostNameByStatisticalReport
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/statistics/findHostNameByStatisticalReport'
,
data
);
}
//查询所有主机的警告数和高危报警数
findWarningByAll
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/statistics/findWarningByAll/'
+
params
);
}
//查询报警主机 和报警数量 以及最高报警级别
findHostWarningCount
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/statistics/findHostWarningCount'
,
data
);
}
//统计报告
statisticalReport
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/statistics/statisticalReport'
,
data
);
}
}
}
src/main/webapp/app/analysis/operation-work/analysis-deal/analysis-deal.component.html
0 → 100644
View file @
d050f344
<!--处理人统计-->
<nz-spin
[
nzSpinning
]="
isLoading
"
>
<div
echarts
[
options
]="
chartOption
"
style=
"height: 400px;width: 100%"
></div>
</nz-spin>
<nz-tabset
[
nzTabPosition
]="'
top
'"
[
nzType
]="'
card
'"
>
<nz-tab
nzTitle=
"接收流量排行"
>
<nz-table
#
nzTable
[
nzData
]="
inList
"
[
nzLoading
]="
inLoading
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
inTotalNum
"
[
nzPageIndex
]="
inPageNum
"
[
nzPageSize
]="
inPageCount
"
(
nzPageIndexChange
)="
inChnagePage
($
event
)"
>
<thead>
<tr>
<th
nzWidth=
"20%"
>
监测点名称
</th>
<th>
最大值
</th>
<th>
最小值
</th>
<th>
平均值
</th>
</tr>
</thead>
<tbody>
<ng-container
*
ngFor=
"let item of inList"
>
<tr
(
click
)="
getEcharts
(
item
.
itemid
)"
>
<td>
{{item.itemName}}
</td>
<td>
{{item.max | toUtil}}
</td>
<td>
{{item.min | toUtil}}
</td>
<td>
{{item.avg | toUtil}}
</td>
</tr>
</ng-container>
</tbody>
</nz-table>
</nz-tab>
<nz-tab
nzTitle=
"发送流量排行"
>
<nz-table
#
nzTable
[
nzData
]="
outList
"
[
nzLoading
]="
outLoading
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
outTotalNum
"
[
nzPageIndex
]="
outPageNum
"
[
nzPageSize
]="
outPageCount
"
(
nzPageIndexChange
)="
outChnagePage
($
event
)"
>
<thead>
<tr>
<th
nzWidth=
"20%"
>
监测点名称
</th>
<th>
最大值
</th>
<th>
最小值
</th>
<th>
平均值
</th>
</tr>
</thead>
<tbody>
<ng-container
*
ngFor=
"let data of outList"
>
<tr
class=
"cursor"
(
click
)="
getEcharts
(
data
.
itemid
)"
>
<td>
{{data.itemName}}
</td>
<td>
{{data.max | toUtil}}
</td>
<td>
{{data.min | toUtil}}
</td>
<td>
{{data.avg | toUtil}}
</td>
</tr>
</ng-container>
</tbody>
</nz-table>
</nz-tab>
</nz-tabset>
src/main/webapp/app/analysis/operation-work/analysis-deal/analysis-deal.component.ts
0 → 100644
View file @
d050f344
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
DatePipe
}
from
'@angular/common'
;
import
{
AnalysisService
}
from
'../../analysis.service'
;
import
{
OverAllService
}
from
'../../../overAll/overAll.service'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
@
Component
({
selector
:
'smart-analysis-deal'
,
templateUrl
:
'./analysis-deal.component.html'
,
styles
:
[]
})
export
class
AnalysisDealComponent
implements
OnInit
{
startTime
;
endTime
;
timeType
;
obj
=
{
startTime
:
''
,
endTime
:
''
};
constructor
(
private
analysisSer
:
AnalysisService
,
private
message
:
NzMessageService
,
private
datePipe
:
DatePipe
,
private
overAllSer
:
OverAllService
,)
{
}
ngOnInit
()
{
const
today
=
new
Date
().
getTime
();
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
today
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
today
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
this
.
getEcharts
();
}
//获取图表
getEcharts
()
{
this
.
analysisSer
.
operateUser
(
this
.
obj
).
subscribe
(
(
res
)
=>
{
}
);
}
//时间改变
changeType
()
{
const
nowDate
=
new
Date
().
getTime
();
let
day1
,
day2
;
switch
(
this
.
timeType
)
{
case
'1'
:
{
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
nowDate
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
nowDate
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'2'
:
{
day1
=
nowDate
-
1
*
24
*
60
*
60
*
1000
;
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'3'
:
{
day1
=
nowDate
-
3
*
24
*
60
*
60
*
1000
;
day2
=
nowDate
-
1
*
24
*
60
*
60
*
1000
;
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
day2
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'4'
:
{
day1
=
nowDate
-
7
*
24
*
60
*
60
*
1000
;
day2
=
nowDate
-
1
*
24
*
60
*
60
*
1000
;
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
day2
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'5'
:
{
break
;
}
}
}
//搜索
search
()
{
if
(
this
.
timeType
==
'5'
)
{
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
this
.
startTime
,
'yyyy-MM-dd HH:mm:ss'
);
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
this
.
endTime
,
'yyyy-MM-dd HH:mm:ss'
);
}
this
.
getEcharts
();
}
}
src/main/webapp/app/analysis/operation-work/analysis-event/analysis-event.component.html
0 → 100644
View file @
d050f344
<!--事件分类统计-->
<nz-spin
[
nzSpinning
]="
isLoading
"
>
<div
echarts
[
options
]="
chartOption
"
style=
"height: 400px;width: 100%"
></div>
</nz-spin>
<nz-tabset
[
nzTabPosition
]="'
top
'"
[
nzType
]="'
card
'"
>
<nz-tab
nzTitle=
"接收流量排行"
>
<nz-table
#
nzTable
[
nzData
]="
inList
"
[
nzLoading
]="
inLoading
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
inTotalNum
"
[
nzPageIndex
]="
inPageNum
"
[
nzPageSize
]="
inPageCount
"
(
nzPageIndexChange
)="
inChnagePage
($
event
)"
>
<thead>
<tr>
<th
nzWidth=
"20%"
>
监测点名称
</th>
<th>
最大值
</th>
<th>
最小值
</th>
<th>
平均值
</th>
</tr>
</thead>
<tbody>
<ng-container
*
ngFor=
"let item of inList"
>
<tr
(
click
)="
getEcharts
(
item
.
itemid
)"
>
<td>
{{item.itemName}}
</td>
<td>
{{item.max | toUtil}}
</td>
<td>
{{item.min | toUtil}}
</td>
<td>
{{item.avg | toUtil}}
</td>
</tr>
</ng-container>
</tbody>
</nz-table>
</nz-tab>
<nz-tab
nzTitle=
"发送流量排行"
>
<nz-table
#
nzTable
[
nzData
]="
outList
"
[
nzLoading
]="
outLoading
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
outTotalNum
"
[
nzPageIndex
]="
outPageNum
"
[
nzPageSize
]="
outPageCount
"
(
nzPageIndexChange
)="
outChnagePage
($
event
)"
>
<thead>
<tr>
<th
nzWidth=
"20%"
>
监测点名称
</th>
<th>
最大值
</th>
<th>
最小值
</th>
<th>
平均值
</th>
</tr>
</thead>
<tbody>
<ng-container
*
ngFor=
"let data of outList"
>
<tr
class=
"cursor"
(
click
)="
getEcharts
(
data
.
itemid
)"
>
<td>
{{data.itemName}}
</td>
<td>
{{data.max | toUtil}}
</td>
<td>
{{data.min | toUtil}}
</td>
<td>
{{data.avg | toUtil}}
</td>
</tr>
</ng-container>
</tbody>
</nz-table>
</nz-tab>
</nz-tabset>
\ No newline at end of file
src/main/webapp/app/analysis/operation-work/analysis-event/analysis-event.component.ts
0 → 100644
View file @
d050f344
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
DatePipe
}
from
'@angular/common'
;
import
{
AnalysisService
}
from
'../../analysis.service'
;
import
{
OverAllService
}
from
'../../../overAll/overAll.service'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
@
Component
({
selector
:
'smart-analysis-event'
,
templateUrl
:
'./analysis-event.component.html'
,
styles
:
[]
})
export
class
AnalysisEventComponent
implements
OnInit
{
startTime
;
endTime
;
timeType
;
obj
=
{
startTime
:
''
,
endTime
:
''
};
constructor
(
private
analysisSer
:
AnalysisService
,
private
message
:
NzMessageService
,
private
datePipe
:
DatePipe
,
private
overAllSer
:
OverAllService
,)
{
}
ngOnInit
()
{
const
today
=
new
Date
().
getTime
();
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
today
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
today
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
this
.
getEcharts
();
}
//获取图表
getEcharts
()
{
this
.
analysisSer
.
eventByType
(
this
.
obj
).
subscribe
(
(
res
)
=>
{
}
);
}
//时间改变
changeType
()
{
const
nowDate
=
new
Date
().
getTime
();
let
day1
,
day2
;
switch
(
this
.
timeType
)
{
case
'1'
:
{
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
nowDate
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
nowDate
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'2'
:
{
day1
=
nowDate
-
1
*
24
*
60
*
60
*
1000
;
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'3'
:
{
day1
=
nowDate
-
3
*
24
*
60
*
60
*
1000
;
day2
=
nowDate
-
1
*
24
*
60
*
60
*
1000
;
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
day2
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'4'
:
{
day1
=
nowDate
-
7
*
24
*
60
*
60
*
1000
;
day2
=
nowDate
-
1
*
24
*
60
*
60
*
1000
;
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
day2
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'5'
:
{
break
;
}
}
}
//搜索
search
()
{
if
(
this
.
timeType
==
'5'
)
{
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
this
.
startTime
,
'yyyy-MM-dd HH:mm:ss'
);
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
this
.
endTime
,
'yyyy-MM-dd HH:mm:ss'
);
}
this
.
getEcharts
();
}
}
src/main/webapp/app/analysis/operation-work/analysis-status/analysis-status.component.html
0 → 100644
View file @
d050f344
<!--解决状态统计-->
<nz-spin
[
nzSpinning
]="
isLoading
"
>
<div
echarts
[
options
]="
chartOption
"
style=
"height: 400px;width: 100%"
></div>
</nz-spin>
<nz-tabset
[
nzTabPosition
]="'
top
'"
[
nzType
]="'
card
'"
>
<nz-tab
nzTitle=
"接收流量排行"
>
<nz-table
#
nzTable
[
nzData
]="
inList
"
[
nzLoading
]="
inLoading
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
inTotalNum
"
[
nzPageIndex
]="
inPageNum
"
[
nzPageSize
]="
inPageCount
"
(
nzPageIndexChange
)="
inChnagePage
($
event
)"
>
<thead>
<tr>
<th
nzWidth=
"20%"
>
监测点名称
</th>
<th>
最大值
</th>
<th>
最小值
</th>
<th>
平均值
</th>
</tr>
</thead>
<tbody>
<ng-container
*
ngFor=
"let item of inList"
>
<tr
(
click
)="
getEcharts
(
item
.
itemid
)"
>
<td>
{{item.itemName}}
</td>
<td>
{{item.max | toUtil}}
</td>
<td>
{{item.min | toUtil}}
</td>
<td>
{{item.avg | toUtil}}
</td>
</tr>
</ng-container>
</tbody>
</nz-table>
</nz-tab>
<nz-tab
nzTitle=
"发送流量排行"
>
<nz-table
#
nzTable
[
nzData
]="
outList
"
[
nzLoading
]="
outLoading
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
outTotalNum
"
[
nzPageIndex
]="
outPageNum
"
[
nzPageSize
]="
outPageCount
"
(
nzPageIndexChange
)="
outChnagePage
($
event
)"
>
<thead>
<tr>
<th
nzWidth=
"20%"
>
监测点名称
</th>
<th>
最大值
</th>
<th>
最小值
</th>
<th>
平均值
</th>
</tr>
</thead>
<tbody>
<ng-container
*
ngFor=
"let data of outList"
>
<tr
class=
"cursor"
(
click
)="
getEcharts
(
data
.
itemid
)"
>
<td>
{{data.itemName}}
</td>
<td>
{{data.max | toUtil}}
</td>
<td>
{{data.min | toUtil}}
</td>
<td>
{{data.avg | toUtil}}
</td>
</tr>
</ng-container>
</tbody>
</nz-table>
</nz-tab>
</nz-tabset>
\ No newline at end of file
src/main/webapp/app/analysis/operation-work/analysis-status/analysis-status.component.ts
0 → 100644
View file @
d050f344
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
DatePipe
}
from
'@angular/common'
;
import
{
AnalysisService
}
from
'../../analysis.service'
;
import
{
OverAllService
}
from
'../../../overAll/overAll.service'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
@
Component
({
selector
:
'smart-analysis-status'
,
templateUrl
:
'./analysis-status.component.html'
,
styles
:
[]
})
export
class
AnalysisStatusComponent
implements
OnInit
{
startTime
;
endTime
;
timeType
;
obj
=
{
startTime
:
''
,
endTime
:
''
};
constructor
(
private
analysisSer
:
AnalysisService
,
private
message
:
NzMessageService
,
private
datePipe
:
DatePipe
,
private
overAllSer
:
OverAllService
,)
{
}
ngOnInit
()
{
const
today
=
new
Date
().
getTime
();
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
today
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
today
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
this
.
getEcharts
();
}
//获取图表
getEcharts
()
{
this
.
analysisSer
.
operateStatus
(
this
.
obj
).
subscribe
(
(
res
)
=>
{
}
);
}
//时间改变
changeType
()
{
const
nowDate
=
new
Date
().
getTime
();
let
day1
,
day2
;
switch
(
this
.
timeType
)
{
case
'1'
:
{
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
nowDate
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
nowDate
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'2'
:
{
day1
=
nowDate
-
1
*
24
*
60
*
60
*
1000
;
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'3'
:
{
day1
=
nowDate
-
3
*
24
*
60
*
60
*
1000
;
day2
=
nowDate
-
1
*
24
*
60
*
60
*
1000
;
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
day2
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'4'
:
{
day1
=
nowDate
-
7
*
24
*
60
*
60
*
1000
;
day2
=
nowDate
-
1
*
24
*
60
*
60
*
1000
;
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
day2
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'5'
:
{
break
;
}
}
}
//搜索
search
()
{
if
(
this
.
timeType
==
'5'
)
{
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
this
.
startTime
,
'yyyy-MM-dd HH:mm:ss'
);
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
this
.
endTime
,
'yyyy-MM-dd HH:mm:ss'
);
}
this
.
getEcharts
();
}
}
src/main/webapp/app/analysis/operation-work/operation-work.component.html
View file @
d050f344
<p>
<!--运维工作统计-->
operation-work works!
<div
nz-row
class=
"breadcrumbs"
>
</p>
<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>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<button
(
click
)="
search
()"
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>
<div
nz-row
[
nzGutter
]="
4
"
class=
"search-form"
>
<div
nz-col
nzSpan=
"3"
>
<nz-select
style=
"width: 100%;"
nzPlaceHolder=
"选择分组"
[(
ngModel
)]="
type
"
>
<nz-option
nzLabel=
"解决状态"
nzValue=
"1"
></nz-option>
<nz-option
nzLabel=
"事件分类统计"
nzValue=
"2"
></nz-option>
<nz-option
nzLabel=
"处理人统计"
nzValue=
"3"
></nz-option>
</nz-select>
</div>
</div>
<!--解决状态-->
<ng-container
*
ngIf=
"type == '2'"
>
<smart-analysis-status></smart-analysis-status>
</ng-container>
<!--事件分类统计-->
<ng-container
*
ngIf=
"type == '1'"
>
<smart-analysis-event></smart-analysis-event>
</ng-container>
<!--处理人统计-->
<ng-container
*
ngIf=
"type == '3'"
>
<smart-analysis-deal></smart-analysis-deal>
</ng-container>
src/main/webapp/app/analysis/operation-work/operation-work.component.ts
View file @
d050f344
...
@@ -7,6 +7,7 @@ import { Component, OnInit } from '@angular/core';
...
@@ -7,6 +7,7 @@ import { Component, OnInit } from '@angular/core';
})
})
export
class
OperationWorkComponent
implements
OnInit
{
export
class
OperationWorkComponent
implements
OnInit
{
type
=
"1"
;
constructor
()
{
}
constructor
()
{
}
ngOnInit
()
{
ngOnInit
()
{
...
...
src/main/webapp/app/analysis/resource-alarm/resource-alarm.component.html
View file @
d050f344
<!--资源告警统计-->
<p>
<p>
resource-alarm works!
resource-alarm works!
</p>
</p>
src/main/webapp/app/analysis/resource-usabil/resource-usabil.component.html
View file @
d050f344
<p>
<!--资源可用性统计-->
resource-usabil works!
<div
nz-row
class=
"breadcrumbs"
>
</p>
<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>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<button
(
click
)="
search
()"
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>
<div
nz-row
[
nzGutter
]="
4
"
class=
"search-form"
>
<div
nz-col
nzSpan=
"3"
>
<nz-select
style=
"width: 100%;"
nzPlaceHolder=
"选择分组"
[(
ngModel
)]="
obj
.
groupid
"
(
ngModelChange
)="
getList
()"
>
<ng-container
*
ngFor=
"let item of groupList"
>
<nz-option
nzLabel=
"{{item.name}}"
nzValue=
"{{item.groupid}}"
></nz-option>
</ng-container>
</nz-select>
</div>
<div
nz-col
nzSpan=
"3"
>
<nz-select
style=
"width: 100%;"
nzPlaceHolder=
"选择主机资源"
[(
ngModel
)]="
obj
.
hostid
"
(
ngModelChange
)="
getListIO
()"
>
<ng-container
*
ngFor=
"let item of hostList;"
>
<nz-option
nzLabel=
"{{item.name}}"
nzValue=
"{{item.hostid}}"
></nz-option>
</ng-container>
</nz-select>
</div>
<div
nz-col
nzSpan=
"7"
>
<nz-radio-group
style=
"width: 100%;"
[(
ngModel
)]="
timeType
"
(
ngModelChange
)="
changeType
()"
[
nzButtonStyle
]="'
solid
'"
>
<label
nz-radio-button
nzValue=
"1"
>
今天
</label>
<label
nz-radio-button
nzValue=
"2"
>
昨天
</label>
<label
nz-radio-button
nzValue=
"3"
>
三天
</label>
<label
nz-radio-button
nzValue=
"4"
>
一周
</label>
<label
nz-radio-button
nzValue=
"5"
>
自定义
</label>
</nz-radio-group>
</div>
<div
nz-col
nzSpan=
"8"
*
ngIf=
"timeType == '5'"
>
<nz-date-picker
nzShowTime
[(
ngModel
)]="
startTime
"
nzPlaceHolder=
"开始时间"
></nz-date-picker>
<nz-date-picker
nzShowTime
nzFormat=
"yyyy-MM-dd HH:mm:ss"
[(
ngModel
)]="
endTime
"
nzPlaceHolder=
"结束时间"
></nz-date-picker>
</div>
</div>
<nz-spin
[
nzSpinning
]="
isLoading
"
>
<div
echarts
[
options
]="
chartOption
"
style=
"height: 400px;width: 100%"
></div>
</nz-spin>
src/main/webapp/app/analysis/resource-usabil/resource-usabil.component.ts
View file @
d050f344
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
AnalysisService
}
from
'../analysis.service'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
import
{
DatePipe
}
from
'@angular/common'
;
import
{
OverAllService
}
from
'../../overAll/overAll.service'
;
@
Component
({
@
Component
({
selector
:
'smart-resource-usabil'
,
selector
:
'smart-resource-usabil'
,
...
@@ -7,9 +11,97 @@ import { Component, OnInit } from '@angular/core';
...
@@ -7,9 +11,97 @@ import { Component, OnInit } from '@angular/core';
})
})
export
class
ResourceUsabilComponent
implements
OnInit
{
export
class
ResourceUsabilComponent
implements
OnInit
{
constructor
()
{
}
startTime
;
endTime
;
timeType
;
obj
=
{
type
:
''
,
groupid
:
''
,
startTime
:
''
,
endTime
:
''
}
;
groupid
;
groupList
;
constructor
(
private
analysisSer
:
AnalysisService
,
private
message
:
NzMessageService
,
private
datePipe
:
DatePipe
,
private
overAllSer
:
OverAllService
,)
{
}
ngOnInit
()
{
ngOnInit
()
{
const
today
=
new
Date
().
getTime
();
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
today
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
today
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
this
.
getGroup
();
}
//获取分组
getGroup
()
{
this
.
overAllSer
.
getgroups
({}).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
groupList
=
res
.
data
;
this
.
obj
.
groupid
=
this
.
groupList
[
0
].
groupid
+
''
;
this
.
getEcharts
();
}
}
);
}
//获取图表
getEcharts
()
{
this
.
obj
.
type
=
'top'
;
this
.
analysisSer
.
findFailureRate
(
this
.
obj
).
subscribe
(
(
res
)
=>
{
}
);
}
//时间改变
changeType
()
{
const
nowDate
=
new
Date
().
getTime
();
let
day1
,
day2
;
switch
(
this
.
timeType
)
{
case
'1'
:
{
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
nowDate
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
nowDate
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'2'
:
{
day1
=
nowDate
-
1
*
24
*
60
*
60
*
1000
;
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'3'
:
{
day1
=
nowDate
-
3
*
24
*
60
*
60
*
1000
;
day2
=
nowDate
-
1
*
24
*
60
*
60
*
1000
;
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
day2
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'4'
:
{
day1
=
nowDate
-
7
*
24
*
60
*
60
*
1000
;
day2
=
nowDate
-
1
*
24
*
60
*
60
*
1000
;
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
day1
,
'yyyy-MM-dd'
)
+
' 00:00:00'
;
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
day2
,
'yyyy-MM-dd'
)
+
' 23:59:59'
;
break
;
}
case
'5'
:
{
break
;
}
}
}
//搜索
search
()
{
if
(
this
.
timeType
==
'5'
)
{
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
this
.
startTime
,
'yyyy-MM-dd HH:mm:ss'
);
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
this
.
endTime
,
'yyyy-MM-dd HH:mm:ss'
);
}
this
.
getEcharts
();
}
}
}
}
src/main/webapp/app/app.main.module.ts
View file @
d050f344
...
@@ -87,6 +87,9 @@ import {HandleEventComponent} from './work/work-handle/handle-event/handle-event
...
@@ -87,6 +87,9 @@ import {HandleEventComponent} from './work/work-handle/handle-event/handle-event
import
{
EventComponent
}
from
'./work/work-handle/Event/event.component'
;
import
{
EventComponent
}
from
'./work/work-handle/Event/event.component'
;
import
{
TransforComponent
}
from
'./work/modal/transfor/transfor.component'
;
import
{
TransforComponent
}
from
'./work/modal/transfor/transfor.component'
;
import
{
LinkInventoryComponent
}
from
'./work/modal/link-inventory/link-inventory.component'
;
import
{
LinkInventoryComponent
}
from
'./work/modal/link-inventory/link-inventory.component'
;
import
{
AnalysisDealComponent
}
from
'./analysis/operation-work/analysis-deal/analysis-deal.component'
;
import
{
AnalysisEventComponent
}
from
'./analysis/operation-work/analysis-event/analysis-event.component'
;
import
{
AnalysisStatusComponent
}
from
'./analysis/operation-work/analysis-status/analysis-status.component'
;
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
...
@@ -174,7 +177,10 @@ import {LinkInventoryComponent} from './work/modal/link-inventory/link-inventory
...
@@ -174,7 +177,10 @@ import {LinkInventoryComponent} from './work/modal/link-inventory/link-inventory
HandleEventComponent
,
HandleEventComponent
,
EventComponent
,
EventComponent
,
TransforComponent
,
TransforComponent
,
LinkInventoryComponent
LinkInventoryComponent
,
AnalysisDealComponent
,
AnalysisEventComponent
,
AnalysisStatusComponent
],
],
providers
:[
providers
:[
OverAllService
,
OverAllService
,
...
...
src/main/webapp/app/app.route.ts
View file @
d050f344
...
@@ -27,6 +27,9 @@ import {ChildAssetsComponent} from './work/asset-part/child-assets/child-assets.
...
@@ -27,6 +27,9 @@ import {ChildAssetsComponent} from './work/asset-part/child-assets/child-assets.
import
{
AssetsDetailComponent
}
from
'./work/asset-part/assets-detail/assets-detail.component'
;
import
{
AssetsDetailComponent
}
from
'./work/asset-part/assets-detail/assets-detail.component'
;
import
{
HandleDetailComponent
}
from
'./work/work-handle/handle-detail/handle-detail.component'
;
import
{
HandleDetailComponent
}
from
'./work/work-handle/handle-detail/handle-detail.component'
;
import
{
HandleEventComponent
}
from
'./work/work-handle/handle-event/handle-event.component'
;
import
{
HandleEventComponent
}
from
'./work/work-handle/handle-event/handle-event.component'
;
import
{
ResourceUsabilComponent
}
from
'./analysis/resource-usabil/resource-usabil.component'
;
import
{
OperationWorkComponent
}
from
'./analysis/operation-work/operation-work.component'
;
import
{
ResourceAlarmComponent
}
from
'./analysis/resource-alarm/resource-alarm.component'
;
export
const
route
:
Routes
=
[
export
const
route
:
Routes
=
[
{
path
:
''
,
component
:
JhiMainComponent
,
canActivate
:[
LoginGuard
]},
{
path
:
''
,
component
:
JhiMainComponent
,
canActivate
:[
LoginGuard
]},
...
@@ -35,7 +38,7 @@ export const route: Routes = [
...
@@ -35,7 +38,7 @@ export const route: Routes = [
children
:
[
children
:
[
{
path
:
'login'
,
component
:
JhiLoginModalComponent
},
{
path
:
'login'
,
component
:
JhiLoginModalComponent
},
{
{
path
:
'main'
,
component
:
JhiMainComponent
,
canActivate
:[
LoginGuard
],
path
:
'main'
,
component
:
JhiMainComponent
,
canActivate
:[
LoginGuard
],
data
:
{
breadcrumb
:
'首页'
},
children
:
[
children
:
[
{
path
:
'basic'
,
component
:
BasicComponent
},
{
path
:
'basic'
,
component
:
BasicComponent
},
{
path
:
'basic-detail'
,
component
:
BasicDetailComponent
},
{
path
:
'basic-detail'
,
component
:
BasicDetailComponent
},
...
@@ -61,6 +64,9 @@ export const route: Routes = [
...
@@ -61,6 +64,9 @@ export const route: Routes = [
{
path
:
'assetsDetail'
,
component
:
AssetsDetailComponent
},
{
path
:
'assetsDetail'
,
component
:
AssetsDetailComponent
},
{
path
:
'handleDetail'
,
component
:
HandleDetailComponent
},
{
path
:
'handleDetail'
,
component
:
HandleDetailComponent
},
{
path
:
'handleEvent'
,
component
:
HandleEventComponent
},
{
path
:
'handleEvent'
,
component
:
HandleEventComponent
},
{
path
:
'resourceUsabil'
,
component
:
ResourceUsabilComponent
,
data
:
{
breadcrumb
:
'资源可用性统计'
},},
{
path
:
'operationWork'
,
component
:
OperationWorkComponent
,
data
:
{
breadcrumb
:
'运维工作'
},},
{
path
:
'resourceAlarm'
,
component
:
ResourceAlarmComponent
,
data
:
{
breadcrumb
:
'资源告警统计'
},},
]
]
},
},
]
]
...
...
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