ydb-embedded-ui 20.3.0 → 20.4.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/components/Drawer/Drawer.d.ts +2 -1
- package/dist/components/Drawer/Drawer.js +4 -4
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/EntityStatus/EntityStatus.d.ts +4 -1
- package/dist/components/EntityStatus/EntityStatus.js +2 -2
- package/dist/components/EntityStatus/EntityStatus.js.map +1 -1
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/TenantNameWrapper/utils.d.ts +1 -1
- package/dist/components/TenantNameWrapper/utils.js.map +1 -1
- package/dist/containers/Cluster/Cluster.js +1 -1
- package/dist/containers/Cluster/Cluster.js.map +1 -1
- package/dist/containers/Cluster/ClusterDrawerHealthcheck.d.ts +8 -0
- package/dist/containers/Cluster/ClusterDrawerHealthcheck.js +71 -9
- package/dist/containers/Cluster/ClusterDrawerHealthcheck.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.d.ts +2 -1
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +2 -2
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js.map +1 -1
- package/dist/containers/Cluster/ClusterOverview/ClusterOverview.d.ts +1 -0
- package/dist/containers/Cluster/ClusterOverview/ClusterOverview.js.map +1 -1
- package/dist/containers/Cluster/ClusterOverview/components/BridgeInfoTable.d.ts +2 -0
- package/dist/containers/Cluster/ClusterOverview/components/BridgeInfoTable.js +54 -103
- package/dist/containers/Cluster/ClusterOverview/components/BridgeInfoTable.js.map +1 -1
- package/dist/containers/Cluster/ClusterOverview/components/BridgeInfoTable.scss +24 -89
- package/dist/containers/Cluster/ClusterOverview/components/bridgePileHealthcheck.d.ts +13 -0
- package/dist/containers/Cluster/ClusterOverview/components/bridgePileHealthcheck.js +94 -0
- package/dist/containers/Cluster/ClusterOverview/components/bridgePileHealthcheck.js.map +1 -0
- package/dist/containers/Cluster/i18n/en.json +8 -5
- package/dist/containers/Cluster/i18n/index.d.ts +1 -1
- package/dist/containers/Clusters/constants.d.ts +1 -1
- package/dist/containers/Header/DatabaseRightControls.d.ts +4 -2
- package/dist/containers/Header/DatabaseRightControls.js +2 -2
- package/dist/containers/Header/DatabaseRightControls.js.map +1 -1
- package/dist/containers/Header/Header.js +2 -2
- package/dist/containers/Header/Header.js.map +1 -1
- package/dist/containers/Header/HeaderActionsMenu.d.ts +4 -2
- package/dist/containers/Header/HeaderActionsMenu.js +19 -2
- package/dist/containers/Header/HeaderActionsMenu.js.map +1 -1
- package/dist/containers/Header/HeaderRightControls.d.ts +4 -2
- package/dist/containers/Header/HeaderRightControls.js +2 -2
- package/dist/containers/Header/HeaderRightControls.js.map +1 -1
- package/dist/containers/Header/hooks/useClusterData.d.ts +1 -0
- package/dist/containers/Header/hooks/useHeaderData.d.ts +1 -0
- package/dist/containers/Header/hooks/useHeaderData.js +1 -0
- package/dist/containers/Header/hooks/useHeaderData.js.map +1 -1
- package/dist/containers/Header/hooks/useSharedDatabasePath.d.ts +10 -0
- package/dist/containers/Header/hooks/useSharedDatabasePath.js +102 -0
- package/dist/containers/Header/hooks/useSharedDatabasePath.js.map +1 -0
- package/dist/containers/Header/i18n/en.json +1 -0
- package/dist/containers/Header/i18n/index.d.ts +1 -1
- package/dist/containers/Operations/constants.d.ts +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/i18n/index.d.ts +1 -1
- package/dist/containers/Tablets/Tablets.js +3 -3
- package/dist/containers/Tablets/Tablets.js.map +1 -1
- package/dist/containers/Tablets/TabletsTable.js +17 -27
- package/dist/containers/Tablets/TabletsTable.js.map +1 -1
- package/dist/containers/Tablets/i18n/en.json +3 -0
- package/dist/containers/Tablets/i18n/index.d.ts +1 -1
- package/dist/containers/Tablets/useTabletQueryParams.d.ts +8 -0
- package/dist/containers/Tablets/useTabletQueryParams.js +40 -0
- package/dist/containers/Tablets/useTabletQueryParams.js.map +1 -0
- package/dist/containers/Tablets/utils.d.ts +11 -0
- package/dist/containers/Tablets/utils.js +23 -0
- package/dist/containers/Tablets/utils.js.map +1 -0
- package/dist/containers/Tenant/Healthcheck/Healthcheck.d.ts +6 -1
- package/dist/containers/Tenant/Healthcheck/Healthcheck.js +5 -5
- package/dist/containers/Tenant/Healthcheck/Healthcheck.js.map +1 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.d.ts +2 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.js +2 -2
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.js.map +1 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssue.d.ts +5 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssue.js +5 -3
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssue.js.map +1 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/ComputeLocation.d.ts +1 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/ComputeLocation.js +11 -2
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/ComputeLocation.js.map +1 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/NodeInfo.js +2 -0
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/NodeInfo.js.map +1 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/StorageLocation.js +4 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/StorageLocation.js.map +1 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssues.d.ts +5 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssues.js +2 -2
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssues.js.map +1 -1
- package/dist/containers/Tenant/Healthcheck/i18n/en.json +2 -1
- package/dist/containers/Tenant/Healthcheck/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.scss +2 -0
- package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
- package/dist/routes.d.ts +4 -1
- package/dist/routes.js +3 -2
- package/dist/routes.js.map +1 -1
- package/dist/services/api/viewer.d.ts +3 -1
- package/dist/services/api/viewer.js +3 -2
- package/dist/services/api/viewer.js.map +1 -1
- package/dist/store/reducers/cluster/cluster.d.ts +2 -1
- package/dist/store/reducers/cluster/cluster.js +1 -0
- package/dist/store/reducers/cluster/cluster.js.map +1 -1
- package/dist/store/reducers/healthcheckInfo/types.d.ts +1 -0
- package/dist/store/reducers/healthcheckInfo/utils.d.ts +1 -0
- package/dist/store/reducers/healthcheckInfo/utils.js +43 -9
- package/dist/store/reducers/healthcheckInfo/utils.js.map +1 -1
- package/dist/store/reducers/tenants/tenants.d.ts +10 -1
- package/dist/store/reducers/tenants/tenants.js +33 -0
- package/dist/store/reducers/tenants/tenants.js.map +1 -1
- package/dist/store/reducers/tenants/types.d.ts +4 -0
- package/dist/types/api/healthcheck.d.ts +7 -0
- package/package.json +1 -1
- package/src/components/Drawer/Drawer.tsx +6 -0
- package/src/components/EntityStatus/EntityStatus.tsx +9 -1
- package/src/components/TenantNameWrapper/utils.ts +1 -1
- package/src/containers/Cluster/Cluster.tsx +1 -0
- package/src/containers/Cluster/ClusterDrawerHealthcheck.tsx +112 -13
- package/src/containers/Cluster/ClusterInfo/ClusterInfo.tsx +7 -1
- package/src/containers/Cluster/ClusterOverview/ClusterOverview.tsx +1 -0
- package/src/containers/Cluster/ClusterOverview/components/BridgeInfoTable.scss +24 -89
- package/src/containers/Cluster/ClusterOverview/components/BridgeInfoTable.tsx +156 -200
- package/src/containers/Cluster/ClusterOverview/components/bridgePileHealthcheck.ts +142 -0
- package/src/containers/Cluster/i18n/en.json +8 -5
- package/src/containers/Header/DatabaseRightControls.tsx +7 -1
- package/src/containers/Header/Header.tsx +3 -0
- package/src/containers/Header/HeaderActionsMenu.tsx +24 -2
- package/src/containers/Header/HeaderRightControls.tsx +7 -1
- package/src/containers/Header/hooks/useHeaderData.ts +1 -0
- package/src/containers/Header/hooks/useSharedDatabasePath.ts +195 -0
- package/src/containers/Header/i18n/en.json +1 -0
- package/src/containers/Tablets/Tablets.tsx +3 -3
- package/src/containers/Tablets/TabletsTable.tsx +37 -31
- package/src/containers/Tablets/i18n/en.json +3 -0
- package/src/containers/Tablets/useTabletQueryParams.ts +54 -0
- package/src/containers/Tablets/utils.ts +43 -0
- package/src/containers/Tenant/Healthcheck/Healthcheck.tsx +37 -4
- package/src/containers/Tenant/Healthcheck/components/HealthcheckDrawer.tsx +3 -0
- package/src/containers/Tenant/Healthcheck/components/HealthcheckIssue.tsx +17 -4
- package/src/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/ComputeLocation.tsx +13 -3
- package/src/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/NodeInfo.tsx +1 -0
- package/src/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/StorageLocation.tsx +3 -1
- package/src/containers/Tenant/Healthcheck/components/HealthcheckIssues.tsx +15 -2
- package/src/containers/Tenant/Healthcheck/i18n/en.json +2 -1
- package/src/containers/Tenant/Query/SavedQueries/SavedQueries.scss +2 -0
- package/src/routes.ts +8 -2
- package/src/services/api/viewer.ts +10 -2
- package/src/store/reducers/cluster/cluster.ts +2 -1
- package/src/store/reducers/healthcheckInfo/types.ts +1 -0
- package/src/store/reducers/healthcheckInfo/utils.ts +50 -10
- package/src/store/reducers/tenants/tenants.ts +55 -1
- package/src/store/reducers/tenants/types.ts +5 -0
- package/src/types/api/healthcheck.ts +8 -0
|
@@ -1,42 +1,46 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ArrowChevronRight, Ban,
|
|
4
|
-
import { Flex, Icon, Text } from '@gravity-ui/uikit';
|
|
3
|
+
import { Archive, ArrowChevronRight, Ban, ChevronRight, CirclePause, LinkSlash, MapPin, } from '@gravity-ui/icons';
|
|
4
|
+
import { Flex, Icon, Label, Text } from '@gravity-ui/uikit';
|
|
5
|
+
import { EntityStatus } from '../../../../components/EntityStatus/EntityStatus';
|
|
5
6
|
import { LabelWithHelpMark } from '../../../../components/LabelWithHelpMark/LabelWithHelpMark';
|
|
6
|
-
import {
|
|
7
|
+
import { Skeleton } from '../../../../components/Skeleton/Skeleton';
|
|
8
|
+
import { healthcheckApi, selectLeavesIssues, } from '../../../../store/reducers/healthcheckInfo/healthcheckInfo';
|
|
9
|
+
import { BridgePileState } from '../../../../types/api/cluster';
|
|
7
10
|
import { cn } from '../../../../utils/cn';
|
|
8
11
|
import { EMPTY_DATA_PLACEHOLDER } from '../../../../utils/constants';
|
|
9
12
|
import { formatNumber } from '../../../../utils/dataFormatters/dataFormatters';
|
|
13
|
+
import { useAutoRefreshInterval, useTypedSelector } from '../../../../utils/hooks';
|
|
14
|
+
import { useClusterHealthcheckQueryParams } from '../../ClusterDrawerHealthcheck';
|
|
10
15
|
import i18n from '../../i18n';
|
|
16
|
+
import { getBridgePileHealthcheck } from './bridgePileHealthcheck';
|
|
11
17
|
import './BridgeInfoTable.scss';
|
|
12
18
|
const b = cn('ydb-bridge-info-table');
|
|
13
|
-
const progressB = cn('ydb-bridge-info-table-progress');
|
|
14
|
-
const legendB = cn('ydb-bridge-info-table-legend');
|
|
15
19
|
function getBridgePileStateInfo(state) {
|
|
16
20
|
switch (state) {
|
|
17
21
|
case BridgePileState.PRIMARY:
|
|
18
22
|
return {
|
|
19
23
|
label: i18n('value_bridge-state-primary'),
|
|
20
24
|
theme: 'normal',
|
|
25
|
+
help: i18n('context_bridge-pile-state-primary'),
|
|
21
26
|
};
|
|
22
27
|
case BridgePileState.PROMOTED:
|
|
23
28
|
return {
|
|
24
29
|
label: i18n('value_bridge-state-promoted'),
|
|
25
|
-
theme: '
|
|
30
|
+
theme: 'info',
|
|
26
31
|
icon: _jsx(Icon, { data: ArrowChevronRight, size: 12 }),
|
|
27
32
|
help: i18n('context_bridge-pile-state-promoted'),
|
|
28
33
|
};
|
|
29
34
|
case BridgePileState.SYNCHRONIZED:
|
|
30
35
|
return {
|
|
31
36
|
label: i18n('value_bridge-state-synchronised'),
|
|
32
|
-
theme: '
|
|
33
|
-
icon: _jsx(Icon, { data: CircleCheck, size: 12 }),
|
|
37
|
+
theme: 'normal',
|
|
34
38
|
help: i18n('context_bridge-pile-state-synchronised'),
|
|
35
39
|
};
|
|
36
40
|
case BridgePileState.NOT_SYNCHRONIZED:
|
|
37
41
|
return {
|
|
38
42
|
label: i18n('value_bridge-state-not-synchronised'),
|
|
39
|
-
theme: '
|
|
43
|
+
theme: 'warning',
|
|
40
44
|
icon: _jsx(Icon, { data: Ban, size: 12 }),
|
|
41
45
|
help: i18n('context_bridge-pile-state-not-synchronised'),
|
|
42
46
|
};
|
|
@@ -50,7 +54,7 @@ function getBridgePileStateInfo(state) {
|
|
|
50
54
|
case BridgePileState.DISCONNECTED:
|
|
51
55
|
return {
|
|
52
56
|
label: i18n('value_bridge-state-disconnected'),
|
|
53
|
-
theme: '
|
|
57
|
+
theme: 'danger',
|
|
54
58
|
icon: _jsx(Icon, { data: LinkSlash, size: 12 }),
|
|
55
59
|
help: i18n('context_bridge-pile-state-disconnected'),
|
|
56
60
|
};
|
|
@@ -66,99 +70,14 @@ function getBridgePileStateInfo(state) {
|
|
|
66
70
|
};
|
|
67
71
|
}
|
|
68
72
|
}
|
|
69
|
-
function
|
|
70
|
-
if (nodes === undefined) {
|
|
71
|
-
return EMPTY_DATA_PLACEHOLDER;
|
|
72
|
-
}
|
|
73
|
-
return i18n('value_nodes', {
|
|
74
|
-
count: nodes,
|
|
75
|
-
formattedCount: formatNumber(nodes),
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
function getBridgePileGroupStatusInfo(status) {
|
|
79
|
-
switch (status) {
|
|
80
|
-
case BridgePileGroupStatus.UNKNOWN:
|
|
81
|
-
return {
|
|
82
|
-
label: i18n('value_bridge-group-status-unknown'),
|
|
83
|
-
theme: 'secondary',
|
|
84
|
-
};
|
|
85
|
-
case BridgePileGroupStatus.FULL:
|
|
86
|
-
return {
|
|
87
|
-
label: i18n('value_bridge-group-status-full'),
|
|
88
|
-
theme: 'positive',
|
|
89
|
-
};
|
|
90
|
-
case BridgePileGroupStatus.PARTIAL:
|
|
91
|
-
return {
|
|
92
|
-
label: i18n('value_bridge-group-status-partial'),
|
|
93
|
-
theme: 'warning',
|
|
94
|
-
};
|
|
95
|
-
case BridgePileGroupStatus.DEGRADED:
|
|
96
|
-
return {
|
|
97
|
-
label: i18n('value_bridge-group-status-degraded'),
|
|
98
|
-
theme: 'danger',
|
|
99
|
-
};
|
|
100
|
-
case BridgePileGroupStatus.DISINTEGRATED:
|
|
101
|
-
return {
|
|
102
|
-
label: i18n('value_bridge-group-status-disintegrated'),
|
|
103
|
-
theme: 'dark-complementary',
|
|
104
|
-
};
|
|
105
|
-
default:
|
|
106
|
-
return {
|
|
107
|
-
label: EMPTY_DATA_PLACEHOLDER,
|
|
108
|
-
theme: 'secondary',
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
function getBridgePileGroupStatus(status) {
|
|
113
|
-
if (Object.values(BridgePileGroupStatus).includes(status)) {
|
|
114
|
-
return status;
|
|
115
|
-
}
|
|
116
|
-
return undefined;
|
|
117
|
-
}
|
|
118
|
-
function prepareGroupStatuses(groupStatuses) {
|
|
119
|
-
return Object.entries(groupStatuses !== null && groupStatuses !== void 0 ? groupStatuses : {})
|
|
120
|
-
.map(([status, value]) => {
|
|
121
|
-
const groupStatus = getBridgePileGroupStatus(status);
|
|
122
|
-
const { label, theme } = groupStatus
|
|
123
|
-
? getBridgePileGroupStatusInfo(groupStatus)
|
|
124
|
-
: { label: status, theme: 'secondary' };
|
|
125
|
-
const numericValue = Number(value);
|
|
126
|
-
if (!Number.isFinite(numericValue) || numericValue <= 0) {
|
|
127
|
-
return undefined;
|
|
128
|
-
}
|
|
129
|
-
return {
|
|
130
|
-
label,
|
|
131
|
-
theme,
|
|
132
|
-
value: numericValue,
|
|
133
|
-
};
|
|
134
|
-
})
|
|
135
|
-
.filter((status) => status !== undefined);
|
|
136
|
-
}
|
|
137
|
-
function SegmentedProgressBar({ statuses, describedBy }) {
|
|
138
|
-
const total = statuses.reduce((sum, { value }) => sum + value, 0);
|
|
139
|
-
if (!Number.isFinite(total) || total <= 0) {
|
|
140
|
-
return (_jsx("div", { className: progressB({ empty: true }), role: "img", "aria-label": i18n('context_group-statuses-empty') }));
|
|
141
|
-
}
|
|
142
|
-
return (_jsx("div", { className: progressB(), role: "img", "aria-label": i18n('context_group-statuses'), "aria-describedby": describedBy, children: statuses.map(({ label, theme, value }) => (_jsx("div", { className: progressB('item', { theme }), "aria-hidden": "true", style: {
|
|
143
|
-
width: `${(value / total) * 100}%`,
|
|
144
|
-
} }, `${label}-${value}`))) }));
|
|
145
|
-
}
|
|
146
|
-
function GroupStatusesLegend({ statuses, id }) {
|
|
147
|
-
if (!statuses.length) {
|
|
148
|
-
return (_jsx(Text, { variant: "caption-2", color: "secondary", children: EMPTY_DATA_PLACEHOLDER }));
|
|
149
|
-
}
|
|
150
|
-
return (_jsx("ul", { id: id, className: legendB(), "aria-label": i18n('context_group-statuses'), children: statuses.map(({ label, theme, value }) => (_jsxs("li", { className: legendB('item'), children: [_jsx("span", { "aria-hidden": "true", className: legendB('dot', { theme }) }), _jsx(Text, { variant: "caption-2", className: legendB('label'), children: label }), _jsx(Text, { variant: "caption-2", color: "secondary", children: formatNumber(value) })] }, `${label}-${value}`))) }));
|
|
151
|
-
}
|
|
152
|
-
const BridgePileCard = React.memo(function BridgePileCard({ pile }) {
|
|
73
|
+
const BridgePileCard = React.memo(function BridgePileCard({ pile, current, healthcheckAvailable, healthcheckSupportsPiles, healthcheckLoading, leavesIssues, onHealthcheckClick, }) {
|
|
153
74
|
var _a;
|
|
154
|
-
const groupStatusesLegendId = React.useId();
|
|
155
75
|
const stateStatus = React.useMemo(() => {
|
|
156
76
|
const { label, theme, icon, help } = getBridgePileStateInfo(pile.State);
|
|
157
77
|
if (!label) {
|
|
158
78
|
return null;
|
|
159
79
|
}
|
|
160
|
-
|
|
161
|
-
return (_jsx(LabelWithHelpMark, { theme: theme, size: "xs", icon: icon, className: b('state-label', { 'with-help': showStateHelp }), contentGap: 2, help: help, helpMarkProps: {
|
|
80
|
+
return (_jsx(LabelWithHelpMark, { theme: theme, size: "xs", icon: icon, className: b('state-label'), contentGap: 2, help: help, helpMarkProps: {
|
|
162
81
|
className: b('state-help'),
|
|
163
82
|
popoverProps: {
|
|
164
83
|
placement: ['top', 'bottom'],
|
|
@@ -166,12 +85,44 @@ const BridgePileCard = React.memo(function BridgePileCard({ pile }) {
|
|
|
166
85
|
},
|
|
167
86
|
}, children: label }));
|
|
168
87
|
}, [pile.State]);
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
|
|
88
|
+
const pileHealthcheck = React.useMemo(() => getBridgePileHealthcheck(pile.Name, leavesIssues, healthcheckAvailable, healthcheckSupportsPiles), [healthcheckAvailable, healthcheckSupportsPiles, leavesIssues, pile.Name]);
|
|
89
|
+
const pileName = ((_a = pile.Name) === null || _a === void 0 ? void 0 : _a.trim()) || EMPTY_DATA_PLACEHOLDER;
|
|
90
|
+
const nodes = pile.Nodes === undefined ? EMPTY_DATA_PLACEHOLDER : formatNumber(pile.Nodes);
|
|
91
|
+
const handleHealthcheckClick = () => {
|
|
92
|
+
if (pileHealthcheck.target) {
|
|
93
|
+
onHealthcheckClick(pileHealthcheck.target);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
return (_jsxs(Flex, { direction: "column", gap: 2, className: b('pile'), children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", gap: 2, width: "100%", children: [_jsx(Text, { variant: "subheader-1", ellipsis: true, className: b('pile-name'), children: pileName }), current ? (_jsx(Label, { theme: "clear", size: "xs", icon: _jsx(Icon, { data: MapPin, size: 12 }), className: b('current-pile'), children: i18n('label_you-are-here') })) : null] }), _jsxs(Flex, { gap: 2, alignItems: "center", wrap: true, children: [stateStatus, healthcheckLoading ? (_jsx(Skeleton, { className: b('healthcheck-skeleton') })) : (_jsx(EntityStatus.Label, { status: pileHealthcheck.status, size: "xs", className: b('healthcheck-status'), onClick: pileHealthcheck.target ? handleHealthcheckClick : undefined, endContent: pileHealthcheck.target ? (_jsx(Icon, { data: ChevronRight, size: 12 })) : undefined, qa: "bridge-pile-healthcheck", children: pileHealthcheck.target ? (_jsx("span", { className: b('healthcheck-accessible-prefix'), children: i18n('label_bridge-pile-health-status-prefix', { pileName }) })) : null }))] }), _jsxs(Flex, { gap: 1, alignItems: "center", className: b('nodes'), children: [_jsx(Icon, { data: Archive, size: 14 }), _jsxs(Text, { variant: "body-1", children: [i18n('field_nodes'), ": ", nodes] })] })] }));
|
|
172
97
|
});
|
|
173
|
-
export const BridgeInfoTable = React.memo(function BridgeInfoTable({ piles }) {
|
|
174
|
-
|
|
175
|
-
|
|
98
|
+
export const BridgeInfoTable = React.memo(function BridgeInfoTable({ piles, database, clusterName, }) {
|
|
99
|
+
var _a, _b, _c;
|
|
100
|
+
const [autoRefreshInterval] = useAutoRefreshInterval();
|
|
101
|
+
const { handleOpenHealthcheckIssue } = useClusterHealthcheckQueryParams();
|
|
102
|
+
const { currentData: healthcheckData, isFetching: healthcheckFetching, error: healthcheckError, } = healthcheckApi.useGetHealthcheckInfoQuery({ database: database !== null && database !== void 0 ? database : '', clusterName }, {
|
|
103
|
+
pollingInterval: autoRefreshInterval,
|
|
104
|
+
skip: !database,
|
|
105
|
+
});
|
|
106
|
+
const leavesIssues = useTypedSelector((state) => selectLeavesIssues(state, database !== null && database !== void 0 ? database : '', clusterName));
|
|
107
|
+
const healthcheckAvailable = healthcheckData !== undefined && healthcheckError === undefined;
|
|
108
|
+
const healthcheckLoading = healthcheckData === undefined && healthcheckFetching;
|
|
109
|
+
const currentPileName = (_b = (_a = healthcheckData === null || healthcheckData === void 0 ? void 0 : healthcheckData.location) === null || _a === void 0 ? void 0 : _a.pile) === null || _b === void 0 ? void 0 : _b.name;
|
|
110
|
+
const healthcheckSupportsPiles = ((_c = healthcheckData === null || healthcheckData === void 0 ? void 0 : healthcheckData.location) === null || _c === void 0 ? void 0 : _c.pile) !== undefined;
|
|
111
|
+
const sortedPiles = React.useMemo(() => {
|
|
112
|
+
return piles
|
|
113
|
+
.map((pile, index) => ({ pile, index }))
|
|
114
|
+
.sort((left, right) => {
|
|
115
|
+
const leftPrimary = left.pile.State === BridgePileState.PRIMARY;
|
|
116
|
+
const rightPrimary = right.pile.State === BridgePileState.PRIMARY;
|
|
117
|
+
if (leftPrimary !== rightPrimary) {
|
|
118
|
+
return leftPrimary ? -1 : 1;
|
|
119
|
+
}
|
|
120
|
+
return left.index - right.index;
|
|
121
|
+
});
|
|
122
|
+
}, [piles]);
|
|
123
|
+
return (_jsx(Flex, { wrap: true, className: b(), children: sortedPiles.map(({ pile, index }) => {
|
|
124
|
+
var _a, _b;
|
|
125
|
+
return (_jsx(BridgePileCard, { pile: pile, current: Boolean((currentPileName === null || currentPileName === void 0 ? void 0 : currentPileName.trim()) && pile.Name === currentPileName), healthcheckAvailable: healthcheckAvailable, healthcheckSupportsPiles: healthcheckSupportsPiles, healthcheckLoading: healthcheckLoading, leavesIssues: leavesIssues, onHealthcheckClick: handleOpenHealthcheckIssue }, (_b = (_a = pile.PileId) !== null && _a !== void 0 ? _a : pile.Name) !== null && _b !== void 0 ? _b : index));
|
|
126
|
+
}) }));
|
|
176
127
|
});
|
|
177
128
|
//# sourceMappingURL=BridgeInfoTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeInfoTable.js","sourceRoot":"","sources":["../../../../../src/containers/Cluster/ClusterOverview/components/BridgeInfoTable.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,
|
|
1
|
+
{"version":3,"file":"BridgeInfoTable.js","sourceRoot":"","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E,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,eAAe,CAAC,OAAO,CAAC;YAClE,IAAI,WAAW,KAAK,YAAY,EAAE,CAAC;gBAC/B,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAChC,CAAC;YACD,OAAO,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACpC,CAAC,CAAC,CAAC;IACX,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,CACH,KAAC,IAAI,IAAC,IAAI,QAAC,SAAS,EAAE,CAAC,EAAE,YACpB,WAAW,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,EAAE,EAAE;;YAAC,OAAA,CAChC,KAAC,cAAc,IAEX,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,CAAC,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,IAAI,EAAE,KAAI,IAAI,CAAC,IAAI,KAAK,eAAe,CAAC,EAC1E,oBAAoB,EAAE,oBAAoB,EAC1C,wBAAwB,EAAE,wBAAwB,EAClD,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,0BAA0B,IAPzC,MAAA,MAAA,IAAI,CAAC,MAAM,mCAAI,IAAI,CAAC,IAAI,mCAAI,KAAK,CAQxC,CACL,CAAA;SAAA,CAAC,GACC,CACV,CAAC;AACN,CAAC,CAAC,CAAC"}
|
|
@@ -1,50 +1,29 @@
|
|
|
1
|
-
@use '../../../../styles/mixins.scss';
|
|
2
|
-
|
|
3
|
-
@mixin bridge-group-status-background {
|
|
4
|
-
&_theme_positive {
|
|
5
|
-
background-color: var(--g-color-text-positive);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
&_theme_warning {
|
|
9
|
-
background-color: var(--g-color-text-warning);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&_theme_danger {
|
|
13
|
-
background-color: var(--g-color-text-danger);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&_theme_dark-complementary {
|
|
17
|
-
background-color: var(--g-color-text-dark-complementary);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&_theme_secondary {
|
|
21
|
-
background-color: var(--g-color-text-secondary);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
1
|
.ydb-bridge-info-table {
|
|
2
|
+
gap: 10px;
|
|
3
|
+
|
|
26
4
|
height: 100%;
|
|
27
5
|
|
|
28
6
|
&__pile {
|
|
7
|
+
box-sizing: border-box;
|
|
29
8
|
width: 321px;
|
|
30
|
-
|
|
9
|
+
min-height: 98px;
|
|
10
|
+
padding: var(--g-spacing-3);
|
|
31
11
|
|
|
32
12
|
border-radius: var(--g-border-radius-s);
|
|
33
13
|
background-color: var(--g-color-base-generic);
|
|
34
|
-
|
|
35
|
-
@include mixins.body-2-typography();
|
|
36
14
|
}
|
|
37
15
|
|
|
38
|
-
&__pile-
|
|
16
|
+
&__pile-name {
|
|
39
17
|
min-width: 0;
|
|
40
18
|
}
|
|
41
19
|
|
|
42
|
-
&
|
|
20
|
+
&__current-pile {
|
|
43
21
|
flex-shrink: 0;
|
|
22
|
+
}
|
|
44
23
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
24
|
+
&__state-label,
|
|
25
|
+
&__healthcheck-status {
|
|
26
|
+
flex-shrink: 0;
|
|
48
27
|
}
|
|
49
28
|
|
|
50
29
|
&__state-help {
|
|
@@ -55,69 +34,25 @@
|
|
|
55
34
|
white-space: pre-line;
|
|
56
35
|
}
|
|
57
36
|
|
|
58
|
-
&
|
|
59
|
-
width:
|
|
37
|
+
&__healthcheck-skeleton {
|
|
38
|
+
width: 72px;
|
|
39
|
+
height: 20px;
|
|
60
40
|
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.ydb-bridge-info-table-progress {
|
|
64
|
-
display: flex;
|
|
65
|
-
overflow: hidden;
|
|
66
|
-
align-items: center;
|
|
67
|
-
gap: var(--g-spacing-half);
|
|
68
41
|
|
|
69
|
-
|
|
42
|
+
&__healthcheck-accessible-prefix {
|
|
43
|
+
position: absolute;
|
|
70
44
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
&_empty {
|
|
74
|
-
background-color: var(--g-color-sfx-shadow);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&__item {
|
|
78
|
-
min-width: 8px;
|
|
79
|
-
height: 4px;
|
|
80
|
-
|
|
81
|
-
border-radius: var(--g-border-radius-xs);
|
|
82
|
-
|
|
83
|
-
@include bridge-group-status-background();
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.ydb-bridge-info-table-legend {
|
|
88
|
-
display: flex;
|
|
89
|
-
flex-wrap: wrap;
|
|
90
|
-
gap: var(--g-spacing-2);
|
|
91
|
-
|
|
92
|
-
min-width: 0;
|
|
93
|
-
margin: 0;
|
|
94
|
-
padding: 0;
|
|
95
|
-
|
|
96
|
-
list-style: none;
|
|
97
|
-
|
|
98
|
-
&__item {
|
|
99
|
-
display: inline-flex;
|
|
100
|
-
align-items: center;
|
|
101
|
-
gap: var(--g-spacing-1);
|
|
102
|
-
|
|
103
|
-
min-width: 0;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&__dot {
|
|
107
|
-
flex: 0 0 6px;
|
|
108
|
-
|
|
109
|
-
width: 6px;
|
|
110
|
-
height: 6px;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
clip: rect(0 0 0 0);
|
|
111
47
|
|
|
112
|
-
|
|
48
|
+
width: 1px;
|
|
49
|
+
height: 1px;
|
|
113
50
|
|
|
114
|
-
|
|
51
|
+
white-space: nowrap;
|
|
52
|
+
clip-path: inset(50%);
|
|
115
53
|
}
|
|
116
54
|
|
|
117
|
-
&
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
white-space: nowrap;
|
|
121
|
-
text-overflow: ellipsis;
|
|
55
|
+
&__nodes {
|
|
56
|
+
color: var(--g-color-text-secondary);
|
|
122
57
|
}
|
|
123
58
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IssuesTree } from '../../../../store/reducers/healthcheckInfo/types';
|
|
2
|
+
import { EFlag } from '../../../../types/api/enums';
|
|
3
|
+
export interface BridgePileHealthcheckTarget {
|
|
4
|
+
issueId: string;
|
|
5
|
+
leafIssueId: string;
|
|
6
|
+
view: string;
|
|
7
|
+
}
|
|
8
|
+
interface BridgePileHealthcheck {
|
|
9
|
+
status: EFlag;
|
|
10
|
+
target?: BridgePileHealthcheckTarget;
|
|
11
|
+
}
|
|
12
|
+
export declare function getBridgePileHealthcheck(pileName: string | undefined, leavesIssues: IssuesTree[], healthcheckAvailable: boolean, healthcheckSupportsPiles?: boolean): BridgePileHealthcheck;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { getHealthcheckIssuePileNames, hcStatusToColorFlag, } from '../../../../store/reducers/healthcheckInfo/utils';
|
|
2
|
+
import { EFlag } from '../../../../types/api/enums';
|
|
3
|
+
import { StatusFlag } from '../../../../types/api/healthcheck';
|
|
4
|
+
const STATUS_PRIORITY = {
|
|
5
|
+
[StatusFlag.UNSPECIFIED]: 0,
|
|
6
|
+
[StatusFlag.GREY]: 0,
|
|
7
|
+
[StatusFlag.GREEN]: 1,
|
|
8
|
+
[StatusFlag.BLUE]: 2,
|
|
9
|
+
[StatusFlag.YELLOW]: 3,
|
|
10
|
+
[StatusFlag.ORANGE]: 4,
|
|
11
|
+
[StatusFlag.RED]: 5,
|
|
12
|
+
};
|
|
13
|
+
function normalizeStatus(status) {
|
|
14
|
+
return typeof status === 'string' && Object.hasOwn(STATUS_PRIORITY, status)
|
|
15
|
+
? status
|
|
16
|
+
: StatusFlag.UNSPECIFIED;
|
|
17
|
+
}
|
|
18
|
+
function getBranch(leaf) {
|
|
19
|
+
const branch = [];
|
|
20
|
+
let current = leaf;
|
|
21
|
+
while (current) {
|
|
22
|
+
branch.push(current);
|
|
23
|
+
current = current.parent;
|
|
24
|
+
}
|
|
25
|
+
return branch.reverse();
|
|
26
|
+
}
|
|
27
|
+
function getBranchCandidate(leaf, pileName) {
|
|
28
|
+
var _a;
|
|
29
|
+
const branch = getBranch(leaf);
|
|
30
|
+
for (const [branchIndex, issue] of branch.entries()) {
|
|
31
|
+
if (!getHealthcheckIssuePileNames(issue).includes(pileName)) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
// Backend guarantees increasing levels; add validation here if that can change.
|
|
35
|
+
const level = (_a = issue.level) !== null && _a !== void 0 ? _a : branchIndex;
|
|
36
|
+
return { issue, leaf, level };
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
function compareSourceOrder(left, right) {
|
|
41
|
+
if (!left) {
|
|
42
|
+
return right ? 1 : 0;
|
|
43
|
+
}
|
|
44
|
+
if (!right) {
|
|
45
|
+
return -1;
|
|
46
|
+
}
|
|
47
|
+
const commonLength = Math.min(left.length, right.length);
|
|
48
|
+
for (let index = 0; index < commonLength; index += 1) {
|
|
49
|
+
if (left[index] !== right[index]) {
|
|
50
|
+
return left[index] - right[index];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return left.length - right.length;
|
|
54
|
+
}
|
|
55
|
+
function isWorseCandidate(candidate, current) {
|
|
56
|
+
const candidatePriority = STATUS_PRIORITY[normalizeStatus(candidate.issue.status)];
|
|
57
|
+
const currentPriority = STATUS_PRIORITY[normalizeStatus(current.issue.status)];
|
|
58
|
+
if (candidatePriority !== currentPriority) {
|
|
59
|
+
return candidatePriority > currentPriority;
|
|
60
|
+
}
|
|
61
|
+
if (candidate.level !== current.level) {
|
|
62
|
+
return candidate.level < current.level;
|
|
63
|
+
}
|
|
64
|
+
const issueOrder = compareSourceOrder(candidate.issue.sourceOrderPath, current.issue.sourceOrderPath);
|
|
65
|
+
if (issueOrder !== 0) {
|
|
66
|
+
return issueOrder < 0;
|
|
67
|
+
}
|
|
68
|
+
return compareSourceOrder(candidate.leaf.sourceOrderPath, current.leaf.sourceOrderPath) < 0;
|
|
69
|
+
}
|
|
70
|
+
export function getBridgePileHealthcheck(pileName, leavesIssues, healthcheckAvailable, healthcheckSupportsPiles = healthcheckAvailable) {
|
|
71
|
+
if (!healthcheckAvailable || !(pileName === null || pileName === void 0 ? void 0 : pileName.trim())) {
|
|
72
|
+
return { status: EFlag.Grey };
|
|
73
|
+
}
|
|
74
|
+
let selectedCandidate;
|
|
75
|
+
for (const leaf of leavesIssues) {
|
|
76
|
+
const candidate = getBranchCandidate(leaf, pileName);
|
|
77
|
+
if (candidate && (!selectedCandidate || isWorseCandidate(candidate, selectedCandidate))) {
|
|
78
|
+
selectedCandidate = candidate;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (!selectedCandidate) {
|
|
82
|
+
return { status: healthcheckSupportsPiles ? EFlag.Green : EFlag.Grey };
|
|
83
|
+
}
|
|
84
|
+
const issueStatus = normalizeStatus(selectedCandidate.issue.status);
|
|
85
|
+
return {
|
|
86
|
+
status: hcStatusToColorFlag[issueStatus],
|
|
87
|
+
target: {
|
|
88
|
+
issueId: selectedCandidate.issue.id,
|
|
89
|
+
leafIssueId: selectedCandidate.leaf.id,
|
|
90
|
+
view: selectedCandidate.leaf.categoryForUI,
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=bridgePileHealthcheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridgePileHealthcheck.js","sourceRoot":"","sources":["../../../../../src/containers/Cluster/ClusterOverview/components/bridgePileHealthcheck.ts"],"names":[],"mappings":"AACA,OAAO,EACH,4BAA4B,EAC5B,mBAAmB,GACtB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAC,KAAK,EAAC,MAAM,6BAA6B,CAAC;AAClD,OAAO,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e,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpE,OAAO;QACH,MAAM,EAAE,mBAAmB,CAAC,WAAW,CAAC;QACxC,MAAM,EAAE;YACJ,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE;YACnC,WAAW,EAAE,iBAAiB,CAAC,IAAI,CAAC,EAAE;YACtC,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,aAAa;SAC7C;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -24,16 +24,19 @@
|
|
|
24
24
|
"value_bridge-state-suspended": "Suspended",
|
|
25
25
|
"value_bridge-state-disconnected": "Disconnected",
|
|
26
26
|
"value_bridge-state-unspecified": "Unspecified",
|
|
27
|
+
"label_you-are-here": "You are here",
|
|
28
|
+
"label_bridge-pile-health-status-prefix": "Health status for pile {{pileName}}:",
|
|
27
29
|
"value_bridge-group-status-unknown": "Unknown",
|
|
28
30
|
"value_bridge-group-status-full": "Full",
|
|
29
31
|
"value_bridge-group-status-partial": "Partial",
|
|
30
32
|
"value_bridge-group-status-degraded": "Degraded",
|
|
31
33
|
"value_bridge-group-status-disintegrated": "Disintegrated",
|
|
32
|
-
"context_bridge-pile-state-promoted": "Pile that is being promoted from
|
|
33
|
-
"context_bridge-pile-state-
|
|
34
|
-
"context_bridge-pile-state-
|
|
35
|
-
"context_bridge-pile-state-
|
|
36
|
-
"context_bridge-pile-state-
|
|
34
|
+
"context_bridge-pile-state-promoted": "Pile that is being promoted from Synchronized to\u00a0Primary",
|
|
35
|
+
"context_bridge-pile-state-primary": "Primary pile that currently participates in operation execution.",
|
|
36
|
+
"context_bridge-pile-state-synchronised": "Secondary pile where all storage groups are fully synchronized with Primary",
|
|
37
|
+
"context_bridge-pile-state-not-synchronised": "Storage groups are not yet fully synchronized with Primary",
|
|
38
|
+
"context_bridge-pile-state-suspended": "Pile is being transitioned to\u00a0Disconnected state",
|
|
39
|
+
"context_bridge-pile-state-disconnected": "Pile is disconnected from Primary and does not participate in operation execution",
|
|
37
40
|
"context_group-statuses": "Storage group statuses",
|
|
38
41
|
"context_group-statuses-empty": "No storage group status data",
|
|
39
42
|
"context_cpu": "CPU load",
|
|
@@ -1,2 +1,2 @@
|
|
|
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" | "value_nodes" | "value_bridge-state-primary" | "value_bridge-state-promoted" | "value_bridge-state-synchronised" | "value_bridge-state-not-synchronised" | "value_bridge-state-suspended" | "value_bridge-state-disconnected" | "value_bridge-state-unspecified" | "value_bridge-group-status-unknown" | "value_bridge-group-status-full" | "value_bridge-group-status-partial" | "value_bridge-group-status-degraded" | "value_bridge-group-status-disintegrated" | "context_bridge-pile-state-promoted" | "context_bridge-pile-state-synchronised" | "context_bridge-pile-state-not-synchronised" | "context_bridge-pile-state-suspended" | "context_bridge-pile-state-disconnected" | "context_group-statuses" | "context_group-statuses-empty" | "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;
|
|
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" | "value_nodes" | "value_bridge-state-primary" | "value_bridge-state-promoted" | "value_bridge-state-synchronised" | "value_bridge-state-not-synchronised" | "value_bridge-state-suspended" | "value_bridge-state-disconnected" | "value_bridge-state-unspecified" | "label_you-are-here" | "label_bridge-pile-health-status-prefix" | "value_bridge-group-status-unknown" | "value_bridge-group-status-full" | "value_bridge-group-status-partial" | "value_bridge-group-status-degraded" | "value_bridge-group-status-disintegrated" | "context_bridge-pile-state-promoted" | "context_bridge-pile-state-primary" | "context_bridge-pile-state-synchronised" | "context_bridge-pile-state-not-synchronised" | "context_bridge-pile-state-suspended" | "context_bridge-pile-state-disconnected" | "context_group-statuses" | "context_group-statuses-empty" | "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;
|
|
@@ -16,7 +16,7 @@ export declare const COLUMNS_NAMES: {
|
|
|
16
16
|
readonly TENANTS: "tenants";
|
|
17
17
|
readonly DESCRIPTION: "description";
|
|
18
18
|
};
|
|
19
|
-
export declare const DEFAULT_COLUMNS: ("
|
|
19
|
+
export declare const DEFAULT_COLUMNS: ("status" | "storage" | "hosts" | "versions" | "title" | "service" | "nodes" | "tenants" | "load")[];
|
|
20
20
|
export declare const COLUMNS_TITLES: {
|
|
21
21
|
readonly title: string;
|
|
22
22
|
readonly versions: string;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type { PreparedTenant } from '../../store/reducers/tenants/types';
|
|
2
|
-
import type { ClusterLinkWithTitle } from '../../types/additionalProps';
|
|
2
|
+
import type { AdditionalTenantsProps, ClusterLinkWithTitle } from '../../types/additionalProps';
|
|
3
3
|
interface DatabaseRightControlsProps {
|
|
4
4
|
database: string;
|
|
5
5
|
clusterName?: string;
|
|
6
6
|
databaseData?: PreparedTenant;
|
|
7
7
|
isDatabaseDataLoading: boolean;
|
|
8
8
|
isV2NavigationEnabled: boolean;
|
|
9
|
+
isViewerUser?: boolean;
|
|
10
|
+
prepareTenantBackend?: AdditionalTenantsProps['prepareTenantBackend'];
|
|
9
11
|
showDeveloperUI: boolean;
|
|
10
12
|
databaseLinks: ClusterLinkWithTitle[];
|
|
11
13
|
}
|
|
12
|
-
export declare function DatabaseRightControls({ database, clusterName, databaseData, isDatabaseDataLoading, isV2NavigationEnabled, showDeveloperUI, databaseLinks, }: DatabaseRightControlsProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function DatabaseRightControls({ database, clusterName, databaseData, isDatabaseDataLoading, isV2NavigationEnabled, isViewerUser, prepareTenantBackend, showDeveloperUI, databaseLinks, }: DatabaseRightControlsProps): import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export {};
|
|
@@ -8,10 +8,10 @@ import { DeveloperUIControl } from './GlobalRightControls';
|
|
|
8
8
|
import { DBHeaderActionsMenu } from './HeaderActionsMenu';
|
|
9
9
|
import { MonitoringControl } from './MonitoringControl';
|
|
10
10
|
import { headerKeyset } from './i18n';
|
|
11
|
-
export function DatabaseRightControls({ database, clusterName, databaseData, isDatabaseDataLoading, isV2NavigationEnabled, showDeveloperUI, databaseLinks, }) {
|
|
11
|
+
export function DatabaseRightControls({ database, clusterName, databaseData, isDatabaseDataLoading, isV2NavigationEnabled, isViewerUser, prepareTenantBackend, showDeveloperUI, databaseLinks, }) {
|
|
12
12
|
const monitoringDatabaseLink = React.useMemo(() => databaseLinks.find((link) => link.context === CLUSTER_LINK_CONTEXT.MONITORING), [databaseLinks]);
|
|
13
13
|
const actionDatabaseLinks = React.useMemo(() => databaseLinks.filter((link) => link.context !== CLUSTER_LINK_CONTEXT.MONITORING), [databaseLinks]);
|
|
14
14
|
const showLegacyConnect = !isV2NavigationEnabled;
|
|
15
|
-
return (_jsxs(React.Fragment, { children: [monitoringDatabaseLink ? _jsx(MonitoringControl, { link: monitoringDatabaseLink }) : null, showLegacyConnect ? (_jsx(ActionTooltip, { title: headerKeyset('description_connect-to-db'), children: _jsxs(Button, { view: "flat", onClick: () => getConnectToDBDialog({ database }), children: [_jsx(Icon, { data: PlugConnection }), headerKeyset('title_connect')] }) })) : null, showDeveloperUI ? _jsx(DeveloperUIControl, {}) : null, _jsx(DBHeaderActionsMenu, { database: database, clusterName: clusterName, databaseData: databaseData, isDatabaseDataLoading: isDatabaseDataLoading, isV2NavigationEnabled: isV2NavigationEnabled, databaseLinks: actionDatabaseLinks })] }));
|
|
15
|
+
return (_jsxs(React.Fragment, { children: [monitoringDatabaseLink ? _jsx(MonitoringControl, { link: monitoringDatabaseLink }) : null, showLegacyConnect ? (_jsx(ActionTooltip, { title: headerKeyset('description_connect-to-db'), children: _jsxs(Button, { view: "flat", onClick: () => getConnectToDBDialog({ database }), children: [_jsx(Icon, { data: PlugConnection }), headerKeyset('title_connect')] }) })) : null, showDeveloperUI ? _jsx(DeveloperUIControl, {}) : null, _jsx(DBHeaderActionsMenu, { database: database, clusterName: clusterName, databaseData: databaseData, isDatabaseDataLoading: isDatabaseDataLoading, isV2NavigationEnabled: isV2NavigationEnabled, isViewerUser: isViewerUser, prepareTenantBackend: prepareTenantBackend, databaseLinks: actionDatabaseLinks })] }));
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=DatabaseRightControls.js.map
|