open-vault/ui/app/templates/components/secret-edit.hbs

49 lines
1.6 KiB
Handlebars
Raw Normal View History

2018-04-03 14:16:57 +00:00
<header class="page-header">
{{key-value-header
baseKey=baseKey
path="vault.cluster.secrets.backend.list"
mode=mode
root=root
showCurrent=true
}}
<div class="level">
<h1 class="title is-3">
{{#if (eq mode "create") }}
Create Secret
{{else if (eq mode 'edit')}}
Edit Secret
{{else}}
{{key.id}}
{{/if}}
</h1>
</div>
</header>
<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"}} />
<label for="json">JSON</label>
</div>
{{#if (and (not-eq mode 'create') (or capabilities.canUpdate capabilities.canDelete))}}
<div class="control is-flex">
{{input
id="edit"
type="checkbox"
name="navToEdit"
class="switch is-rounded is-success is-small"
checked=(eq mode 'edit')
change=(action (nav-to-route (concat 'vault.cluster.secrets.backend.' (if (eq mode 'show') 'edit' 'show')) key.id replace=true) )
}}
<label for="edit">Edit</label>
</div>
{{/if}}
</div>
</div>
</div>
</div>
{{partial partialName}}