open-consul/ui-v2/app/components/consul-metadata-list/index.hbs
John Cowen c8f8814d03 ui: Add <ConsulMetadataList /> and use it in 2 places (#7568)
We previoulsy had some pretty straightforward duplicated code for
rendering our metadata list for both Service Metadata and Node Metadata.

This moves this code into a component.
2020-05-12 17:14:21 +00:00

20 lines
401 B
Handlebars

<TabularCollection
data-test-metadata
@items={{items}} as |item index|
>
<BlockSlot @name="header">
<th>Key</th>
<th>Value</th>
</BlockSlot>
<BlockSlot @name="row">
<td>
<span>
{{object-at 0 item}}
</span>
</td>
<td>
<span>{{object-at 1 item}}</span>
</td>
</BlockSlot>
</TabularCollection>