mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
* UI: Part 1 - hds adoption replace <Modal> (#23363) * replace policy-form modal * replace clients/attribution modal * clients/config modal * scope form odal * remove button type * include toolbar to match other example templates * rotate credentials modal * add toolbar button class for hds buttons * transformation-edit modal * add back test selector * add route arg to button! * update link status * fix link-status tests * remove prevent default * update db tests * update tests * use page alert for hcp link status banner * fix scopy button selector * fix sidebar test * change to neutral banner * UI: Part 2 - hds adoption replace <Modal> (#23398) * upgrade HDS library (adds support for snippet containers * cleanup flight icons * replace transit key action modals * re-add deps as devDeps * remove line * address transit tests * UI: Part 3 - hds adoption replace <Modal> (#23415) * cleanup css * cleanup extra type attr * masked input download modal * use Hds::Button in download button" * fix size of modal * tiny icon fix * refactor download button to always render download icon * update tests * UI: Part 3.5 - hds adoption replace <Modal> (#23448) * replication-promote modal * replication component modals * replication add secondary modal * move update text for diff * UI: Part 4 - hds adoption replace <Modal> (#23451) * k8 configure modal * kv delete modal * ldap modals * pki modals * add trash icon * move deps * UI: Part 5 - hds adoption replace <Modal> (#23471) * replace confirmation modals --------- * UI: Part 6 - hds adoption replace <Modal> (#23484) * search select with modal * policy search select modal * replace date dropdown for client dashboard * change padding to top * update policy example args * lolllll test typo wow * update dropdown tests * shamir flow modals! * add one more container * update test selectors * UI: Final hds adoption replace <Modal> cleanup PR (#23522) * search select with modal * policy search select modal * replace date dropdown for client dashboard * change padding to top * update policy example args * lolllll test typo wow * update dropdown tests * shamir flow modals! * add one more container * update test selectors * remove wormhole and modal component * fix selectors * uninstall wormhole * remove shamir-modal-flow class * fix confirm modal test * fix pki and kv test * fix toolbar selector kv * client and download button test * fix-confirmation-modal-padding * fix replication modal tests so relevant modal opens (#23540) * more confirmation modal tests * adds changelog
175 lines
6.2 KiB
Handlebars
175 lines
6.2 KiB
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
~}}
|
|
|
|
<Toolbar>
|
|
<ToolbarActions>
|
|
<div class="toolbar-separator"></div>
|
|
{{#if @autoTidyConfig.enabled}}
|
|
<ToolbarLink @route="tidy.auto" data-test-pki-auto-tidy-config>
|
|
Auto-tidy configuration
|
|
</ToolbarLink>
|
|
<ToolbarLink @route="tidy.manual" data-test-pki-manual-tidy-config>
|
|
Perform manual tidy
|
|
</ToolbarLink>
|
|
{{else}}
|
|
<Hds::Button
|
|
class="toolbar-button"
|
|
@color="secondary"
|
|
@icon="chevron-right"
|
|
@iconPosition="trailing"
|
|
{{on "click" (fn (mut this.tidyOptionsModal) true)}}
|
|
data-test-pki-tidy-options-modal
|
|
@text="Tidy"
|
|
/>
|
|
{{/if}}
|
|
</ToolbarActions>
|
|
</Toolbar>
|
|
|
|
{{#if this.hasTidyConfig}}
|
|
<Hds::Alert
|
|
@type="inline"
|
|
@color={{this.tidyStateAlertBanner.color}}
|
|
@icon={{this.tidyStateAlertBanner.icon}}
|
|
class="has-top-margin-m"
|
|
data-test-tidy-status-alert
|
|
as |A|
|
|
>
|
|
<A.Title data-test-tidy-status-alert-title>{{this.tidyStateAlertBanner.title}}</A.Title>
|
|
<A.Description data-test-tidy-status-alert-description>{{this.tidyStateAlertBanner.message}}</A.Description>
|
|
{{#if this.tidyStateAlertBanner.shouldShowCancelTidy}}
|
|
<A.Button
|
|
@text="Cancel tidy"
|
|
@color="critical"
|
|
@icon={{if this.cancelTidy.isRunning "loading"}}
|
|
{{on "click" (fn (mut this.confirmCancelTidy) true)}}
|
|
data-test-cancel-tidy-action
|
|
/>
|
|
{{/if}}
|
|
{{#if @tidyStatus.responseTimestamp}}
|
|
<A.Description class="has-top-margin-xs" data-test-tidy-status-alert-updated-at>
|
|
Updated
|
|
{{date-format @tidyStatus.responseTimestamp "MMM d yyyy, h:mm:ss aaa" withTimeZone=true}}
|
|
</A.Description>
|
|
{{/if}}
|
|
</Hds::Alert>
|
|
|
|
{{#each this.tidyStatusGeneralFields as |attr|}}
|
|
<InfoTableRow
|
|
@label={{humanize (dasherize attr)}}
|
|
@formatDate={{if
|
|
(includes attr (array "time_started" "time_finished" "last_auto_tidy_finished"))
|
|
"MMM dd, yyyy hh:mm:ss a"
|
|
}}
|
|
@value={{get @tidyStatus attr}}
|
|
@alwaysRender={{true}}
|
|
/>
|
|
{{/each}}
|
|
|
|
{{#if this.isEnterprise}}
|
|
{{#each this.crossClusterOperation.status as |attr|}}
|
|
<InfoTableRow @label={{humanize (dasherize attr)}} @value={{get @tidyStatus attr}} @alwaysRender={{true}} />
|
|
{{/each}}
|
|
{{/if}}
|
|
|
|
<h2 class="title is-4 has-bottom-margin-xs has-top-margin-l has-border-bottom-light has-bottom-padding-s">
|
|
{{if (eq this.tidyState "Running") "Current" "Last"}}
|
|
tidy settings
|
|
</h2>
|
|
{{#each this.tidyStatusConfigFields as |attr|}}
|
|
<InfoTableRow
|
|
@label={{humanize (dasherize attr)}}
|
|
@value={{get @tidyStatus attr}}
|
|
@formatTtl={{includes attr (array "safety_buffer" "issuer_safety_buffer")}}
|
|
@alwaysRender={{true}}
|
|
/>
|
|
{{/each}}
|
|
|
|
{{#if this.isEnterprise}}
|
|
{{#each this.crossClusterOperation.config as |attr|}}
|
|
<InfoTableRow
|
|
@label={{humanize (dasherize attr)}}
|
|
@value={{get @tidyStatus attr}}
|
|
@formatTtl={{eq attr "revocation_queue_safety_buffer"}}
|
|
@alwaysRender={{true}}
|
|
/>
|
|
{{/each}}
|
|
{{/if}}
|
|
{{else}}
|
|
<EmptyState
|
|
@title="Tidy status unavailable"
|
|
@message="After the next tidy operation has been performed, information about the current or most recent tidy operation will display here."
|
|
>
|
|
<Hds::Button
|
|
@color="tertiary"
|
|
@icon="chevron-right"
|
|
@iconPosition="trailing"
|
|
{{on "click" (fn (mut this.tidyOptionsModal) true)}}
|
|
data-test-tidy-empty-state-configure
|
|
@text="Tidy"
|
|
/>
|
|
</EmptyState>
|
|
{{/if}}
|
|
|
|
{{! TIDY OPTIONS MODAL }}
|
|
{{#if this.tidyOptionsModal}}
|
|
<Hds::Modal id="pki-tidy-modal" @size="large" @onClose={{fn (mut this.tidyOptionsModal) false}} as |M|>
|
|
<M.Header>
|
|
Tidy this mount
|
|
</M.Header>
|
|
<M.Body>
|
|
<h3 class="title is-5">How tidying will work</h3>
|
|
<p class="has-text-grey has-bottom-padding-s">
|
|
Tidying cleans up the storage backend and/or CRL by removing certificates that have expired and are past a certain
|
|
buffer period beyond their expiration time.
|
|
<DocLink @path="/vault/docs/secrets/pki/considerations#automate-crl-building-and-tidying">
|
|
Documentation.
|
|
</DocLink>
|
|
</p>
|
|
<p class="has-text-grey">
|
|
<ol class="has-left-margin-m has-bottom-margin-s">
|
|
<li>Select a tidy operation:</li>
|
|
<ul class="bullet has-bottom-margin-xs">
|
|
<li><strong>Automatic tidy</strong>
|
|
periodically runs a tidy operation with saved configuration settings after waiting the specified interval
|
|
duration between tidies
|
|
</li>
|
|
<li><strong>Manual tidy</strong> runs a tidy operation once</li>
|
|
</ul>
|
|
<li>Configure the parameters that determine how to tidy and run the operation.</li>
|
|
</ol>
|
|
</p>
|
|
<div class="has-top-margin-l has-padding">
|
|
<img src={{img-path "~/pki-tidy.png"}} alt="tidy operation diagram" />
|
|
</div>
|
|
</M.Body>
|
|
<M.Footer as |F|>
|
|
<Hds::ButtonSet>
|
|
<Hds::Button @text="Automatic tidy" @route="tidy.auto.configure" data-test-tidy-modal-auto-button />
|
|
<Hds::Button @text="Manual tidy" @route="tidy.manual" data-test-tidy-modal-manual-button />
|
|
<Hds::Button @text="Cancel" @color="secondary" {{on "click" F.close}} data-test-tidy-modal-cancel-button />
|
|
</Hds::ButtonSet>
|
|
</M.Footer>
|
|
</Hds::Modal>
|
|
{{/if}}
|
|
|
|
{{! CANCEL TIDY CONFIRMATION MODAL }}
|
|
{{#if this.confirmCancelTidy}}
|
|
<Hds::Modal id="pki-cancel-tidy-modal" @color="warning" @onClose={{fn (mut this.confirmCancelTidy) false}} as |M|>
|
|
<M.Header @icon="alert-triangle">
|
|
Cancel tidy?
|
|
</M.Header>
|
|
<M.Body>
|
|
This will cancel the tidy at the next available checkpoint, which may process additional certificates between when the
|
|
operation was marked as cancelled and when the operation stopped.
|
|
<p class="has-top-margin-s">Click “Confirm” to cancel the running tidy operation.</p>
|
|
</M.Body>
|
|
<M.Footer as |F|>
|
|
<Hds::ButtonSet>
|
|
<Hds::Button @text="Confirm" {{on "click" (perform this.cancelTidy)}} data-test-tidy-modal-cancel-button />
|
|
<Hds::Button @text="Cancel" @color="secondary" {{on "click" F.close}} />
|
|
</Hds::ButtonSet>
|
|
</M.Footer>
|
|
</Hds::Modal>
|
|
{{/if}} |