open-nomad/ui/app/templates/components/attributes-section.hbs

19 lines
666 B
Handlebars
Raw Normal View History

2017-09-19 14:47:10 +00:00
{{#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}}
2017-09-19 14:47:10 +00:00
</td>
</tr>
<AttributesSection @prefix={{if prefix (concat prefix "." key) key}} @attributes={{value}} />
2017-09-19 14:47:10 +00:00
{{else}}
<tr data-test-attributes-section>
<td data-test-key>
{{#if prefix}}<span class="is-faded" data-test-prefix>{{prefix}}.</span>{{/if}}
2017-09-19 14:47:10 +00:00
{{~key}}
</td>
<td data-test-value title="{{value}}">{{value}}</td>
2017-09-19 14:47:10 +00:00
</tr>
{{/if}}
{{/each-in}}