<!--监控项原型列表-->
<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-item>
        模版：{{tempName}}
      </nz-breadcrumb-item>
      <nz-breadcrumb-item>
        自动发现：{{disName}}
      </nz-breadcrumb-item>
    </nz-breadcrumb>
  </div>
  <div nz-col nzSpan="8" class="text-right">
    <button (click)="ngOnInit()" nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
    <smart-full-screen></smart-full-screen>
  </div>
</div>
<div nz-row [nzGutter]="4" class="search-form">
  <div nz-col nzSpan="3">
    <button (click)="showAddModal()" nz-button nzType="default"><i class="anticon anticon-plus-circle-o"></i>添加监控项原型</button>
  </div>
  <div nz-col nzSpan="18"></div>
  <div nz-col nzSpan="3">
    <button (click)="deleteBatchCheck()" nz-button nzType="default"><i class="anticon anticon-close-circle-o"></i>批量删除</button>
  </div>
</div>

<nz-table #nzTable [nzData]="checkList" [nzFrontPagination]="false"
          [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount"
          (nzPageIndexChange)="change($event)" [nzLoading]="loading">
  <thead>
  <tr>
    <th nzShowCheckbox [nzIndeterminate]="indeterminate" [nzChecked]="allChecked" (nzCheckedChange)="checkAll($event)"></th>
    <th>名称</th>
    <th>键值</th>
    <th>间隔</th>
    <th>状态</th>
    <th>操作</th>
  </tr>
  </thead>
  <tbody>
  <tr *ngFor="let data of checkList">
    <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="selectItem(data,$event)"></td>
    <td class="round-tag tag-form">{{data.name}}</td>
    <td>{{data.key_}}</td>
    <td>{{data.delay}}</td>
    <td>
      <span *ngIf="data.status == 0">启用</span>
      <span *ngIf="data.status == 1">禁用</span>
    </td>
    <td class="main-color cursor">
      <span (click)="showEditModal(data)">编辑</span>
      <span (click)="deleteCheck(data)">删除</span>
    </td>
  </tr>
  </tbody>
</nz-table>

<!--监控项原型-->
<smart-check-prototype #smartCheckProtoType (done)="getList()"></smart-check-prototype>
