mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-25 04:31:12 +01:00
37 lines
1.5 KiB
Handlebars
37 lines
1.5 KiB
Handlebars
<BasicDropdown @class="popup-menu" @horizontalPosition="auto-right" @verticalPosition="below" as |D|>
|
|
<D.Trigger data-test-version-dropdown class="toolbar-link {{if D.isOpen ' is-active'}}">
|
|
Version
|
|
{{or @displayVersion "current"}}
|
|
<Chevron @direction="down" @isButton={{true}} />
|
|
</D.Trigger>
|
|
<D.Content @defaultClass="popup-menu-content">
|
|
<nav class="box menu">
|
|
<ul class="menu-list">
|
|
{{#each @metadata.sortedVersions as |versionData|}}
|
|
<li data-test-version={{versionData.version}} class="action">
|
|
<LinkTo @query={{hash version=versionData.version}} {{on "click" (fn @onClose D)}}>
|
|
Version
|
|
{{versionData.version}}
|
|
{{#if versionData.destroyed}}
|
|
<Icon @name="x-square-fill" class="has-text-danger is-pulled-right" />
|
|
{{else if versionData.deletion_time}}
|
|
<Icon @name="x-square-fill" class="has-text-grey is-pulled-right" />
|
|
{{else if (loose-equal versionData.version @metadata.currentVersion)}}
|
|
<Icon @name="check-circle" class="has-text-success is-pulled-right" />
|
|
{{/if}}
|
|
</LinkTo>
|
|
</li>
|
|
{{/each}}
|
|
{{! version diff }}
|
|
{{#if (gt @metadata.sortedVersions.length 1)}}
|
|
<hr />
|
|
<li>
|
|
<LinkTo @route="secret.metadata.diff" {{on "click" (fn @onClose D)}}>
|
|
Version Diff
|
|
</LinkTo>
|
|
</li>
|
|
{{/if}}
|
|
</ul>
|
|
</nav>
|
|
</D.Content>
|
|
</BasicDropdown> |