open-vault/ui/app/templates/components/identity/item-metadata.hbs
2021-05-17 16:41:39 -05:00

32 lines
1.1 KiB
Handlebars

{{#each-in @model.metadata as |key value|}}
<div class="info-table-row is-mobile">
<div class="is-flex is-fullwidth">
<div class="column is-one-quarter">
<span class="is-label has-text-grey-dark">
{{key}}
</span>
</div>
<div class="column is-5">
{{value}}
</div>
<div class="column has-text-right">
{{#if @model.canEdit}}
<Identity::PopupMetadata @params={{array @model key}} />
{{/if}}
</div>
</div>
</div>
{{else}}
<EmptyState
@title="No metadata for {{@model.name}}"
@message="You can store custom data that you want to associate with a {{lowercase (humanize @model.identityType)}}. Edit this {{lowercase (humanize @model.identityType)}} to get started."
>
<LinkTo @route="vault.cluster.access.identity.edit" @model={{@model.id}} @tagName="button" class="link">
Edit {{lowercase (humanize @model.identityType)}}
</LinkTo>
<LearnLink @path="/vault/identity-access-management/iam-identity">
Learn more
</LearnLink>
</EmptyState>
{{/each-in}}