Commit eafae7c2 authored by wangqinghua's avatar wangqinghua

样式调整

parent 2d01aa09
...@@ -199,8 +199,8 @@ export class HomeComponent implements OnInit, AfterViewInit { ...@@ -199,8 +199,8 @@ export class HomeComponent implements OnInit, AfterViewInit {
this.leftOneChart = this.leftOneChart =
{ {
title: { title: {
text: '' + this.leftOneTotal + ' 台\n设备', text: ' ' + this.leftOneTotal + ' 台\n设备',
x: '36%', x: '40%',
y: '40%', y: '40%',
itemGap: 50, itemGap: 50,
textStyle: { textStyle: {
...@@ -286,8 +286,8 @@ export class HomeComponent implements OnInit, AfterViewInit { ...@@ -286,8 +286,8 @@ export class HomeComponent implements OnInit, AfterViewInit {
this.leftTwoChart = this.leftTwoChart =
{ {
title: { title: {
text: this.leftTwoTotal + '个\n监测点', text: " " + this.leftTwoTotal + '个\n监测点',
x: '36%', x: '40%',
y: '40%', y: '40%',
itemGap: 50, itemGap: 50,
textStyle: { textStyle: {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</ng-container> </ng-container>
</nz-select> </nz-select>
<nz-dropdown [nzTrigger]="'click'"> <nz-dropdown [nzTrigger]="'click'">
<a nz-dropdown>{{user.loginName}}<i class="anticon anticon-down"></i> <a nz-dropdown style="color: #bfbfbf">{{user.loginName}}<i class="anticon anticon-down"></i>
</a> </a>
<ul nz-menu> <ul nz-menu>
<li (click)="showPasswordModal()" nz-menu-item>修改密码</li> <li (click)="showPasswordModal()" nz-menu-item>修改密码</li>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="padding-10" style="height: 40%;position: relative"> <div class="padding-10" style="height: 40%;position: relative">
<p class="host-item-title">分区</p> <p class="host-item-title">分区</p>
<div class="time-group" style="top: 18px;"> <div class="time-group" style="top: 18px;">
<nz-select style="width: 150px;" nzPlaceHolder="选择指标" <nz-select style="width: 150px;" nzPlaceHolder="选择磁盘"
(ngModelChange)="setDiskChart($event)" [(ngModel)]="diskType"> (ngModelChange)="setDiskChart($event)" [(ngModel)]="diskType">
<ng-container *ngFor="let disk of hostObj.disk;let i = index;"> <ng-container *ngFor="let disk of hostObj.disk;let i = index;">
<nz-option [nzLabel]="disk.name" [nzValue]="i"></nz-option> <nz-option [nzLabel]="disk.name" [nzValue]="i"></nz-option>
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
</nz-select> </nz-select>
</div> </div>
<div class="host-item-content" style="height: 300px;"> <div class="host-item-content" style="height: 300px;">
<ng-container *ngIf="noData">
<div class="img-noData" style="min-height: 400px">
<div class="noData" title="暂无数据"></div>
</div>
</ng-container>
<ng-container *ngIf="hostObj.disk.length > 0"> <ng-container *ngIf="hostObj.disk.length > 0">
<nz-spin [nzSpinning]="isDiskLoading"> <nz-spin [nzSpinning]="isDiskLoading">
<div echarts [options]="chartDiskOption" style="height: 150px;width: 100%"></div> <div echarts [options]="chartDiskOption" style="height: 150px;width: 100%"></div>
......
...@@ -16,6 +16,7 @@ export class ServerComponent implements OnInit { ...@@ -16,6 +16,7 @@ export class ServerComponent implements OnInit {
hostId; //主机ID hostId; //主机ID
equipmentType; //主机类型 equipmentType; //主机类型
server; server;
noData = false;
targetFlow = HostFlow; //主机指标 targetFlow = HostFlow; //主机指标
timeList = [ timeList = [
...@@ -136,6 +137,9 @@ export class ServerComponent implements OnInit { ...@@ -136,6 +137,9 @@ export class ServerComponent implements OnInit {
if (this.hostObj.disk.length > 0) { if (this.hostObj.disk.length > 0) {
this.diskType = 0; this.diskType = 0;
this.setDiskChart(0); this.setDiskChart(0);
this.noData = false;
}else {
this.noData = true;
} }
} }
); );
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
<div class="host-item-content" style="height:100px"> <div class="host-item-content" style="height:100px">
<nz-row> <nz-row>
<nz-col nzSpan="12"> <nz-col nzSpan="12">
<p style="text-align: center">cpu利用率</p> <p class="text-center margin-bottom-15">cpu利用率</p>
<div class="width-host"> <div class="width-host">
<div class="space" [style.width]="this.hostObj.cpu + '%'"></div> <div class="space" [style.width]="this.hostObj.cpu + '%'"></div>
</div> </div>
</nz-col> </nz-col>
<nz-col nzSpan="12"> <nz-col nzSpan="12">
<p style="text-align: center;color: #b7d1f1;">内存使用率</p> <p class="text-center margin-bottom-15" style="color: #b7d1f1;">内存使用率</p>
<div class="width-host"> <div class="width-host">
<div class="space" [style.width]="this.hostObj.used + '%'"></div> <div class="space" [style.width]="this.hostObj.used + '%'"></div>
</div> </div>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
</div> </div>
<div class="host-item-content" style="height: 300px"> <div class="host-item-content" style="height: 300px">
<nz-spin [nzSpinning]="isTrendLoading"> <nz-spin [nzSpinning]="isTrendLoading">
<div echarts [options]="chartTrendOption" style="height: 360px;width: 100%"></div> <div echarts [options]="chartTrendOption" style="height: 300px;width: 100%"></div>
</nz-spin> </nz-spin>
</div> </div>
</div> </div>
...@@ -116,9 +116,16 @@ ...@@ -116,9 +116,16 @@
</nz-select> </nz-select>
</div> </div>
<div class="host-item-content" style="height: 300px"> <div class="host-item-content" style="height: 300px">
<nz-spin [nzSpinning]="isNetworkLoading"> <ng-container *ngIf="noData">
<div echarts [options]="chartNetworkOption" style="height: 360px;width: 100%"></div> <div class="img-noData" style="min-height: 300px">
</nz-spin> <div class="noData" title="暂无数据"></div>
</div>
</ng-container>
<ng-container *ngIf="noData">
<nz-spin [nzSpinning]="isNetworkLoading">
<div echarts [options]="chartNetworkOption" style="height: 300px;width: 100%"></div>
</nz-spin>
</ng-container>
</div> </div>
</div> </div>
</nz-col> </nz-col>
......
...@@ -37,11 +37,12 @@ export class SwitchComponent implements OnInit { ...@@ -37,11 +37,12 @@ export class SwitchComponent implements OnInit {
chartTrendOption; chartTrendOption;
netWorkdObj = { //网卡图表参数 netWorkdObj = { //网卡图表参数
itemName: '', itemName: null,
unit: 'Mbps', unit: 'Mbps',
startTime: '', startTime: '',
endTime: '', endTime: '',
}; };
noData = false;
trendObj = { trendObj = {
type: 'total_flow', type: 'total_flow',
...@@ -76,6 +77,9 @@ export class SwitchComponent implements OnInit { ...@@ -76,6 +77,9 @@ export class SwitchComponent implements OnInit {
if(this.interfaceList && this.interfaceList.length > 0){ if(this.interfaceList && this.interfaceList.length > 0){
this.netWorkdObj.itemName = this.interfaceList[0]; this.netWorkdObj.itemName = this.interfaceList[0];
this.changeTimeFlow('0'); this.changeTimeFlow('0');
this.noData = false;
}else{
this.noData = true;
} }
} }
); );
......
...@@ -125,7 +125,8 @@ $fontColor: #b7d1f1; ...@@ -125,7 +125,8 @@ $fontColor: #b7d1f1;
height: 400px; height: 400px;
nz-col { nz-col {
padding: 5px 10px; padding:8px 10px;
word-break: break-all;
} }
.table-title { .table-title {
...@@ -169,19 +170,21 @@ $fontColor: #b7d1f1; ...@@ -169,19 +170,21 @@ $fontColor: #b7d1f1;
top: 10px; top: 10px;
z-index: 9; z-index: 9;
} }
.width-host { .width-host {
position: relative; position: relative;
width: 80%; width: 80%;
margin: 0 auto; margin: 0 auto;
background-color: #5489b2; background-color: #5489b2;
height: 23px; height: 23px;
.space{
.space {
height: 23px; height: 23px;
background-color: #4ccf46; background-color: #4ccf46;
transition: all 500ms; transition: all 500ms;
} }
} }
.topology-context { .topology-context {
background: rgba(0, 0, 0, 0.2); background: rgba(0, 0, 0, 0.2);
} }
......
...@@ -117,7 +117,8 @@ nz-header { ...@@ -117,7 +117,8 @@ nz-header {
height: 400px; height: 400px;
nz-col { nz-col {
padding: 5px 10px; padding:8px 10px;
word-break: break-all;
} }
.table-title { .table-title {
......
...@@ -51,7 +51,8 @@ ...@@ -51,7 +51,8 @@
border: 1px solid #eee; border: 1px solid #eee;
border-radius: 5px; border-radius: 5px;
nz-col { nz-col {
padding: 5px 10px; padding:8px 10px;
word-break: break-all;
} }
.table-title { .table-title {
......
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