ydb-embedded-ui 6.4.0 → 6.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/components/AsyncReplicationState/AsyncReplicationState.d.ts +6 -0
- package/dist/components/AsyncReplicationState/AsyncReplicationState.js +20 -0
- package/dist/components/AsyncReplicationState/index.d.ts +1 -0
- package/dist/components/AsyncReplicationState/index.js +1 -0
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +6 -2
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +12 -3
- package/dist/components/Errors/ResponseError/ResponseError.js +3 -0
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.d.ts +1 -2
- package/dist/components/QueryExecutionStatus/QueryExecutionStatus.js +2 -1
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Clusters/Clusters.js +7 -2
- package/dist/containers/Clusters/constants.d.ts +1 -3
- package/dist/containers/Clusters/constants.js +0 -18
- package/dist/containers/PDiskPage/PDiskPage.js +2 -1
- package/dist/containers/PDiskPage/i18n/en.json +2 -1
- package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
- package/dist/containers/Tablet/TabletControls/TabletControls.js +3 -1
- package/dist/containers/Tablet/i18n/en.json +3 -0
- package/dist/containers/Tablet/i18n/index.d.ts +1 -1
- package/dist/containers/Tablet/i18n/index.js +1 -2
- package/dist/containers/Tablets/Tablets.js +2 -1
- package/dist/containers/Tablets/i18n/en.json +2 -1
- package/dist/containers/Tablets/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +2 -0
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +29 -18
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.scss +14 -4
- package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/en.json +2 -1
- package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.js +39 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/Credentials.d.ts +6 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/Credentials.js +14 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/en.json +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/index.js +4 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/index.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/index.js +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.js +34 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.scss +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/en.json +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/index.js +4 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/index.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/index.js +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +2 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +3 -3
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +3 -3
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +20 -6
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.d.ts +2 -2
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +5 -6
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +5 -13
- package/dist/containers/Tenant/Query/Preview/Preview.js +2 -2
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +1 -7
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +18 -19
- package/dist/containers/Tenant/Tenant.js +3 -2
- package/dist/containers/Tenant/utils/schema.js +8 -0
- package/dist/containers/Tenant/utils/schemaActions.js +1 -0
- package/dist/containers/Tenant/utils/schemaControls.js +1 -0
- package/dist/containers/VDiskPage/VDiskPage.js +2 -1
- package/dist/containers/VDiskPage/i18n/en.json +2 -1
- package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
- package/dist/services/api.d.ts +3 -3
- package/dist/services/settings.d.ts +1 -0
- package/dist/services/settings.js +2 -1
- package/dist/store/configureStore.d.ts +0 -4
- package/dist/store/defaultStore.d.ts +0 -2
- package/dist/store/reducers/authentication/authentication.d.ts +187 -7
- package/dist/store/reducers/authentication/authentication.js +12 -3
- package/dist/store/reducers/authentication/types.d.ts +5 -1
- package/dist/store/reducers/cluster/cluster.js +4 -0
- package/dist/store/reducers/executeQuery.d.ts +4 -63
- package/dist/store/reducers/executeQuery.js +38 -34
- package/dist/store/reducers/executeTopQueries/executeTopQueries.js +4 -1
- package/dist/store/reducers/explainQuery/explainQuery.d.ts +9 -0
- package/dist/store/reducers/explainQuery/explainQuery.js +32 -0
- package/dist/store/reducers/explainQuery/types.d.ts +12 -0
- package/dist/store/reducers/explainQuery/utils.d.ts +6 -0
- package/dist/store/reducers/explainQuery/utils.js +40 -0
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +0 -20
- package/dist/store/reducers/host.d.ts +61 -2
- package/dist/store/reducers/index.d.ts +0 -3
- package/dist/store/reducers/index.js +0 -2
- package/dist/store/reducers/node/selectors.d.ts +0 -1
- package/dist/store/reducers/nodesList.d.ts +0 -1
- package/dist/store/reducers/olapStats.js +4 -1
- package/dist/store/reducers/preview.js +4 -1
- package/dist/store/reducers/schema/schema.d.ts +61 -2
- package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +61 -2
- package/dist/store/reducers/shardsWorkload/shardsWorkload.js +4 -1
- package/dist/store/reducers/tablets.d.ts +0 -1
- package/dist/store/reducers/tabletsFilters.d.ts +61 -2
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js +6 -3
- package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.js +6 -3
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +6 -3
- package/dist/store/reducers/tenants/selectors.d.ts +0 -9
- package/dist/store/reducers/topic.d.ts +0 -15
- package/dist/store/utils.d.ts +2 -3
- package/dist/store/utils.js +1 -1
- package/dist/types/api/schema/replication.d.ts +74 -0
- package/dist/types/api/schema/replication.js +7 -0
- package/dist/types/api/schema/schema.d.ts +4 -1
- package/dist/types/api/schema/schema.js +1 -0
- package/dist/types/api/whoami.d.ts +6 -0
- package/dist/types/store/executeQuery.d.ts +2 -9
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +1 -0
- package/dist/utils/monaco/yql/constants.d.ts +2 -0
- package/dist/utils/monaco/yql/constants.js +33 -0
- package/dist/utils/monaco/yql/generateSuggestions.d.ts +1 -0
- package/dist/utils/monaco/yql/generateSuggestions.js +28 -11
- package/dist/utils/monaco/yql/yqlSuggestions.js +6 -1
- package/dist/utils/query.d.ts +5 -3
- package/dist/utils/query.js +27 -4
- package/dist/utils/response.d.ts +4 -0
- package/dist/utils/response.js +9 -0
- package/package.json +3 -3
- package/dist/containers/Tablet/i18n/ru.json +0 -10
- package/dist/store/reducers/explainQuery.d.ts +0 -145
- package/dist/store/reducers/explainQuery.js +0 -94
- package/dist/types/store/explainQuery.d.ts +0 -27
- package/dist/utils/error.d.ts +0 -2
- package/dist/utils/error.js +0 -13
- /package/dist/{types/store/explainQuery.js → store/reducers/explainQuery/types.js} +0 -0
package/README.md
CHANGED
@@ -41,7 +41,7 @@ For API reference, open Swagger UI on http://localhost:8765/viewer/api/.
|
|
41
41
|
Image `cr.yandex/yc/yandex-docker-local-ydb` corresponds to `:latest` tag. It's the latest stable ydb version.
|
42
42
|
|
43
43
|
To test new features, you can use ydb version that is currently in testing mode with `cr.yandex/yc/yandex-docker-local-ydb:edge` image
|
44
|
-
or use a build from `main` brunch with `ghcr.io/ydb-platform/local-ydb:
|
44
|
+
or use a build from `main` brunch with `ghcr.io/ydb-platform/local-ydb:nightly` image.
|
45
45
|
Also you can set specific version like `cr.yandex/yc/yandex-docker-local-ydb:23.1`
|
46
46
|
|
47
47
|
### Custom configuration in dev mode with .env file
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { TReplicationState } from '../../types/api/schema/replication';
|
2
|
+
interface AsyncReplicationStateProps {
|
3
|
+
state?: TReplicationState;
|
4
|
+
}
|
5
|
+
export declare function AsyncReplicationState({ state }: AsyncReplicationStateProps): import("react/jsx-runtime").JSX.Element | null;
|
6
|
+
export {};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { Label } from '@gravity-ui/uikit';
|
3
|
+
export function AsyncReplicationState({ state }) {
|
4
|
+
if (!state) {
|
5
|
+
return null;
|
6
|
+
}
|
7
|
+
if ('StandBy' in state) {
|
8
|
+
return _jsx(Label, { theme: "info", children: "Standby" });
|
9
|
+
}
|
10
|
+
if ('Paused' in state) {
|
11
|
+
return _jsx(Label, { theme: "info", children: "Paused" });
|
12
|
+
}
|
13
|
+
if ('Done' in state) {
|
14
|
+
return _jsx(Label, { theme: "success", children: "Done" });
|
15
|
+
}
|
16
|
+
if ('Error' in state) {
|
17
|
+
return _jsx(Label, { theme: "danger", children: "Error" });
|
18
|
+
}
|
19
|
+
return _jsx(Label, { size: "s", children: "Unknown" });
|
20
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './AsyncReplicationState';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './AsyncReplicationState';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import type { ButtonProps } from '@gravity-ui/uikit';
|
2
|
+
import type { ButtonProps, PopoverProps } from '@gravity-ui/uikit';
|
3
3
|
interface ButtonWithConfirmDialogProps<T, K> {
|
4
4
|
children: React.ReactNode;
|
5
5
|
onConfirmAction: () => Promise<T>;
|
@@ -8,6 +8,10 @@ interface ButtonWithConfirmDialogProps<T, K> {
|
|
8
8
|
buttonDisabled?: ButtonProps['disabled'];
|
9
9
|
buttonView?: ButtonProps['view'];
|
10
10
|
buttonClassName?: ButtonProps['className'];
|
11
|
+
withPopover?: boolean;
|
12
|
+
popoverContent?: PopoverProps['content'];
|
13
|
+
popoverPlacement?: PopoverProps['placement'];
|
14
|
+
popoverDisabled?: PopoverProps['disabled'];
|
11
15
|
}
|
12
|
-
export declare function ButtonWithConfirmDialog<T, K>({ children, onConfirmAction, onConfirmActionSuccess, dialogContent, buttonDisabled, buttonView, buttonClassName, }: ButtonWithConfirmDialogProps<T, K>): import("react/jsx-runtime").JSX.Element;
|
16
|
+
export declare function ButtonWithConfirmDialog<T, K>({ children, onConfirmAction, onConfirmActionSuccess, dialogContent, buttonDisabled, buttonView, buttonClassName, withPopover, popoverContent, popoverPlacement, popoverDisabled, }: ButtonWithConfirmDialogProps<T, K>): import("react/jsx-runtime").JSX.Element;
|
13
17
|
export {};
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
|
-
import { Button } from '@gravity-ui/uikit';
|
3
|
+
import { Button, Popover } from '@gravity-ui/uikit';
|
4
4
|
import { CriticalActionDialog } from '../CriticalActionDialog';
|
5
|
-
export function ButtonWithConfirmDialog({ children, onConfirmAction, onConfirmActionSuccess, dialogContent, buttonDisabled = false, buttonView = 'action', buttonClassName, }) {
|
5
|
+
export function ButtonWithConfirmDialog({ children, onConfirmAction, onConfirmActionSuccess, dialogContent, buttonDisabled = false, buttonView = 'action', buttonClassName, withPopover = false, popoverContent, popoverPlacement = 'right', popoverDisabled = true, }) {
|
6
6
|
const [isConfirmDialogVisible, setIsConfirmDialogVisible] = React.useState(false);
|
7
7
|
const [buttonLoading, setButtonLoading] = React.useState(false);
|
8
8
|
const handleConfirmAction = async () => {
|
@@ -26,7 +26,16 @@ export function ButtonWithConfirmDialog({ children, onConfirmAction, onConfirmAc
|
|
26
26
|
const handleConfirmActionError = () => {
|
27
27
|
setButtonLoading(false);
|
28
28
|
};
|
29
|
+
const renderButton = () => {
|
30
|
+
return (_jsx(Button, { onClick: () => setIsConfirmDialogVisible(true), view: buttonView, disabled: buttonDisabled, loading: !buttonDisabled && buttonLoading, className: buttonClassName, children: children }));
|
31
|
+
};
|
32
|
+
const renderContent = () => {
|
33
|
+
if (withPopover) {
|
34
|
+
return (_jsx(Popover, { content: popoverContent, placement: popoverPlacement, disabled: popoverDisabled, children: renderButton() }));
|
35
|
+
}
|
36
|
+
return renderButton();
|
37
|
+
};
|
29
38
|
return (_jsxs(React.Fragment, { children: [_jsx(CriticalActionDialog, { visible: isConfirmDialogVisible, text: dialogContent, onConfirm: handleConfirmAction, onConfirmActionSuccess: handleConfirmActionSuccess, onConfirmActionError: handleConfirmActionError, onClose: () => {
|
30
39
|
setIsConfirmDialogVisible(false);
|
31
|
-
} }),
|
40
|
+
} }), renderContent()] }));
|
32
41
|
}
|
@@ -2,6 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import i18n from '../i18n';
|
3
3
|
export const ResponseError = ({ error, className, defaultMessage = i18n('responseError.defaultMessage'), }) => {
|
4
4
|
let statusText = '';
|
5
|
+
if (error && typeof error === 'string') {
|
6
|
+
statusText = error;
|
7
|
+
}
|
5
8
|
if (error && typeof error === 'object') {
|
6
9
|
if ('statusText' in error && typeof error.statusText === 'string') {
|
7
10
|
statusText = error.statusText;
|
@@ -1 +1 @@
|
|
1
|
-
export declare const pDiskInfoKeyset: (key: "path" | "type" | "size" | "
|
1
|
+
export declare const pDiskInfoKeyset: (key: "path" | "type" | "size" | "state" | "links" | "guid" | "category" | "device" | "realtime" | "serial-number" | "developer-ui" | "pdisk-page", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import type { AxiosError } from 'axios';
|
2
1
|
import './QueryExecutionStatus.scss';
|
3
2
|
interface QueryExecutionStatusProps {
|
4
3
|
className?: string;
|
5
|
-
error?:
|
4
|
+
error?: unknown;
|
6
5
|
}
|
7
6
|
export declare const QueryExecutionStatus: ({ className, error }: QueryExecutionStatusProps) => import("react/jsx-runtime").JSX.Element;
|
8
7
|
export {};
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { CircleCheck, CircleQuestionFill, CircleXmark } from '@gravity-ui/icons';
|
3
3
|
import { Icon } from '@gravity-ui/uikit';
|
4
|
+
import { isAxiosError } from 'axios';
|
4
5
|
import { cn } from '../../utils/cn';
|
5
6
|
import './QueryExecutionStatus.scss';
|
6
7
|
const b = cn('kv-query-execution-status');
|
7
8
|
export const QueryExecutionStatus = ({ className, error }) => {
|
8
9
|
let icon;
|
9
10
|
let label;
|
10
|
-
if (
|
11
|
+
if (isAxiosError(error) && error.code === 'ECONNABORTED') {
|
11
12
|
icon = _jsx(Icon, { data: CircleQuestionFill });
|
12
13
|
label = 'Connection aborted';
|
13
14
|
}
|
@@ -1 +1 @@
|
|
1
|
-
export declare const vDiskInfoKeyset: (key: "size" | "kind" | "
|
1
|
+
export declare const vDiskInfoKeyset: (key: "size" | "kind" | "yes" | "no" | "links" | "pool-name" | "guid" | "developer-ui" | "slot-id" | "incarnation-guid" | "instance-guid" | "replication-status" | "state-status" | "space-status" | "fresh-rank-satisfaction" | "level-rank-satisfaction" | "front-queues" | "has-unreadable-blobs" | "read-throughput" | "write-throughput" | "vdisk-page", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
@@ -14,7 +14,7 @@ import { useTypedDispatch, useTypedSelector } from '../../utils/hooks';
|
|
14
14
|
import { getMinorVersion } from '../../utils/versions';
|
15
15
|
import { ClustersStatistics } from './ClustersStatistics';
|
16
16
|
import { CLUSTERS_COLUMNS, CLUSTERS_COLUMNS_WIDTH_LS_KEY } from './columns';
|
17
|
-
import {
|
17
|
+
import { COLUMNS_NAMES, COLUMNS_TITLES, DEFAULT_COLUMNS, SELECTED_COLUMNS_KEY } from './constants';
|
18
18
|
import i18n from './i18n';
|
19
19
|
import { b } from './shared';
|
20
20
|
import { useSelectedColumns } from './useSelectedColumns';
|
@@ -67,10 +67,15 @@ export function Clusters() {
|
|
67
67
|
return filterClusters(clusters !== null && clusters !== void 0 ? clusters : [], { clusterName, status, service, version });
|
68
68
|
}, [clusterName, clusters, service, status, version]);
|
69
69
|
const aggregation = React.useMemo(() => aggregateClustersInfo(filteredClusters), [filteredClusters]);
|
70
|
+
const statuses = React.useMemo(() => {
|
71
|
+
return Array.from(new Set((clusters !== null && clusters !== void 0 ? clusters : []).map((cluster) => cluster.status).filter(Boolean)))
|
72
|
+
.sort()
|
73
|
+
.map((el) => ({ value: el, content: el }));
|
74
|
+
}, [clusters]);
|
70
75
|
if (query.isLoading) {
|
71
76
|
return _jsx(Loader, { size: "l" });
|
72
77
|
}
|
73
|
-
return (_jsxs("div", { className: b(), children: [_jsx(Helmet, { children: _jsx("title", { children: i18n('page_title') }) }), _jsx(ClustersStatistics, { stats: aggregation, count: filteredClusters.length }), _jsxs("div", { className: b('controls'), children: [_jsx("div", { className: b('control', { wide: true }), children: _jsx(Search, { placeholder: i18n('controls_search-placeholder'), onChange: changeClusterName, value: clusterName }) }), _jsx("div", { className: b('control'), children: _jsx(Select, { multiple: true, filterable: true, hasClear: true, placeholder: i18n('controls_select-placeholder'), label: i18n('controls_status-select-label'), value: status, options:
|
78
|
+
return (_jsxs("div", { className: b(), children: [_jsx(Helmet, { children: _jsx("title", { children: i18n('page_title') }) }), _jsx(ClustersStatistics, { stats: aggregation, count: filteredClusters.length }), _jsxs("div", { className: b('controls'), children: [_jsx("div", { className: b('control', { wide: true }), children: _jsx(Search, { placeholder: i18n('controls_search-placeholder'), onChange: changeClusterName, value: clusterName }) }), _jsx("div", { className: b('control'), children: _jsx(Select, { multiple: true, filterable: true, hasClear: true, placeholder: i18n('controls_select-placeholder'), label: i18n('controls_status-select-label'), value: status, options: statuses, onUpdate: changeStatus, width: "max" }) }), _jsx("div", { className: b('control'), children: _jsx(Select, { multiple: true, filterable: true, hasClear: true, placeholder: i18n('controls_select-placeholder'), label: i18n('controls_service-select-label'), value: service, options: servicesToSelect, onUpdate: changeService, width: "max" }) }), _jsx("div", { className: b('control'), children: _jsx(Select, { multiple: true, filterable: true, hasClear: true, placeholder: i18n('controls_select-placeholder'), label: i18n('controls_version-select-label'), value: version, options: versions, onUpdate: changeVersion, width: "max" }) }), _jsx("div", { className: b('control'), children: _jsx(TableColumnSetup, { popupWidth: 242, items: columnsToSelect, showStatus: true, onUpdate: setColumns, sortable: false }, "TableColumnSetup") })] }), query.isError ? _jsx(ResponseError, { error: query.error, className: b('error') }) : null, _jsx("div", { className: b('table-wrapper'), children: _jsx("div", { className: b('table-content'), children: _jsx(ResizeableDataTable, { columnsWidthLSKey: CLUSTERS_COLUMNS_WIDTH_LS_KEY, wrapperClassName: b('table'), data: filteredClusters, columns: columnsToShow, settings: Object.assign(Object.assign({}, DEFAULT_TABLE_SETTINGS), { dynamicRender: false }), initialSortOrder: {
|
74
79
|
columnId: COLUMNS_NAMES.TITLE,
|
75
80
|
order: DataTable.ASCENDING,
|
76
81
|
} }) }) })] }));
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import type { SelectOption } from '@gravity-ui/uikit';
|
2
1
|
export declare const SELECTED_COLUMNS_KEY = "selectedColumns";
|
3
2
|
export declare const COLUMNS_NAMES: {
|
4
3
|
readonly TITLE: "title";
|
@@ -15,7 +14,7 @@ export declare const COLUMNS_NAMES: {
|
|
15
14
|
readonly DESCRIPTION: "description";
|
16
15
|
readonly BALANCER: "balancer";
|
17
16
|
};
|
18
|
-
export declare const DEFAULT_COLUMNS: ("nodes" | "storage" | "
|
17
|
+
export declare const DEFAULT_COLUMNS: ("nodes" | "storage" | "status" | "tenants" | "versions" | "service" | "hosts" | "balancer" | "title" | "owner" | "load")[];
|
19
18
|
export declare const COLUMNS_TITLES: {
|
20
19
|
readonly title: "Cluster";
|
21
20
|
readonly versions: "Versions";
|
@@ -31,4 +30,3 @@ export declare const COLUMNS_TITLES: {
|
|
31
30
|
readonly description: "Description";
|
32
31
|
readonly balancer: "Balancer";
|
33
32
|
};
|
34
|
-
export declare const CLUSTER_STATUSES: SelectOption[];
|
@@ -42,21 +42,3 @@ export const COLUMNS_TITLES = {
|
|
42
42
|
[COLUMNS_NAMES.DESCRIPTION]: 'Description',
|
43
43
|
[COLUMNS_NAMES.BALANCER]: 'Balancer',
|
44
44
|
};
|
45
|
-
export const CLUSTER_STATUSES = [
|
46
|
-
{
|
47
|
-
value: 'production',
|
48
|
-
content: 'Production',
|
49
|
-
},
|
50
|
-
{
|
51
|
-
value: 'preprod',
|
52
|
-
content: 'Preprod',
|
53
|
-
},
|
54
|
-
{
|
55
|
-
value: 'testing',
|
56
|
-
content: 'Testing',
|
57
|
-
},
|
58
|
-
{
|
59
|
-
value: 'development',
|
60
|
-
content: 'Development',
|
61
|
-
},
|
62
|
-
];
|
@@ -25,6 +25,7 @@ export function PDiskPage() {
|
|
25
25
|
var _a;
|
26
26
|
const dispatch = useTypedDispatch();
|
27
27
|
const nodesMap = useTypedSelector(selectNodesMap);
|
28
|
+
const { isUserAllowedToMakeChanges } = useTypedSelector((state) => state.authentication);
|
28
29
|
const [{ nodeId, pDiskId }] = useQueryParams({
|
29
30
|
nodeId: StringParam,
|
30
31
|
pDiskId: StringParam,
|
@@ -74,7 +75,7 @@ export function PDiskPage() {
|
|
74
75
|
return (_jsx(DiskPageTitle, { entityName: pDiskPageKeyset('pdisk'), status: getSeverityColor(Severity), id: pDiskId, className: pdiskPageCn('title') }));
|
75
76
|
};
|
76
77
|
const renderControls = () => {
|
77
|
-
return (_jsx("div", { className: pdiskPageCn('controls'), children: _jsxs(ButtonWithConfirmDialog, { onConfirmAction: handleRestart, onConfirmActionSuccess: handleAfterRestart, buttonDisabled: !nodeId || !pDiskId, buttonView: "normal", dialogContent: pDiskPageKeyset('restart-pdisk-dialog'), children: [_jsx(Icon, { data: ArrowRotateLeft }), pDiskPageKeyset('restart-pdisk-button')] }) }));
|
78
|
+
return (_jsx("div", { className: pdiskPageCn('controls'), children: _jsxs(ButtonWithConfirmDialog, { onConfirmAction: handleRestart, onConfirmActionSuccess: handleAfterRestart, buttonDisabled: !nodeId || !pDiskId || !isUserAllowedToMakeChanges, buttonView: "normal", dialogContent: pDiskPageKeyset('restart-pdisk-dialog'), withPopover: true, popoverContent: pDiskPageKeyset('restart-pdisk-not-allowed'), popoverDisabled: isUserAllowedToMakeChanges, children: [_jsx(Icon, { data: ArrowRotateLeft }), pDiskPageKeyset('restart-pdisk-button')] }) }));
|
78
79
|
};
|
79
80
|
const renderInfo = () => {
|
80
81
|
if (pDiskLoading) {
|
@@ -4,5 +4,6 @@
|
|
4
4
|
"groups": "Groups",
|
5
5
|
"node": "Node",
|
6
6
|
"restart-pdisk-button": "Restart PDisk",
|
7
|
-
"restart-pdisk-dialog": "PDisk will be restarted. Do you want to proceed?"
|
7
|
+
"restart-pdisk-dialog": "PDisk will be restarted. Do you want to proceed?",
|
8
|
+
"restart-pdisk-not-allowed": "You don't have enough rights to restart PDisk"
|
8
9
|
}
|
@@ -1 +1 @@
|
|
1
|
-
export declare const pDiskPageKeyset: (key: "node" | "groups" | "fqdn" | "pdisk" | "restart-pdisk-button" | "restart-pdisk-dialog", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
1
|
+
export declare const pDiskPageKeyset: (key: "node" | "groups" | "fqdn" | "pdisk" | "restart-pdisk-button" | "restart-pdisk-dialog" | "restart-pdisk-not-allowed", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
@@ -2,10 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
3
3
|
import { ButtonWithConfirmDialog } from '../../../components/ButtonWithConfirmDialog/ButtonWithConfirmDialog';
|
4
4
|
import { ETabletState } from '../../../types/api/tablet';
|
5
|
+
import { useTypedSelector } from '../../../utils/hooks';
|
5
6
|
import { b } from '../Tablet';
|
6
7
|
import i18n from '../i18n';
|
7
8
|
export const TabletControls = ({ tablet, fetchData }) => {
|
8
9
|
const { TabletId, HiveId } = tablet;
|
10
|
+
const { isUserAllowedToMakeChanges } = useTypedSelector((state) => state.authentication);
|
9
11
|
const _onKillClick = () => {
|
10
12
|
return window.api.killTablet(TabletId);
|
11
13
|
};
|
@@ -21,5 +23,5 @@ export const TabletControls = ({ tablet, fetchData }) => {
|
|
21
23
|
const isDisabledRestart = tablet.State === ETabletState.Stopped;
|
22
24
|
const isDisabledResume = tablet.State !== ETabletState.Stopped && tablet.State !== ETabletState.Dead;
|
23
25
|
const isDisabledStop = tablet.State === ETabletState.Stopped || tablet.State === ETabletState.Deleted;
|
24
|
-
return (_jsxs("div", { className: b('controls'), children: [_jsx(ButtonWithConfirmDialog, { dialogContent: i18n('dialog.kill'), onConfirmAction: _onKillClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledRestart, children: i18n('controls.kill') }), hasHiveId() ? (_jsxs(React.Fragment, { children: [_jsx(ButtonWithConfirmDialog, { dialogContent: i18n('dialog.stop'), onConfirmAction: _onStopClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledStop, children: i18n('controls.stop') }), _jsx(ButtonWithConfirmDialog, { dialogContent: i18n('dialog.resume'), onConfirmAction: _onResumeClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledResume, children: i18n('controls.resume') })] })) : null] }));
|
26
|
+
return (_jsxs("div", { className: b('controls'), children: [_jsx(ButtonWithConfirmDialog, { dialogContent: i18n('dialog.kill'), onConfirmAction: _onKillClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledRestart || !isUserAllowedToMakeChanges, withPopover: true, popoverContent: i18n('controls.kill-not-allowed'), popoverPlacement: 'bottom', popoverDisabled: isUserAllowedToMakeChanges, children: i18n('controls.kill') }), hasHiveId() ? (_jsxs(React.Fragment, { children: [_jsx(ButtonWithConfirmDialog, { dialogContent: i18n('dialog.stop'), onConfirmAction: _onStopClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledStop || !isUserAllowedToMakeChanges, withPopover: true, popoverContent: i18n('controls.stop-not-allowed'), popoverPlacement: 'bottom', popoverDisabled: isUserAllowedToMakeChanges, children: i18n('controls.stop') }), _jsx(ButtonWithConfirmDialog, { dialogContent: i18n('dialog.resume'), onConfirmAction: _onResumeClick, onConfirmActionSuccess: fetchData, buttonClassName: b('control'), buttonDisabled: isDisabledResume || !isUserAllowedToMakeChanges, withPopover: true, popoverContent: i18n('controls.resume-not-allowed'), popoverPlacement: 'bottom', popoverDisabled: isUserAllowedToMakeChanges, children: i18n('controls.resume') })] })) : null] }));
|
25
27
|
};
|
@@ -3,6 +3,9 @@
|
|
3
3
|
"controls.kill": "Restart",
|
4
4
|
"controls.stop": "Stop",
|
5
5
|
"controls.resume": "Resume",
|
6
|
+
"controls.kill-not-allowed": "You don't have enough rights to restart tablet",
|
7
|
+
"controls.stop-not-allowed": "You don't have enough rights to stop tablet",
|
8
|
+
"controls.resume-not-allowed": "You don't have enough rights to resume tablet",
|
6
9
|
"dialog.kill": "The tablet will be restarted. Do you want to proceed?",
|
7
10
|
"dialog.stop": "The tablet will be stopped. Do you want to proceed?",
|
8
11
|
"dialog.resume": "The tablet will be resumed. Do you want to proceed?",
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: (key: "dialog.kill" | "tablet.header" | "controls.kill" | "controls.stop" | "controls.resume" | "dialog.stop" | "dialog.resume" | "emptyState", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
1
|
+
declare const _default: (key: "dialog.kill" | "controls.kill-not-allowed" | "tablet.header" | "controls.kill" | "controls.stop" | "controls.resume" | "controls.stop-not-allowed" | "controls.resume-not-allowed" | "dialog.stop" | "dialog.resume" | "emptyState", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
2
2
|
export default _default;
|
@@ -103,11 +103,12 @@ const columns = [
|
|
103
103
|
function TabletActions(tablet) {
|
104
104
|
const isDisabledRestart = tablet.State === ETabletState.Stopped;
|
105
105
|
const dispatch = useTypedDispatch();
|
106
|
+
const { isUserAllowedToMakeChanges } = useTypedSelector((state) => state.authentication);
|
106
107
|
return (_jsx(ButtonWithConfirmDialog, { buttonView: "outlined", dialogContent: i18n('dialog.kill'), onConfirmAction: () => {
|
107
108
|
return window.api.killTablet(tablet.TabletId);
|
108
109
|
}, onConfirmActionSuccess: () => {
|
109
110
|
dispatch(tabletsApi.util.invalidateTags(['All']));
|
110
|
-
}, buttonDisabled: isDisabledRestart, children: _jsx(Icon, { data: ArrowsRotateRight }) }));
|
111
|
+
}, buttonDisabled: isDisabledRestart || !isUserAllowedToMakeChanges, withPopover: true, popoverContent: i18n('controls.kill-not-allowed'), popoverDisabled: isUserAllowedToMakeChanges, children: _jsx(Icon, { data: ArrowsRotateRight }) }));
|
111
112
|
}
|
112
113
|
export function Tablets({ nodeId, path, className }) {
|
113
114
|
const { autorefresh } = useTypedSelector((state) => state.schema);
|
@@ -7,5 +7,6 @@
|
|
7
7
|
"Node FQDN": "Node FQDN",
|
8
8
|
"Generation": "Generation",
|
9
9
|
"Uptime": "Uptime",
|
10
|
-
"dialog.kill": "The tablet will be restarted. Do you want to proceed?"
|
10
|
+
"dialog.kill": "The tablet will be restarted. Do you want to proceed?",
|
11
|
+
"controls.kill-not-allowed": "You don't have enough rights to restart tablet"
|
11
12
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: (key: "Uptime" | "Type" | "State" | "Generation" | "Tablet" | "Node ID" | "Node FQDN" | "noTabletsData" | "dialog.kill", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
1
|
+
declare const _default: (key: "Uptime" | "Type" | "State" | "Generation" | "Tablet" | "Node ID" | "Node FQDN" | "noTabletsData" | "dialog.kill" | "controls.kill-not-allowed", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
2
2
|
export default _default;
|
@@ -4,6 +4,13 @@ type Page = {
|
|
4
4
|
id: TenantDiagnosticsTab;
|
5
5
|
title: string;
|
6
6
|
};
|
7
|
+
export declare const ASYNC_REPLICATION_PAGES: ({
|
8
|
+
id: "overview";
|
9
|
+
title: string;
|
10
|
+
} | {
|
11
|
+
id: "describe";
|
12
|
+
title: string;
|
13
|
+
})[];
|
7
14
|
export declare const DATABASE_PAGES: ({
|
8
15
|
id: "overview";
|
9
16
|
title: string;
|
@@ -52,6 +52,7 @@ const partitions = {
|
|
52
52
|
id: TENANT_DIAGNOSTICS_TABS_IDS.partitions,
|
53
53
|
title: 'Partitions',
|
54
54
|
};
|
55
|
+
export const ASYNC_REPLICATION_PAGES = [overview, describe];
|
55
56
|
export const DATABASE_PAGES = [
|
56
57
|
overview,
|
57
58
|
topQueries,
|
@@ -86,5 +87,6 @@ const pathTypeToPages = {
|
|
86
87
|
[EPathType.EPathTypeExternalDataSource]: EXTERNAL_DATA_SOURCE_PAGES,
|
87
88
|
[EPathType.EPathTypeExternalTable]: EXTERNAL_TABLE_PAGES,
|
88
89
|
[EPathType.EPathTypeView]: VIEW_PAGES,
|
90
|
+
[EPathType.EPathTypeReplication]: ASYNC_REPLICATION_PAGES,
|
89
91
|
};
|
90
92
|
export const getPagesByType = (type) => (type && pathTypeToPages[type]) || DIR_PAGES;
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
|
+
import { Xmark } from '@gravity-ui/icons';
|
3
4
|
import DataTable from '@gravity-ui/react-data-table';
|
4
|
-
import { Icon } from '@gravity-ui/uikit';
|
5
|
+
import { Button, Card, Icon } from '@gravity-ui/uikit';
|
5
6
|
import { ResponseError } from '../../../../components/Errors/ResponseError';
|
6
7
|
import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
|
7
8
|
import { setHotKeysData, setHotKeysDataWasNotLoaded, setHotKeysError, setHotKeysLoading, } from '../../../../store/reducers/hotKeys/hotKeys';
|
8
9
|
import { cn } from '../../../../utils/cn';
|
9
|
-
import { DEFAULT_TABLE_SETTINGS } from '../../../../utils/constants';
|
10
|
-
import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
|
10
|
+
import { DEFAULT_TABLE_SETTINGS, IS_HOTKEYS_HELP_HIDDDEN_KEY } from '../../../../utils/constants';
|
11
|
+
import { useSetting, useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
|
11
12
|
import i18n from './i18n';
|
12
13
|
import keyIcon from '../../../../assets/icons/key.svg';
|
13
14
|
import './HotKeys.scss';
|
@@ -25,6 +26,7 @@ const getHotKeysColumns = (keyColumnsIds = []) => {
|
|
25
26
|
sortable: false,
|
26
27
|
}));
|
27
28
|
return [
|
29
|
+
...keysColumns,
|
28
30
|
{
|
29
31
|
name: tableColumnsIds.accessSample,
|
30
32
|
header: 'Samples',
|
@@ -32,12 +34,12 @@ const getHotKeysColumns = (keyColumnsIds = []) => {
|
|
32
34
|
align: DataTable.RIGHT,
|
33
35
|
sortable: false,
|
34
36
|
},
|
35
|
-
...keysColumns,
|
36
37
|
];
|
37
38
|
};
|
38
39
|
export function HotKeys({ path }) {
|
39
40
|
var _a, _b, _c;
|
40
41
|
const dispatch = useTypedDispatch();
|
42
|
+
const [helpHidden, setHelpHidden] = useSetting(IS_HOTKEYS_HELP_HIDDDEN_KEY);
|
41
43
|
const collectSamplesTimerRef = React.useRef();
|
42
44
|
const { loading, wasLoaded, data, error } = useTypedSelector((state) => state.hotKeys);
|
43
45
|
const { loading: schemaLoading, data: schemaData } = useTypedSelector((state) => state.schema);
|
@@ -85,18 +87,27 @@ export function HotKeys({ path }) {
|
|
85
87
|
};
|
86
88
|
fetchData();
|
87
89
|
}, [dispatch, path]);
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
90
|
+
const renderContent = () => {
|
91
|
+
// It takes a while to collect hot keys. Display explicit status message, while collecting
|
92
|
+
if ((loading && !wasLoaded) || schemaLoading) {
|
93
|
+
return _jsx("div", { children: i18n('hot-keys-collecting') });
|
94
|
+
}
|
95
|
+
if (error) {
|
96
|
+
return _jsx(ResponseError, { error: error });
|
97
|
+
}
|
98
|
+
if (!data) {
|
99
|
+
return _jsx("div", { children: i18n('no-data') });
|
100
|
+
}
|
101
|
+
return (_jsx(ResizeableDataTable, { wrapperClassName: b('table'), columns: tableColumns, data: data, settings: DEFAULT_TABLE_SETTINGS, initialSortOrder: {
|
102
|
+
columnId: tableColumnsIds.accessSample,
|
103
|
+
order: DataTable.DESCENDING,
|
104
|
+
} }));
|
105
|
+
};
|
106
|
+
const renderHelpCard = () => {
|
107
|
+
if (helpHidden) {
|
108
|
+
return null;
|
109
|
+
}
|
110
|
+
return (_jsxs(Card, { theme: "info", view: "filled", type: "container", className: b('help-card'), children: [i18n('help'), _jsx(Button, { className: b('help-card__close-button'), view: "flat", onClick: () => setHelpHidden(true), children: _jsx(Icon, { data: Xmark, size: 18 }) })] }));
|
111
|
+
};
|
112
|
+
return (_jsxs(React.Fragment, { children: [renderHelpCard(), renderContent()] }));
|
102
113
|
}
|
@@ -1,13 +1,23 @@
|
|
1
1
|
@import '../../../../styles/mixins.scss';
|
2
2
|
|
3
3
|
.ydb-hot-keys {
|
4
|
-
&__table {
|
5
|
-
@include freeze-nth-column(1);
|
6
|
-
}
|
7
|
-
|
8
4
|
&__primary-key-column {
|
9
5
|
display: flex;
|
10
6
|
align-items: center;
|
11
7
|
gap: 5px;
|
12
8
|
}
|
9
|
+
|
10
|
+
&__help-card {
|
11
|
+
position: sticky;
|
12
|
+
left: 0;
|
13
|
+
|
14
|
+
margin-bottom: 20px;
|
15
|
+
padding: 20px 40px 20px 20px;
|
16
|
+
|
17
|
+
&__close-button {
|
18
|
+
position: absolute;
|
19
|
+
top: 5px;
|
20
|
+
right: 5px;
|
21
|
+
}
|
22
|
+
}
|
13
23
|
}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
{
|
2
2
|
"hot-keys-collecting": "Please wait a little while we are collecting hot keys samples...",
|
3
|
-
"no-data": "No information about hot keys"
|
3
|
+
"no-data": "No information about hot keys",
|
4
|
+
"help": "Hot keys contains a list of table primary key values that are accessed most often. Sample is collected upon request to the tab during 5s time interval. Samples column indicates how many requests to the particular key value were registered during collection phase."
|
4
5
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: (key: "no-data" | "hot-keys-collecting", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
1
|
+
declare const _default: (key: "no-data" | "hot-keys-collecting" | "help", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
2
2
|
export default _default;
|
package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.d.ts
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { TEvDescribeSchemeResult } from '../../../../../types/api/schema';
|
2
|
+
interface AsyncReplicationProps {
|
3
|
+
data?: TEvDescribeSchemeResult;
|
4
|
+
}
|
5
|
+
/** Displays overview for Replication EPathType */
|
6
|
+
export declare function AsyncReplicationInfo({ data }: AsyncReplicationProps): import("react/jsx-runtime").JSX.Element;
|
7
|
+
export {};
|
package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.js
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Flex, Text } from '@gravity-ui/uikit';
|
3
|
+
import { AsyncReplicationState } from '../../../../../components/AsyncReplicationState';
|
4
|
+
import { InfoViewer } from '../../../../../components/InfoViewer';
|
5
|
+
import { useTypedSelector } from '../../../../../utils/hooks';
|
6
|
+
import { getEntityName } from '../../../utils';
|
7
|
+
import { AsyncReplicationPaths } from '../AsyncReplicationPaths';
|
8
|
+
import { Credentials } from './Credentials';
|
9
|
+
import i18n from './i18n';
|
10
|
+
/** Displays overview for Replication EPathType */
|
11
|
+
export function AsyncReplicationInfo({ data }) {
|
12
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
13
|
+
const entityName = getEntityName(data === null || data === void 0 ? void 0 : data.PathDescription);
|
14
|
+
const { error: schemaError } = useTypedSelector((state) => state.schema);
|
15
|
+
if (schemaError) {
|
16
|
+
return _jsx("div", { className: "error", children: schemaError.statusText });
|
17
|
+
}
|
18
|
+
if (!data) {
|
19
|
+
return (_jsxs("div", { className: "error", children: [i18n('noData'), " ", entityName] }));
|
20
|
+
}
|
21
|
+
return (_jsxs(Flex, { direction: "column", gap: "4", children: [_jsx(InfoViewer, { title: entityName, info: [
|
22
|
+
{
|
23
|
+
label: i18n('state.label'),
|
24
|
+
value: (_jsx(AsyncReplicationState, { state: (_b = (_a = data.PathDescription) === null || _a === void 0 ? void 0 : _a.ReplicationDescription) === null || _b === void 0 ? void 0 : _b.State })),
|
25
|
+
},
|
26
|
+
{
|
27
|
+
label: i18n('srcConnection.endpoint.label'),
|
28
|
+
value: (_jsx(Text, { variant: "code-inline-2", children: (_f = (_e = (_d = (_c = data.PathDescription) === null || _c === void 0 ? void 0 : _c.ReplicationDescription) === null || _d === void 0 ? void 0 : _d.Config) === null || _e === void 0 ? void 0 : _e.SrcConnectionParams) === null || _f === void 0 ? void 0 : _f.Endpoint })),
|
29
|
+
},
|
30
|
+
{
|
31
|
+
label: i18n('srcConnection.database.label'),
|
32
|
+
value: (_jsx(Text, { variant: "code-inline-2", children: (_k = (_j = (_h = (_g = data.PathDescription) === null || _g === void 0 ? void 0 : _g.ReplicationDescription) === null || _h === void 0 ? void 0 : _h.Config) === null || _j === void 0 ? void 0 : _j.SrcConnectionParams) === null || _k === void 0 ? void 0 : _k.Database })),
|
33
|
+
},
|
34
|
+
{
|
35
|
+
label: i18n('credentials.label'),
|
36
|
+
value: (_jsx(Credentials, { connection: (_o = (_m = (_l = data.PathDescription) === null || _l === void 0 ? void 0 : _l.ReplicationDescription) === null || _m === void 0 ? void 0 : _m.Config) === null || _o === void 0 ? void 0 : _o.SrcConnectionParams })),
|
37
|
+
},
|
38
|
+
] }), _jsx(AsyncReplicationPaths, { config: (_q = (_p = data.PathDescription) === null || _p === void 0 ? void 0 : _p.ReplicationDescription) === null || _q === void 0 ? void 0 : _q.Config })] }));
|
39
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { TConnectionParams } from '../../../../../types/api/schema/replication';
|
2
|
+
interface CredentialsProps {
|
3
|
+
connection?: TConnectionParams;
|
4
|
+
}
|
5
|
+
export declare function Credentials({ connection }: CredentialsProps): "unknown" | import("react/jsx-runtime").JSX.Element | "OAuth" | null;
|
6
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { Label } from '@gravity-ui/uikit';
|
3
|
+
export function Credentials({ connection }) {
|
4
|
+
if (!connection) {
|
5
|
+
return null;
|
6
|
+
}
|
7
|
+
if (connection.StaticCredentials) {
|
8
|
+
return (_jsx(Label, { value: connection.StaticCredentials.User, theme: "normal", children: "user" }));
|
9
|
+
}
|
10
|
+
if ('OAuthToken' in connection) {
|
11
|
+
return 'OAuth';
|
12
|
+
}
|
13
|
+
return 'unknown';
|
14
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './AsyncReplicationInfo';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './AsyncReplicationInfo';
|
package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.d.ts
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { TReplicationConfig } from '../../../../../types/api/schema/replication';
|
2
|
+
import './AsyncReplicationPaths.scss';
|
3
|
+
interface AsyncReplicationPathsProps {
|
4
|
+
config?: TReplicationConfig;
|
5
|
+
}
|
6
|
+
export declare function AsyncReplicationPaths({ config }: AsyncReplicationPathsProps): import("react/jsx-runtime").JSX.Element | null;
|
7
|
+
export {};
|