consul/ui-v2/app/components/consul-metadata-list
John Cowen 5dad95faf1 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
..
README.mdx ui: Add `<ConsulMetadataList />` and use it in 2 places (#7568) 2020-05-12 17:14:21 +00:00
index.hbs ui: Add `<ConsulMetadataList />` and use it in 2 places (#7568) 2020-05-12 17:14:21 +00:00
index.js ui: Add `<ConsulMetadataList />` and use it in 2 places (#7568) 2020-05-12 17:14:21 +00:00

README.mdx

## ConsulMetadataList

`<ConsulMetadataList @items={{meta}} />`

A presentational component for presenting Consul Metadata

### Arguments

| Argument/Attribute | Type | Default | Description |
| --- | --- | --- | --- |
| `items` | `array` |  | A an array of entries or `[key, value]` pairs as returned by `Object.entries()` |

### Example

The following example shows how to construct the required structure from the
Consul API using a `object-entries` helper.

```handlebars
  <ConsulMetadataList @items={{object-entries item.Meta}} />
```

### See

- [Component Source Code](./index.js)
- [TemplateSource Code](./index.hbs)

---