<div class="clr-row">
  <div class="clr-col-lg-12 clr-col-md-12 clr-col-sm-12 clr-col-xs-12">
    <div class="clr-row flex-items-xs-between flex-items-xs-top" style="padding-left: 15px; padding-right: 15px;">
      <h2 class="header-title">{{'DEPLOYMENT_ADMIN.TRASH.DEPLOYMENT_DELETE_LIST' | translate}}</h2>
    </div>
    <clr-datagrid (clrDgRefresh)="refresh($event)">
      <clr-dg-column [clrDgField]="'id'" class="col-query-id">
        <ng-container *clrDgHideableColumn="{hidden: false}">
          ID
        </ng-container>
      </clr-dg-column>
      <clr-dg-column class="col-app-name" [clrDgField]="'name'">
        <ng-container *clrDgHideableColumn="{hidden: false}">
         {{'TITLE.NAME' | translate}}
        </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 [clrDgField]="'user'">
        <ng-container *clrDgHideableColumn="{hidden: false}">
          {{'TITLE.CREATE_USER' | translate}}
        </ng-container>
      </clr-dg-column>
      <clr-dg-column [clrDgSortBy]="'createTime'">
        <ng-container *clrDgHideableColumn="{hidden: false}">
          {{'TITLE.CREATE_TIME' | translate}}
        </ng-container>
      </clr-dg-column>
      <clr-dg-row *ngFor="let deployment of deployments" [clrDgItem]="deployment">
        <clr-dg-action-overflow>
          <button class="action-item" (click)="recoverDeployment(deployment)">{{'BUTTON.RESTORE' | translate}}</button>
          <button class="action-item" (click)="deleteDeployment(deployment)">{{'BUTTON.DELETE_PERMANENTLY' | translate}}</button>
        </clr-dg-action-overflow>
        <clr-dg-cell class="col-query-id">{{deployment.id}}</clr-dg-cell>
        <clr-dg-cell class="col-app-name copy">{{deployment.name}}</clr-dg-cell>
        <clr-dg-cell class="col-metadata">
          <div class="text-overflow">
            <a href="javascript:;" (click)="detailMetaDataTpl(deployment.metaData)">{{deployment.metaData}}</a>
          </div>
        </clr-dg-cell>
        <clr-dg-cell>{{deployment.description}}</clr-dg-cell>
        <clr-dg-cell>{{deployment.user}}</clr-dg-cell>
        <clr-dg-cell>{{deployment.createTime | date:'yyyy-MM-dd HH:mm'}}</clr-dg-cell>
      </clr-dg-row>

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