mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 20:36:26 +02:00
UI: [VAULT-19478] Fix info table row value overflow (#22776)
This commit is contained in:
parent
2cd8f59845
commit
00331b742e
@ -97,6 +97,12 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.text-overflow-ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
// screen reader only
|
||||
.sr-only {
|
||||
border: 0;
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
<Icon @name="minus" />
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="column is-flex" data-test-value-div={{@label}}>
|
||||
<div class="column {{if @truncateValue 'is-two-thirds is-flex-center' 'is-flex'}}" data-test-value-div={{@label}}>
|
||||
{{#if @addCopyButton}}
|
||||
<div class="display-only">
|
||||
<CopyButton
|
||||
|
||||
@ -22,6 +22,7 @@ import { action } from '@ember/object';
|
||||
* @param {string} helperText=null - Text to describe the value displayed beneath the label.
|
||||
* @param {any} value=null - The the data to be displayed - by default the content of the component will only show if there is a value. Also note that special handling is given to boolean values - they will render `Yes` for true and `No` for false. Overridden by block if exists
|
||||
* @param {boolean} [alwaysRender=false] - Indicates if the component content should be always be rendered. When false, the value of `value` will be used to determine if the component should render.
|
||||
* @param {boolean} [truncateValue=false] - Indicates if the value should be truncated.
|
||||
* @param {string} [defaultShown] - Text that renders as value if alwaysRender=true. Eg. "Vault default"
|
||||
* @param {string} [tooltipText] - Text if a tooltip should display over the value.
|
||||
* @param {boolean} [isTooltipCopyable] - Allows tooltip click to copy
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
<div class="box is-fullwidth is-sideless is-paddingless is-marginless">
|
||||
{{#each this.paths as |path|}}
|
||||
<InfoTableRow @label={{path.label}} @labelWidth="is-one-third" @helperText={{path.text}}>
|
||||
<InfoTableRow @label={{path.label}} @labelWidth="is-one-third" @helperText={{path.text}} @truncateValue={{true}}>
|
||||
{{! replace with Hds::Copy::Snippet }}
|
||||
<CopyButton
|
||||
class="button is-compact is-transparent level-right"
|
||||
@ -25,7 +25,7 @@
|
||||
>
|
||||
<Icon @name="clipboard-copy" aria-label="Copy" />
|
||||
</CopyButton>
|
||||
<code class="has-left-margin-s level-left">
|
||||
<code class="is-flex-1 text-overflow-ellipsis has-left-margin-s">
|
||||
{{path.snippet}}
|
||||
</code>
|
||||
</InfoTableRow>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user