open-vault/ui/app/templates/components/identity/popup-policy.hbs
Matthew Irish c31671ce04
Bug fix - ui context menu (#6018)
* 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
2019-01-09 12:30:19 -06:00

32 lines
1.1 KiB
Handlebars

{{#popup-menu name="policy-menu"}}
<nav class="menu">
<ul class="menu-list">
<li class="action">
{{#link-to "vault.cluster.policy.show" "acl" policyName}}
View Policy
{{/link-to}}
</li>
<li class="action">
{{#link-to "vault.cluster.policy.edit" "acl" policyName}}
Edit Policy
{{/link-to}}
</li>
<li class="action">
{{#confirm-action
confirmButtonClasses="button is-primary"
confirmButtonText="Remove"
buttonClasses="link is-destroy"
onConfirmAction=(action "performTransaction" model policyName)
confirmMessage=(concat "Are you sure you want to remove " policyName "?")
showConfirm=(get this (concat "shouldDelete-" (dot-to-dash policyName)))
class=(if (get this (concat "shouldDelete-" (dot-to-dash policyName))) "message is-block is-warning is-outline")
containerClasses="message-body is-block"
messageClasses="is-block"
}}
Remove from {{model.identityType}}
{{/confirm-action}}
</li>
</ul>
</nav>
{{/popup-menu}}