open-vault/ui/app/templates/components/identity/popup-alias.hbs
2022-03-21 14:36:21 -06:00

41 lines
1.3 KiB
Handlebars

<PopupMenu @name="alias-menu">
<Confirm as |c|>
{{#let this.params.firstObject as |item|}}
<nav class="menu">
<ul class="menu-list">
<li class="action">
<LinkTo
@route="vault.cluster.access.identity.aliases.show"
@models={{array (pluralize item.parentType) item.id "details"}}
>
Details
</LinkTo>
</li>
{{#if item.updatePath.isPending}}
<li class="action">
<button disabled type="button" class="link button is-loading is-transparent">
loading
</button>
</li>
{{else}}
{{#if item.canEdit}}
<li class="action">
<LinkTo
@route="vault.cluster.access.identity.aliases.edit"
@models={{array (pluralize item.parentType) item.id}}
>
Edit
</LinkTo>
</li>
{{/if}}
{{#if item.canDelete}}
<li class="action">
<c.Message @id={{item.id}} @onConfirm={{action "performTransaction" item}} data-test-item-delete />
</li>
{{/if}}
{{/if}}
</ul>
</nav>
{{/let}}
</Confirm>
</PopupMenu>