From 005b8e4d180113e61b8b5542a7cde064fc4a9298 Mon Sep 17 00:00:00 2001 From: Elena Makarova Date: Tue, 17 Jun 2025 09:50:40 +0300 Subject: [PATCH] fix(Healthcheck): do not autorefresh --- src/containers/Tenant/Healthcheck/Healthcheck.tsx | 10 ++-------- src/containers/Tenant/TenantDrawerWrappers.tsx | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/containers/Tenant/Healthcheck/Healthcheck.tsx b/src/containers/Tenant/Healthcheck/Healthcheck.tsx index 718cc46c55..65c0079075 100644 --- a/src/containers/Tenant/Healthcheck/Healthcheck.tsx +++ b/src/containers/Tenant/Healthcheck/Healthcheck.tsx @@ -7,11 +7,10 @@ import Fullscreen from '../../../components/Fullscreen/Fullscreen'; import {HealthcheckStatus} from '../../../components/HealthcheckStatus/HealthcheckStatus'; import {Illustration} from '../../../components/Illustration'; import {Loader} from '../../../components/Loader'; -import {useClusterBaseInfo} from '../../../store/reducers/cluster/cluster'; import type {IssuesTree} from '../../../store/reducers/healthcheckInfo/types'; import {SelfCheckResult} from '../../../types/api/healthcheck'; import {uiFactory} from '../../../uiFactory/uiFactory'; -import {useAutoRefreshInterval, useTypedSelector} from '../../../utils/hooks'; +import {useTypedSelector} from '../../../utils/hooks'; import {HEALTHCHECK_RESULT_TO_TEXT} from '../constants'; import {HealthcheckFilter} from './components/HealthcheckFilter'; @@ -38,14 +37,9 @@ export function Healthcheck({ tenantName, countIssueTypes = uiFactory.healthcheck.countHealthcheckIssuesByType, }: HealthcheckDetailsProps) { - const [autoRefreshInterval] = useAutoRefreshInterval(); const fullscreen = useTypedSelector((state) => state.fullscreen); - const {name} = useClusterBaseInfo(); const {loading, error, selfCheckResult, fulfilledTimeStamp, leavesIssues, refetch} = - useHealthcheck(tenantName, { - //FIXME https://github.com/ydb-platform/ydb-embedded-ui/issues/1889 - autorefresh: name === 'ydb_ru' ? undefined : autoRefreshInterval, - }); + useHealthcheck(tenantName); const issuesCount = React.useMemo( () => countIssueTypes(leavesIssues), diff --git a/src/containers/Tenant/TenantDrawerWrappers.tsx b/src/containers/Tenant/TenantDrawerWrappers.tsx index 0d4c1a9b54..ca0c5d831e 100644 --- a/src/containers/Tenant/TenantDrawerWrappers.tsx +++ b/src/containers/Tenant/TenantDrawerWrappers.tsx @@ -46,7 +46,7 @@ export function TenantDrawerWrapper({children, database}: TenantDrawerWrapperPro const renderDrawerContent = React.useCallback(() => { return ; - }, []); + }, [database]); return (