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
5b78d765
Commit
5b78d765
authored
May 28, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页接口调试
parent
fa9435be
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
18 deletions
+81
-18
home.component.html
src/main/webapp/app/home/home.component.html
+18
-18
home.component.ts
src/main/webapp/app/home/home.component.ts
+43
-0
overAll.service.ts
src/main/webapp/app/overAll/overAll.service.ts
+20
-0
No files found.
src/main/webapp/app/home/home.component.html
View file @
5b78d765
...
...
@@ -96,12 +96,12 @@
<nz-col
nzSpan=
"7"
>
CPU利用率
</nz-col>
<nz-col
nzSpan=
"7"
>
内存利用率
</nz-col>
</nz-row>
<ng-container>
<ng-container
*
ngFor=
"let flow of countOrderList;"
>
<nz-row
class=
"table-content"
>
<nz-col
class=
"text-center"
nzSpan=
"3"
>
状态
</nz-col>
<nz-col
nzSpan=
"7"
>
资源名称
</nz-col>
<nz-col
nzSpan=
"7"
>
CPU利用率
</nz-col>
<nz-col
nzSpan=
"7"
>
内存利用率
</nz-col>
<nz-col
nzSpan=
"7"
>
{{flow.name}}
</nz-col>
<nz-col
nzSpan=
"7"
>
{{flow.cpuUseRate}}
</nz-col>
<nz-col
nzSpan=
"7"
>
{{flow.vmUseRate}}
</nz-col>
</nz-row>
</ng-container>
</div>
...
...
@@ -117,15 +117,15 @@
<div
class=
"host-item-title"
>
接口流量排行
</div>
<div
class=
"host-item-table"
style=
"height: 500px"
>
<nz-row
class=
"text-center table-title"
>
<nz-col
nzSpan=
"
7
"
>
资源名称
</nz-col>
<nz-col
nzSpan=
"
7
"
>
发送流量
</nz-col>
<nz-col
nzSpan=
"
7
"
>
接受流量
</nz-col>
<nz-col
nzSpan=
"
8
"
>
资源名称
</nz-col>
<nz-col
nzSpan=
"
8
"
>
发送流量
</nz-col>
<nz-col
nzSpan=
"
8
"
>
接受流量
</nz-col>
</nz-row>
<ng-container>
<ng-container
*
ngFor=
"let flow of flowListNum;"
>
<nz-row
class=
"table-content"
>
<nz-col
nzSpan=
"
7"
>
资源名称
</nz-col>
<nz-col
nzSpan=
"
7"
>
发送流量
</nz-col>
<nz-col
nzSpan=
"
7"
>
接受流量
</nz-col>
<nz-col
nzSpan=
"
8"
>
{{flow.name}}
</nz-col>
<nz-col
nzSpan=
"
8"
>
{{flow.send}}
</nz-col>
<nz-col
nzSpan=
"
8"
>
{{flow.receive}}
</nz-col>
</nz-row>
</ng-container>
</div>
...
...
@@ -134,15 +134,15 @@
<div
class=
"host-item-title"
>
接口指标排行
</div>
<div
class=
"host-item-table"
style=
"height: 500px"
>
<nz-row
class=
"text-center table-title"
>
<nz-col
nzSpan=
"
7
"
>
资源名称
</nz-col>
<nz-col
nzSpan=
"
7
"
>
发送利用率
</nz-col>
<nz-col
nzSpan=
"
7
"
>
接受利用率
</nz-col>
<nz-col
nzSpan=
"
8
"
>
资源名称
</nz-col>
<nz-col
nzSpan=
"
8
"
>
发送利用率
</nz-col>
<nz-col
nzSpan=
"
8
"
>
接受利用率
</nz-col>
</nz-row>
<ng-container>
<ng-container
*
ngFor=
"let flow of flowListPre"
>
<nz-row
class=
"table-content"
>
<nz-col
nzSpan=
"
7"
>
资源名称
</nz-col>
<nz-col
nzSpan=
"
7"
>
发送利用率
</nz-col>
<nz-col
nzSpan=
"
7"
>
接受利用率
</nz-col>
<nz-col
nzSpan=
"
8"
>
{{flow.name}}
</nz-col>
<nz-col
nzSpan=
"
8"
>
{{flow.useRate}}
</nz-col>
<nz-col
nzSpan=
"
8"
>
{{flow.useRate}}
</nz-col>
</nz-row>
</ng-container>
</div>
...
...
src/main/webapp/app/home/home.component.ts
View file @
5b78d765
...
...
@@ -64,6 +64,10 @@ export class HomeComponent implements OnInit,AfterViewInit {
rightTotal
=
0
;
flowListNum
;
//接口流量排行 数值
flowListPre
;
//发送利用率排名 百分比
countOrderList
;
//cpu内存使用率排名列表
constructor
(
private
overAllSer
:
OverAllService
,
private
message
:
NzMessageService
,
private
alarmSer
:
AlarmService
,
private
renderer
:
Renderer2
,
...
...
@@ -79,6 +83,10 @@ export class HomeComponent implements OnInit,AfterViewInit {
this
.
findHostCount
();
this
.
getGroup
();
this
.
flowRankNum
();
this
.
flowRankPre
();
this
.
countOrde
();
}
ngAfterViewInit
(){
...
...
@@ -459,4 +467,39 @@ export class HomeComponent implements OnInit,AfterViewInit {
};
}
//发送利用率排名
countOrde
(){
const
data
=
{
limit
:
'10'
};
this
.
overAllSer
.
homeUseOrder
(
data
.
limit
).
subscribe
(
(
res
)
=>
{
this
.
flowListPre
=
res
.
data
;
}
)
}
//主机发送接收流量排名列表 数值
flowRankNum
(){
const
data
=
{
limit
:
'10'
};
this
.
overAllSer
.
homeFlowOrder
(
data
.
limit
).
subscribe
(
(
res
)
=>
{
this
.
flowListNum
=
res
.
data
;
}
)
}
//cpu内存使用率排名列表 百分比
flowRankPre
(){
const
data
=
{
limit
:
'10'
};
this
.
overAllSer
.
runStateOrder
(
data
.
limit
).
subscribe
(
(
res
)
=>
{
this
.
countOrderList
=
res
.
data
;
}
)
}
}
src/main/webapp/app/overAll/overAll.service.ts
View file @
5b78d765
...
...
@@ -468,4 +468,24 @@ export class OverAllService {
findHostNew
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/host/findHostNew'
,
data
);
}
//发送利用率排名
homeUseOrder
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/home/useOrder/'
+
params
);
}
//查询业务系统的安全运行天数
findSafeRunDayList
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/itservice/findSafeRunDayList'
,
data
);
}
//查询主机cpu内存使用率排名列表
runStateOrder
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/home/runStateOrder/'
+
params
);
}
//查询主机发送接收流量排名列表
homeFlowOrder
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/home/flowOrder/'
+
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