mirror of https://github.com/rancher/ui.git
88 lines
3.3 KiB
Handlebars
88 lines
3.3 KiB
Handlebars
{{#if projectController.showOrchestrationWelcome}}
|
|
{{orchestration-welcome}}
|
|
{{else}}
|
|
{{#containers-header tags=tags simpleMode=simpleMode}}
|
|
{{#link-to "new-stack" classNames="btn btn-sm bg-default mr-10"}}{{t 'nav.containers.importCompose'}}{{/link-to}}
|
|
{{#link-to "containers.run" projects.current.id class="btn btn-sm bg-primary"}}{{t 'nav.containers.addContainer'}}{{/link-to}}
|
|
{{/containers-header}}
|
|
|
|
{{#if rows.length}}
|
|
<section class="instances">
|
|
{{#sortable-table
|
|
tableClassNames="double-rows"
|
|
classNames="grid sortable-table"
|
|
body=rows
|
|
searchText=searchText
|
|
sortBy=sortBy
|
|
bulkActions=true
|
|
subRows=true
|
|
fullRows=true
|
|
groupByKey=groupBy
|
|
groupByRef="stack"
|
|
extraGroups=emptyStacks
|
|
pagingLabel="pagination.containerService"
|
|
subSearchField="instances"
|
|
extraSearchFields=extraSearchFields
|
|
extraSearchSubFields=extraSearchSubFields
|
|
headers=headers as |sortable kind row dt|}}
|
|
{{#if (eq kind "row")}}
|
|
{{#if (eq row.baseType "instance")}}
|
|
{{container-row
|
|
model=row
|
|
dt=dt
|
|
showHost=true
|
|
expandPlaceholder=true
|
|
scalePlaceholder=true
|
|
fullColspan=sortable.fullColspan
|
|
}}
|
|
{{else}}
|
|
{{service-row
|
|
model=row
|
|
toggle=(action "toggleExpand" row.id)
|
|
expanded=(array-includes expandedInstances row.id)
|
|
searchText=searchText
|
|
subMatches=sortable.subMatches
|
|
fullColspan=sortable.fullColspan
|
|
dt=dt
|
|
}}
|
|
{{/if}}
|
|
{{else if (eq kind "group")}}
|
|
<tr class="group-row">
|
|
{{#if row.ref}}
|
|
<td colspan={{sub sortable.fullColspan 3}}>
|
|
{{stack-row model=row.ref}}
|
|
</td>
|
|
<td>
|
|
{{upgrade-btn classNames="btn-sm" model=row.ref}}
|
|
</td>
|
|
<td data-title="{{dt.instanceState}}" class="progress-td">
|
|
<div class="mt-10">
|
|
{{progress-bar-multi
|
|
labelKey="state"
|
|
valueKey="count"
|
|
values=row.ref.serviceStates.byColor
|
|
tooltipValues=row.ref.serviceStates.byName
|
|
}}
|
|
</div>
|
|
</td>
|
|
<td data-title="{{dt.actions}}" class="actions">
|
|
{{action-menu model=row.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 'containersPage.table.noMatch'}}</td></tr>
|
|
{{else if (eq kind "norows")}}
|
|
<tr><td colspan="{{sortable.fullColspan}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'containersPage.table.noData'}}</td></tr>
|
|
{{/if}}
|
|
{{/sortable-table}}
|
|
</section>
|
|
{{else}}
|
|
{{empty-table resource="container" newRoute="containers.run" newTranslationKey="nav.containers.addContainer"}}
|
|
{{/if}}
|
|
{{/if}}
|