Skip to content

Commit 3331f50

Browse files
committed
fix: review
1 parent 241923b commit 3331f50

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,18 @@ export function HealthcheckPreview(props: HealthcheckPreviewProps) {
4848

4949
const {name} = useClusterBaseInfo();
5050

51-
const healthcheckPreviewDisabled = name === 'ydb_ru';
51+
const healthcheckPreviewDisabled = name !== 'ydb_ru';
5252

5353
const {
5454
currentData: data,
5555
isFetching,
5656
error,
5757
} = healthcheckApi.useGetHealthcheckInfoQuery(
58-
{database: tenantName, disabled: healthcheckPreviewDisabled},
58+
{database: tenantName},
5959
{
6060
//FIXME https://github.com/ydb-platform/ydb-embedded-ui/issues/1889
6161
pollingInterval: healthcheckPreviewDisabled ? undefined : autoRefreshInterval,
62+
skip: healthcheckPreviewDisabled,
6263
},
6364
);
6465

src/store/reducers/healthcheckInfo/healthcheckInfo.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,9 @@ export const healthcheckApi = api.injectEndpoints({
1010
endpoints: (builder) => ({
1111
getHealthcheckInfo: builder.query({
1212
queryFn: async (
13-
{
14-
database,
15-
maxLevel,
16-
disabled,
17-
}: {database: string; maxLevel?: number; disabled?: boolean},
13+
{database, maxLevel}: {database: string; maxLevel?: number; disabled?: boolean},
1814
{signal},
1915
) => {
20-
if (disabled) {
21-
return {data: undefined};
22-
}
2316
try {
2417
const data = await window.api.viewer.getHealthcheckInfo(
2518
{database, maxLevel},

0 commit comments

Comments
 (0)