open-vault/ui/app/templates/components/role-pki-edit.hbs

66 lines
1.6 KiB
Handlebars
Raw Normal View History

<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") }}
Create a PKI Role
{{else if (eq mode 'edit')}}
Edit PKI Role
{{else}}
PKI Role <code>{{model.id}}</code>
{{/if}}
</h1>
</p.levelLeft>
</PageHeader>
2018-04-03 14:16:57 +00:00
2019-02-14 16:04:46 +00:00
<Toolbar>
<ToolbarActions>
{{#if (eq mode "show") }}
{{#if (or model.canUpdate model.canDelete)}}
<ToolbarSecretLink
@secret={{model.id}}
@mode="edit"
@data-test-edit-link=true
@replace=true
>
Edit role
</ToolbarSecretLink>
{{/if}}
{{#if model.canGenerate}}
<ToolbarSecretLink
@secret={{model.id}}
@mode="credentials"
@queryParams={{query-params action="issue"}}
@data-test-credentials-link=true
>
Generate Certificate
</ToolbarSecretLink>
{{/if}}
{{#if model.canSign}}
<ToolbarSecretLink
@secret={{model.id}}
@mode="credentials"
@queryParams={{query-params action="sign"}}
@data-test-sign-link=true
>
Sign Certificate
</ToolbarSecretLink>
{{/if}}
{{/if}}
</ToolbarActions>
</Toolbar>
2018-04-03 14:16:57 +00:00
{{#if (or (eq mode 'edit') (eq mode 'create'))}}
{{partial 'partials/role-pki/form'}}
{{else}}
{{partial 'partials/role-pki/show'}}
{{/if}}