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

65 lines
1.5 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">
2019-02-14 16:04:46 +00:00
{{#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>
2018-04-03 14:16:57 +00:00
{{#if (eq mode "show")}}
<Toolbar>
<ToolbarActions>
{{#if model.canGenerate}}
2019-02-14 16:04:46 +00:00
<ToolbarSecretLink
@secret={{model.id}}
@mode="credentials"
@data-test-backend-credentials="iam"
2019-02-14 16:04:46 +00:00
>
Generate credentials
2019-02-14 16:04:46 +00:00
</ToolbarSecretLink>
{{/if}}
{{#if (and model.canGenerate (or model.canDelete model.canEdit))}}
<div class="toolbar-separator" />
{{/if}}
{{#if model.canDelete}}
<ConfirmAction
@buttonClasses="toolbar-link"
@onConfirmAction={{action "delete"}}
>
Delete role
</ConfirmAction>
{{/if}}
{{#if model.canEdit}}
2019-02-14 16:04:46 +00:00
<ToolbarSecretLink
@secret={{model.id}}
@mode="edit"
@replace=true
2019-02-14 16:04:46 +00:00
>
Edit role
2019-02-14 16:04:46 +00:00
</ToolbarSecretLink>
{{/if}}
</ToolbarActions>
</Toolbar>
{{/if}}
2019-02-14 16:04:46 +00:00
2018-04-03 14:16:57 +00:00
{{#if (or (eq mode 'edit') (eq mode 'create'))}}
{{partial 'partials/role-aws/form'}}
{{else}}
{{partial 'partials/role-aws/show'}}
{{/if}}