vault/ui/app/components/key-version-select.hbs
Vault Automation 0c6c13dd38
license: update headers to IBM Corp. (#10229) (#10233)
* license: update headers to IBM Corp.
* `make proto`
* update offset because source file changed

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-10-21 15:20:20 -06:00

34 lines
No EOL
1.2 KiB
Handlebars

{{!
Copyright IBM Corp. 2016, 2025
SPDX-License-Identifier: BUSL-1.1
}}
{{#if (gt this.key.keysForEncryption.length 1)}}
<div class="field" data-test-transit-key-version-select={{true}}>
<label for="key_version" class="is-label">Key version</label>
<div class="control is-expanded">
<div class="select is-fullwidth">
<select name="key_version" id="key_version" onchange={{action this.onVersionChange value="target.value"}}>
{{#each this.key.keysForEncryption as |version|}}
{{#if (eq version this.key.latestVersion)}}
<option
selected={{if this.key_version (eq version this.key_version) (eq version this.key.latestVersion)}}
value={{0}}
>
{{version}}
(latest)
</option>
{{else}}
<option
selected={{if this.key_version (eq version this.key_version) (eq version this.key.latestVersion)}}
value={{version}}
>
{{version}}
</option>
{{/if}}
{{/each}}
</select>
</div>
</div>
</div>
{{/if}}