Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
.ydb-healthcheck-preview {
$block: &;

&__icon-wrapper {
display: inline-flex;

color: var(--g-color-text-warning);
}

&__skeleton {
width: 100%;
height: 60px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type {AlertProps} from '@gravity-ui/uikit';
import {Alert, Button, Flex, Icon, Popover, Skeleton} from '@gravity-ui/uikit';
import {Alert, Button, Flex, Icon, Skeleton} from '@gravity-ui/uikit';

import {ResponseError} from '../../../../../components/Errors/ResponseError';
import {useClusterBaseInfo} from '../../../../../store/reducers/cluster/cluster';
import {healthcheckApi} from '../../../../../store/reducers/healthcheckInfo/healthcheckInfo';
import {SelfCheckResult} from '../../../../../types/api/healthcheck';
import {cn} from '../../../../../utils/cn';
Expand All @@ -12,8 +11,6 @@ import {useTenantQueryParams} from '../../../useTenantQueryParams';

import i18n from './i18n';

import CircleExclamationIcon from '@gravity-ui/icons/svgs/circle-exclamation.svg';

import './HealthcheckPreview.scss';

const b = cn('ydb-healthcheck-preview');
Expand All @@ -35,21 +32,16 @@ export function HealthcheckPreview(props: HealthcheckPreviewProps) {
const {tenantName} = props;
const [autoRefreshInterval] = useAutoRefreshInterval();

const {name} = useClusterBaseInfo();

const {handleShowHealthcheckChange} = useTenantQueryParams();

const healthcheckPreviewDisabled = name === 'ydb_ru';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not forget to delete this logic internally - we have the same hack for advisor


const {
currentData: data,
isFetching,
error,
} = healthcheckApi.useGetHealthcheckInfoQuery(
{database: tenantName},
{
//FIXME https://github.com/ydb-platform/ydb-embedded-ui/issues/1889
pollingInterval: healthcheckPreviewDisabled ? undefined : autoRefreshInterval,
pollingInterval: autoRefreshInterval,
},
);

Expand Down Expand Up @@ -81,15 +73,6 @@ export function HealthcheckPreview(props: HealthcheckPreviewProps) {
<Flex gap={1} alignItems="center">
{HEALTHCHECK_RESULT_TO_TEXT[selfCheckResult]}
{issuesText ? ` ${issuesText}` : ''}
{healthcheckPreviewDisabled ? (
<Popover
content={'Healthcheck is disabled. Please update healthcheck manually.'}
placement={['top']}
className={b('icon-wrapper')}
>
{() => <Icon size={16} data={CircleExclamationIcon} />}
</Popover>
) : null}
</Flex>
{issuesCount && (
<Button
Expand Down
Loading