mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-17 12:07:02 +02:00
* adds ember-flight-icons dependecy * adds inline-json-import babel plugin * adds flight icon styling * updates Icon component to support flight icons * updates Icon component usages to new api and updates name values to flight icon set when available * fixes tests * updates icon story with flight mappings and fixes issue with flight icons not rendering in storybook * adds changelog * fixes typo in sign action glyph name in transit-key model * adds comments to icon-map * updates Icon component to use only supported flight icon sizes * adds icon transform codemod * updates icon transform formatting to handle edge case * runs icon transform on templates * updates Icon usage in toolbar-filter md and story * updates tests
73 lines
2.0 KiB
Handlebars
73 lines
2.0 KiB
Handlebars
{{#if label}}
|
|
<label class="title {{if small-label 'is-5' 'is-4'}}" data-test-kv-label="true">
|
|
{{label}}
|
|
{{#if helpText}}
|
|
<InfoTooltip>
|
|
{{helpText}}
|
|
</InfoTooltip>
|
|
{{/if}}
|
|
</label>
|
|
{{#if subText}}
|
|
<p class="has-padding-bottom">
|
|
{{subText}}
|
|
</p>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{#if (get validationMessages name)}}
|
|
<div>
|
|
<AlertInline
|
|
@type="danger"
|
|
@message={{get validationMessages name}}
|
|
@paddingTop=true
|
|
/>
|
|
</div>
|
|
{{/if}}
|
|
{{#each kvData as |row index|}}
|
|
<div class="columns is-variable" data-test-kv-row>
|
|
<div class="column is-one-quarter">
|
|
<Input data-test-kv-key={{true}} @value={{row.name}} placeholder="key" @change={{action "updateRow" row index}} class="input" />
|
|
</div>
|
|
<div class="column">
|
|
<Textarea
|
|
data-test-kv-value={{true}}
|
|
@name={{row.name}}
|
|
class="input {{if (get validationMessages name) "has-error-border"}}"
|
|
@change={{action "updateRow" row index}}
|
|
@value={{row.value}}
|
|
@wrap="off"
|
|
placeholder="value"
|
|
@rows={{1}}
|
|
onkeyup={{action
|
|
(action "handleKeyUp" name)
|
|
value="target.value"
|
|
}}
|
|
/>
|
|
</div>
|
|
<div class="column is-narrow">
|
|
{{#if (eq kvData.length (inc index))}}
|
|
<button type="button" {{action "addRow"}} class="button is-outlined is-primary" data-test-kv-add-row=true>
|
|
Add
|
|
</button>
|
|
{{else}}
|
|
<button
|
|
class="button has-text-grey is-expanded is-icon"
|
|
type="button"
|
|
{{action "deleteRow" row index}}
|
|
aria-label="Delete row"
|
|
data-test-kv-delete-row
|
|
>
|
|
<Icon @name="trash" />
|
|
</button>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
{{/each}}
|
|
{{#if kvHasDuplicateKeys}}
|
|
<AlertBanner
|
|
@type="warning"
|
|
@message="More than one key shares the same name. Please be sure to have unique key names or some data may be lost when saving."
|
|
@class="is-marginless"
|
|
data-test-duplicate-error-warnings
|
|
/>
|
|
{{/if}}
|