924d1b4ddc
* use lazyCapabilities macro in models * use expandAttributeMeta and fieldToAttrs everywhere * add angle bracket component polyfill * use PageHeader component throughout
71 lines
1.9 KiB
Handlebars
71 lines
1.9 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 SSH Role
|
|
{{else if (eq mode 'edit')}}
|
|
Edit SSH Role
|
|
{{else}}
|
|
SSH 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}}
|
|
<div class="control">
|
|
{{#if (eq model.keyType "otp")}}
|
|
{{#secret-link
|
|
mode="credentials"
|
|
secret=model.id
|
|
class="button has-icon-right is-ghost is-compact"
|
|
data-test-backend-credentials=true
|
|
}}
|
|
Generate Credentials
|
|
{{i-con glyph="chevron-right" size=11}}
|
|
{{/secret-link}}
|
|
{{else}}
|
|
{{#secret-link
|
|
mode="sign"
|
|
secret=model.id
|
|
class="button has-icon-right is-ghost is-compact"
|
|
data-test-backend-credentials=true
|
|
}}
|
|
Sign Keys
|
|
{{i-con glyph="chevron-right" size=11}}
|
|
{{/secret-link}}
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
</p.levelRight>
|
|
</PageHeader>
|
|
|
|
{{#if (or (eq mode 'edit') (eq mode 'create'))}}
|
|
{{partial 'partials/role-ssh/form'}}
|
|
{{else}}
|
|
{{partial 'partials/role-ssh/show'}}
|
|
{{/if}}
|