Skip to content

Commit

Permalink
Adds copy button to entity, alias and mfa method ID fields (#28742)
Browse files Browse the repository at this point in the history
* make id buttons copyable

* add changelog
  • Loading branch information
hellobontempo authored Oct 21, 2024
1 parent efd6148 commit 9097689
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelog/28742.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
ui: Adds copy button to identity entity, alias and mfa method IDs
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
~}}

<InfoTableRow @label="Name" @value={{@model.name}} data-test-alias-name={{true}} />
<InfoTableRow @label="ID" @value={{@model.id}} />
<InfoTableRow @label="ID" @value={{@model.id}} @addCopyButton={{true}} />
<InfoTableRow @label={{if (eq @model.identityType "entity-alias") "Entity ID" "Group ID"}} @value={{this.model.canonicalId}}>
<LinkTo
@route="vault.cluster.access.identity.show"
@models={{array (if (eq @model.identityType "entity-alias") "entities" "groups") @model.canonicalId "details"}}
class="has-text-black is-font-mono"
>
{{@model.canonicalId}}
</LinkTo>
Expand Down
2 changes: 1 addition & 1 deletion ui/app/templates/components/identity/item-details.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{{/if}}
<InfoTableRow @label="Name" @value={{@model.name}} data-test-identity-item-name={{true}} />
<InfoTableRow @label="Type" @value={{@model.type}} />
<InfoTableRow @label="ID" @value={{@model.id}} />
<InfoTableRow @label="ID" @value={{@model.id}} @addCopyButton={{true}} />
<InfoTableRow @label="Merged Ids" @value={{@model.mergedEntityIds}}>
<div>
{{#each @model.mergedEntityIds as |id|}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
</ToolbarActions>
</Toolbar>
<div class="box is-fullwidth is-sideless is-paddingless is-marginless">
<InfoTableRow @label="ID" @value={{this.model.method.id}} @addCopyButton={{true}} />
{{#each this.model.method.attrs as |attr|}}
{{#if (eq attr.type "object")}}
<InfoTableRow
Expand Down

0 comments on commit 9097689

Please sign in to comment.