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
21a7c745
Commit
21a7c745
authored
Aug 02, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电压温度功率
parent
df6fe5ee
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
143 additions
and
13 deletions
+143
-13
server.component.html
...ain/webapp/app/overAll/modal/server/server.component.html
+65
-9
server.component.ts
src/main/webapp/app/overAll/modal/server/server.component.ts
+67
-3
overAll.service.ts
src/main/webapp/app/overAll/overAll.service.ts
+11
-1
No files found.
src/main/webapp/app/overAll/modal/server/server.component.html
View file @
21a7c745
...
...
@@ -105,19 +105,41 @@
<nz-col
nzSpan=
"16"
>
内存利用率(%):
</nz-col>
<nz-col
nzSpan=
"8"
>
{{hostObj.used || '-'}}
</nz-col>
</nz-row>
<!-- <nz-row>-->
<!-- <nz-col nzSpan="16">CPU个数:</nz-col>-->
<!-- <nz-col nzSpan="8">100</nz-col>-->
<!-- </nz-row>-->
<!-- <nz-row>-->
<!-- <nz-col nzSpan="16">接口数:</nz-col>-->
<!-- <nz-col nzSpan="8">100</nz-col>-->
<!-- </nz-row>-->
</div>
</nz-col>
</nz-row>
</div>
<div
class=
"padding-10"
style=
"height: 50%;position: relative"
>
<div
class=
"time-group"
style=
"top: 18px;"
>
<nz-select
style=
"width: 150px;"
nzPlaceHolder=
"选择指标"
(
ngModelChange
)="
changeTrend
(
trendObj
.
type
)"
[(
ngModel
)]="
trendObj
.
type
"
>
<ng-container
*
ngFor=
"let flow of targetFlow"
>
<nz-option
[
nzLabel
]="
flow
.
label
"
[
nzValue
]="
flow
.
value
"
></nz-option>
</ng-container>
</nz-select>
<nz-select
style=
"width: 150px;"
nzPlaceHolder=
"选择时间"
[(
ngModel
)]="
timeTypeTrend
"
(
ngModelChange
)="
changeTrend
($
event
)"
>
<ng-container
*
ngFor=
"let time of timeList"
>
<nz-option
[
nzLabel
]="
time
.
label
"
[
nzValue
]="
time
.
value
"
></nz-option>
</ng-container>
</nz-select>
</div>
<div
class=
"host-item-title"
>
风扇
</div>
<div
class=
"host-item-content"
>
<ng-container
*
ngIf=
"!fanObj.noData"
>
<nz-spin
[
nzSpinning
]="
fanObj
.
isFanLoading
"
>
<div
echarts
[
options
]="
fanObj
.
fanOption
"
style=
"height:360px;width: 100%"
></div>
</nz-spin>
</ng-container>
<ng-container
*
ngIf=
"fanObj.noData"
>
<div
class=
"img-noData"
style=
"min-height: 300px"
>
<div
class=
"noData"
title=
"暂无数据"
></div>
</div>
</ng-container>
</div>
</div>
</nz-col>
<nz-col
nzSpan=
"12"
>
<div
class=
"padding-10"
style=
"height: 50%;position: relative"
>
...
...
@@ -162,6 +184,40 @@
</nz-spin>
</div>
</div>
<div
class=
"padding-10"
style=
"height: 40%;"
>
<nz-row>
<nz-col
class=
"padding-right-10"
nzSpan=
"12"
>
<p
class=
"host-item-title"
>
温度
</p>
<div
class=
"host-item-content"
style=
"height: 300px;"
>
<ng-container
*
ngIf=
"!temObj.noData"
>
<nz-spin
[
nzSpinning
]="
temObj
.
isFanLoading
"
>
<div
echarts
[
options
]="
temObj
.
fanOption
"
style=
"height:360px;width: 100%"
></div>
</nz-spin>
</ng-container>
<ng-container
*
ngIf=
"temObj.noData"
>
<div
class=
"img-noData"
style=
"min-height: 300px"
>
<div
class=
"noData"
title=
"暂无数据"
></div>
</div>
</ng-container>
</div>
</nz-col>
<nz-col
class=
"padding-left-10"
nzSpan=
"12"
>
<p
class=
"host-item-title"
>
电压与功率
</p>
<div
class=
"host-item-content"
style=
"height: 300px;"
>
<ng-container
*
ngIf=
"!powerObj.noData"
>
<nz-spin
[
nzSpinning
]="
powerObj
.
isFanLoading
"
>
<div
echarts
[
options
]="
powerObj
.
fanOption
"
style=
"height:360px;width: 100%"
></div>
</nz-spin>
</ng-container>
<ng-container
*
ngIf=
"powerObj.noData"
>
<div
class=
"img-noData"
style=
"min-height: 300px"
>
<div
class=
"noData"
title=
"暂无数据"
></div>
</div>
</ng-container>
</div>
</nz-col>
</nz-row>
</div>
</nz-col>
</nz-row>
</div>
src/main/webapp/app/overAll/modal/server/server.component.ts
View file @
21a7c745
...
...
@@ -57,6 +57,27 @@ export class ServerComponent implements OnInit {
chartDiskOption
;
diskType
;
//风扇
fanObj
=
{
isFanLoading
:
false
,
fanOption
:
null
,
noData
:
false
};
//温度
temObj
=
{
isTemLoading
:
false
,
temOption
:
null
,
noData
:
false
};
//电压与功率
powerObj
=
{
isPowerLoading
:
false
,
powerOption
:
null
,
noData
:
false
};
constructor
(
private
commonSer
:
CommonService
,
private
routerInfo
:
ActivatedRoute
,
private
message
:
NzMessageService
,
private
overAllSer
:
OverAllService
,
private
hostCom
:
HostComponent
)
{
...
...
@@ -71,6 +92,9 @@ export class ServerComponent implements OnInit {
this
.
changeHistory
(
'0'
);
this
.
changeTrend
(
'0'
);
this
.
getDisk
();
this
.
getTep
();
this
.
getFeng
();
console
.
log
(
'fang'
);
}
getDetail
()
{
...
...
@@ -79,9 +103,9 @@ export class ServerComponent implements OnInit {
};
this
.
overAllSer
.
findDetailed
(
this
.
hostId
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
server
=
res
.
data
[
0
];
}
else
{
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
...
...
@@ -142,7 +166,7 @@ export class ServerComponent implements OnInit {
this
.
diskType
=
0
;
this
.
setDiskChart
(
0
);
this
.
noData
=
false
;
}
else
{
}
else
{
this
.
noData
=
true
;
}
}
...
...
@@ -304,4 +328,44 @@ export class ServerComponent implements OnInit {
this
.
getHistory
();
}
//风扇
getFeng
()
{
const
data
=
{
hostid
:
this
.
hostId
};
this
.
overAllSer
.
getfan
(
data
).
subscribe
(
(
res
)
=>
{
}
);
}
//电压与温度
getTep
()
{
const
data
=
{
type
:
'1'
,
hostid
:
this
.
hostId
,
startTime
:
'2019-07-02 10:05:40'
,
endTime
:
'2019-08-02 10:05:40'
};
this
.
overAllSer
.
getTemperature
(
data
).
subscribe
(
(
res
)
=>
{
}
);
data
.
type
=
'2'
;
this
.
overAllSer
.
getTemperature
(
data
).
subscribe
(
(
res
)
=>
{
}
);
data
.
type
=
'3'
;
this
.
overAllSer
.
getTemperature
(
data
).
subscribe
(
(
res
)
=>
{
}
);
}
}
src/main/webapp/app/overAll/overAll.service.ts
View file @
21a7c745
...
...
@@ -538,6 +538,16 @@ export class OverAllService {
//查询系统信息
getSystem
():
Observable
<
any
>
{
return
this
.
http
.
get
(
'./json/system.json'
);
return
this
.
http
.
get
(
'./json/system.json'
);
}
//查询温度电压功率
getTemperature
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/host/getTemperature'
,
data
);
}
//获取主机风扇信息
getfan
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/host/fan'
,
data
);
}
}
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