mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Enterprise Search] Render indexed_document_volume in MiB (#155250)
## Part of https://github.com/elastic/connectors-python/issues/735 ## Summary The field type for `indexed_document_volume` is `integer`, which can only represent about 2GB worth of "bytes". To be able to support syncing with larger datasets, `indexed_document_volume` is updated to store the size in `MebiBytes`. This PR makes sure the size is rendered correctly in UI. ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
This commit is contained in:
parent
11721308fc
commit
5de52e84d5
1 changed files with 17 additions and 1 deletions
|
@ -45,7 +45,23 @@ export const SyncJobDocumentsPanel: React.FC<SyncJobDocumentsPanelProps> = (sync
|
|||
name: i18n.translate('xpack.enterpriseSearch.content.index.syncJobs.documents.volume', {
|
||||
defaultMessage: 'Volume',
|
||||
}),
|
||||
render: (volume: number) => new ByteSizeValue(volume).toString(),
|
||||
render: (volume: number) =>
|
||||
volume < 1
|
||||
? i18n.translate(
|
||||
'xpack.enterpriseSearch.content.index.syncJobs.documents.volume.lessThanOneMBLabel',
|
||||
{
|
||||
defaultMessage: 'Less than 1mb',
|
||||
}
|
||||
)
|
||||
: i18n.translate(
|
||||
'xpack.enterpriseSearch.content.index.syncJobs.documents.volume.aboutLabel',
|
||||
{
|
||||
defaultMessage: 'About {volume}',
|
||||
values: {
|
||||
volume: new ByteSizeValue(volume * 1024 * 1024).toString(),
|
||||
},
|
||||
}
|
||||
),
|
||||
},
|
||||
];
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue