mirror of https://github.com/rancher/ui.git
66 lines
1.8 KiB
Handlebars
66 lines
1.8 KiB
Handlebars
{{#if rows.length}}
|
|
<SortableTable
|
|
@body={{rows}}
|
|
@bulkActions={{true}}
|
|
@class="grid sortable-table"
|
|
@descending={{descending}}
|
|
@groupByKey="clusterTemplateId"
|
|
@groupByRef="clusterTemplate"
|
|
@headers={{headers}}
|
|
@pagingLabel="pagination.cluster"
|
|
@searchText={{searchText}}
|
|
@sortBy={{sortBy}}
|
|
@subRows={{true}}
|
|
@suffix={{suffix}}
|
|
as |sortable kind inst dt|
|
|
>
|
|
{{#if (eq kind "row")}}
|
|
<ClusterTemplateRow
|
|
@model={{inst}}
|
|
@fullColspan={{sortable.fullColspan}}
|
|
@dt={{dt}}
|
|
/>
|
|
{{else if (eq kind "group")}}
|
|
<ClusterTemplateRow
|
|
@model={{inst.ref}}
|
|
@fullColspan={{sortable.fullColspan}}
|
|
@dt={{dt}}
|
|
@isGroup={{true}}
|
|
/>
|
|
{{else if (eq kind "suffix")}}
|
|
{{#if (and clusterTemplatesWithoutRevisionsRows.length (not searchText.length))}}
|
|
<tbody class="fixed grid group">
|
|
{{#each clusterTemplatesWithoutRevisionsRows as |inst|}}
|
|
<ClusterTemplateRow
|
|
@model={{inst}}
|
|
@fullColspan={{sortable.fullColspan}}
|
|
@dt={{dt}}
|
|
@isGroup={{true}}
|
|
/>
|
|
{{/each}}
|
|
</tbody>
|
|
{{/if}}
|
|
{{else if (eq kind "nomatch")}}
|
|
<tr>
|
|
<td colspan="{{sortable.fullColspan}}" class="no-match">
|
|
{{t "clusterRow.noClusterMatch"}}
|
|
</td>
|
|
</tr>
|
|
{{else if (eq kind "norows")}}
|
|
<tr>
|
|
<td colspan="{{sortable.fullColspan}}" class="no-data">
|
|
{{t "clusterRow.noClusterData"}}
|
|
</td>
|
|
</tr>
|
|
{{/if}}
|
|
</SortableTable>
|
|
{{else}}
|
|
<EmptyTable
|
|
@resource="container"
|
|
@newRoute="global-admin.cluster-templates.new"
|
|
@newTranslationKey="clusterTemplatesPage.index.newTemplate"
|
|
@disabled={{rbac-prevents resource="cluster" scope="global" permission="create"}}
|
|
@ctx=""
|
|
/>
|
|
{{/if}}
|