open-consul/ui-v2/app/templates/dc/services/metadata.hbs
John Cowen 6bf6002ab0
ui: Move slots to use attributes over positional params (#7032)
* Change all instances of yield/block-slots to use attributes over positional arguments

* Remove the ability to use yield/block-slots with positional params
2020-01-15 09:15:54 +00:00

28 lines
639 B
Handlebars

{{#if item.Meta}}
{{#with (object-entries item.Meta) as |meta|}}
{{#tabular-collection
data-test-metadata
items=meta as |item index|
}}
{{#block-slot name='header'}}
<th>Key</th>
<th>Value</th>
{{/block-slot}}
{{#block-slot name='row'}}
<td>
<span>
{{object-at 0 item}}
</span>
</td>
<td>
<span>{{object-at 1 item}}</span>
</td>
{{/block-slot}}
{{/tabular-collection}}
{{/with}}
{{else}}
<p>
This instance has no meta data.
</p>
{{/if}}