Files
vault/ui/app/templates/components/secret-list/transform-list-item.hbs
claire bontempo 05f32b69ee UI: upgrade HDS to 4.12.0 (#28525)
* update hds to latest version

* yield dropdown Interactive text instead of use @text arg, results after running codemod

* remaining dropdown changes

* address sidebar nav IconButton deprecation, fix secret tests

* revert

* explicitly select popupmenu

* more test changes

* fix pki toggle button

* remove tracked prop in oidc client controller

* aaand more test updates

* change to tilde

* tilde yarn lock changes

* small cleanup items
2024-10-04 20:07:48 +00:00

65 lines
2.3 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}
{{#if (and @item.updatePath.canRead (not this.isBuiltin))}}
<LinkedBlock
@params={{array "vault.cluster.secrets.backend.show" @itemPath}}
class="list-item-row"
data-test-secret-link={{@itemPath}}
@encode={{true}}
@queryParams={{secret-query-params @backendType}}
>
<div class="columns is-mobile">
<div class="column is-10">
<SecretLink
@mode="show"
@secret={{@itemPath}}
@queryParams={{hash type=@modelType}}
class="has-text-black has-text-weight-semibold"
>
<Icon @name="file" class="has-text-grey-light" />
{{if (eq @item.id " ") "(self)" (or @item.keyWithoutParent @item.id)}}
</SecretLink>
</div>
<div class="column has-text-right">
{{#if (or @item.updatePath.canRead @item.updatePath.canUpdate)}}
<Hds::Dropdown @isInline={{true}} @listPosition="bottom-right" as |dd|>
<dd.ToggleIcon
@icon="more-horizontal"
@text="Manage transform {{@itemType}}"
@hasChevron={{false}}
data-test-popup-menu-trigger
/>
{{#if @item.updatePath.canRead}}
<dd.Interactive @route="vault.cluster.secrets.backend.show" @model={{@itemPath}}>Details</dd.Interactive>
{{/if}}
{{#if @item.updatePath.canUpdate}}
<dd.Interactive @route="vault.cluster.secrets.backend.edit" @model={{@itemPath}}>Edit</dd.Interactive>
{{/if}}
</Hds::Dropdown>
{{/if}}
</div>
</div>
</LinkedBlock>
{{else}}
<div class="list-item-row" data-test-view-only-list-item>
<div class="columns is-mobile">
<div class="column is-12 has-text-grey has-text-weight-semibold">
<Icon @name="file" class="has-text-grey-light" />
{{#if this.isBuiltin}}
<Hds::TooltipButton
@text="This is a built-in HashiCorp {{@itemType}}. It can't be viewed or edited."
@placement="top-start"
aria-label="Why this item cannot be viewed or edited"
>
{{@item.id}}
</Hds::TooltipButton>
{{else}}
{{@item.id}}
{{/if}}
</div>
</div>
</div>
{{/if}}