open-vault/ui/app/templates/partials/secret-form-show.hbs
2018-11-15 16:48:04 -06:00

46 lines
1.5 KiB
Handlebars

{{#if (and isV2 modelForData.destroyed)}}
<EmptyState
@title="Version {{modelForData.version}} of this secret has been permanently destroyed"
@message="A version that has been permanently deleted cannot be restored. You can see other versions of this secret in the History menu."
>
<DocLink @path="/docs/secrets/kv/kv-v2.html">
Learn More
</DocLink>
</EmptyState>
{{else if (and isV2 modelForData.deleted)}}
<EmptyState
@title="Version {{modelForData.version}} of this secret has been deleted"
@message="A version that has been deleted but can be undeleted using the Version {{modelForData.version}} menu above.
You can also see other versions of this secret in the History menu."
>
<DocLink @path="/docs/secrets/kv/kv-v2.html">
Learn More
</DocLink>
</EmptyState>
{{else}}
{{#if showAdvancedMode}}
{{json-editor
value=modelForData.dataAsJSONString
options=(hash
readOnly=true
)
}}
{{else}}
<div class="table info-table-row-header">
<div class="info-table-row thead">
<div class="th column is-one-quarter">
Key
</div>
<div class="th column">
Value
</div>
</div>
</div>
{{#each-in modelForData.secretData as |key value|}}
{{#info-table-row label=key value=value alwaysRender=true}}
{{masked-input value=value displayOnly=true allowCopy=true}}
{{/info-table-row}}
{{/each-in}}
{{/if}}
{{/if}}