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

54 lines
1.2 KiB
Handlebars

<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 an AWS Role
{{else if (eq mode 'edit')}}
Edit AWS Role <code>{{model.id}}</code>
{{else}}
AWS Role <code>{{model.id}}</code>
{{/if}}
</h1>
</p.levelLeft>
</PageHeader>
<Toolbar>
<ToolbarActions>
{{#if (eq mode "show")}}
{{#if (or model.canUpdate model.canDelete)}}
<ToolbarSecretLink
@secret={{model.id}}
@mode="edit"
@replace=true
>
Edit role
</ToolbarSecretLink>
{{/if}}
{{#if model.canGenerate}}
<ToolbarSecretLink
@secret={{model.id}}
@mode="credentials"
@data-test-backend-credentials="iam"
>
Generate credentials
</ToolbarSecretLink>
{{/if}}
{{/if}}
</ToolbarActions>
</Toolbar>
{{#if (or (eq mode 'edit') (eq mode 'create'))}}
{{partial 'partials/role-aws/form'}}
{{else}}
{{partial 'partials/role-aws/show'}}
{{/if}}