331b6ce6f5
Update UI for AWS secret backend refactor * Support empty AWS policy documents * Try to make ARN input multiple * move aws-role serializer to use the application serializer as the base * support editing strings as JSON in the form field component * update model, form and show to use form-component component, and swap fields based on credential type * fix tests * unify credential generation for aws and remove the STS specific action in the UI * add label to the new json string form field
61 lines
1.6 KiB
Handlebars
61 lines
1.6 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>
|
|
<p.levelRight>
|
|
<div class="field is-grouped">
|
|
{{#if (eq mode "show") }}
|
|
{{#if (or model.canUpdate model.canDelete)}}
|
|
<div class="control">
|
|
{{#secret-link
|
|
secret=model.id
|
|
mode="edit"
|
|
replace=true
|
|
class="button has-icon-right is-ghost is-compact"
|
|
}}
|
|
Edit role
|
|
{{i-con glyph="chevron-right" size=11}}
|
|
{{/secret-link}}
|
|
</div>
|
|
{{/if}}
|
|
{{#if model.canGenerate}}
|
|
<div class="control">
|
|
{{#secret-link
|
|
mode="credentials"
|
|
secret=model.id
|
|
class="button has-icon-right is-ghost is-compact"
|
|
data-test-backend-credentials="iam"
|
|
}}
|
|
Generate credentials
|
|
{{i-con glyph="chevron-right" size=11}}
|
|
{{/secret-link}}
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
</p.levelRight>
|
|
</PageHeader>
|
|
|
|
{{#if (or (eq mode 'edit') (eq mode 'create'))}}
|
|
{{partial 'partials/role-aws/form'}}
|
|
{{else}}
|
|
{{partial 'partials/role-aws/show'}}
|
|
{{/if}}
|