<button (click)="createDaemonSet()" class="wayne-button primary"
        *ngIf="authService.currentAppPermission.daemonSet?.create || authService.currentUser.admin">
  {{'DAEMONSET.CREATE' | translate}}
</button>
<create-edit-daemonset (create)="create($event)"></create-edit-daemonset>
<div *ngIf="daemonSetId && daemonSets?.length>0">
  <wayne-tabs>
    <wayne-tab (click)="tabClick(daemonSet.id)"
               [id]="daemonSet.id"
               *ngFor="let daemonSet of daemonSets"
               [active]="daemonSet.id==daemonSetId"
               [description]="daemonSet.description"
    >
      {{daemonSet.name}}
    </wayne-tab>
  </wayne-tabs>
  <div class="table-search">
    <div class="table-search-left">
      <button (click)="createDaemonSetTpl()" class="wayne-button normal"
              *ngIf="authService.currentAppPermission.daemonSet?.create || authService.currentUser.admin">
        {{'DAEMONSET.CREATE_TMP' | translate}}
      </button>
      <button (click)="editDaemonSet()" class="wayne-button normal"
              *ngIf="authService.currentAppPermission.daemonSet?.update || authService.currentUser.admin">
        {{'DAEMONSET.EDIT' | translate}}
      </button>
      <button (click)="publishHistory()" class="wayne-button normal"
              *ngIf="authService.currentAppPermission.daemonSet?.read || authService.currentUser.admin">
        {{'BUTTON.HISTORY' | translate}}
      </button>
      <button (click)="deleteDaemonSet()" class="wayne-button normal"
              *ngIf="authService.currentAppPermission.daemonSet?.delete || authService.currentUser.admin">
        {{'DAEMONSET.DELETE' | translate}}
      </button>
      <button class="wayne-button normal" (click)="diffTpl()">{{'BUTTON.COMPARE_TEMPLATES' | translate}}</button>
      <wayne-filter-box (confirm)="confirmEvent()" (cancel)="cancelEvent()">
        <wayne-checkbox-group [(ngModel)]="showList">
          <wayne-checkbox value="create_time">{{'TITLE.CREATE_TIME' | translate}}</wayne-checkbox>
          <wayne-checkbox value="version">{{'TITLE.VERSION' | translate}}</wayne-checkbox>
          <wayne-checkbox value="online_cluster">{{'TITLE.ONLINE_CLUSTER' | translate}}</wayne-checkbox>
          <wayne-checkbox value="release_explain">{{'TITLE.RELEASE_EXPLAIN' | translate}}</wayne-checkbox>
          <wayne-checkbox value="create_user">{{'TITLE.CREATE_USER' | translate}}</wayne-checkbox>
          <wayne-checkbox value="action">{{'TITLE.ACTION' | translate}}</wayne-checkbox>
        </wayne-checkbox-group>
      </wayne-filter-box>
    </div>
    <div class="table-search-right">
      <div class="toggle-switch">
        <input type="checkbox" id="toggle_1" [(ngModel)]="isOnline" (change)="onlineChange()">
        <label for="toggle_1">{{'MESSAGE.ONLY_ONLINE_TEMPLATE' | translate}}</label>
      </div>
    </div>
  </div>
  <list-daemonset [daemonSetTpls]="changedDaemonSetTpls"
                  (paginate)="retrieve($event)"
                  (edit)="editDaemonSet($event)"
                  (createTpl)="createDaemonSetTpl($event)"
                  (cloneTpl)="cloneDaemonSetTpl($event)"
                  [appId]="appId"
                  [page]="pageState.page"
                  [showState]="showState">
  </list-daemonset>
</div>

