Files
vault/ui/lib/ldap/addon/components/page/library/details/accounts.hbs
claire bontempo 43258c28fa UI: HDS adoption replace <Modal> (#23382)
* 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
2023-10-06 22:06:36 +00:00

76 lines
2.7 KiB
Handlebars
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="is-grid has-top-margin-l grid-2-columns grid-gap-2">
<div>
<Hds::Card::Container @level="mid" @hasBorder={{true}} class="has-padding-l is-flex-half border-radius-2">
<div class="is-flex-between">
<h3 class="is-size-5 has-text-weight-semibold">All accounts</h3>
{{#if @library.canCheckOut}}
<button
type="button"
class="button is-link"
data-test-check-out
{{on "click" (fn (mut this.showCheckOutPrompt) true)}}
>
Check-out
</button>
{{/if}}
</div>
<p class="has-text-grey is-size-8">The accounts within this library</p>
<hr class="has-background-gray-200" />
<Hds::Table @model={{@statuses}} @columns={{array (hash label="Accounts") (hash label="Status")}}>
<:body as |Body|>
<Body.Tr>
<Body.Td data-test-account-name={{Body.data.account}}>{{Body.data.account}}</Body.Td>
<Body.Td>
<Hds::Badge
@text={{if Body.data.available "Available" "Unavailable"}}
@color={{if Body.data.available "success" "neutral"}}
data-test-account-status={{Body.data.account}}
/>
</Body.Td>
</Body.Tr>
</:body>
</Hds::Table>
</Hds::Card::Container>
</div>
<div>
<AccountsCheckedOut
@libraries={{array @library}}
@statuses={{@statuses}}
@onCheckInSuccess={{transition-to "vault.cluster.secrets.backend.ldap.libraries.library.details.accounts"}}
data-test-checked-out-card
/>
<OverviewCard
@cardTitle="To renew a checked-out account"
@subText="Use the CLI command below:"
class="has-padding-l has-top-margin-l"
>
<CodeSnippet @codeBlock={{this.cliCommand}} class="has-top-margin-s" />
</OverviewCard>
</div>
</div>
{{#if this.showCheckOutPrompt}}
<Hds::Modal id="account-check-out-modal" @onClose={{fn (mut this.showCheckOutPrompt) false}} as |M|>
<M.Header>
Account Check-out
</M.Header>
<M.Body>
<p>
Current generated credentials time-to-live is set at
{{format-duration @library.ttl}}. You can set a different limit if youd like:
</p>
<br />
<TtlPicker @label="TTL" @hideToggle={{true}} @initialValue={{@library.ttl}} @onChange={{this.setTtl}} />
</M.Body>
<M.Footer as |F|>
<Hds::ButtonSet>
<Hds::Button data-test-check-out="save" @text="Check-out" {{on "click" this.checkOut}} />
<Hds::Button data-test-check-out="cancel" @text="Cancel" @color="secondary" {{on "click" F.close}} />
</Hds::ButtonSet>
</M.Footer>
</Hds::Modal>
{{/if}}