35d65c7c7e
Fixes #14617 Dynamic Node Metadata allows Nomad users, and their jobs, to update Node metadata through an API. Currently Node metadata is only reloaded when a Client agent is restarted. Includes new UI for editing metadata as well. --------- Co-authored-by: Phil Renaud <phil.renaud@hashicorp.com>
42 lines
848 B
Handlebars
42 lines
848 B
Handlebars
<form class="metadata-editor">
|
|
<label>
|
|
<strong>Key</strong>
|
|
{{#if @constantKey}}
|
|
<span class="constant-key">{{@kv.key}}</span>
|
|
{{else}}
|
|
<Input
|
|
{{autofocus}}
|
|
id="new-meta-key"
|
|
@type="text"
|
|
@value={{@kv.key}}
|
|
class="input"
|
|
{{on "keyup" @onEdit}}
|
|
/>
|
|
{{/if}}
|
|
</label>
|
|
<label>
|
|
<strong>Value</strong>
|
|
{{#if @autofocusValue}}
|
|
<Input
|
|
data-test-metadata-editor-value
|
|
@type="text"
|
|
@value={{@kv.value}}
|
|
class="input"
|
|
{{autofocus}}
|
|
{{on "keyup" @onEdit}}
|
|
/>
|
|
{{else}}
|
|
<Input
|
|
data-test-metadata-editor-value
|
|
@type="text"
|
|
@value={{@kv.value}}
|
|
class="input"
|
|
{{on "keyup" @onEdit}}
|
|
/>
|
|
{{/if}}
|
|
</label>
|
|
<footer>
|
|
{{yield}}
|
|
</footer>
|
|
</form>
|