2018-06-12 21:06:37 +00:00
|
|
|
<PageHeader as |p|>
|
|
|
|
<p.top>
|
2021-12-17 03:44:29 +00:00
|
|
|
<KeyValueHeader
|
|
|
|
@baseKey={{this.baseKey}}
|
|
|
|
@path="vault.cluster.secrets.backend.list"
|
|
|
|
@mode={{this.mode}}
|
|
|
|
@root={{this.root}}
|
|
|
|
@showCurrent={{true}}
|
|
|
|
/>
|
2018-06-12 21:06:37 +00:00
|
|
|
</p.top>
|
|
|
|
<p.levelLeft>
|
2018-04-03 14:16:57 +00:00
|
|
|
<h1 class="title is-3">
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#if (eq this.mode "create")}}
|
2019-03-29 23:40:12 +00:00
|
|
|
Create secret
|
2021-12-17 03:44:29 +00:00
|
|
|
{{else if (and this.isV2 (eq this.mode "edit"))}}
|
2019-03-29 23:40:12 +00:00
|
|
|
Create new version
|
2021-12-17 03:44:29 +00:00
|
|
|
{{else if (eq this.mode "edit")}}
|
2019-03-29 23:40:12 +00:00
|
|
|
Edit secret
|
2018-04-03 14:16:57 +00:00
|
|
|
{{else}}
|
2021-12-17 03:44:29 +00:00
|
|
|
{{this.key.id}}
|
2018-04-03 14:16:57 +00:00
|
|
|
{{/if}}
|
|
|
|
</h1>
|
2018-06-12 21:06:37 +00:00
|
|
|
</p.levelLeft>
|
|
|
|
</PageHeader>
|
2021-12-17 03:44:29 +00:00
|
|
|
{{! tabs for show only }}
|
|
|
|
{{#if (eq this.mode "show")}}
|
2021-08-31 15:41:41 +00:00
|
|
|
<div class="tabs-container box is-bottomless is-marginless is-fullwidth is-paddingless">
|
|
|
|
<nav class="tabs">
|
|
|
|
<ul>
|
2021-12-17 03:44:29 +00:00
|
|
|
{{! template-lint-configure no-unknown-arguments-for-builtin-components "warn" }}
|
|
|
|
<LinkTo
|
|
|
|
@route="vault.cluster.secrets.backend.show"
|
|
|
|
@model={{this.key.id}}
|
|
|
|
@tagName="li"
|
|
|
|
@activeClass="is-active"
|
|
|
|
data-test-secret-tab
|
|
|
|
>
|
2021-08-31 15:41:41 +00:00
|
|
|
<LinkTo @route="vault.cluster.secrets.backend.show">
|
|
|
|
Secret
|
|
|
|
</LinkTo>
|
|
|
|
</LinkTo>
|
2021-12-17 03:44:29 +00:00
|
|
|
{{! must have read access to /metadata see tab or update to update metadata}}
|
2021-09-29 20:35:00 +00:00
|
|
|
{{#if (or this.canReadSecretMetadata this.canUpdateSecretMetadata)}}
|
2021-12-17 03:44:29 +00:00
|
|
|
<LinkTo
|
|
|
|
@route="vault.cluster.secrets.backend.metadata"
|
|
|
|
@model={{this.key.id}}
|
|
|
|
@tagName="li"
|
|
|
|
@activeClass="is-active"
|
|
|
|
data-test-secret-metadata-tab
|
|
|
|
>
|
2021-08-31 15:41:41 +00:00
|
|
|
<LinkTo @route="vault.cluster.secrets.backend.metadata">
|
|
|
|
Metadata
|
|
|
|
</LinkTo>
|
|
|
|
</LinkTo>
|
|
|
|
{{/if}}
|
2021-12-17 03:44:29 +00:00
|
|
|
{{! template-lint-configure no-unknown-arguments-for-builtin-components "on" }}
|
2021-08-31 15:41:41 +00:00
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2019-02-14 16:04:46 +00:00
|
|
|
|
2021-08-31 15:41:41 +00:00
|
|
|
<SecretEditToolbar
|
2021-12-17 03:44:29 +00:00
|
|
|
@mode={{this.mode}}
|
|
|
|
@model={{this.model}}
|
|
|
|
@isV2={{this.isV2}}
|
|
|
|
@isWriteWithoutRead={{this.isWriteWithoutRead}}
|
|
|
|
@secretDataIsAdvanced={{this.secretDataIsAdvanced}}
|
|
|
|
@showAdvancedMode={{this.showAdvancedMode}}
|
|
|
|
@modelForData={{this.modelForData}}
|
|
|
|
@navToNearestAncestor={{this.navToNearestAncestor}}
|
|
|
|
@canUpdateSecretData={{this.canUpdateSecretData}}
|
|
|
|
@canReadSecretMetadata={{this.canReadSecretMetadata}}
|
|
|
|
@codemirrorString={{this.codemirrorString}}
|
|
|
|
@editActions={{hash toggleAdvanced=(action "toggleAdvanced") refresh=(action "refresh")}}
|
2021-08-31 15:41:41 +00:00
|
|
|
/>
|
2021-05-19 16:43:55 +00:00
|
|
|
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#if (or (eq this.mode "create") (eq this.mode "edit"))}}
|
2021-08-31 15:41:41 +00:00
|
|
|
<SecretCreateOrUpdate
|
2021-12-17 03:44:29 +00:00
|
|
|
@mode={{this.mode}}
|
|
|
|
@model={{this.model}}
|
|
|
|
@showAdvancedMode={{this.showAdvancedMode}}
|
|
|
|
@modelForData={{this.modelForData}}
|
|
|
|
@error={{this.error}}
|
|
|
|
@isV2={{this.isV2}}
|
|
|
|
@secretData={{this.secretData}}
|
|
|
|
@buttonDisabled={{this.buttonDisabled}}
|
|
|
|
@canUpdateSecretMetadata={{this.canUpdateSecretMetadata}}
|
|
|
|
@canReadSecretData={{this.canReadSecretData}}
|
|
|
|
@canReadSecretMetadata={{this.canReadSecretMetadata}}
|
2021-08-31 15:41:41 +00:00
|
|
|
/>
|
2021-12-17 03:44:29 +00:00
|
|
|
{{else if (eq this.mode "show")}}
|
2021-06-04 19:09:47 +00:00
|
|
|
<SecretFormShow
|
2021-12-17 03:44:29 +00:00
|
|
|
@isV2={{this.isV2}}
|
|
|
|
@modelForData={{this.modelForData}}
|
|
|
|
@isWriteWithoutRead={{this.isWriteWithoutRead}}
|
|
|
|
@showAdvancedMode={{this.showAdvancedMode}}
|
2021-06-04 19:09:47 +00:00
|
|
|
/>
|
|
|
|
{{else}}
|
2021-12-17 03:44:29 +00:00
|
|
|
<EmptyState @title="No secret view was selected" />
|
|
|
|
{{/if}}
|