Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "9.6.3"
".": "9.6.3-hotfix.1"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [9.6.3-hotfix.1](https://github.com/ydb-platform/ydb-embedded-ui/compare/v9.6.3...v9.6.3-hotfix.1) (2025-06-19)


### Bug Fixes

* **HealthcheckPreview:** use only one query ([#2427](https://github.com/ydb-platform/ydb-embedded-ui/issues/2427)) ([0089133](https://github.com/ydb-platform/ydb-embedded-ui/commit/00891339a9ae22518ffa5a331c0605227584cd02))
* **Tenant:** support name param ([8103bb6](https://github.com/ydb-platform/ydb-embedded-ui/commit/8103bb68b1faccafc93ac569dc18d7e0be756801))

## [9.6.3](https://github.com/ydb-platform/ydb-embedded-ui/compare/v9.6.2...v9.6.3) (2025-06-17)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ydb-embedded-ui",
"version": "9.6.3",
"version": "9.6.3-hotfix.1",
"files": [
"dist"
],
Expand Down
4 changes: 3 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"include-component-in-tag": false,
"pull-request-title-pattern": "chore(${branch}): release ${version}",
"packages": {
".": {}
".": {
"release-as": "9.6.3-hotfix.1"
}
}
}
8 changes: 1 addition & 7 deletions src/containers/Tenant/Diagnostics/Diagnostics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,7 @@ function Diagnostics(props: DiagnosticsProps) {
}}
allowNotSelected={true}
/>
<AutoRefreshControl
onManualRefresh={() => {
//this is needed to collect healthcheck if it is disabled by default https://github.com/ydb-platform/ydb-embedded-ui/issues/1889
const event = new CustomEvent('diagnosticsRefresh');
document.dispatchEvent(event);
}}
/>
<AutoRefreshControl />
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import type {AlertProps} from '@gravity-ui/uikit';
import {Alert, Button, Flex, Icon, Popover, Skeleton} from '@gravity-ui/uikit';

Expand Down Expand Up @@ -52,36 +50,12 @@ export function HealthcheckPreview(props: HealthcheckPreviewProps) {
{
//FIXME https://github.com/ydb-platform/ydb-embedded-ui/issues/1889
pollingInterval: healthcheckPreviewDisabled ? undefined : autoRefreshInterval,
skip: healthcheckPreviewDisabled,
},
);

const [getHealthcheckQuery, {currentData: manualData, isFetching: isFetchingManually}] =
healthcheckApi.useLazyGetHealthcheckInfoQuery();

React.useEffect(() => {
if (healthcheckPreviewDisabled) {
getHealthcheckQuery({database: tenantName});
}
}, [healthcheckPreviewDisabled, tenantName, getHealthcheckQuery]);
const loading = isFetching && data === undefined;

React.useEffect(() => {
const fetchHealthcheck = () => {
if (healthcheckPreviewDisabled) {
getHealthcheckQuery({database: tenantName});
}
};
document.addEventListener('diagnosticsRefresh', fetchHealthcheck);
return () => {
document.removeEventListener('diagnosticsRefresh', fetchHealthcheck);
};
}, [tenantName, healthcheckPreviewDisabled, getHealthcheckQuery]);

const loading =
(isFetching && data === undefined) || (isFetchingManually && manualData === undefined);

const selfCheckResult: SelfCheckResult =
data?.self_check_result || manualData?.self_check_result || SelfCheckResult.UNSPECIFIED;
const selfCheckResult: SelfCheckResult = data?.self_check_result || SelfCheckResult.UNSPECIFIED;

const modifier = selfCheckResult.toLowerCase();

Expand Down
12 changes: 11 additions & 1 deletion src/containers/Tenant/Tenant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,24 @@ interface TenantProps {
additionalNodesProps?: AdditionalNodesProps;
}

// eslint-disable-next-line complexity
export function Tenant(props: TenantProps) {
const [summaryVisibilityState, dispatchSummaryVisibilityAction] = React.useReducer(
paneVisibilityToggleReducerCreator(DEFAULT_IS_TENANT_SUMMARY_COLLAPSED),
undefined,
getTenantSummaryState,
);

const {database, schema} = useTenantQueryParams();
// TODO: name is used together with database to keep old links valid, do not remove
const {database: queryDatabase, schema, name, handleDatabaseChange} = useTenantQueryParams();

React.useEffect(() => {
if (name && !queryDatabase) {
handleDatabaseChange(name);
}
}, [queryDatabase, name, handleDatabaseChange]);

const database = queryDatabase ?? name;

if (!database) {
throw new Error('Tenant name is not defined');
Expand Down
4 changes: 3 additions & 1 deletion src/containers/Tenant/useTenantQueryParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ import React from 'react';
import {BooleanParam, StringParam, useQueryParams} from 'use-query-params';

export function useTenantQueryParams() {
const [{showHealthcheck, database, schema, view, issuesFilter}, setQueryParams] =
const [{showHealthcheck, database, schema, view, issuesFilter, name}, setQueryParams] =
useQueryParams({
showHealthcheck: BooleanParam,
database: StringParam,
schema: StringParam,
view: StringParam,
issuesFilter: StringParam,
name: StringParam,
});
const handleShowHealthcheckChange = React.useCallback(
(value?: boolean) => {
Expand Down Expand Up @@ -55,5 +56,6 @@ export function useTenantQueryParams() {
handleHealthcheckViewChange,
issuesFilter,
handleIssuesFilterChange,
name,
};
}
Loading