c31671ce04
* add dot-to-dash helper * fix context menu on policy page and add test for deletion * use dot-to-dash where we use confirm component * fix acceptance test
30 lines
1.1 KiB
Handlebars
30 lines
1.1 KiB
Handlebars
{{#popup-menu name="role-aws-nav" contentClass="is-wide"}}
|
|
<nav class="menu">
|
|
<ul class="menu-list">
|
|
<li class="action">
|
|
{{#link-to "vault.cluster.secrets.backend.show" item.idForNav data-test-pki-cert-link="show"}}
|
|
Details
|
|
{{/link-to}}
|
|
</li>
|
|
{{#if item.canRevoke}}
|
|
<li class="action">
|
|
{{#confirm-action
|
|
confirmButtonClasses="button is-primary"
|
|
buttonClasses="link is-destroy"
|
|
onConfirmAction=(action "delete" item)
|
|
confirmMessage=(concat "Are you sure you want to revoke " item.id "?")
|
|
showConfirm=(get this (concat "shouldDelete-" (dot-to-dash item.id)))
|
|
class=(if (get this (concat "shouldDelete-" (dot-to-dash item.id))) "message is-block is-warning is-outline")
|
|
containerClasses="message-body is-block"
|
|
messageClasses="is-block"
|
|
confirmButtonText="Revoke"
|
|
data-test-cert-revoke-delete=item.id
|
|
}}
|
|
Revoke
|
|
{{/confirm-action}}
|
|
</li>
|
|
{{/if}}
|
|
</ul>
|
|
</nav>
|
|
{{/popup-menu}}
|