<section class="header clearfix">
  <h1 class="pull-left">
    {{t "clustersPage.header"}}
  </h1>

  <div class="vertical-middle"></div>

  <div class="right-buttons">
    {{#link-to
       "cluster-templates.new"
       class="btn btn-sm bg-primary"
       disabled=(rbac-prevents resource="clustertemplate" scope="global" permission="create")
    }}
      {{t "clustersPage.newTemplate"}}
    {{/link-to}}

    {{#link-to
       "clusters.new"
       class="btn btn-sm bg-primary"
       disabled=(rbac-prevents resource="cluster" scope="global" permission="create")
    }}
      {{t "clustersPage.newCluster"}}
    {{/link-to}}
  </div>
</section>

{{#sortable-table
   classNames="grid sortable-table"
   body=model.clusters
   searchText=searchText
   descending=descending
   sortBy=sortBy
   bulkActions=true
   extraSearchFields=extraSearchFields
   pagingLabel="pagination.cluster"
   headers=headers as |sortable kind inst dt|
}}
  {{#if (eq kind "row")}}
    {{cluster-row
      model=inst
      fullColspan=sortable.fullColspan
      launchOnCluster=(action "launchOnCluster")
      useKubernetes=(action "useKubernetes")
      dt=dt
    }}
  {{else if (eq kind "nomatch")}}
    <tr>
      <td colspan="{{sortable.fullColspan}}" class="text-center text-muted pt-20 pb-20">
        {{t "clusterRow.noClusterMatch"}}
      </td>
    </tr>
  {{else if (eq kind "norows")}}
    <tr>
      <td colspan="{{sortable.fullColspan}}" class="text-center text-muted pt-20 pb-20">
        {{t "clusterRow.noClusterData"}}
      </td>
    </tr>
  {{/if}}
{{/sortable-table}}