71 lines
2.1 KiB
Handlebars
71 lines
2.1 KiB
Handlebars
<PageHeader as |p|>
|
|
<p.top>
|
|
{{key-value-header
|
|
baseKey=baseKey
|
|
path="vault.cluster.secrets.backend.list"
|
|
mode=mode
|
|
root=root
|
|
showCurrent=true
|
|
}}
|
|
</p.top>
|
|
<p.levelLeft>
|
|
<h1 class="title is-3">
|
|
{{#if (eq mode "create") }}
|
|
Create Secret
|
|
{{else if (eq mode 'edit')}}
|
|
Edit Secret
|
|
{{else}}
|
|
{{key.id}}
|
|
{{/if}}
|
|
</h1>
|
|
</p.levelLeft>
|
|
<p.levelRight>
|
|
{{#if canDelete}}
|
|
{{#confirm-action
|
|
buttonClasses="button is-compact is-ghost has-icon-right"
|
|
onConfirmAction=(action "deleteKey")
|
|
confirmMessage=(concat "Are you sure you want to delete " model.id "?")
|
|
cancelButtonText="Cancel"
|
|
data-test-secret-delete="true"
|
|
}}
|
|
Delete secret <ICon @glyph="chevron-right" @size="11" />
|
|
{{/confirm-action}}
|
|
{{/if}}
|
|
</p.levelRight>
|
|
</PageHeader>
|
|
<div class="box is-sideless has-background-grey-lighter has-slim-padding is-marginless">
|
|
<div class="level">
|
|
<div class="level-left">
|
|
</div>
|
|
<div class="level-right is-marginless">
|
|
<div class="field is-horizontal is-flex-end is-single-line">
|
|
<div class="control is-flex">
|
|
<input
|
|
data-test-secret-json-toggle=true
|
|
id="json"
|
|
type="checkbox"
|
|
name="json"
|
|
class="switch is-rounded is-success is-small"
|
|
checked={{showAdvancedMode}}
|
|
onchange={{action "toggleAdvanced" value="target.checked"}}
|
|
disabled={{and (eq mode 'show') secretDataIsAdvanced}}
|
|
/>
|
|
<label for="json">JSON</label>
|
|
</div>
|
|
{{#if (and (eq mode 'show') canEdit)}}
|
|
<div class="control is-flex">
|
|
<LinkTo
|
|
@params={{array (concat 'vault.cluster.secrets.backend.' (if (eq mode 'show') 'edit' 'show')) model.id }}
|
|
@replace={{true}}
|
|
class="link link-plain has-text-weight-semibold"
|
|
>
|
|
Edit Secret
|
|
</LinkTo>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{partial partialName}}
|