<!--阈值列表-->
<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>
  </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="15">
    <button (click)="deleteBatchTrigger()" nz-button nzType="default"><i class="anticon anticon-close-circle-o"></i>批量删除</button>
  </div>
  <div nz-col nzSpan="6">
    <input (keyup.enter)="getList()" style="width: 200px;" type="text" nz-input [(ngModel)]="queryName" placeholder="输入阈值名称">
    <button (click)="getList()" nz-button nzType="default"><i class="anticon anticon-search"
                                                                   style="color: #6097b7"></i>搜索</button>
  </div>
</div>

<nz-table #nzTable [nzData]="triggerList" [nzLoading]="loading">
  <thead>
  <tr>
    <th nzShowCheckbox [nzIndeterminate]="indeterminate" [nzChecked]="allChecked"
        (nzCheckedChange)="checkAll($event)"></th>
    <th>严重性</th>
    <th nzWidth="35%">名称</th>
    <th nzWidth="35%">表达式</th>
    <th>操作</th>
  </tr>
  </thead>
  <tbody>
  <tr *ngFor="let data of triggerList">
    <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="refreshStatus()"></td>
    <td class="round-tag tag-form">
      <nz-tag *ngIf="data.priority == 4 || data.priority == 5" class="tag-red" [nzColor]="color.red"></nz-tag>
      <nz-tag *ngIf="data.priority == 2 || data.priority == 3" class="tag-yellow" [nzColor]="color.yellow"></nz-tag>
    </td>
    <td>{{data.description}}</td>
    <td>{{data.expression}}</td>
    <td class="cursor main-color">
      <span (click)="showEditModal(data)">编辑</span>
      <span class="handle-delete" (click)="deleteTrigger(data)">删除</span>
    </td>
  </tr>
  </tbody>
</nz-table>
<!--阈值-->
<smart-tri-modal #smartTriModal (done)="getList()"></smart-tri-modal>
