From 689b1414dbc338abe36324b184f434e6ef0c5037 Mon Sep 17 00:00:00 2001 From: mufazalov Date: Tue, 4 Mar 2025 13:21:35 +0300 Subject: [PATCH] fix(TopShards): display table for column entities --- src/containers/Tenant/Diagnostics/Diagnostics.tsx | 2 +- .../Tenant/Diagnostics/TopShards/TopShards.tsx | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/containers/Tenant/Diagnostics/Diagnostics.tsx b/src/containers/Tenant/Diagnostics/Diagnostics.tsx index eaefbb79b..5c69d3f28 100644 --- a/src/containers/Tenant/Diagnostics/Diagnostics.tsx +++ b/src/containers/Tenant/Diagnostics/Diagnostics.tsx @@ -98,7 +98,7 @@ function Diagnostics(props: DiagnosticsProps) { return ; } case TENANT_DIAGNOSTICS_TABS_IDS.topShards: { - return ; + return ; } case TENANT_DIAGNOSTICS_TABS_IDS.nodes: { return ( diff --git a/src/containers/Tenant/Diagnostics/TopShards/TopShards.tsx b/src/containers/Tenant/Diagnostics/TopShards/TopShards.tsx index 5b44dc462..35574b7c0 100644 --- a/src/containers/Tenant/Diagnostics/TopShards/TopShards.tsx +++ b/src/containers/Tenant/Diagnostics/TopShards/TopShards.tsx @@ -14,13 +14,11 @@ import { import {EShardsWorkloadMode} from '../../../../store/reducers/shardsWorkload/types'; import type {ShardsWorkloadFilters} from '../../../../store/reducers/shardsWorkload/types'; import type {CellValue, KeyValueRow} from '../../../../types/api/query'; -import type {EPathType} from '../../../../types/api/schema'; import {cn} from '../../../../utils/cn'; import {DEFAULT_TABLE_SETTINGS} from '../../../../utils/constants'; import {formatDateTime} from '../../../../utils/dataFormatters/dataFormatters'; import {useAutoRefreshInterval, useTypedDispatch, useTypedSelector} from '../../../../utils/hooks'; import {parseQueryErrorToString} from '../../../../utils/query'; -import {isColumnEntityType} from '../../utils/schema'; import {Filters} from './Filters'; import {getShardsWorkloadColumns} from './columns/columns'; @@ -60,10 +58,9 @@ function fillDateRangeFor(value: ShardsWorkloadFilters) { interface TopShardsProps { tenantName: string; path: string; - type?: EPathType; } -export const TopShards = ({tenantName, path, type}: TopShardsProps) => { +export const TopShards = ({tenantName, path}: TopShardsProps) => { const dispatch = useTypedDispatch(); const location = useLocation(); @@ -163,10 +160,6 @@ export const TopShards = ({tenantName, path, type}: TopShardsProps) => { return null; } - if (!data || isColumnEntityType(type)) { - return i18n('no-data'); - } - return (