Skip to content

Commit 6b28803

Browse files
fix(TopShards): display table for column entities (#1999)
1 parent 7c21d71 commit 6b28803

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/containers/Tenant/Diagnostics/Diagnostics.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function Diagnostics(props: DiagnosticsProps) {
9898
return <TopQueries tenantName={tenantName} />;
9999
}
100100
case TENANT_DIAGNOSTICS_TABS_IDS.topShards: {
101-
return <TopShards tenantName={tenantName} path={path} type={type} />;
101+
return <TopShards tenantName={tenantName} path={path} />;
102102
}
103103
case TENANT_DIAGNOSTICS_TABS_IDS.nodes: {
104104
return (

src/containers/Tenant/Diagnostics/TopShards/TopShards.tsx

+1-8
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ import {
1414
import {EShardsWorkloadMode} from '../../../../store/reducers/shardsWorkload/types';
1515
import type {ShardsWorkloadFilters} from '../../../../store/reducers/shardsWorkload/types';
1616
import type {CellValue, KeyValueRow} from '../../../../types/api/query';
17-
import type {EPathType} from '../../../../types/api/schema';
1817
import {cn} from '../../../../utils/cn';
1918
import {DEFAULT_TABLE_SETTINGS} from '../../../../utils/constants';
2019
import {formatDateTime} from '../../../../utils/dataFormatters/dataFormatters';
2120
import {useAutoRefreshInterval, useTypedDispatch, useTypedSelector} from '../../../../utils/hooks';
2221
import {parseQueryErrorToString} from '../../../../utils/query';
23-
import {isColumnEntityType} from '../../utils/schema';
2422

2523
import {Filters} from './Filters';
2624
import {getShardsWorkloadColumns} from './columns/columns';
@@ -60,10 +58,9 @@ function fillDateRangeFor(value: ShardsWorkloadFilters) {
6058
interface TopShardsProps {
6159
tenantName: string;
6260
path: string;
63-
type?: EPathType;
6461
}
6562

66-
export const TopShards = ({tenantName, path, type}: TopShardsProps) => {
63+
export const TopShards = ({tenantName, path}: TopShardsProps) => {
6764
const dispatch = useTypedDispatch();
6865
const location = useLocation();
6966

@@ -163,10 +160,6 @@ export const TopShards = ({tenantName, path, type}: TopShardsProps) => {
163160
return null;
164161
}
165162

166-
if (!data || isColumnEntityType(type)) {
167-
return i18n('no-data');
168-
}
169-
170163
return (
171164
<ResizeableDataTable
172165
columnsWidthLSKey={TOP_SHARDS_COLUMNS_WIDTH_LS_KEY}

0 commit comments

Comments
 (0)