70 lines
2.3 KiB
Handlebars
70 lines
2.3 KiB
Handlebars
{{#popup-menu name="role-aws-nav"}}
|
|
<Confirm as |c|>
|
|
<nav class="menu">
|
|
{{#if (or item.generatePath.isPending item.signPath.isPending)}}
|
|
<ul class="menu-list">
|
|
<li class="action">
|
|
<button disabled type="button" class="link button is-loading is-transparent">
|
|
loading
|
|
</button>
|
|
</li>
|
|
</ul>
|
|
{{else if (or item.canGenerate item.canSign)}}
|
|
<ul class="menu-list">
|
|
{{#if item.canGenerate}}
|
|
<li class="action">
|
|
{{#link-to "vault.cluster.secrets.backend.credentials" item.id (query-params action="issue") data-test-role-pki-link="generate-certificate"}}
|
|
Generate certificate
|
|
{{/link-to}}
|
|
</li>
|
|
{{/if}}
|
|
{{#if item.canSign}}
|
|
<li class="action">
|
|
{{#link-to "vault.cluster.secrets.backend.credentials" item.id (query-params action="sign") data-test-role-pki-link="sign-certificate"}}
|
|
Sign certificate
|
|
{{/link-to}}
|
|
</li>
|
|
{{/if}}
|
|
</ul>
|
|
{{/if}}
|
|
<ul class="menu-list">
|
|
{{#if item.updatePath.isPending}}
|
|
<li class="action">
|
|
<button disabled type="button" class="link button is-loading is-transparent">
|
|
loading
|
|
</button>
|
|
</li>
|
|
<li class="action">
|
|
<button disabled type="button" class="link button is-loading is-transparent">
|
|
loading
|
|
</button>
|
|
</li>
|
|
{{else}}
|
|
{{#if item.canRead}}
|
|
<li class="action">
|
|
{{#link-to "vault.cluster.secrets.backend.show" item.id data-test-role-pki-link="show"}}
|
|
Details
|
|
{{/link-to}}
|
|
</li>
|
|
{{/if}}
|
|
{{#if item.canEdit}}
|
|
<li class="action">
|
|
{{#link-to "vault.cluster.secrets.backend.edit" item.id data-test-role-pki-link="edit"}}
|
|
Edit
|
|
{{/link-to}}
|
|
</li>
|
|
{{/if}}
|
|
{{#if item.canDelete}}
|
|
<li class="action">
|
|
<c.Message
|
|
@id={{item.id}}
|
|
@onConfirm={{action "delete" item}}
|
|
data-test-pki-role-delete={{item.id}}/>
|
|
</li>
|
|
{{/if}}
|
|
{{/if}}
|
|
</ul>
|
|
</nav>
|
|
</Confirm>
|
|
{{/popup-menu}}
|