Skip to content

Commit

Permalink
fix: handlers list that should be refetched in autorefresh mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Raubzeug committed Dec 26, 2024
1 parent 1095d96 commit fcff727
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/containers/Tenant/Diagnostics/Configs/Configs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {tenantApi} from '../../../../store/reducers/tenant/tenant';
import type {FeatureFlagConfig} from '../../../../types/api/featureFlags';
import {cn} from '../../../../utils/cn';
import {DEFAULT_TABLE_SETTINGS} from '../../../../utils/constants';
import {useAutoRefreshInterval} from '../../../../utils/hooks';

import i18n from './i18n';

Expand Down Expand Up @@ -87,7 +88,12 @@ interface ConfigsProps {

export const Configs = ({database}: ConfigsProps) => {
const [search, setSearch] = useQueryParam('search', StringParam);
const {currentData = [], isFetching, error} = tenantApi.useGetClusterConfigQuery({database});
const [autoRefreshInterval] = useAutoRefreshInterval();
const {
currentData = [],
isFetching,
error,
} = tenantApi.useGetClusterConfigQuery({database}, {pollingInterval: autoRefreshInterval});

const onChange = (value: string) => {
setSearch(value || undefined, 'replaceIn');
Expand Down
1 change: 0 additions & 1 deletion src/store/reducers/nodesList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export const nodesListApi = api.injectEndpoints({
return {error};
}
},
providesTags: ['All'],
}),
}),
overrideExisting: 'throw',
Expand Down
1 change: 1 addition & 0 deletions src/store/reducers/tenant/tenant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export const tenantApi = api.injectEndpoints({
return {error};
}
},
providesTags: ['All'],
}),
}),
overrideExisting: 'throw',
Expand Down

0 comments on commit fcff727

Please sign in to comment.