open-vault/ui/lib/kmip/addon/templates/credentials/show.hbs
Matthew Irish 29a85fa1c5
UI kmip acceptance (#7129)
* change the story blueprint so that using -ir will generate a story in the expected place for in-repo addons and engines

* update gen-story-md script to do output md to stories folder inside of in-repo addons and engines

* update storybook config to look for story files in /lib

* add story for list-view component

* add list view page object

* add kmip page objects and tests

* update storybook commands in the README

* split tests up more

* update var name in storybook
2019-08-01 16:04:59 -05:00

92 lines
2.4 KiB
Handlebars

<PageHeader as |p|>
<p.top>
<KmipBreadcrumb @scope={{this.scope}} @role={{this.role}}/>
</p.top>
<p.levelLeft>
<h1 class="title is-3">
Credentials
</h1>
</p.levelLeft>
</PageHeader>
<Toolbar>
<ToolbarActions>
<ToolbarLink
@params={{array "credentials.index" this.scope this.role}}
data-test-kmip-link-back-to-role
>
Back to role
</ToolbarLink>
{{#if model.deletePath.canDelete}}
<ModelWrap as |m|>
<ConfirmAction
@buttonClasses="toolbar-link"
@onConfirmAction={{action
(perform
m.callMethod
"destroyRecord"
model
"Successfully revoked credentials"
"There was an error revoking credentials"
(transition-to "vault.cluster.secrets.backend.kmip.credentials.index" this.scope this.role)
)
}}
@confirmTitle="Revoke this?"
@confirmMessage="Any client using these credentials will no longer be able to."
@cancelButtonText="Cancel"
@confirmButtonText="Revoke"
>
Revoke credentials
</ConfirmAction>
</ModelWrap>
{{/if}}
<CopyButton
class="toolbar-link"
@clipboardText={{model.certificate}}
@success={{action (set-flash-message "Certificate Copied!")}}
data-test-copy-button
>
Copy certificate
<Chevron />
</CopyButton>
</ToolbarActions>
</Toolbar>
<div class="box is-shadowless is-fullwidth is-sideless">
<InfoTableRow
@label="Serial number"
@value={{model.id}}
/>
<InfoTableRow
@label="Private key"
@value={{model.privateKey}}
>
<div class="is-block">
<AlertBanner
@type="warning"
@message="You will not be able to access the private key later, so please copy the information below."
data-test-warning
/>
<MaskedInput
@value={{model.privateKey}}
@name="Private key"
@allowCopy={{true}}
@displayOnly={{true}}
class="is-block"
/>
</div>
</InfoTableRow>
<InfoTableRow
@label="Certificate"
@value={{model.certificate}}
/>
<InfoTableRow
@label="CA Chain"
@value={{model.caChain}}
>
<div class="is-block">
{{#each model.caChain as |chain|}}
<code class="is-block is-word-break has-text-black">{{chain}}</code>
{{/each}}
</div>
</InfoTableRow>
</div>