import {ResizeableDataTable} from '../../../../../components/ResizeableDataTable/ResizeableDataTable'; import {NODES_COLUMNS_WIDTH_LS_KEY} from '../../../../../components/nodesColumns/constants'; import {nodesApi} from '../../../../../store/reducers/nodes/nodes'; import { TENANT_OVERVIEW_TABLES_LIMIT, TENANT_OVERVIEW_TABLES_SETTINGS, } from '../../../../../utils/constants'; import {useAutoRefreshInterval} from '../../../../../utils/hooks'; import {TenantOverviewTableLayout} from '../TenantOverviewTableLayout'; import i18n from '../i18n'; import {getTopNodesBySkewColumns} from './columns'; interface TopNodesBySkewProps { database: string; } export function TopNodesBySkew({database}: TopNodesBySkewProps) { const [autoRefreshInterval] = useAutoRefreshInterval(); const [columns, fieldsRequired] = getTopNodesBySkewColumns({database}); const {currentData, isFetching, error} = nodesApi.useGetNodesQuery( { tenant: database, type: 'any', sort: '-ClockSkew', limit: TENANT_OVERVIEW_TABLES_LIMIT, tablets: false, fieldsRequired: fieldsRequired, }, {pollingInterval: autoRefreshInterval}, ); const loading = isFetching && currentData === undefined; const topNodes = currentData?.nodes || []; return ( ); }