ydb-embedded-ui 15.4.0 → 15.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__mocks__/svgMock.d.ts +2 -0
- package/dist/__mocks__/svgMock.js +2 -0
- package/dist/__mocks__/svgMock.js.map +1 -0
- package/dist/assets/icons/monium.svg +3 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +11 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +32 -0
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.scss +14 -0
- package/dist/components/DropdownMenu/index.d.ts +2 -0
- package/dist/components/DropdownMenu/index.js +2 -0
- package/dist/components/DropdownMenu/index.js.map +1 -0
- package/dist/components/LinkWithIcon/LinkWithIcon.d.ts +4 -1
- package/dist/components/LinkWithIcon/LinkWithIcon.js +7 -6
- package/dist/components/LinkWithIcon/LinkWithIcon.js.map +1 -1
- package/dist/containers/App/Content.js +3 -2
- package/dist/containers/App/Content.js.map +1 -1
- package/dist/containers/App/legacyRedirects.d.ts +13 -0
- package/dist/containers/App/legacyRedirects.js +14 -0
- package/dist/containers/App/legacyRedirects.js.map +1 -0
- package/dist/containers/App/legacyRedirects.test.d.ts +1 -0
- package/dist/containers/App/legacyRedirects.test.js +52 -0
- package/dist/containers/App/legacyRedirects.test.js.map +1 -0
- package/dist/containers/AppWithClusters/ExtendedCluster/ExtendedCluster.d.ts +6 -0
- package/dist/containers/AppWithClusters/ExtendedCluster/ExtendedCluster.js +8 -3
- package/dist/containers/AppWithClusters/ExtendedCluster/ExtendedCluster.js.map +1 -1
- package/dist/containers/AppWithClusters/ExtendedCluster/ExtendedCluster.scss +2 -1
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +10 -10
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +2 -1
- package/dist/containers/Cluster/i18n/en.json +0 -3
- package/dist/containers/Cluster/i18n/index.d.ts +1 -1
- package/dist/containers/Cluster/utils.d.ts +2 -2
- package/dist/containers/Cluster/utils.js +1 -1
- package/dist/containers/Cluster/utils.js.map +1 -1
- package/dist/containers/Clusters/i18n/en.json +1 -2
- package/dist/containers/Clusters/i18n/index.d.ts +1 -1
- package/dist/containers/Header/ClusterMonitoringControl.d.ts +6 -0
- package/dist/containers/Header/ClusterMonitoringControl.js +7 -0
- package/dist/containers/Header/ClusterMonitoringControl.js.map +1 -0
- package/dist/containers/Header/ClusterRightControls.d.ts +9 -0
- package/dist/containers/Header/ClusterRightControls.js +48 -0
- package/dist/containers/Header/ClusterRightControls.js.map +1 -0
- package/dist/containers/Header/ClustersHomeControls.d.ts +1 -0
- package/dist/containers/Header/ClustersHomeControls.js +13 -0
- package/dist/containers/Header/ClustersHomeControls.js.map +1 -0
- package/dist/containers/Header/DatabaseRightControls.d.ts +12 -0
- package/dist/containers/Header/DatabaseRightControls.js +15 -0
- package/dist/containers/Header/DatabaseRightControls.js.map +1 -0
- package/dist/containers/Header/GlobalRightControls.d.ts +1 -0
- package/dist/containers/Header/GlobalRightControls.js +9 -0
- package/dist/containers/Header/GlobalRightControls.js.map +1 -0
- package/dist/containers/Header/Header.d.ts +1 -1
- package/dist/containers/Header/Header.js +27 -191
- package/dist/containers/Header/Header.js.map +1 -1
- package/dist/containers/Header/HeaderActionsMenu.js +6 -7
- package/dist/containers/Header/HeaderActionsMenu.js.map +1 -1
- package/dist/containers/Header/HeaderBreadcrumbs.d.ts +8 -0
- package/dist/containers/Header/HeaderBreadcrumbs.js +12 -0
- package/dist/containers/Header/HeaderBreadcrumbs.js.map +1 -0
- package/dist/containers/Header/HeaderLeftControls.d.ts +8 -0
- package/dist/containers/Header/HeaderLeftControls.js +15 -0
- package/dist/containers/Header/HeaderLeftControls.js.map +1 -0
- package/dist/containers/Header/HeaderRightControls.d.ts +20 -0
- package/dist/containers/Header/HeaderRightControls.js +14 -0
- package/dist/containers/Header/HeaderRightControls.js.map +1 -0
- package/dist/containers/Header/constants.js +3 -0
- package/dist/containers/Header/constants.js.map +1 -0
- package/dist/containers/Header/hooks/useClusterData.d.ts +38 -0
- package/dist/containers/Header/hooks/useClusterData.js +46 -0
- package/dist/containers/Header/hooks/useClusterData.js.map +1 -0
- package/dist/containers/Header/hooks/useDatabaseData.d.ts +14 -0
- package/dist/containers/Header/hooks/useDatabaseData.js +36 -0
- package/dist/containers/Header/hooks/useDatabaseData.js.map +1 -0
- package/dist/containers/Header/hooks/useHeaderBreadcrumbs.d.ts +22 -0
- package/dist/containers/Header/hooks/useHeaderBreadcrumbs.js +35 -0
- package/dist/containers/Header/hooks/useHeaderBreadcrumbs.js.map +1 -0
- package/dist/containers/Header/hooks/useHeaderClusterLinks.d.ts +2 -0
- package/dist/containers/Header/hooks/useHeaderClusterLinks.js +11 -0
- package/dist/containers/Header/hooks/useHeaderClusterLinks.js.map +1 -0
- package/dist/containers/Header/hooks/useHeaderData.d.ts +19 -0
- package/dist/containers/Header/hooks/useHeaderData.js +29 -0
- package/dist/containers/Header/hooks/useHeaderData.js.map +1 -0
- package/dist/containers/Header/hooks/useHeaderPageContext.d.ts +19 -0
- package/dist/containers/Header/hooks/useHeaderPageContext.js +48 -0
- package/dist/containers/Header/hooks/useHeaderPageContext.js.map +1 -0
- package/dist/containers/Header/i18n/en.json +5 -2
- package/dist/containers/Header/i18n/index.d.ts +1 -1
- package/dist/containers/Tablets/Tablets.js +43 -3
- package/dist/containers/Tablets/Tablets.js.map +1 -1
- package/dist/containers/Tablets/TabletsTable.d.ts +6 -1
- package/dist/containers/Tablets/TabletsTable.js +12 -2
- package/dist/containers/Tablets/TabletsTable.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +18 -3
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopicData/columns/columns.js +5 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/columns/columns.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +16 -4
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryResult/components/QueryInfoDropdown/QueryInfoDropdown.d.ts +0 -1
- package/dist/containers/Tenant/Query/QueryResult/components/QueryInfoDropdown/QueryInfoDropdown.js +3 -4
- package/dist/containers/Tenant/Query/QueryResult/components/QueryInfoDropdown/QueryInfoDropdown.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryResult/components/QueryInfoDropdown/useQueryInfoMenuItems.d.ts +2 -7
- package/dist/containers/Tenant/Query/QueryResult/components/QueryInfoDropdown/useQueryInfoMenuItems.js +9 -15
- package/dist/containers/Tenant/Query/QueryResult/components/QueryInfoDropdown/useQueryInfoMenuItems.js.map +1 -1
- package/dist/containers/Tenant/TenantNavigation/useTenantNavigation.js +24 -6
- package/dist/containers/Tenant/TenantNavigation/useTenantNavigation.js.map +1 -1
- package/dist/containers/Tenant/TenantPages.d.ts +2 -2
- package/dist/containers/Tenant/TenantPages.js.map +1 -1
- package/dist/containers/Tenants/TenantsTable.js +1 -1
- package/dist/containers/Tenants/TenantsTable.js.map +1 -1
- package/dist/containers/Tenants/i18n/en.json +1 -0
- package/dist/containers/Tenants/i18n/index.d.ts +1 -1
- package/dist/containers/UserSettings/i18n/en.json +1 -1
- package/dist/routes.d.ts +5 -2
- package/dist/routes.js +20 -6
- package/dist/routes.js.map +1 -1
- package/dist/routes.test.js +37 -1
- package/dist/routes.test.js.map +1 -1
- package/dist/store/reducers/cluster/__test__/parseFields.test.js +73 -1
- package/dist/store/reducers/cluster/__test__/parseFields.test.js.map +1 -1
- package/dist/store/reducers/cluster/cluster.d.ts +2 -1
- package/dist/store/reducers/cluster/cluster.js +2 -1
- package/dist/store/reducers/cluster/cluster.js.map +1 -1
- package/dist/store/reducers/cluster/parseFields.d.ts +2 -1
- package/dist/store/reducers/cluster/parseFields.js +19 -0
- package/dist/store/reducers/cluster/parseFields.js.map +1 -1
- package/dist/store/reducers/healthcheckInfo/utils.d.ts +2 -1
- package/dist/store/reducers/healthcheckInfo/utils.js +8 -1
- package/dist/store/reducers/healthcheckInfo/utils.js.map +1 -1
- package/dist/store/reducers/tenant/constants.d.ts +2 -1
- package/dist/store/reducers/tenant/constants.js +4 -1
- package/dist/store/reducers/tenant/constants.js.map +1 -1
- package/dist/store/state-url-mapping.d.ts +94 -0
- package/dist/store/state-url-mapping.js +54 -94
- package/dist/store/state-url-mapping.js.map +1 -1
- package/dist/types/additionalProps.d.ts +16 -2
- package/dist/types/api/meta.d.ts +9 -0
- package/dist/utils/clusterLinks/__test__/resolveClusterLinks.test.d.ts +1 -0
- package/dist/utils/clusterLinks/__test__/resolveClusterLinks.test.js +503 -0
- package/dist/utils/clusterLinks/__test__/resolveClusterLinks.test.js.map +1 -0
- package/dist/utils/clusterLinks/clusterLinkConstants.d.ts +12 -0
- package/dist/utils/clusterLinks/clusterLinkConstants.js +23 -0
- package/dist/utils/clusterLinks/clusterLinkConstants.js.map +1 -0
- package/dist/utils/clusterLinks/i18n/en.json +8 -0
- package/dist/utils/clusterLinks/i18n/index.d.ts +2 -0
- package/dist/utils/clusterLinks/i18n/index.js +5 -0
- package/dist/utils/clusterLinks/i18n/index.js.map +1 -0
- package/dist/utils/clusterLinks/resolveClusterLinks.d.ts +34 -0
- package/dist/utils/clusterLinks/resolveClusterLinks.js +198 -0
- package/dist/utils/clusterLinks/resolveClusterLinks.js.map +1 -0
- package/dist/utils/clusterLinks/useClusterLinks.d.ts +2 -0
- package/dist/utils/clusterLinks/useClusterLinks.js +10 -0
- package/dist/utils/clusterLinks/useClusterLinks.js.map +1 -0
- package/dist/utils/queryParams.d.ts +4 -0
- package/dist/utils/queryParams.js +14 -0
- package/dist/utils/queryParams.js.map +1 -0
- package/package.json +1 -1
- package/dist/assets/icons/monitoring.svg +0 -9
- package/dist/containers/Cluster/ClusterInfo/utils/useClusterLinks.d.ts +0 -2
- package/dist/containers/Cluster/ClusterInfo/utils/useClusterLinks.js +0 -29
- package/dist/containers/Cluster/ClusterInfo/utils/useClusterLinks.js.map +0 -1
- package/dist/containers/Tenant/Query/QueryResult/components/QueryInfoDropdown/QueryInfoDropdown.scss +0 -17
- package/dist/containers/Tenant/Query/QueryResult/components/QueryInfoDropdown/shared.js +0 -3
- package/dist/containers/Tenant/Query/QueryResult/components/QueryInfoDropdown/shared.js.map +0 -1
- /package/dist/containers/{Tenant/Query/QueryResult/components/QueryInfoDropdown/shared.d.ts → Header/constants.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svgMock.js","sourceRoot":"","sources":["../../src/__mocks__/svgMock.ts"],"names":[],"mappings":"AAAA,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DropdownMenuItem, DropdownMenuProps as GravityDropdownMenuProps, IconProps } from '@gravity-ui/uikit';
|
|
3
|
+
import './DropdownMenu.scss';
|
|
4
|
+
export interface DropdownMenuItemWithDescription<T = HTMLElement> extends Omit<DropdownMenuItem<T>, 'text' | 'iconStart'> {
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
iconStart?: IconProps['data'];
|
|
7
|
+
}
|
|
8
|
+
export interface DropdownMenuProps<T = HTMLElement> extends Omit<GravityDropdownMenuProps<T>, 'items'> {
|
|
9
|
+
items: (DropdownMenuItemWithDescription<T> | DropdownMenuItemWithDescription<T>[])[];
|
|
10
|
+
}
|
|
11
|
+
export declare function DropdownMenu<T = HTMLElement>({ items, ...props }: DropdownMenuProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Flex, DropdownMenu as GravityDropdownMenu, Icon, Text } from '@gravity-ui/uikit';
|
|
4
|
+
import { cn } from '../../utils/cn';
|
|
5
|
+
import './DropdownMenu.scss';
|
|
6
|
+
const b = cn('ydb-dropdown-menu');
|
|
7
|
+
function renderMenuItemText({ title, description, }) {
|
|
8
|
+
return (_jsxs(Flex, { direction: "column", className: b('item-content'), children: [_jsx(Text, { className: b('item-title'), children: title }), description ? (_jsx(Text, { color: "secondary", className: b('item-description'), children: description })) : null] }));
|
|
9
|
+
}
|
|
10
|
+
function mapMenuItem(item) {
|
|
11
|
+
const { title, description, iconStart, className, ...restItem } = item;
|
|
12
|
+
return {
|
|
13
|
+
...restItem,
|
|
14
|
+
text: renderMenuItemText({ title, description }),
|
|
15
|
+
iconStart: iconStart ? (_jsx(Icon, { data: iconStart, className: b('icon', { 'with-description': Boolean(description) }) })) : undefined,
|
|
16
|
+
className: [className, b('menu-item', { 'with-description': Boolean(description) })]
|
|
17
|
+
.filter(Boolean)
|
|
18
|
+
.join(' '),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export function DropdownMenu({ items, ...props }) {
|
|
22
|
+
const mappedItems = React.useMemo(() => {
|
|
23
|
+
return items.map((group) => {
|
|
24
|
+
if (Array.isArray(group)) {
|
|
25
|
+
return group.map(mapMenuItem);
|
|
26
|
+
}
|
|
27
|
+
return mapMenuItem(group);
|
|
28
|
+
});
|
|
29
|
+
}, [items]);
|
|
30
|
+
return _jsx(GravityDropdownMenu, { ...props, items: mappedItems });
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=DropdownMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownMenu.js","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAC,IAAI,EAAE,YAAY,IAAI,mBAAmB,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,mBAAm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U,YAAY,CAAkB,EAAC,KAAK,EAAE,GAAG,KAAK,EAAuB;IACjF,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAuC,GAAG,EAAE;QACzE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACvB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBACvB,OAAO,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YAClC,CAAC;YAED,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;IACP,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,KAAC,mBAAmB,OAAK,KAAK,EAAE,KAAK,EAAE,WAAW,GAAI,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.ydb-dropdown-menu {
|
|
2
|
+
&__item-content {
|
|
3
|
+
padding: var(--g-spacing-1) 0;
|
|
4
|
+
}
|
|
5
|
+
&__icon {
|
|
6
|
+
margin-right: calc(var(--g-spacing-1) + var(--g-spacing-half));
|
|
7
|
+
}
|
|
8
|
+
&__icon_with-description {
|
|
9
|
+
margin-top: calc(var(--g-spacing-1) + var(--g-spacing-half));
|
|
10
|
+
}
|
|
11
|
+
&__menu-item_with-description {
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DropdownMenu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import type { IconData } from '@gravity-ui/uikit';
|
|
1
2
|
import './LinkWithIcon.scss';
|
|
2
3
|
interface ExternalLinkWithIconProps {
|
|
3
4
|
title: string;
|
|
4
5
|
url: string;
|
|
5
6
|
external?: boolean;
|
|
6
7
|
className?: string;
|
|
8
|
+
icon?: IconData;
|
|
9
|
+
description?: string;
|
|
7
10
|
}
|
|
8
|
-
export declare const LinkWithIcon: ({ title, url, external, className, }: ExternalLinkWithIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const LinkWithIcon: ({ title, url, external, className, icon, description, }: ExternalLinkWithIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
12
|
export {};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ArrowUpRightFromSquare } from '@gravity-ui/icons';
|
|
4
|
-
import { Link } from '@gravity-ui/uikit';
|
|
4
|
+
import { ActionTooltip, Icon, Link } from '@gravity-ui/uikit';
|
|
5
5
|
import { cn } from '../../utils/cn';
|
|
6
6
|
import { InternalLink } from '../InternalLink';
|
|
7
7
|
import './LinkWithIcon.scss';
|
|
8
8
|
const b = cn('ydb-link-with-icon');
|
|
9
|
-
export const LinkWithIcon = ({ title, url, external = true, className, }) => {
|
|
10
|
-
const linkContent = (_jsxs(React.Fragment, { children: [title, '\u00a0', _jsx(ArrowUpRightFromSquare, {})] }));
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
export const LinkWithIcon = ({ title, url, external = true, className, icon, description, }) => {
|
|
10
|
+
const linkContent = (_jsxs(React.Fragment, { children: [icon ? _jsx(Icon, { data: icon, size: 16 }) : null, icon ? '\u00a0' : null, title, '\u00a0', _jsx(ArrowUpRightFromSquare, {})] }));
|
|
11
|
+
const link = external ? (_jsx(Link, { href: url, target: "_blank", className: b(null, className), children: linkContent })) : (_jsx(InternalLink, { to: url, className: b(null, className), children: linkContent }));
|
|
12
|
+
if (description) {
|
|
13
|
+
return (_jsx(ActionTooltip, { title: description, placement: ['top', 'bottom'], children: link }));
|
|
13
14
|
}
|
|
14
|
-
return
|
|
15
|
+
return link;
|
|
15
16
|
};
|
|
16
17
|
//# sourceMappingURL=LinkWithIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkWithIcon.js","sourceRoot":"","sources":["../../../src/components/LinkWithIcon/LinkWithIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"LinkWithIcon.js","sourceRoot":"","sources":["../../../src/components/LinkWithIcon/LinkWithIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAC,aAAa,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C,OAAO,qBAAqB,CAAC;AAE7B,MAAM,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC,CAAC;AAWnC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EACzB,KAAK,EACL,GAAG,EACH,QAAQ,GAAG,IAAI,EACf,SAAS,EACT,IAAI,EACJ,WAAW,GACa,EAAE,EAAE;IAC5B,MAAM,WAAW,GAAG,CAChB,MAAC,KAAK,CAAC,QAAQ,eACV,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,GAAI,CAAC,CAAC,CAAC,IAAI,EAC5C,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EACtB,KAAK,EACL,QAAQ,EACT,KAAC,sBAAsB,KAAG,IACb,CACpB,CAAC;IAEF,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CACpB,KAAC,IAAI,IAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,YACzD,WAAW,GACT,CACV,CAAC,CAAC,CAAC,CACA,KAAC,YAAY,IAAC,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,YAC/C,WAAW,GACD,CAClB,CAAC;IAEF,IAAI,WAAW,EAAE,CAAC;QACd,OAAO,CACH,KAAC,aAAa,IAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,YAC1D,IAAI,GACO,CACnB,CAAC;IACN,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -6,7 +6,7 @@ import { Unauthenticated } from '../../components/Errors/401';
|
|
|
6
6
|
import { AccessDenied } from '../../components/Errors/403';
|
|
7
7
|
import { LoaderWrapper } from '../../components/LoaderWrapper/LoaderWrapper';
|
|
8
8
|
import { useSlots } from '../../components/slots';
|
|
9
|
-
import routes, { getClusterPath } from '../../routes';
|
|
9
|
+
import routes, { CLUSTER, getClusterPath } from '../../routes';
|
|
10
10
|
import { useAllCapabilitiesLoaded, useCapabilitiesQuery, useClusterWithoutAuthInUI, useMetaCapabilitiesLoaded, useMetaCapabilitiesQuery, } from '../../store/reducers/capabilities/hooks';
|
|
11
11
|
import { nodesListApi } from '../../store/reducers/nodesList';
|
|
12
12
|
import { cn } from '../../utils/cn';
|
|
@@ -18,6 +18,7 @@ import Authentication from '../Authentication/Authentication';
|
|
|
18
18
|
import { GetUser } from '../GetUserWrapper/GetUserWrapper';
|
|
19
19
|
import { Header } from '../Header/Header';
|
|
20
20
|
import { ClusterSlot, HomePageSlot, NodeSlot, PDiskPageSlot, RedirectSlot, RoutesSlot, StorageGroupSlot, TabletSlot, TenantSlot, VDiskPageSlot, } from './appSlots';
|
|
21
|
+
import { getLegacyClusterTenantsRedirect, getLegacyTenantRedirect } from './legacyRedirects';
|
|
21
22
|
import './App.scss';
|
|
22
23
|
const b = cn('app');
|
|
23
24
|
const routesSlots = [
|
|
@@ -99,7 +100,7 @@ export function Content(props) {
|
|
|
99
100
|
const additionalRoutes = slots.get(RoutesSlot);
|
|
100
101
|
const redirect = slots.get(RedirectSlot);
|
|
101
102
|
const redirectProps = (_a = redirect === null || redirect === void 0 ? void 0 : redirect.props) !== null && _a !== void 0 ? _a : (singleClusterMode ? { to: getClusterPath() } : { to: routes.homePage });
|
|
102
|
-
return (_jsxs(Switch, { children: [additionalRoutes === null || additionalRoutes === void 0 ? void 0 : additionalRoutes.rendered, _jsxs(Route, { children: [_jsx(Header, {}), _jsxs(Switch, { children: [singleClusterMode
|
|
103
|
+
return (_jsxs(Switch, { children: [additionalRoutes === null || additionalRoutes === void 0 ? void 0 : additionalRoutes.rendered, _jsxs(Route, { children: [_jsx(Header, {}), _jsxs(Switch, { children: [_jsx(Route, { path: `/:environment?/${CLUSTER}/tenants`, exact: true, render: ({ location }) => (_jsx(Redirect, { to: getLegacyClusterTenantsRedirect(location) })) }), _jsx(Route, { path: routes.legacyTenant, render: ({ location }) => _jsx(Redirect, { to: getLegacyTenantRedirect(location) }) }), singleClusterMode
|
|
103
104
|
? null
|
|
104
105
|
: multiClusterRoutes.map((route) => {
|
|
105
106
|
return renderRouteSlot(slots, route);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../src/containers/App/Content.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAC,aAAa,EAAC,MAAM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ErD,MAAM,sBAAsB,GAAG,GAAG,EAAE;QAChC,IAAI,eAAe,IAAI,mBAAmB,EAAE,CAAC;YACzC,OAAO,KAAC,YAAY,KAAG,CAAC;QAC5B,CAAC;QACD,OAAO,KAAC,cAAc,KAAG,CAAC;IAC9B,CAAC,CAAC;IAEF,OAAO,CACH,MAAC,MAAM,eACF,CAAC,eAAe,IAAI,CAAC,mBAAmB,IAAI,CACzC,KAAC,KAAK,IAAC,IAAI,EAAE,MAAM,CAAC,IAAI,YACpB,KAAC,cAAc,IAAC,QAAQ,SAAG,GACvB,CACX,EACD,KAAC,KAAK,cACF,cAAK,SAAS,EAAE,CAAC,CAAC,EAAC,QAAQ,EAAE,iBAAiB,EAAC,CAAC,YAC3C,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,sBAAsB,EAAE,GAC1D,GACF,IACH,CACZ,CAAC;AACN,CAAC;AAED,SAAS,eAAe,CAAC,KAAgB;IACrC,OAAO;QACH,eAAe,EAAE,KAAK,CAAC,cAAc,CAAC,eAAe;QACrD,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;KAC7C,CAAC;AACN,CAAC;AAED,eAAe,OAAO,CAAC,eAAe,CAAC,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Location } from 'history';
|
|
2
|
+
type LegacyRedirectLocation = Pick<Location, 'pathname' | 'search' | 'hash'>;
|
|
3
|
+
export declare function getLegacyClusterTenantsRedirect(location: LegacyRedirectLocation): {
|
|
4
|
+
pathname: string;
|
|
5
|
+
search: string;
|
|
6
|
+
hash: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function getLegacyTenantRedirect(location: LegacyRedirectLocation): {
|
|
9
|
+
pathname: string;
|
|
10
|
+
search: string;
|
|
11
|
+
hash: string;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function makeRedirectLocation(location, pathname) {
|
|
2
|
+
return {
|
|
3
|
+
pathname,
|
|
4
|
+
search: location.search,
|
|
5
|
+
hash: location.hash,
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export function getLegacyClusterTenantsRedirect(location) {
|
|
9
|
+
return makeRedirectLocation(location, location.pathname.replace(/\/cluster\/tenants(\/|$)/, '/cluster/databases$1'));
|
|
10
|
+
}
|
|
11
|
+
export function getLegacyTenantRedirect(location) {
|
|
12
|
+
return makeRedirectLocation(location, location.pathname.replace(/\/tenant(\/|$)/, '/database$1'));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=legacyRedirects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacyRedirects.js","sourceRoot":"","sources":["../../../src/containers/App/legacyRedirects.ts"],"names":[],"mappings":"AAIA,SAAS,oBAAoB,CAAC,QAAgC,EAAE,QAAgB;IAC5E,OAAO;QACH,QAAQ;QACR,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,IAAI,EAAE,QAAQ,CAAC,IAAI;KACtB,CAAC;AACN,CAAC;AAED,MAAM,UAAU,+BAA+B,CAAC,QAAgC;IAC5E,OAAO,oBAAoB,CACvB,QAAQ,EACR,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,0BAA0B,EAAE,sBAAsB,CAAC,CAChF,CAAC;AACN,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,QAAgC;IACpE,OAAO,oBAAoB,CACvB,QAAQ,EACR,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAC7D,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { getLegacyClusterTenantsRedirect, getLegacyTenantRedirect } from './legacyRedirects';
|
|
2
|
+
describe('legacyRedirects', () => {
|
|
3
|
+
describe('getLegacyClusterTenantsRedirect', () => {
|
|
4
|
+
test('redirects legacy cluster tenants tab to databases and preserves URL parts', () => {
|
|
5
|
+
expect(getLegacyClusterTenantsRedirect({
|
|
6
|
+
pathname: '/cluster/tenants',
|
|
7
|
+
search: '?clusterName=my-cluster&backend=http%3A%2F%2Flocalhost%3A8765',
|
|
8
|
+
hash: '#health',
|
|
9
|
+
})).toEqual({
|
|
10
|
+
pathname: '/cluster/databases',
|
|
11
|
+
search: '?clusterName=my-cluster&backend=http%3A%2F%2Flocalhost%3A8765',
|
|
12
|
+
hash: '#health',
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
test('keeps the environment prefix when redirecting cluster tenants tab', () => {
|
|
16
|
+
expect(getLegacyClusterTenantsRedirect({
|
|
17
|
+
pathname: '/cloud-prod/cluster/tenants',
|
|
18
|
+
search: '?clusterName=my-cluster',
|
|
19
|
+
hash: '',
|
|
20
|
+
})).toEqual({
|
|
21
|
+
pathname: '/cloud-prod/cluster/databases',
|
|
22
|
+
search: '?clusterName=my-cluster',
|
|
23
|
+
hash: '',
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
describe('getLegacyTenantRedirect', () => {
|
|
28
|
+
test('redirects legacy tenant page to database and preserves URL parts', () => {
|
|
29
|
+
expect(getLegacyTenantRedirect({
|
|
30
|
+
pathname: '/tenant',
|
|
31
|
+
search: '?schema=%2Flocal&database=%2Flocal&tenantPage=diagnostics',
|
|
32
|
+
hash: '#queries',
|
|
33
|
+
})).toEqual({
|
|
34
|
+
pathname: '/database',
|
|
35
|
+
search: '?schema=%2Flocal&database=%2Flocal&tenantPage=diagnostics',
|
|
36
|
+
hash: '#queries',
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
test('keeps the environment prefix when redirecting tenant page', () => {
|
|
40
|
+
expect(getLegacyTenantRedirect({
|
|
41
|
+
pathname: '/cloud-prod/tenant',
|
|
42
|
+
search: '?database=%2Fprod',
|
|
43
|
+
hash: '',
|
|
44
|
+
})).toEqual({
|
|
45
|
+
pathname: '/cloud-prod/database',
|
|
46
|
+
search: '?database=%2Fprod',
|
|
47
|
+
hash: '',
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=legacyRedirects.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacyRedirects.test.js","sourceRoot":"","sources":["../../../src/containers/App/legacyRedirects.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,+BAA+B,EAAE,uBAAuB,EAAC,MAAM,mBAAmB,CAAC;AAE3F,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC7B,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;QAC7C,IAAI,CAAC,2EAA2E,EAAE,GAAG,EAAE;YACnF,MAAM,CACF,+BAA+B,CAAC;gBAC5B,QAAQ,EAAE,kBAAkB;gBAC5B,MAAM,EAAE,+DAA+D;gBACvE,IAAI,EAAE,SAAS;aAClB,CAAC,CACL,CAAC,OAAO,CAAC;gBACN,QAAQ,EAAE,oBAAoB;gBAC9B,MAAM,EAAE,+DAA+D;gBACvE,IAAI,EAAE,SAAS;aAClB,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,mEAAmE,EAAE,GAAG,EAAE;YAC3E,MAAM,CACF,+BAA+B,CAAC;gBAC5B,QAAQ,EAAE,6BAA6B;gBACvC,MAAM,EAAE,yBAAyB;gBACjC,IAAI,EAAE,EAAE;aACX,CAAC,CACL,CAAC,OAAO,CAAC;gBACN,QAAQ,EAAE,+BAA+B;gBACzC,MAAM,EAAE,yBAAyB;gBACjC,IAAI,EAAE,EAAE;aACX,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACrC,IAAI,CAAC,kEAAkE,EAAE,GAAG,EAAE;YAC1E,MAAM,CACF,uBAAuB,CAAC;gBACpB,QAAQ,EAAE,SAAS;gBACnB,MAAM,EAAE,2DAA2D;gBACnE,IAAI,EAAE,UAAU;aACnB,CAAC,CACL,CAAC,OAAO,CAAC;gBACN,QAAQ,EAAE,WAAW;gBACrB,MAAM,EAAE,2DAA2D;gBACnE,IAAI,EAAE,UAAU;aACnB,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,2DAA2D,EAAE,GAAG,EAAE;YACnE,MAAM,CACF,uBAAuB,CAAC;gBACpB,QAAQ,EAAE,oBAAoB;gBAC9B,MAAM,EAAE,mBAAmB;gBAC3B,IAAI,EAAE,EAAE;aACX,CAAC,CACL,CAAC,OAAO,CAAC;gBACN,QAAQ,EAAE,sBAAsB;gBAChC,MAAM,EAAE,mBAAmB;gBAC3B,IAAI,EAAE,EAAE;aACX,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import type { AdditionalClusterProps } from '../../../types/additionalProps';
|
|
1
2
|
import type { GetClusterLinks, GetDatabaseLinks } from '../../../uiFactory/types';
|
|
2
3
|
import type { GetLogsLink } from '../../../utils/logs';
|
|
3
4
|
import type { GetMonitoringClusterLink, GetMonitoringLink } from '../../../utils/monitoring';
|
|
4
5
|
import type { Cluster } from '../../Cluster/Cluster';
|
|
5
6
|
import './ExtendedCluster.scss';
|
|
7
|
+
interface GetAdditionalClusterProps {
|
|
8
|
+
getMonitoringClusterLink?: GetMonitoringClusterLink;
|
|
9
|
+
getClusterLinks?: GetClusterLinks;
|
|
10
|
+
}
|
|
11
|
+
export declare const useAdditionalClusterProps: ({ getMonitoringClusterLink, getClusterLinks, }: GetAdditionalClusterProps) => AdditionalClusterProps;
|
|
6
12
|
interface ExtendedClusterProps {
|
|
7
13
|
component: typeof Cluster;
|
|
8
14
|
getMonitoringLink?: GetMonitoringLink;
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { ClipboardButton } from '@gravity-ui/uikit';
|
|
3
3
|
import { useClusterBaseInfo } from '../../../store/reducers/cluster/cluster';
|
|
4
4
|
import { cn } from '../../../utils/cn';
|
|
5
|
+
import { MONITORING_UI_TITLE } from '../../../utils/constants';
|
|
5
6
|
import { getCleanBalancerValue } from '../../../utils/parseBalancer';
|
|
6
7
|
import { useAdditionalTenantsProps } from '../utils/useAdditionalTenantsProps';
|
|
7
8
|
import './ExtendedCluster.scss';
|
|
@@ -10,10 +11,10 @@ const getAdditionalBalancerInfo = (balancer) => {
|
|
|
10
11
|
const cleanedValue = getCleanBalancerValue(balancer);
|
|
11
12
|
return {
|
|
12
13
|
label: 'Balancer',
|
|
13
|
-
value: (_jsxs("div", { className: b('balancer'), children: [cleanedValue, _jsx(ClipboardButton, { text: cleanedValue, size: "
|
|
14
|
+
value: (_jsxs("div", { className: b('balancer'), children: [cleanedValue, _jsx(ClipboardButton, { view: "flat-secondary", text: cleanedValue, size: "xs", className: b('clipboard-button') })] })),
|
|
14
15
|
};
|
|
15
16
|
};
|
|
16
|
-
const useAdditionalClusterProps = ({ getMonitoringClusterLink, getClusterLinks, }) => {
|
|
17
|
+
export const useAdditionalClusterProps = ({ getMonitoringClusterLink, getClusterLinks, }) => {
|
|
17
18
|
const clusterInfo = useClusterBaseInfo();
|
|
18
19
|
const { name: clusterName, balancer, monitoring } = clusterInfo;
|
|
19
20
|
const additionalClusterProps = {};
|
|
@@ -21,7 +22,11 @@ const useAdditionalClusterProps = ({ getMonitoringClusterLink, getClusterLinks,
|
|
|
21
22
|
if (monitoring && getMonitoringClusterLink) {
|
|
22
23
|
const clusterLink = getMonitoringClusterLink(monitoring, clusterName);
|
|
23
24
|
if (clusterLink) {
|
|
24
|
-
additionalClusterProps.links.push({
|
|
25
|
+
additionalClusterProps.links.push({
|
|
26
|
+
title: MONITORING_UI_TITLE,
|
|
27
|
+
url: clusterLink,
|
|
28
|
+
context: 'monitoring',
|
|
29
|
+
});
|
|
25
30
|
}
|
|
26
31
|
}
|
|
27
32
|
if (getClusterLinks) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtendedCluster.js","sourceRoot":"","sources":["../../../../src/containers/AppWithClusters/ExtendedCluster/ExtendedCluster.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAC,kBAAkB,EAAC,MAAM,yCAAyC,CAAC;AAG3E,OAAO,EAAC,EAAE,EAAC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ExtendedCluster.js","sourceRoot":"","sources":["../../../../src/containers/AppWithClusters/ExtendedCluster/ExtendedCluster.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAC,kBAAkB,EAAC,MAAM,yCAAyC,CAAC;AAG3E,OAAO,EAAC,EAAE,EAAC,MAAM,mBAAmB,CAAC;AACrC,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAG7D,OAAO,EAAC,qBAAqB,EAAC,MAAM,8BAA8B,CAAC;AAEnE,OAAO,EAAC,yBAAyB,EAAC,MAAM,oCAAoC,CAAC;AAE7E,OAAO,wBAAwB,CAAC;AAEhC,MAAM,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,CAAC;AAEjC,MAAM,yBAAyB,GAAG,CAAC,QAAgB,EAAE,EAAE;IACnD,MAAM,YAAY,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IAErD,OAAO;QACH,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,CACH,eAAK,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,aACxB,YAAY,EACb,KAAC,eAAe,IACZ,IAAI,EAAC,gBAAgB,EACrB,IAAI,EAAE,YAAY,EAClB,IAAI,EAAC,IAAI,EACT,SAAS,EAAE,CAAC,CAA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AyB,CAAC;gBAC9C,wBAAwB;gBACxB,eAAe;aAClB,CAAC,EACF,sBAAsB,EAAE,yBAAyB,CAAC;gBAC9C,iBAAiB;gBACjB,WAAW;gBACX,gBAAgB;aACnB,CAAC,GACJ,GACA,CACT,CAAC;AACN,CAAC"}
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
height: 100%;
|
|
5
5
|
|
|
6
6
|
&__balancer {
|
|
7
|
+
--g-button-height: var(--g-text-body-1-line-height);
|
|
7
8
|
display: flex;
|
|
8
9
|
flex-direction: row;
|
|
9
10
|
align-items: center;
|
|
10
11
|
}
|
|
11
12
|
&__clipboard-button {
|
|
12
|
-
margin-left:
|
|
13
|
+
margin-left: var(--g-spacing-half);
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Card, DefinitionList, Flex, Text } from '@gravity-ui/uikit';
|
|
2
|
+
import { Card, DefinitionList, Divider, Flex, Text } from '@gravity-ui/uikit';
|
|
3
3
|
import { ResponseError } from '../../../components/Errors/ResponseError';
|
|
4
4
|
import { LinkWithIcon } from '../../../components/LinkWithIcon/LinkWithIcon';
|
|
5
5
|
import { Skeleton } from '../../../components/Skeleton/Skeleton';
|
|
6
|
+
import { useClusterLinks } from '../../../utils/clusterLinks/useClusterLinks';
|
|
6
7
|
import { formatNumber } from '../../../utils/dataFormatters/dataFormatters';
|
|
7
8
|
import { BridgeInfoTable } from '../ClusterOverview/components/BridgeInfoTable';
|
|
8
9
|
import i18n from '../i18n';
|
|
9
10
|
import { StorageGroupStats } from './components/DiskGroupsStatsBars/DiskGroupsStats';
|
|
10
11
|
import { b } from './shared';
|
|
11
|
-
import { useClusterLinks } from './utils/useClusterLinks';
|
|
12
12
|
import './ClusterInfo.scss';
|
|
13
13
|
export const ClusterInfo = ({ cluster, loading, error, additionalClusterProps = {}, groupStats = {}, bridgePiles, }) => {
|
|
14
14
|
const { info = [], links = [] } = additionalClusterProps;
|
|
15
|
-
const clusterLinks = useClusterLinks();
|
|
16
|
-
const
|
|
17
|
-
const noDetails = (error && !cluster) || (!info.length && !linksList.length);
|
|
15
|
+
const clusterLinks = useClusterLinks(links);
|
|
16
|
+
const noDetails = (error && !cluster) || (!info.length && !clusterLinks.length);
|
|
18
17
|
const renderDetailSection = () => {
|
|
19
18
|
if (loading) {
|
|
20
19
|
return (_jsxs(InfoSection, { className: b('detail-section'), children: [_jsx(Skeleton, { className: b('skeleton-title') }), _jsx(Skeleton, { className: b('skeleton-section') })] }));
|
|
@@ -22,11 +21,12 @@ export const ClusterInfo = ({ cluster, loading, error, additionalClusterProps =
|
|
|
22
21
|
if (noDetails) {
|
|
23
22
|
return null;
|
|
24
23
|
}
|
|
25
|
-
return (_jsxs(InfoSection, { className: b('detail-section'), children: [_jsx(Text, { as: "div", variant: "subheader-2", className: b('section-title'), children: i18n('title_details') }), _jsx(Card, { view: "outlined", className: b('section'), children: _jsxs(DefinitionList, { nameMaxWidth: 200, className: b('details'), children:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
return (_jsxs(InfoSection, { className: b('detail-section'), children: [_jsx(Text, { as: "div", variant: "subheader-2", className: b('section-title'), children: i18n('title_details') }), _jsx(Card, { view: "outlined", className: b('section'), children: _jsxs(Flex, { direction: "column", gap: 3, children: [info.length > 0 && (_jsx(DefinitionList, { nameMaxWidth: 200, className: b('details'), children: info.map(({ label, value }) => {
|
|
25
|
+
return (_jsx(DefinitionList.Item, { name: label, children: _jsx("div", { className: b('details-value'), children: value }) }, label));
|
|
26
|
+
}) })), clusterLinks.length > 0 && (_jsx(Flex, { direction: "row", gap: 3, wrap: "wrap", children: clusterLinks.map(({ title, url, icon, description }, index) => {
|
|
27
|
+
const delimiter = index < clusterLinks.length - 1 ? (_jsx(Divider, { orientation: "vertical" })) : ('');
|
|
28
|
+
return (_jsxs(Flex, { gap: 3, wrap: "wrap", children: [_jsx(LinkWithIcon, { title: title, url: url, icon: icon, description: description }), delimiter] }, `${title}-${index}`));
|
|
29
|
+
}) }))] }) })] }));
|
|
30
30
|
};
|
|
31
31
|
const renderStorageGroupsSection = () => {
|
|
32
32
|
if (loading || Object.keys(groupStats).length === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterInfo.js","sourceRoot":"","sources":["../../../../src/containers/Cluster/ClusterInfo/ClusterInfo.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ClusterInfo.js","sourceRoot":"","sources":["../../../../src/containers/Cluster/ClusterInfo/ClusterInfo.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAE5E,OAAO,EAAC,aAAa,EAAC,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAC,YAAY,EAAC,MAAM,+CAA+C,CAAC;AAC3E,OAAO,EAAC,QAAQ,EAAC,MAAM,uCAAuC,CAAC;AAK/D,OAAO,EAAC,eAAe,EAAC,MAAM,6CAA6C,CAAC;AAC5E,OAAO,EAAC,YAAY,EAAC,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAC,eAAe,EAAC,MAAM,+CAA+C,CAAC;AAC9E,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,EAAC,iBAAiB,EAAC,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAC,CAAC,EAAC,MAAM,UAAU,CAAC;AAE3B,OAAO,oBAAoB,CAAC;AAW5B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EACxB,OAAO,EACP,OAAO,EACP,KAAK,EACL,sBAAsB,GAAG,EAAE,EAC3B,UAAU,GAAG,EAAE,EACf,WAAW,GACI,EAA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AC,YAAY,EAAE,SAAS,EAAC,CAAC,aACnD,mBAAmB,EAAE,EACrB,0BAA0B,EAAE,EAC5B,wBAAwB,EAAE,IACzB,IACH,CACV,CAAC;AACN,CAAC,CAAC;AAOF,SAAS,WAAW,CAAC,EAAC,QAAQ,EAAE,SAAS,EAAmB;IACxD,OAAO,CACH,KAAC,IAAI,IAAC,SAAS,EAAC,QAAQ,EAAC,GAAG,EAAE,CAAC,EAAE,SAAS,EAAE,SAAS,YAChD,QAAQ,GACN,CACV,CAAC;AACN,CAAC"}
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
|
|
67
67
|
&__section {
|
|
68
68
|
width: 100%;
|
|
69
|
-
min-width: max-content;
|
|
70
69
|
padding: var(--cluster-overview-vertical-padding);
|
|
71
70
|
|
|
72
71
|
@container overview-wrapper (min-width: 804px) {
|
|
73
72
|
width: var(--cluster-overview-section);
|
|
73
|
+
min-width: var(--cluster-overview-section);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
&__details {
|
|
82
|
+
@include mixins.body-1-typography();
|
|
82
83
|
@container overview-wrapper (min-width: 804px) {
|
|
83
84
|
max-width: calc(
|
|
84
85
|
var(--cluster-overview-section) - var(--cluster-overview-vertical-padding) * 2
|
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
"title_available-one": "Available : 1 group",
|
|
4
4
|
"title_available-other": "Available : {{count}} groups",
|
|
5
5
|
"context_storage-group-allocation-progress": "Storage group allocation progress",
|
|
6
|
-
"link_cores": "Coredumps",
|
|
7
|
-
"link_logging": "Logging",
|
|
8
|
-
"link_slo-logs": "SLO Logs",
|
|
9
6
|
"title_cpu": "CPU",
|
|
10
7
|
"title_storage-groups": "Allocated Storage Groups",
|
|
11
8
|
"title_memory": "Memory",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (key: "title_allocated" | "title_available-one" | "title_available-other" | "context_storage-group-allocation-progress" | "
|
|
1
|
+
declare const _default: (key: "title_allocated" | "title_available-one" | "title_available-other" | "context_storage-group-allocation-progress" | "title_cpu" | "title_storage-groups" | "title_memory" | "title_network" | "title_links" | "title_details" | "title_bridge" | "label_overview" | "field_state" | "field_nodes" | "context_cpu" | "context_memory" | "title_storage-by-type" | "title_storage" | "context_network" | "context_cpu-description" | "context_memory-description" | "context_storage-by-type-description" | "context_storage-total-description" | "context_network-description" | "tab_databases" | "tab_nodes" | "tab_storage" | "tab_network" | "tab_versions" | "tab_tablets" | "tab_events" | "tab_configs" | "title_healthcheck-dashboard" | "action_download-healthcheck", params?: import("@gravity-ui/i18n").Params) => string;
|
|
2
2
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ValueOf } from '../../types/common';
|
|
2
2
|
export declare const clusterTabsIds: {
|
|
3
|
-
readonly tenants: "
|
|
3
|
+
readonly tenants: "databases";
|
|
4
4
|
readonly nodes: "nodes";
|
|
5
5
|
readonly storage: "storage";
|
|
6
6
|
readonly network: "network";
|
|
@@ -11,7 +11,7 @@ export declare const clusterTabsIds: {
|
|
|
11
11
|
};
|
|
12
12
|
export type ClusterTab = ValueOf<typeof clusterTabsIds>;
|
|
13
13
|
export declare const clusterTabs: ({
|
|
14
|
-
id: "
|
|
14
|
+
id: "databases";
|
|
15
15
|
readonly title: string;
|
|
16
16
|
} | {
|
|
17
17
|
id: "nodes";
|
|
@@ -2,7 +2,7 @@ import { useEmMetaAvailable } from '../../store/reducers/capabilities/hooks';
|
|
|
2
2
|
import { uiFactory } from '../../uiFactory/uiFactory';
|
|
3
3
|
import i18n from './i18n';
|
|
4
4
|
export const clusterTabsIds = {
|
|
5
|
-
tenants: '
|
|
5
|
+
tenants: 'databases',
|
|
6
6
|
nodes: 'nodes',
|
|
7
7
|
storage: 'storage',
|
|
8
8
|
network: 'network',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/containers/Cluster/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,yCAAyC,CAAC;AAE3E,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAEpD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/containers/Cluster/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,yCAAyC,CAAC;AAE3E,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAEpD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACZ,CAAC;AAIX,MAAM,OAAO,GAAG;IACZ,EAAE,EAAE,cAAc,CAAC,OAAO;IAC1B,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC;IACjC,CAAC;CACJ,CAAC;AACF,MAAM,KAAK,GAAG;IACV,EAAE,EAAE,cAAc,CAAC,KAAK;IACxB,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7B,CAAC;CACJ,CAAC;AACF,MAAM,OAAO,GAAG;IACZ,EAAE,EAAE,cAAc,CAAC,OAAO;IAC1B,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC;IAC/B,CAAC;CACJ,CAAC;AACF,MAAM,OAAO,GAAG;IACZ,EAAE,EAAE,cAAc,CAAC,OAAO;IAC1B,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC;IAC/B,CAAC;CACJ,CAAC;AACF,MAAM,QAAQ,GAAG;IACb,EAAE,EAAE,cAAc,CAAC,QAAQ;IAC3B,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC;IAChC,CAAC;CACJ,CAAC;AACF,MAAM,OAAO,GAAG;IACZ,EAAE,EAAE,cAAc,CAAC,OAAO;IAC1B,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC;IAC/B,CAAC;CACJ,CAAC;AACF,MAAM,MAAM,GAAG;IACX,EAAE,EAAE,cAAc,CAAC,MAAM;IACzB,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC;IAC9B,CAAC;CACJ,CAAC;AACF,MAAM,OAAO,GAAG;IACZ,EAAE,EAAE,cAAc,CAAC,OAAO;IAC1B,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC;IAC/B,CAAC;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAElG,MAAM,UAAU,YAAY,CAAC,GAAQ;IACjC,OAAO,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,sBAAsB;IAClC,OAAO,kBAAkB,EAAE,IAAI,SAAS,CAAC,YAAY,CAAC;AAC1D,CAAC"}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
"controls_select-placeholder": "All",
|
|
7
7
|
"statistics_clusters": "Clusters",
|
|
8
8
|
"statistics_hosts": "Hosts",
|
|
9
|
-
"statistics_tenants": "Tenants",
|
|
10
9
|
"statistics_nodes": "Nodes",
|
|
11
10
|
"statistics_load": "Load",
|
|
12
11
|
"statistics_storage": "Storage",
|
|
@@ -18,7 +17,7 @@
|
|
|
18
17
|
"entities-count": "{{value}} of {{capacity}}",
|
|
19
18
|
"page_title": "Clusters",
|
|
20
19
|
"edit-cluster": "Edit Cluster",
|
|
21
|
-
"remove-cluster": "
|
|
20
|
+
"remove-cluster": "Delete Cluster",
|
|
22
21
|
"field_cluster": "Cluster",
|
|
23
22
|
"field_versions": "Versions",
|
|
24
23
|
"field_compute-versions": "Compute versions",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (key: "field_nodes" | "controls_search-placeholder" | "controls_status-select-label" | "controls_service-select-label" | "controls_version-select-label" | "controls_select-placeholder" | "statistics_clusters" | "statistics_hosts" | "
|
|
1
|
+
declare const _default: (key: "field_nodes" | "controls_search-placeholder" | "controls_status-select-label" | "controls_service-select-label" | "controls_version-select-label" | "controls_select-placeholder" | "statistics_clusters" | "statistics_hosts" | "statistics_nodes" | "statistics_load" | "statistics_storage" | "tooltip_no-cluster-data" | "clusters-count" | "entities-count" | "page_title" | "edit-cluster" | "remove-cluster" | "field_cluster" | "field_versions" | "field_compute-versions" | "field_storage-versions" | "field_dc" | "field_service" | "field_domain" | "field_status" | "field_load" | "field_storage" | "field_hosts" | "field_databases" | "field_description", params?: import("@gravity-ui/i18n").Params) => string;
|
|
2
2
|
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ClusterLinkWithTitle } from '../../types/additionalProps';
|
|
2
|
+
interface ClusterMonitoringControlProps {
|
|
3
|
+
link: ClusterLinkWithTitle;
|
|
4
|
+
}
|
|
5
|
+
export declare function ClusterMonitoringControl({ link }: ClusterMonitoringControlProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ActionTooltip, Button, Icon } from '@gravity-ui/uikit';
|
|
3
|
+
import { headerKeyset } from './i18n';
|
|
4
|
+
export function ClusterMonitoringControl({ link }) {
|
|
5
|
+
return (_jsx(ActionTooltip, { title: link.description || '', disabled: !link.description, children: _jsxs(Button, { view: "flat", href: link.url, target: "_blank", children: [link.icon && _jsx(Icon, { data: link.icon }), headerKeyset('title_monitoring', { system: link.title })] }) }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ClusterMonitoringControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClusterMonitoringControl.js","sourceRoot":"","sources":["../../../src/containers/Header/ClusterMonitoringControl.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAI9D,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAMpC,MAAM,UAAU,wBAAwB,CAAC,EAAC,IAAI,EAAgC;IAC1E,OAAO,CACH,KAAC,aAAa,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,WAAW,YACrE,MAAC,MAAM,IAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAC,QAAQ,aAC9C,IAAI,CAAC,IAAI,IAAI,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,EACtC,YAAY,CAAC,kBAAkB,EAAE,EAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAC,CAAC,IAClD,GACG,CACnB,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ClusterLinkWithTitle } from '../../types/additionalProps';
|
|
2
|
+
interface ClusterRightControlsProps {
|
|
3
|
+
clusterLinks: ClusterLinkWithTitle[];
|
|
4
|
+
showDeveloperUI: boolean;
|
|
5
|
+
handleEditCluster?: () => Promise<boolean>;
|
|
6
|
+
handleDeleteCluster?: () => Promise<boolean>;
|
|
7
|
+
}
|
|
8
|
+
export declare function ClusterRightControls({ clusterLinks, showDeveloperUI, handleEditCluster, handleDeleteCluster, }: ClusterRightControlsProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|