diff --git a/src/containers/Tenant/Diagnostics/TopShards/columns/columns.tsx b/src/containers/Tenant/Diagnostics/TopShards/columns/columns.tsx index 614f31b536..7117b91ea0 100644 --- a/src/containers/Tenant/Diagnostics/TopShards/columns/columns.tsx +++ b/src/containers/Tenant/Diagnostics/TopShards/columns/columns.tsx @@ -13,10 +13,6 @@ import {getDefaultNodePath} from '../../../../Node/NodePages'; import {TOP_SHARDS_COLUMNS_IDS, TOP_SHARDS_COLUMNS_TITLES} from './constants'; -function prepareCPUWorkloadValue(value: string | number) { - return `${roundToPrecision(Number(value) * 100, 2)}%`; -} - const getPathColumn = (schemaPath: string, location: Location): Column => ({ name: TOP_SHARDS_COLUMNS_IDS.Path, header: TOP_SHARDS_COLUMNS_TITLES.Path, @@ -32,15 +28,6 @@ const getPathColumn = (schemaPath: string, location: Location): Column = { - name: TOP_SHARDS_COLUMNS_IDS.CPUCores, - header: TOP_SHARDS_COLUMNS_TITLES.CPUCores, - render: ({row}) => { - return prepareCPUWorkloadValue(row.CPUCores || 0); - }, - align: DataTable.RIGHT, -}; - const dataSizeColumn: Column = { name: TOP_SHARDS_COLUMNS_IDS.DataSize, header: TOP_SHARDS_COLUMNS_TITLES.DataSize, @@ -75,21 +62,17 @@ const nodeIdColumn: Column = { align: DataTable.RIGHT, }; -const topShardsCpuCoresColumn: Column = { +const cpuCoresColumn: Column = { name: TOP_SHARDS_COLUMNS_IDS.CPUCores, header: TOP_SHARDS_COLUMNS_TITLES.CPUCores, render: ({row}) => { - return ( - - ); + const usage = Number(row.CPUCores) * 100 || 0; + + return ; }, align: DataTable.RIGHT, - sortable: false, - width: 140, - resizeMinWidth: 140, + width: 110, + resizeMinWidth: 110, }; const inFlightTxCountColumn: Column = { @@ -111,5 +94,5 @@ export const getShardsWorkloadColumns = (schemaPath: string, location: Location) }; export const getTopShardsColumns = (schemaPath: string, location: Location) => { - return [tabletIdColumn, getPathColumn(schemaPath, location), topShardsCpuCoresColumn]; + return [tabletIdColumn, getPathColumn(schemaPath, location), cpuCoresColumn]; };