ui/app/volumes/index/template.hbs

62 lines
2.2 KiB
Handlebars

{{#if projectController.showOrchestrationWelcome}}
{{orchestration-welcome}}
{{else}}
{{#containers-header tags=tags}}
{{#link-to "new-stack" classNames="btn btn-sm bg-default mr-10"}}{{t 'nav.containers.importCompose'}}{{/link-to}}
{{#link-to "volumes.new" projects.current.id class="btn btn-sm bg-primary"}}{{t 'nav.containers.addVolume'}}{{/link-to}}
{{/containers-header}}
{{#if rows.length}}
<section class="pl-0 pr-0">
{{#sortable-table
classNames="grid sortable-table"
body=rows
searchText=searchText
sortBy=sortBy
bulkActions=true
subRows=true
fullRows=true
groupByKey=groupBy
groupByRef="stack"
pagingLabel="pagination.volume"
subHeaders=containerHeaders
subSearchField="instances"
headers=headers as |sortable kind inst dt|}}
{{#if (eq kind "row")}}
{{volume-row
model=inst
toggle=(action "toggleExpand" inst.id)
expanded=(array-includes expandedInstances inst.id)
searchText=searchText
subMatches=sortable.subMatches
fullColspan=sortable.fullColspan
dt=dt
}}
{{else if (eq kind "group")}}
<tr class="group-row">
{{#if inst.ref}}
<td colspan={{sub sortable.fullColspan 2}}>
{{stack-row model=inst.ref}}
</td>
<td>
{{upgrade-btn classNames="btn-sm" model=inst.ref}}
</td>
<td data-title="{{dt.actions}}" class="actions">
{{action-menu model=inst.ref}}
</td>
{{else}}
<td colspan={{sortable.fullColspan}}>
{{stack-row}}
</td>
{{/if}}
</tr>
{{else if (eq kind "nomatch")}}
<tr><td colspan="{{sortable.fullColspan}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'volumesPage.noMatch'}}</td></tr>
{{/if}}
{{/sortable-table}}
</section>
{{else}}
{{empty-table resource="container" newRoute="volumes.new" newTranslationKey="nav.containers.addVolume"}}
{{/if}}
{{/if}}