@@ -6,18 +6,21 @@ import {
66 TriangleExclamationFill ,
77} from '@gravity-ui/icons' ;
88import type { IconData } from '@gravity-ui/uikit' ;
9- import { Icon } from '@gravity-ui/uikit' ;
9+ import { Icon , Popover } from '@gravity-ui/uikit' ;
1010
1111import { DiagnosticCard } from '../../../../../components/DiagnosticCard/DiagnosticCard' ;
1212import { ResponseError } from '../../../../../components/Errors/ResponseError' ;
1313import { Loader } from '../../../../../components/Loader' ;
14+ import { useClusterBaseInfo } from '../../../../../store/reducers/cluster/cluster' ;
1415import { healthcheckApi } from '../../../../../store/reducers/healthcheckInfo/healthcheckInfo' ;
1516import { SelfCheckResult } from '../../../../../types/api/healthcheck' ;
1617import { cn } from '../../../../../utils/cn' ;
1718import { useAutoRefreshInterval } from '../../../../../utils/hooks' ;
1819
1920import i18n from './i18n' ;
2021
22+ import CircleExclamationIcon from '@gravity-ui/icons/svgs/circle-exclamation.svg' ;
23+
2124import './Healthcheck.scss' ;
2225
2326const b = cn ( 'healthcheck' ) ;
@@ -38,14 +41,21 @@ const icons: Record<SelfCheckResult, IconData> = {
3841export function HealthcheckPreview ( props : HealthcheckPreviewProps ) {
3942 const { tenantName, active} = props ;
4043 const [ autoRefreshInterval ] = useAutoRefreshInterval ( ) ;
44+
45+ const { name} = useClusterBaseInfo ( ) ;
46+ const healthcheckPreviewAutorefreshDisabled = name === 'ydb_ru' ;
47+
4148 const {
4249 currentData : data ,
4350 isFetching,
4451 error,
4552 } = healthcheckApi . useGetHealthcheckInfoQuery (
4653 { database : tenantName } ,
4754 {
48- pollingInterval : autoRefreshInterval ,
55+ //FIXME https://github.com/ydb-platform/ydb-embedded-ui/issues/1889
56+ pollingInterval : healthcheckPreviewAutorefreshDisabled
57+ ? undefined
58+ : autoRefreshInterval ,
4959 } ,
5060 ) ;
5161
@@ -56,6 +66,22 @@ export function HealthcheckPreview(props: HealthcheckPreviewProps) {
5666 < div className = { b ( 'preview-header' ) } >
5767 < div className = { b ( 'preview-title-wrapper' ) } >
5868 < div className = { b ( 'preview-title' ) } > { i18n ( 'title.healthcheck' ) } </ div >
69+ { /* FIXME https://github.com/ydb-platform/ydb-embedded-ui/issues/1889 */ }
70+ { autoRefreshInterval && healthcheckPreviewAutorefreshDisabled ? (
71+ < Popover
72+ content = { 'Autorefresh is disabled. Please update healthcheck manually.' }
73+ placement = { [ 'top' ] }
74+ className = { b ( 'icon-wrapper' ) }
75+ >
76+ { ( ) => (
77+ < Icon
78+ size = { 16 }
79+ className = { b ( 'icon-warn' ) }
80+ data = { CircleExclamationIcon }
81+ />
82+ ) }
83+ </ Popover >
84+ ) : null }
5985 </ div >
6086 </ div >
6187 ) ;
0 commit comments