open-nomad/ui/app/templates/components/attributes-section.hbs
2018-01-17 09:03:59 -08:00

19 lines
659 B
Handlebars

{{#each-in attributes as |key value|}}
{{#if (is-object value)}}
<tr data-test-attributes-section>
<td data-test-heading class="is-subheading" colspan="2">
{{#if prefix}}<span class="is-faded" data-test-prefix>{{prefix}}.</span>{{/if}}{{key}}
</td>
</tr>
{{attributes-section prefix=(if prefix (concat prefix '.' key) key) attributes=value}}
{{else}}
<tr data-test-attributes-section>
<td data-test-key>
{{#if prefix}}<span class="is-faded" data-test-prefix>{{prefix}}.</span>{{/if}}
{{~key}}
</td>
<td data-test-value title="{{value}}">{{value}}</td>
</tr>
{{/if}}
{{/each-in}}