mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Fixes small ui misalignment on generate API key modal.
When fieldname and fieldvalue are too long, result table will not
truncate the text on expanded view to make all content visible.
(cherry picked from commit 8f0b6b5c45
)
Co-authored-by: Efe Gürkan YALAMAN <efeguerkan.yalaman@elastic.co>
This commit is contained in:
parent
ffa6fe4eca
commit
abe609d12c
2 changed files with 26 additions and 19 deletions
|
@ -113,17 +113,23 @@ export const GenerateApiKeyModal: React.FC<GenerateApiKeyModalProps> = ({ indexN
|
|||
</EuiFlexItem>
|
||||
</>
|
||||
) : (
|
||||
<ApiKey
|
||||
apiKey={apiKey}
|
||||
label={keyName}
|
||||
actions={
|
||||
<EuiButtonIcon
|
||||
iconType="download"
|
||||
href={encodeURI(`data:text/csv;charset=utf-8,${apiKey}`)}
|
||||
download={`${keyName}.csv`}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
<EuiFlexItem>
|
||||
<ApiKey
|
||||
apiKey={apiKey}
|
||||
label={keyName}
|
||||
actions={
|
||||
<EuiButtonIcon
|
||||
aria-label={i18n.translate(
|
||||
'xpack.enterpriseSearch.content.overview.generateApiKeyModal.csvDownloadButton',
|
||||
{ defaultMessage: 'Download API key' }
|
||||
)}
|
||||
iconType="download"
|
||||
href={encodeURI(`data:text/csv;charset=utf-8,${apiKey}`)}
|
||||
download={`${keyName}.csv`}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</EuiFlexItem>
|
||||
)}
|
||||
</EuiFlexGroup>
|
||||
</EuiFlexItem>
|
||||
|
|
|
@ -74,10 +74,13 @@ export const ResultField: React.FC<ResultFieldProps> = ({
|
|||
/>
|
||||
</span>
|
||||
</EuiTableRowCell>
|
||||
<EuiTableRowCell className="resultFieldRowCell" width="25%" valign="middle">
|
||||
<EuiText size="xs" grow={false}>
|
||||
{fieldName}
|
||||
</EuiText>
|
||||
<EuiTableRowCell
|
||||
className="resultFieldRowCell"
|
||||
width="25%"
|
||||
truncateText={!isExpanded}
|
||||
valign="middle"
|
||||
>
|
||||
<EuiText size="xs">{fieldName}</EuiText>
|
||||
</EuiTableRowCell>
|
||||
<EuiTableRowCell
|
||||
className="resultFieldRowCell"
|
||||
|
@ -86,7 +89,7 @@ export const ResultField: React.FC<ResultFieldProps> = ({
|
|||
>
|
||||
<EuiIcon type="sortRight" color="subdued" />
|
||||
</EuiTableRowCell>
|
||||
<EuiTableRowCell className="resultFieldRowCell" truncateText valign="middle">
|
||||
<EuiTableRowCell className="resultFieldRowCell" truncateText={!isExpanded} valign="middle">
|
||||
{(fieldType === 'object' ||
|
||||
fieldType === 'array' ||
|
||||
fieldType === 'nested' ||
|
||||
|
@ -96,9 +99,7 @@ export const ResultField: React.FC<ResultFieldProps> = ({
|
|||
{fieldValue}
|
||||
</EuiCodeBlock>
|
||||
) : (
|
||||
<EuiText size="xs" grow={false}>
|
||||
{fieldValue}
|
||||
</EuiText>
|
||||
<EuiText size="xs">{fieldValue}</EuiText>
|
||||
)}
|
||||
</EuiTableRowCell>
|
||||
</EuiTableRow>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue