Commit 954cc6d9 authored by wangqinghua's avatar wangqinghua

服务器

parent f91ff121
......@@ -24,6 +24,12 @@ import {WorkService} from '../../work/work.service';
padding: 2px 4px;
border-radius: 4px;
}
.tag-warn span.select-border {
border: 1px solid #6097b7;
border-radius: 5px;
padding: 2px;
margin-right: 5px;
}
:host ::ng-deep .tag-warn .ant-tag{
margin-right: 0px;
}
......@@ -51,7 +57,6 @@ export class NowAlarmComponent implements OnInit, OnDestroy {
}
ngOnInit() {
this.search(null);
this.getType();
this.time_ = setInterval(()=>{
this.search(null);
......@@ -76,6 +81,7 @@ export class NowAlarmComponent implements OnInit, OnDestroy {
(res)=>{
if(res.errCode == 10000){
this.warnCountList = res.data;
this.search(this.warnCountList[0].hostid);
}else{
this.message.info(res.errMsg);
}
......
......@@ -33,21 +33,21 @@
<div class="host-item-content" style="height: 300px;">
<ng-container *ngIf="hostObj.disk.length > 0">
<nz-spin [nzSpinning]="isDiskLoading">
<div echarts [options]="chartDiskOption" style="height: 360px;width: 100%"></div>
<div>
<span>{{hostObj.disk[diskType].name}}</span>
<div echarts [options]="chartDiskOption" style="height: 150px;width: 100%"></div>
<div class="text-center margin-bottom-10">
<span style="border: 1px solid #d8c5c5;padding: 4px 8px;border-radius: 3px;">{{hostObj.disk[diskType].name}}</span>
</div>
<nz-row>
<nz-col nzSpan="12">总大小</nz-col>
<nz-col nzSpan="12">{{hostObj.disk[diskType].total}}</nz-col>
<nz-col nzSpan="12">总大小</nz-col>
<nz-col nzSpan="12">{{hostObj.disk[diskType].total || '-'}}</nz-col>
</nz-row>
<nz-row>
<nz-col nzSpan="12">已用大小</nz-col>
<nz-col nzSpan="12">{{hostObj.disk[diskType].use}}</nz-col>
<nz-col nzSpan="12">已用大小</nz-col>
<nz-col nzSpan="12">{{hostObj.disk[diskType].use || '-'}}</nz-col>
</nz-row>
<nz-row>
<nz-col nzSpan="12">剩余容量</nz-col>
<nz-col nzSpan="12">{{hostObj.disk[diskType].total - hostObj.disk[diskType].use}}</nz-col>
<nz-col nzSpan="12">剩余容量</nz-col>
<nz-col nzSpan="12">{{(hostObj.disk[diskType].total - hostObj.disk[diskType].use) || '-'}}</nz-col>
</nz-row>
</nz-spin>
</ng-container>
......@@ -57,7 +57,7 @@
<nz-row>
<nz-col class="padding-right-10" nzSpan="12">
<p class="host-item-title">基本信息</p>
<div class="host-item-content">
<div class="host-item-content" style="height: 300px;">
<nz-row>
<nz-col nzSpan="8">资源状态:</nz-col>
<nz-col nzSpan="16">{{server?.waringName}}</nz-col>
......@@ -86,7 +86,7 @@
</nz-col>
<nz-col class="padding-left-10" nzSpan="12">
<p class="host-item-title">指标列表</p>
<div class="host-item-content">
<div class="host-item-content" style="height: 300px;">
<nz-row>
<nz-col nzSpan="16">CPU利用率(%):</nz-col>
<nz-col nzSpan="8">{{hostObj.cpu}}</nz-col>
......@@ -94,20 +94,20 @@
<nz-row>
<nz-col nzSpan="16">Ping延时(ms):</nz-col>
<nz-col nzSpan="8">100</nz-col>
<nz-col nzSpan="8">{{hostObj.response}}</nz-col>
</nz-row>
<nz-row>
<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>
<!-- <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>
......@@ -135,7 +135,7 @@
</div>
<div class="host-item-content">
<nz-spin [nzSpinning]="isTrendLoading">
<div echarts [options]="chartTrendOption" style="height: 360px;width: 100%"></div>
<div echarts [options]="chartTrendOption" style="height:360px;width: 100%"></div>
</nz-spin>
</div>
</div>
......
......@@ -134,6 +134,7 @@ export class ServerComponent implements OnInit {
(res) => {
this.hostObj.disk = res.data.disks;
if (this.hostObj.disk.length > 0) {
this.diskType = 0;
this.setDiskChart(0);
}
}
......@@ -149,7 +150,6 @@ export class ServerComponent implements OnInit {
},
series: [
{
type: 'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
......@@ -168,7 +168,7 @@ export class ServerComponent implements OnInit {
},
labelLine: {
normal: {
show: false
show: true
}
},
data: [
......@@ -178,6 +178,7 @@ export class ServerComponent implements OnInit {
}
]
};
this.isDiskLoading = false;
}
//获取趋势数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment