2018-04-03 14:16:57 +00:00
|
|
|
{{#popup-menu name="role-ssh-nav"}}
|
|
|
|
<nav class="menu">
|
|
|
|
<ul class="menu-list">
|
|
|
|
{{#if (eq item.keyType 'otp')}}
|
|
|
|
{{#if item.generatePath.isPending}}
|
|
|
|
<li class="action">
|
2018-11-09 18:04:58 +00:00
|
|
|
<button disabled type="button" class="link button is-loading is-transparent">
|
2018-04-03 14:16:57 +00:00
|
|
|
loading
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
{{else if item.canGenerate}}
|
|
|
|
<li class="action">
|
2018-08-16 17:48:24 +00:00
|
|
|
{{#link-to "vault.cluster.secrets.backend.credentials" item.id data-test-role-ssh-link="generate"}}
|
2018-04-03 14:16:57 +00:00
|
|
|
Generate Credentials
|
2018-08-16 17:48:24 +00:00
|
|
|
{{/link-to}}
|
2018-04-03 14:16:57 +00:00
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
{{else if (eq item.keyType 'ca')}}
|
|
|
|
{{#if item.signPath.isPending}}
|
|
|
|
<li class="action">
|
2018-11-09 18:04:58 +00:00
|
|
|
<button disabled type="button" class="link button is-loading is-transparent">
|
2018-04-03 14:16:57 +00:00
|
|
|
loading
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
{{else if item.canGenerate}}
|
|
|
|
<li class="action">
|
2018-08-16 17:48:24 +00:00
|
|
|
{{#link-to "vault.cluster.secrets.backend.sign" item.id data-test-role-ssh-link="generate"}}
|
2018-04-03 14:16:57 +00:00
|
|
|
Sign Keys
|
2018-08-16 17:48:24 +00:00
|
|
|
{{/link-to}}
|
2018-04-03 14:16:57 +00:00
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
{{#if item.updatePath.isPending}}
|
|
|
|
<li class="action">
|
2018-11-09 18:04:58 +00:00
|
|
|
<button disabled type="button" class="link button is-loading is-transparent">
|
2018-04-03 14:16:57 +00:00
|
|
|
loading
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
<li class="action">
|
2018-11-09 18:04:58 +00:00
|
|
|
<button disabled type="button" class="link button is-loading is-transparent">
|
2018-04-03 14:16:57 +00:00
|
|
|
loading
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
{{else}}
|
|
|
|
{{#if item.canRead}}
|
|
|
|
<li class="action">
|
2018-08-16 17:48:24 +00:00
|
|
|
{{#link-to "vault.cluster.secrets.backend.show" item.id data-test-role-ssh-link="show"}}
|
2018-04-03 14:16:57 +00:00
|
|
|
Details
|
2018-08-16 17:48:24 +00:00
|
|
|
{{/link-to}}
|
2018-04-03 14:16:57 +00:00
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
{{#if item.canEdit}}
|
|
|
|
<li class="action">
|
2018-08-16 17:48:24 +00:00
|
|
|
{{#link-to "vault.cluster.secrets.backend.edit" item.id data-test-role-ssh-link="edit"}}
|
2018-04-03 14:16:57 +00:00
|
|
|
Edit
|
2018-08-16 17:48:24 +00:00
|
|
|
{{/link-to}}
|
2018-04-03 14:16:57 +00:00
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
{{#if item.canDelete}}
|
|
|
|
<li class="action">
|
|
|
|
{{#confirm-action
|
|
|
|
confirmButtonClasses="button is-primary"
|
2018-05-24 23:10:19 +00:00
|
|
|
buttonClasses="link is-destroy"
|
2018-04-03 14:16:57 +00:00
|
|
|
onConfirmAction=(action "delete" item)
|
|
|
|
confirmMessage=(concat "Are you sure you want to delete " item.id "?")
|
2019-01-09 18:30:19 +00:00
|
|
|
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")
|
2018-04-03 14:16:57 +00:00
|
|
|
containerClasses="message-body is-block"
|
|
|
|
messageClasses="is-block"
|
|
|
|
data-test-ssh-role-delete=item.id
|
|
|
|
}}
|
|
|
|
Delete
|
|
|
|
{{/confirm-action}}
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
2018-09-25 16:28:26 +00:00
|
|
|
{{#if item.canEditZeroAddress}}
|
2018-04-03 14:16:57 +00:00
|
|
|
{{#if item.zeroAddress}}
|
|
|
|
<li class="action">
|
|
|
|
<button type="button" disabled={{get this (concat "loading-" item.id)}} class="link button is-transparent
|
|
|
|
{{if (get this (concat "loading-" item.id)) 'is-loading'}} " {{action "toggleZeroAddress" item backendModel}}>
|
|
|
|
Disable Zero Address
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
{{else}}
|
|
|
|
<li class="action">
|
2018-09-25 16:28:26 +00:00
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
disabled={{get this (concat "loading-" item.id)}}
|
|
|
|
class="link button is-transparent {{if (get this (concat "loading-" item.id)) 'is-loading'}}"
|
|
|
|
{{action "toggleZeroAddress" item backendModel}}
|
|
|
|
>
|
2018-04-03 14:16:57 +00:00
|
|
|
Enable Zero Address
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
{{/popup-menu}}
|