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">
|
2019-02-14 16:04:46 +00:00
|
|
|
{{#if (eq mode "create")}}
|
2018-06-12 21:06:37 +00:00
|
|
|
Create an AWS Role
|
|
|
|
{{else if (eq mode 'edit')}}
|
2018-08-28 00:54:30 +00:00
|
|
|
Edit AWS Role <code>{{model.id}}</code>
|
2018-06-12 21:06:37 +00:00
|
|
|
{{else}}
|
|
|
|
AWS Role <code>{{model.id}}</code>
|
|
|
|
{{/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")}}
|
|
|
|
<Toolbar>
|
|
|
|
<ToolbarActions>
|
|
|
|
{{#if model.canGenerate}}
|
2019-02-14 16:04:46 +00:00
|
|
|
<ToolbarSecretLink
|
|
|
|
@secret={{model.id}}
|
2019-05-17 17:29:21 +00:00
|
|
|
@mode="credentials"
|
|
|
|
@data-test-backend-credentials="iam"
|
2019-02-14 16:04:46 +00:00
|
|
|
>
|
2019-05-17 17:29:21 +00:00
|
|
|
Generate credentials
|
2019-02-14 16:04:46 +00:00
|
|
|
</ToolbarSecretLink>
|
|
|
|
{{/if}}
|
2019-05-17 17:29:21 +00:00
|
|
|
{{#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}}
|
2019-05-17 17:29:21 +00:00
|
|
|
@mode="edit"
|
|
|
|
@replace=true
|
2019-02-14 16:04:46 +00:00
|
|
|
>
|
2019-05-17 17:29:21 +00:00
|
|
|
Edit role
|
2019-02-14 16:04:46 +00:00
|
|
|
</ToolbarSecretLink>
|
|
|
|
{{/if}}
|
2019-05-17 17:29:21 +00:00
|
|
|
</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}}
|