From cfbc45615e237791a169e2684342af3e87cc7093 Mon Sep 17 00:00:00 2001 From: mohamedhamed-ahmed Date: Thu, 14 Mar 2024 18:27:59 +0200 Subject: [PATCH] [Dataset quality] Align size units (#178736) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes https://github.com/elastic/kibana/issues/178614 ## 📝 Summary This PR aligns the size column units format to match the format of the one in the summary panel. Screenshot 2024-03-14 at 15 52 41 --- .../public/components/dataset_quality/table/columns.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/columns.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/columns.tsx index 73c5ba7732dfe..dd85160f17b80 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/columns.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/columns.tsx @@ -23,6 +23,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; import { css } from '@emotion/react'; +import { formatBytes } from '@kbn/formatters'; import { DEGRADED_QUALITY_MINIMUM_PERCENTAGE, POOR_QUALITY_MINIMUM_PERCENTAGE, @@ -194,8 +195,9 @@ export const getDatasetQualityTableColumns = ({ }, { name: sizeColumnName, - field: 'size', + field: 'sizeBytes', sortable: true, + render: (_, dataStreamStat: DataStreamStat) => formatBytes(dataStreamStat.sizeBytes || 0), width: '100px', }, {