ui/lib/shared/addon/components/labels-section/template.hbs

45 lines
1.4 KiB
Handlebars

{{#accordion-list-item
title=(t 'labelsSection.title')
detail=(t translationDetail)
status=(t 'labelsSection.status' count=labelArray.length)
statusClass=(if labelArray.length 'bg-success' 'text-muted')
expandAll=expandAll
expand=(action expandFn)
componentName='sortable-table'
as | parent |
}}
{{#component parent.intent
classNames="grid fixed mb-0"
bulkActions=false
rowActions=false
paging=false
search=true
sortBy=sortBy
stickyHeader=false
descending=descending
headers=headers
body=labelArray
as |sortable kind label|
}}
{{#if (eq kind "row")}}
<tr>
{{#if showKind}}
<td data-title="{{t 'labelsSection.kind'}}:">{{uc-first label.type}}</td>
{{/if}}
<td data-title="{{t 'labelsSection.key'}}:" class="force-wrap">{{label.key}}</td>
<td data-title="{{t 'labelsSection.value'}}:" class="force-wrap">{{pretty-json value=label.value}}</td>
</tr>
{{else if (eq kind "nomatch")}}
<tr>
<td colspan="{{sortable.fullColspan}}" class="text-center text-muted pt-20 pb-20">{{t 'labelsSection.noMatch'}}
</td>
</tr>
{{else if (eq kind "norows")}}
<tr>
<td colspan="{{sortable.fullColspan}}" class="text-center text-muted pt-20 pb-20">{{t 'labelsSection.noData'}}
</td>
</tr>
{{/if}}
{{/component}}
{{/accordion-list-item}}