2018-06-12 21:06:37 +00:00
|
|
|
<PageHeader as |p|>
|
|
|
|
<p.top>
|
|
|
|
{{key-value-header
|
|
|
|
baseKey=model
|
|
|
|
path="vault.cluster.secrets.backend.list"
|
|
|
|
mode=mode
|
|
|
|
root=root
|
|
|
|
showCurrent=true
|
|
|
|
}}
|
|
|
|
</p.top>
|
|
|
|
<p.levelLeft>
|
|
|
|
<h1 class="title is-3" data-test-secret-header="true">
|
|
|
|
{{#if (eq mode "create") }}
|
2019-03-29 23:40:12 +00:00
|
|
|
Create an SSH role
|
2018-06-12 21:06:37 +00:00
|
|
|
{{else if (eq mode 'edit')}}
|
2019-03-29 23:40:12 +00:00
|
|
|
Edit SSH role
|
2018-06-12 21:06:37 +00:00
|
|
|
{{else}}
|
2019-03-30 17:07:52 +00:00
|
|
|
SSH role <code>{{model.id}}</code>
|
2018-06-12 21:06:37 +00:00
|
|
|
{{/if}}
|
|
|
|
</h1>
|
|
|
|
</p.levelLeft>
|
|
|
|
</PageHeader>
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2019-05-17 17:29:21 +00:00
|
|
|
{{#if (eq mode "show")}}
|
2019-02-14 16:04:46 +00:00
|
|
|
<Toolbar>
|
|
|
|
<ToolbarActions>
|
|
|
|
{{#if (eq model.keyType "otp")}}
|
|
|
|
<ToolbarSecretLink
|
|
|
|
@secret={{model.id}}
|
|
|
|
@mode="credentials"
|
|
|
|
@data-test-backend-credentials=true
|
|
|
|
@replace=true
|
|
|
|
>
|
|
|
|
Generate Credential
|
|
|
|
</ToolbarSecretLink>
|
|
|
|
{{else}}
|
|
|
|
<ToolbarSecretLink
|
|
|
|
@secret={{model.id}}
|
|
|
|
@mode="sign"
|
|
|
|
@data-test-backend-credentials=true
|
|
|
|
@replace=true
|
|
|
|
>
|
|
|
|
Sign Keys
|
|
|
|
</ToolbarSecretLink>
|
|
|
|
{{/if}}
|
2019-05-17 17:29:21 +00:00
|
|
|
{{#if (or model.canUpdate model.canDelete)}}
|
|
|
|
<div class="toolbar-separator" />
|
|
|
|
{{/if}}
|
|
|
|
{{#if model.canDelete}}
|
|
|
|
<ConfirmAction
|
|
|
|
@buttonClasses="toolbar-link"
|
|
|
|
@onConfirmAction={{action "delete"}}
|
|
|
|
>
|
|
|
|
Delete role
|
|
|
|
</ConfirmAction>
|
|
|
|
{{/if}}
|
|
|
|
{{#if (or model.canUpdate model.canDelete)}}
|
|
|
|
<ToolbarSecretLink
|
|
|
|
@secret={{model.id}}
|
|
|
|
@mode="edit"
|
|
|
|
@data-test-edit-link=true
|
|
|
|
@replace=true
|
|
|
|
>
|
|
|
|
Edit role
|
|
|
|
</ToolbarSecretLink>
|
|
|
|
{{/if}}
|
2019-02-14 16:04:46 +00:00
|
|
|
</ToolbarActions>
|
|
|
|
</Toolbar>
|
|
|
|
{{/if}}
|
|
|
|
|
2018-04-03 14:16:57 +00:00
|
|
|
{{#if (or (eq mode 'edit') (eq mode 'create'))}}
|
|
|
|
{{partial 'partials/role-ssh/form'}}
|
|
|
|
{{else}}
|
|
|
|
{{partial 'partials/role-ssh/show'}}
|
|
|
|
{{/if}}
|