<!--资源可用性统计-->
<div nz-row class="breadcrumbs">
  <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>
