open-vault/ui/app/templates/components/auth-method/configuration.hbs
Arnav Palnitkar a21ad2ffe2
Hide fields that are empty in secrets configuration (#11230)
Updated the existing helper to check for empty object, string,
null or undefined
2021-03-31 15:34:20 -07:00

10 lines
541 B
Handlebars

<div class="box is-fullwidth is-sideless is-paddingless is-marginless">
{{#each @model.attrs as |attr|}}
{{#if (eq attr.type "object")}}
<InfoTableRow @alwaysRender={{not (is-empty-value (get @model attr.name))}} @label={{or attr.options.label (to-label attr.name)}} @value={{stringify (get @model attr.name)}} />
{{else}}
<InfoTableRow @alwaysRender={{not (is-empty-value (get @model attr.name))}} @label={{or attr.options.label (to-label attr.name)}} @value={{get @model attr.name}} />
{{/if}}
{{/each}}
</div>