open-vault/ui/app/templates/components/transit-edit.hbs
Matthew Irish 924d1b4ddc
UI - code cleanup (#4699)
* use lazyCapabilities macro in models

* use expandAttributeMeta and fieldToAttrs everywhere

* add angle bracket component polyfill

* use PageHeader component throughout
2018-06-12 16:06:37 -05:00

55 lines
1.4 KiB
Handlebars

<PageHeader as |p|>
<p.top>
{{key-value-header
baseKey=key
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 Encryption Key
{{else if (eq mode "edit") }}
Edit Encryption Key
{{else}}
Encryption Key <code>{{key.id}}</code>
{{/if}}
</h1>
</p.levelLeft>
<p.levelRight>
<div class="field is-grouped">
{{#if (eq mode "show") }}
{{#if (or capabilities.canUpdate capabilities.canDelete)}}
<div class="control">
{{#secret-link
secret=key.id
mode="edit"
replace=true
class="button has-icon-right is-ghost is-compact"
}}
Edit encryption key
{{i-con glyph="chevron-right" size=11}}
{{/secret-link}}
</div>
{{/if}}
<div class="control">
{{#secret-link
mode="actions"
secret=key.id
class="button has-icon-right is-ghost is-compact"
data-test-transit-key-actions-link=true
}}
Key actions
{{i-con glyph="chevron-right" size=11}}
{{/secret-link}}
</div>
{{/if}}
</div>
</p.levelRight>
</PageHeader>
{{partial (concat 'partials/transit-form-' mode)}}