<clr-datagrid (clrDgRefresh)="refresh($event)">
  <clr-dg-column class="col-id">
    <ng-container *clrDgHideableColumn="{hidden: false}">
      ID
    </ng-container>
  </clr-dg-column>
  <clr-dg-column class="col-cluster-name">
    <ng-container *clrDgHideableColumn="{hidden: false}">
     {{'TITLE.NAME' | translate}}
    </ng-container>
  </clr-dg-column>
  <clr-dg-column class="col-host">
    <ng-container *clrDgHideableColumn="{hidden: false}">
      Master
    </ng-container>
  </clr-dg-column>
  <clr-dg-column>
    <ng-container *clrDgHideableColumn="{hidden: false}">
      集群状态
    </ng-container>
  </clr-dg-column>
  <clr-dg-column class="col-metadata">
    <ng-container *clrDgHideableColumn="{hidden: false}">
      KubeConfig
    </ng-container>
  </clr-dg-column>
  <clr-dg-column class="col-metadata">
    <ng-container *clrDgHideableColumn="{hidden: false}">
      {{'TITLE.METADATA' | translate}}
    </ng-container>
  </clr-dg-column>
  <clr-dg-column>
    <ng-container *clrDgHideableColumn="{hidden: false}">
      {{'TITLE.DESCRIPTION' | translate}}
    </ng-container>
  </clr-dg-column>
  <clr-dg-column class="col-user">
    <ng-container *clrDgHideableColumn="{hidden: false}">
      {{'TITLE.CREATE_USER' | translate}}
    </ng-container>
  </clr-dg-column>
  <clr-dg-column class="col-time">
    <ng-container *clrDgHideableColumn="{hidden: false}">
      {{'TITLE.CREATE_TIME' | translate}}
    </ng-container>
  </clr-dg-column>
  <clr-dg-row *ngFor="let cluster of clusters" [clrDgItem]="cluster">
    <clr-dg-action-overflow>
      <button class="action-item" (click)="editCluster(cluster)">{{'BUTTON.EDIT' | translate}}</button>
      <button class="action-item" (click)="deleteCluster(cluster)">{{'BUTTON.DELETE' | translate}}</button>
    </clr-dg-action-overflow>
    <clr-dg-cell class="col-id">{{cluster.id}}</clr-dg-cell>
    <clr-dg-cell class="col-cluster-name copy">{{cluster.name}}</clr-dg-cell>
    <clr-dg-cell class="col-host">{{cluster.master}}</clr-dg-cell>
    <clr-dg-cell>{{getClusterStatus(cluster.status)}}</clr-dg-cell>
    <clr-dg-cell class="col-metadata">
      <div class="text-overflow">
        <a href="javascript:;" (click)="detailMetaDataTpl(cluster.kubeConfig)">{{cluster.kubeConfig}}</a>
      </div>
    </clr-dg-cell>
    <clr-dg-cell class="col-metadata">
      <div class="text-overflow">
        <a href="javascript:;" (click)="detailMetaDataTpl(cluster.metaData)">{{cluster.metaData}}</a>
      </div>
    </clr-dg-cell>
    <clr-dg-cell>{{cluster.description}}</clr-dg-cell>
    <clr-dg-cell class="col-user">{{cluster.user}}</clr-dg-cell>
    <clr-dg-cell class="col-time">{{cluster.createTime | date:'yyyy-MM-dd HH:mm'}}</clr-dg-cell>
  </clr-dg-row>


  <clr-dg-footer>
    <wayne-paginate
      [(currentPage)]="currentPage"
      [total]="page.totalCount"
      [pageSizes]="[10, 20, 50]"
      (sizeChange)="pageSizeChange($event)"
    >
    </wayne-paginate>
  </clr-dg-footer>
</clr-datagrid>
