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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
772 B
Handlebars
Raw Normal View History

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
{{#each-in this.attributes as |key value|}}
2017-09-19 14:47:10 +00:00
{{#if (is-object value)}}
<tr data-test-attributes-section>
<td data-test-heading class="is-subheading" colspan="2">
{{#if this.prefix}}<span class="is-faded" data-test-prefix>{{this.prefix}}.</span>{{/if}}{{key}}
2017-09-19 14:47:10 +00:00
</td>
</tr>
<AttributesSection @prefix={{if this.prefix (concat this.prefix "." key) key}} @attributes={{value}}
@key={{key}} @value={{value}} @editable={{@editable}} @onKVSave={{@onKVSave}} @copyable={{@copyable}} />
2017-09-19 14:47:10 +00:00
{{else}}
<MetadataKv @prefix={{this.prefix}}
@key={{key}} @value={{value}} @editable={{@editable}} @onKVSave={{@onKVSave}} @copyable={{@copyable}} />
2017-09-19 14:47:10 +00:00
{{/if}}
{{/each-in}}