ydb-embedded-ui 22.10.0 → 22.11.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/BridgeSyncStatusLabel/BridgeSyncStatusLabel.d.ts +12 -0
- package/dist/components/BridgeSyncStatusLabel/BridgeSyncStatusLabel.js +47 -0
- package/dist/components/BridgeSyncStatusLabel/BridgeSyncStatusLabel.js.map +1 -0
- package/dist/components/BridgeSyncStatusLabel/i18n/en.json +7 -0
- package/dist/components/BridgeSyncStatusLabel/i18n/index.d.ts +2 -0
- package/dist/components/BridgeSyncStatusLabel/i18n/index.js +4 -0
- package/dist/components/BridgeSyncStatusLabel/i18n/index.js.map +1 -0
- package/dist/components/BridgeSyncStatusLabel/index.d.ts +1 -0
- package/dist/components/BridgeSyncStatusLabel/index.js +2 -0
- package/dist/components/BridgeSyncStatusLabel/index.js.map +1 -0
- package/dist/components/EntityStatus/EntityStatus.d.ts +11 -2
- package/dist/components/EntityStatus/EntityStatus.js +6 -4
- package/dist/components/EntityStatus/EntityStatus.js.map +1 -1
- package/dist/components/EntityStatus/EntityStatus.scss +18 -0
- package/dist/components/StatusIconNew/StatusIcon.d.ts +3 -1
- package/dist/components/StatusIconNew/StatusIcon.js +4 -3
- package/dist/components/StatusIconNew/StatusIcon.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +2 -1
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js.map +1 -1
- package/dist/containers/Cluster/ClusterOverview/components/BridgeDatabasesSummary.d.ts +4 -0
- package/dist/containers/Cluster/ClusterOverview/components/BridgeDatabasesSummary.js +47 -0
- package/dist/containers/Cluster/ClusterOverview/components/BridgeDatabasesSummary.js.map +1 -0
- package/dist/containers/Cluster/ClusterOverview/components/BridgeInfoTable.d.ts +2 -1
- package/dist/containers/Cluster/ClusterOverview/components/BridgeInfoTable.js +53 -14
- package/dist/containers/Cluster/ClusterOverview/components/BridgeInfoTable.js.map +1 -1
- package/dist/containers/Cluster/ClusterOverview/components/BridgeInfoTable.scss +36 -23
- package/dist/containers/Cluster/ClusterOverview/components/bridgeInfo.d.ts +7 -0
- package/dist/containers/Cluster/ClusterOverview/components/bridgeInfo.js +24 -0
- package/dist/containers/Cluster/ClusterOverview/components/bridgeInfo.js.map +1 -0
- package/dist/containers/Cluster/i18n/en.json +13 -0
- package/dist/containers/Cluster/i18n/index.d.ts +1 -1
- package/dist/containers/Operations/useOperationsQueryParams.d.ts +1 -1
- package/dist/containers/Storage/PaginatedStorageGroups/PaginatedStorageGroups.js +5 -1
- package/dist/containers/Storage/PaginatedStorageGroups/PaginatedStorageGroups.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroups/StorageGroupsControls.js +10 -5
- package/dist/containers/Storage/PaginatedStorageGroups/StorageGroupsControls.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroups/useStorageGroupsBridgeGrouping.d.ts +4 -0
- package/dist/containers/Storage/PaginatedStorageGroups/useStorageGroupsBridgeGrouping.js +10 -0
- package/dist/containers/Storage/PaginatedStorageGroups/useStorageGroupsBridgeGrouping.js.map +1 -0
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/StorageGroupSyncPopover/StorageGroupSyncPopover.d.ts +5 -0
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/StorageGroupSyncPopover/StorageGroupSyncPopover.js +24 -0
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/StorageGroupSyncPopover/StorageGroupSyncPopover.js.map +1 -0
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/StorageGroupSyncPopover/StorageGroupSyncPopover.scss +12 -0
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/StorageGroupSyncPopover/i18n/en.json +4 -0
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/StorageGroupSyncPopover/i18n/index.d.ts +2 -0
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/StorageGroupSyncPopover/i18n/index.js +4 -0
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/StorageGroupSyncPopover/i18n/index.js.map +1 -0
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/columns.js +25 -2
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/columns.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/constants.d.ts +6 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/constants.js +34 -5
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/constants.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/hooks.js +24 -14
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/hooks.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/i18n/en.json +5 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/StorageGroupSyncDetails/StorageGroupSyncDetails.d.ts +6 -0
- package/dist/containers/Storage/StorageGroupSyncDetails/StorageGroupSyncDetails.js +46 -0
- package/dist/containers/Storage/StorageGroupSyncDetails/StorageGroupSyncDetails.js.map +1 -0
- package/dist/containers/Storage/StorageGroupSyncDetails/StorageGroupSyncDetails.scss +78 -0
- package/dist/containers/Storage/StorageGroupSyncDetails/i18n/en.json +14 -0
- package/dist/containers/Storage/StorageGroupSyncDetails/i18n/index.d.ts +2 -0
- package/dist/containers/Storage/StorageGroupSyncDetails/i18n/index.js +5 -0
- package/dist/containers/Storage/StorageGroupSyncDetails/i18n/index.js.map +1 -0
- package/dist/containers/StorageGroupPage/StorageGroupPage.js +5 -3
- package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
- package/dist/containers/StorageGroupPage/StorageGroupPage.scss +18 -0
- package/dist/containers/StorageGroupPage/i18n/en.json +2 -0
- package/dist/containers/StorageGroupPage/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +2 -2
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js.map +1 -1
- package/dist/containers/Tenant/ObjectSummary/i18n/en.json +4 -0
- package/dist/containers/Tenant/ObjectSummary/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/NewSQL/NewSQL.js +1 -1
- package/dist/containers/Tenant/Query/NewSQL/NewSQL.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +3 -1
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.scss +4 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.scss +12 -2
- package/dist/containers/Tenant/Query/QueryResult/QueryResultViewer.js +1 -1
- package/dist/containers/Tenant/Query/QueryResult/QueryResultViewer.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryResult/i18n/en.json +2 -0
- package/dist/containers/Tenant/Query/QueryResult/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/QueryResult/utils.js +11 -5
- package/dist/containers/Tenant/Query/QueryResult/utils.js.map +1 -1
- package/dist/containers/Tenant/utils/paneVisibilityToggleHelpers.d.ts +3 -1
- package/dist/containers/Tenant/utils/paneVisibilityToggleHelpers.js +3 -3
- package/dist/containers/Tenant/utils/paneVisibilityToggleHelpers.js.map +1 -1
- package/dist/containers/Tenant/utils/schemaQueryTemplates.js +14 -11
- package/dist/containers/Tenant/utils/schemaQueryTemplates.js.map +1 -1
- package/dist/containers/Tenants/TenantsTable.js +7 -1
- package/dist/containers/Tenants/TenantsTable.js.map +1 -1
- package/dist/containers/Tenants/bridgeColumns.d.ts +3 -0
- package/dist/containers/Tenants/bridgeColumns.js +37 -0
- package/dist/containers/Tenants/bridgeColumns.js.map +1 -0
- package/dist/containers/Tenants/constants.d.ts +4 -0
- package/dist/containers/Tenants/constants.js +10 -0
- package/dist/containers/Tenants/constants.js.map +1 -1
- package/dist/containers/Tenants/i18n/en.json +5 -1
- package/dist/containers/Tenants/i18n/index.d.ts +1 -1
- package/dist/store/reducers/capabilities/hooks.d.ts +3 -0
- package/dist/store/reducers/capabilities/hooks.js +9 -0
- package/dist/store/reducers/capabilities/hooks.js.map +1 -1
- package/dist/store/reducers/query/api.js +8 -3
- package/dist/store/reducers/query/api.js.map +1 -1
- package/dist/store/reducers/query/streaming/reducers.js +1 -1
- package/dist/store/reducers/query/streaming/reducers.js.map +1 -1
- package/dist/store/reducers/query/types.d.ts +1 -0
- package/dist/store/reducers/storage/types.d.ts +2 -2
- package/dist/store/reducers/storage/types.js.map +1 -1
- package/dist/store/reducers/streamingQuery/streamingQuery.js +5 -2
- package/dist/store/reducers/streamingQuery/streamingQuery.js.map +1 -1
- package/dist/types/api/capabilities.d.ts +1 -1
- package/dist/types/api/cluster.d.ts +21 -0
- package/dist/types/api/cluster.js +8 -0
- package/dist/types/api/cluster.js.map +1 -1
- package/dist/types/api/storage.d.ts +25 -4
- package/dist/types/api/storage.js.map +1 -1
- package/dist/types/api/tenant.d.ts +3 -0
- package/dist/types/api/tenant.js.map +1 -1
- package/dist/utils/query.d.ts +1 -0
- package/dist/utils/query.js +3 -2
- package/dist/utils/query.js.map +1 -1
- package/package.json +1 -1
- package/src/components/BridgeSyncStatusLabel/BridgeSyncStatusLabel.tsx +77 -0
- package/src/components/BridgeSyncStatusLabel/i18n/en.json +7 -0
- package/src/components/BridgeSyncStatusLabel/i18n/index.ts +5 -0
- package/src/components/BridgeSyncStatusLabel/index.ts +1 -0
- package/src/components/EntityStatus/EntityStatus.scss +18 -0
- package/src/components/EntityStatus/EntityStatus.tsx +45 -13
- package/src/components/StatusIconNew/StatusIcon.tsx +6 -2
- package/src/containers/Cluster/ClusterInfo/ClusterInfo.tsx +2 -0
- package/src/containers/Cluster/ClusterOverview/components/BridgeDatabasesSummary.tsx +87 -0
- package/src/containers/Cluster/ClusterOverview/components/BridgeInfoTable.scss +36 -23
- package/src/containers/Cluster/ClusterOverview/components/BridgeInfoTable.tsx +165 -69
- package/src/containers/Cluster/ClusterOverview/components/bridgeInfo.ts +27 -0
- package/src/containers/Cluster/i18n/en.json +13 -0
- package/src/containers/Storage/PaginatedStorageGroups/PaginatedStorageGroups.tsx +6 -1
- package/src/containers/Storage/PaginatedStorageGroups/StorageGroupsControls.tsx +16 -7
- package/src/containers/Storage/PaginatedStorageGroups/useStorageGroupsBridgeGrouping.ts +13 -0
- package/src/containers/Storage/PaginatedStorageGroupsTable/columns/StorageGroupSyncPopover/StorageGroupSyncPopover.scss +12 -0
- package/src/containers/Storage/PaginatedStorageGroupsTable/columns/StorageGroupSyncPopover/StorageGroupSyncPopover.tsx +53 -0
- package/src/containers/Storage/PaginatedStorageGroupsTable/columns/StorageGroupSyncPopover/i18n/en.json +4 -0
- package/src/containers/Storage/PaginatedStorageGroupsTable/columns/StorageGroupSyncPopover/i18n/index.ts +5 -0
- package/src/containers/Storage/PaginatedStorageGroupsTable/columns/columns.tsx +31 -2
- package/src/containers/Storage/PaginatedStorageGroupsTable/columns/constants.ts +36 -4
- package/src/containers/Storage/PaginatedStorageGroupsTable/columns/hooks.ts +29 -14
- package/src/containers/Storage/PaginatedStorageGroupsTable/columns/i18n/en.json +5 -1
- package/src/containers/Storage/StorageGroupSyncDetails/StorageGroupSyncDetails.scss +78 -0
- package/src/containers/Storage/StorageGroupSyncDetails/StorageGroupSyncDetails.tsx +199 -0
- package/src/containers/Storage/StorageGroupSyncDetails/i18n/en.json +14 -0
- package/src/containers/Storage/StorageGroupSyncDetails/i18n/index.ts +6 -0
- package/src/containers/StorageGroupPage/StorageGroupPage.scss +18 -0
- package/src/containers/StorageGroupPage/StorageGroupPage.tsx +27 -1
- package/src/containers/StorageGroupPage/i18n/en.json +2 -0
- package/src/containers/Tenant/ObjectSummary/ObjectSummary.tsx +4 -0
- package/src/containers/Tenant/ObjectSummary/i18n/en.json +4 -0
- package/src/containers/Tenant/Query/NewSQL/NewSQL.tsx +1 -1
- package/src/containers/Tenant/Query/QueryEditor/QueryEditor.scss +4 -0
- package/src/containers/Tenant/Query/QueryEditor/QueryEditor.tsx +4 -1
- package/src/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.scss +12 -2
- package/src/containers/Tenant/Query/QueryResult/QueryResultViewer.tsx +2 -0
- package/src/containers/Tenant/Query/QueryResult/i18n/en.json +2 -0
- package/src/containers/Tenant/Query/QueryResult/utils.ts +13 -5
- package/src/containers/Tenant/utils/paneVisibilityToggleHelpers.tsx +8 -2
- package/src/containers/Tenant/utils/schemaQueryTemplates.ts +16 -11
- package/src/containers/Tenants/TenantsTable.tsx +11 -1
- package/src/containers/Tenants/bridgeColumns.tsx +50 -0
- package/src/containers/Tenants/constants.ts +10 -0
- package/src/containers/Tenants/i18n/en.json +6 -1
- package/src/store/reducers/capabilities/hooks.ts +12 -0
- package/src/store/reducers/query/api.ts +8 -2
- package/src/store/reducers/query/streaming/reducers.ts +1 -1
- package/src/store/reducers/query/types.ts +1 -0
- package/src/store/reducers/storage/types.ts +7 -2
- package/src/store/reducers/streamingQuery/streamingQuery.ts +6 -2
- package/src/types/api/capabilities.ts +1 -0
- package/src/types/api/cluster.ts +23 -0
- package/src/types/api/storage.ts +37 -1
- package/src/types/api/tenant.ts +3 -0
- package/src/utils/query.ts +4 -2
|
@@ -1,34 +1,49 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
Archive,
|
|
5
4
|
ArrowChevronRight,
|
|
6
5
|
Ban,
|
|
7
|
-
|
|
6
|
+
Check,
|
|
8
7
|
CirclePause,
|
|
8
|
+
CrownDiamond,
|
|
9
9
|
LinkSlash,
|
|
10
10
|
MapPin,
|
|
11
11
|
} from '@gravity-ui/icons';
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
ActionTooltip,
|
|
14
|
+
Card,
|
|
15
|
+
DefinitionList,
|
|
16
|
+
Flex,
|
|
17
|
+
Icon,
|
|
18
|
+
Label,
|
|
19
|
+
Progress,
|
|
20
|
+
Text,
|
|
21
|
+
Tooltip,
|
|
22
|
+
text,
|
|
23
|
+
} from '@gravity-ui/uikit';
|
|
13
24
|
import type {LabelProps} from '@gravity-ui/uikit';
|
|
14
25
|
|
|
15
|
-
import {EntityStatus} from '../../../../components/EntityStatus/EntityStatus';
|
|
26
|
+
import {EFlagToStatusName, EntityStatus} from '../../../../components/EntityStatus/EntityStatus';
|
|
16
27
|
import {LabelWithHelpMark} from '../../../../components/LabelWithHelpMark/LabelWithHelpMark';
|
|
17
28
|
import {Skeleton} from '../../../../components/Skeleton/Skeleton';
|
|
18
29
|
import {
|
|
19
30
|
healthcheckApi,
|
|
20
31
|
selectLeavesIssues,
|
|
21
32
|
} from '../../../../store/reducers/healthcheckInfo/healthcheckInfo';
|
|
22
|
-
import type {TBridgePile} from '../../../../types/api/cluster';
|
|
33
|
+
import type {TBridgeInfo, TBridgePile} from '../../../../types/api/cluster';
|
|
23
34
|
import {BridgePileState} from '../../../../types/api/cluster';
|
|
35
|
+
import {EFlag} from '../../../../types/api/enums';
|
|
24
36
|
import {cn} from '../../../../utils/cn';
|
|
25
37
|
import {EMPTY_DATA_PLACEHOLDER} from '../../../../utils/constants';
|
|
26
38
|
import {formatNumber} from '../../../../utils/dataFormatters/dataFormatters';
|
|
27
39
|
import {useAutoRefreshInterval, useTypedSelector} from '../../../../utils/hooks';
|
|
28
40
|
import {useIsUserAllowedToMakeChanges} from '../../../../utils/hooks/useIsUserAllowedToMakeChanges';
|
|
41
|
+
import {parseOptionalNonNegativeNumber} from '../../../../utils/utils';
|
|
29
42
|
import {useClusterHealthcheckQueryParams} from '../../ClusterDrawerHealthcheck';
|
|
30
43
|
import i18n from '../../i18n';
|
|
31
44
|
|
|
45
|
+
import {BridgeDatabasesSummary} from './BridgeDatabasesSummary';
|
|
46
|
+
import {getBridgeNodesProgress} from './bridgeInfo';
|
|
32
47
|
import type {BridgePileHealthcheckTarget} from './bridgePileHealthcheck';
|
|
33
48
|
import {getBridgePileHealthcheck} from './bridgePileHealthcheck';
|
|
34
49
|
|
|
@@ -48,7 +63,8 @@ function getBridgePileStateInfo(state?: BridgePileState): BridgePileStateInfo {
|
|
|
48
63
|
case BridgePileState.PRIMARY:
|
|
49
64
|
return {
|
|
50
65
|
label: i18n('value_bridge-state-primary'),
|
|
51
|
-
theme: '
|
|
66
|
+
theme: 'utility',
|
|
67
|
+
icon: <Icon data={CrownDiamond} size={12} />,
|
|
52
68
|
help: i18n('context_bridge-pile-state-primary'),
|
|
53
69
|
};
|
|
54
70
|
case BridgePileState.PROMOTED:
|
|
@@ -61,7 +77,8 @@ function getBridgePileStateInfo(state?: BridgePileState): BridgePileStateInfo {
|
|
|
61
77
|
case BridgePileState.SYNCHRONIZED:
|
|
62
78
|
return {
|
|
63
79
|
label: i18n('value_bridge-state-synchronised'),
|
|
64
|
-
theme: '
|
|
80
|
+
theme: 'success',
|
|
81
|
+
icon: <Icon data={Check} size={12} />,
|
|
65
82
|
help: i18n('context_bridge-pile-state-synchronised'),
|
|
66
83
|
};
|
|
67
84
|
case BridgePileState.NOT_SYNCHRONIZED:
|
|
@@ -100,6 +117,7 @@ function getBridgePileStateInfo(state?: BridgePileState): BridgePileStateInfo {
|
|
|
100
117
|
|
|
101
118
|
interface BridgeInfoTableProps {
|
|
102
119
|
piles: TBridgePile[];
|
|
120
|
+
bridgeInfo?: TBridgeInfo;
|
|
103
121
|
database?: string;
|
|
104
122
|
clusterName?: string;
|
|
105
123
|
}
|
|
@@ -131,6 +149,18 @@ const BridgePileCard = React.memo(function BridgePileCard({
|
|
|
131
149
|
return null;
|
|
132
150
|
}
|
|
133
151
|
|
|
152
|
+
if (pile.State === BridgePileState.PRIMARY && help) {
|
|
153
|
+
return (
|
|
154
|
+
<ActionTooltip title={help}>
|
|
155
|
+
<span className={b('state-label')} tabIndex={0}>
|
|
156
|
+
<Label theme={theme} size="xs" icon={icon}>
|
|
157
|
+
{label}
|
|
158
|
+
</Label>
|
|
159
|
+
</span>
|
|
160
|
+
</ActionTooltip>
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
134
164
|
return (
|
|
135
165
|
<LabelWithHelpMark
|
|
136
166
|
theme={theme}
|
|
@@ -165,67 +195,123 @@ const BridgePileCard = React.memo(function BridgePileCard({
|
|
|
165
195
|
|
|
166
196
|
const pileName = pile.Name?.trim() || EMPTY_DATA_PLACEHOLDER;
|
|
167
197
|
const nodes = pile.Nodes === undefined ? EMPTY_DATA_PLACEHOLDER : formatNumber(pile.Nodes);
|
|
198
|
+
const hasRoleCounters = [
|
|
199
|
+
pile.StorageNodes,
|
|
200
|
+
pile.AliveStorageNodes,
|
|
201
|
+
pile.ComputeNodes,
|
|
202
|
+
pile.AliveComputeNodes,
|
|
203
|
+
].some((value) => value !== undefined);
|
|
204
|
+
const formatCount = (value?: number) => {
|
|
205
|
+
const count = parseOptionalNonNegativeNumber(value);
|
|
206
|
+
return count === undefined ? EMPTY_DATA_PLACEHOLDER : formatNumber(count);
|
|
207
|
+
};
|
|
208
|
+
const nodeCounters = [
|
|
209
|
+
{kind: 'storage', total: pile.StorageNodes, alive: pile.AliveStorageNodes},
|
|
210
|
+
{kind: 'compute', total: pile.ComputeNodes, alive: pile.AliveComputeNodes},
|
|
211
|
+
] as const;
|
|
168
212
|
const handleHealthcheckClick = () => {
|
|
169
213
|
if (pileHealthcheck.target) {
|
|
170
214
|
onHealthcheckClick(pileHealthcheck.target);
|
|
171
215
|
}
|
|
172
216
|
};
|
|
217
|
+
const healthcheckAccessibleName = `${i18n('label_bridge-pile-health-status-prefix', {pileName})} ${EFlagToStatusName[pileHealthcheck.status]}`;
|
|
173
218
|
|
|
174
219
|
return (
|
|
175
|
-
<Flex direction="column" gap={
|
|
176
|
-
<Flex justifyContent="space-between" alignItems="
|
|
177
|
-
<
|
|
178
|
-
{
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
220
|
+
<Flex as={Card} view="outlined" direction="column" gap={3} className={b('pile')}>
|
|
221
|
+
<Flex justifyContent="space-between" alignItems="center" gap={2} width="100%">
|
|
222
|
+
<Flex alignItems="center" gap={1} minWidth={0}>
|
|
223
|
+
<Text variant="subheader-1" ellipsis className={b('pile-name')}>
|
|
224
|
+
{pileName}
|
|
225
|
+
</Text>
|
|
226
|
+
{current ? (
|
|
227
|
+
<Tooltip content={i18n('context_bridge-pile-current')}>
|
|
228
|
+
<span
|
|
229
|
+
role="img"
|
|
230
|
+
aria-label={i18n('label_you-are-here')}
|
|
231
|
+
className={b('current-pile')}
|
|
232
|
+
tabIndex={0}
|
|
233
|
+
>
|
|
234
|
+
<Label
|
|
235
|
+
theme="info"
|
|
236
|
+
size="xs"
|
|
237
|
+
icon={<Icon data={MapPin} size={12} />}
|
|
238
|
+
qa="bridge-current-pile"
|
|
239
|
+
/>
|
|
240
|
+
</span>
|
|
241
|
+
</Tooltip>
|
|
242
|
+
) : null}
|
|
243
|
+
</Flex>
|
|
192
244
|
{stateStatus}
|
|
193
|
-
{healthcheckAllowed &&
|
|
194
|
-
(healthcheckLoading ? (
|
|
195
|
-
<Skeleton className={b('healthcheck-skeleton')} />
|
|
196
|
-
) : (
|
|
197
|
-
<EntityStatus.Label
|
|
198
|
-
status={pileHealthcheck.status}
|
|
199
|
-
size="xs"
|
|
200
|
-
className={b('healthcheck-status')}
|
|
201
|
-
onClick={pileHealthcheck.target ? handleHealthcheckClick : undefined}
|
|
202
|
-
endContent={
|
|
203
|
-
pileHealthcheck.target ? (
|
|
204
|
-
<Icon data={ChevronRight} size={12} />
|
|
205
|
-
) : undefined
|
|
206
|
-
}
|
|
207
|
-
qa="bridge-pile-healthcheck"
|
|
208
|
-
>
|
|
209
|
-
{pileHealthcheck.target ? (
|
|
210
|
-
<span className={b('healthcheck-accessible-prefix')}>
|
|
211
|
-
{i18n('label_bridge-pile-health-status-prefix', {pileName})}
|
|
212
|
-
</span>
|
|
213
|
-
) : null}
|
|
214
|
-
</EntityStatus.Label>
|
|
215
|
-
))}
|
|
216
|
-
</Flex>
|
|
217
|
-
<Flex gap={1} alignItems="center" className={b('nodes')}>
|
|
218
|
-
<Icon data={Archive} size={14} />
|
|
219
|
-
<Text variant="body-1">
|
|
220
|
-
{i18n('field_nodes')}: {nodes}
|
|
221
|
-
</Text>
|
|
222
245
|
</Flex>
|
|
246
|
+
<DefinitionList nameMaxWidth={130} className={text({variant: 'body-1'}, b('details'))}>
|
|
247
|
+
{hasRoleCounters ? (
|
|
248
|
+
nodeCounters.map(({kind, total, alive}) => {
|
|
249
|
+
const title = i18n(
|
|
250
|
+
kind === 'storage' ? 'field_storage-nodes' : 'field_compute-nodes',
|
|
251
|
+
);
|
|
252
|
+
const progress = getBridgeNodesProgress(total, alive);
|
|
253
|
+
return (
|
|
254
|
+
<DefinitionList.Item key={kind} name={title}>
|
|
255
|
+
<Flex
|
|
256
|
+
alignItems="center"
|
|
257
|
+
gap={2}
|
|
258
|
+
wrap
|
|
259
|
+
qa={'bridge-pile-' + kind + '-nodes'}
|
|
260
|
+
>
|
|
261
|
+
{progress !== undefined ? (
|
|
262
|
+
<span className={b('nodes-progress')} aria-hidden="true">
|
|
263
|
+
<Progress value={progress} size="xs" theme="info" />
|
|
264
|
+
</span>
|
|
265
|
+
) : null}
|
|
266
|
+
<Text whiteSpace="nowrap">
|
|
267
|
+
{i18n('value_nodes-alive', {
|
|
268
|
+
alive: formatCount(alive),
|
|
269
|
+
total: formatCount(total),
|
|
270
|
+
})}
|
|
271
|
+
</Text>
|
|
272
|
+
</Flex>
|
|
273
|
+
</DefinitionList.Item>
|
|
274
|
+
);
|
|
275
|
+
})
|
|
276
|
+
) : (
|
|
277
|
+
<DefinitionList.Item name={i18n('field_nodes')}>{nodes}</DefinitionList.Item>
|
|
278
|
+
)}
|
|
279
|
+
{healthcheckAllowed && (
|
|
280
|
+
<DefinitionList.Item name={i18n('field_healthcheck')}>
|
|
281
|
+
{healthcheckLoading ? (
|
|
282
|
+
<Skeleton className={b('healthcheck-skeleton')} />
|
|
283
|
+
) : (
|
|
284
|
+
<Flex shrink={0}>
|
|
285
|
+
<EntityStatus.Label
|
|
286
|
+
view="compact"
|
|
287
|
+
status={pileHealthcheck.status}
|
|
288
|
+
checkIcon="check"
|
|
289
|
+
tooltipTitle={
|
|
290
|
+
pileHealthcheck.status === EFlag.Green
|
|
291
|
+
? i18n('context_bridge-pile-no-issues')
|
|
292
|
+
: undefined
|
|
293
|
+
}
|
|
294
|
+
size="xxs"
|
|
295
|
+
iconSize={12}
|
|
296
|
+
onClick={
|
|
297
|
+
pileHealthcheck.target ? handleHealthcheckClick : undefined
|
|
298
|
+
}
|
|
299
|
+
aria-label={healthcheckAccessibleName}
|
|
300
|
+
tabIndex={pileHealthcheck.target ? undefined : 0}
|
|
301
|
+
qa="bridge-pile-healthcheck"
|
|
302
|
+
/>
|
|
303
|
+
</Flex>
|
|
304
|
+
)}
|
|
305
|
+
</DefinitionList.Item>
|
|
306
|
+
)}
|
|
307
|
+
</DefinitionList>
|
|
223
308
|
</Flex>
|
|
224
309
|
);
|
|
225
310
|
});
|
|
226
311
|
|
|
227
312
|
export const BridgeInfoTable = React.memo(function BridgeInfoTable({
|
|
228
313
|
piles,
|
|
314
|
+
bridgeInfo,
|
|
229
315
|
database,
|
|
230
316
|
clusterName,
|
|
231
317
|
}: BridgeInfoTableProps) {
|
|
@@ -257,8 +343,15 @@ export const BridgeInfoTable = React.memo(function BridgeInfoTable({
|
|
|
257
343
|
|
|
258
344
|
const sortedPiles = React.useMemo(() => {
|
|
259
345
|
return piles
|
|
260
|
-
.map((pile, index) => ({
|
|
346
|
+
.map((pile, index) => ({
|
|
347
|
+
pile,
|
|
348
|
+
index,
|
|
349
|
+
current: Boolean(currentPileName?.trim() && pile.Name === currentPileName),
|
|
350
|
+
}))
|
|
261
351
|
.sort((left, right) => {
|
|
352
|
+
if (left.current !== right.current) {
|
|
353
|
+
return left.current ? -1 : 1;
|
|
354
|
+
}
|
|
262
355
|
const leftPrimary = left.pile.State === BridgePileState.PRIMARY;
|
|
263
356
|
const rightPrimary = right.pile.State === BridgePileState.PRIMARY;
|
|
264
357
|
if (leftPrimary !== rightPrimary) {
|
|
@@ -266,23 +359,26 @@ export const BridgeInfoTable = React.memo(function BridgeInfoTable({
|
|
|
266
359
|
}
|
|
267
360
|
return left.index - right.index;
|
|
268
361
|
});
|
|
269
|
-
}, [piles]);
|
|
362
|
+
}, [piles, currentPileName]);
|
|
270
363
|
|
|
271
364
|
return (
|
|
272
|
-
<Flex
|
|
273
|
-
{
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
365
|
+
<Flex direction="column" gap={3} className={b()}>
|
|
366
|
+
{bridgeInfo ? <BridgeDatabasesSummary bridgeInfo={bridgeInfo} /> : null}
|
|
367
|
+
<Flex wrap className={b('piles')}>
|
|
368
|
+
{sortedPiles.map(({pile, index, current}) => (
|
|
369
|
+
<BridgePileCard
|
|
370
|
+
key={pile.PileId ?? pile.Name ?? index}
|
|
371
|
+
pile={pile}
|
|
372
|
+
current={current}
|
|
373
|
+
healthcheckAllowed={Boolean(isMonitoringAllowed)}
|
|
374
|
+
healthcheckAvailable={healthcheckAvailable}
|
|
375
|
+
healthcheckSupportsPiles={healthcheckSupportsPiles}
|
|
376
|
+
healthcheckLoading={healthcheckLoading}
|
|
377
|
+
leavesIssues={leavesIssues}
|
|
378
|
+
onHealthcheckClick={handleOpenHealthcheckIssue}
|
|
379
|
+
/>
|
|
380
|
+
))}
|
|
381
|
+
</Flex>
|
|
286
382
|
</Flex>
|
|
287
383
|
);
|
|
288
384
|
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type {TBridgeInfo} from '../../../../types/api/cluster';
|
|
2
|
+
import {BridgeSyncStatus} from '../../../../types/api/cluster';
|
|
3
|
+
import {getUsage} from '../../../../utils/storage';
|
|
4
|
+
import {parseOptionalNonNegativeNumber} from '../../../../utils/utils';
|
|
5
|
+
|
|
6
|
+
export function getBridgeDatabaseCounts(bridgeInfo?: TBridgeInfo) {
|
|
7
|
+
const counts = bridgeInfo?.DatabaseCountsBySyncStatus;
|
|
8
|
+
if (counts === undefined || counts === null) {
|
|
9
|
+
return undefined;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return Object.values(BridgeSyncStatus)
|
|
13
|
+
.filter((status) => status !== BridgeSyncStatus.NOT_REQUIRED)
|
|
14
|
+
.flatMap((status) => {
|
|
15
|
+
const count = parseOptionalNonNegativeNumber(counts[status]);
|
|
16
|
+
return count === undefined ? [] : [{status, count}];
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function getBridgeNodesProgress(total?: number, alive?: number) {
|
|
21
|
+
const totalCount = parseOptionalNonNegativeNumber(total);
|
|
22
|
+
const aliveCount = parseOptionalNonNegativeNumber(alive);
|
|
23
|
+
if (totalCount === undefined || aliveCount === undefined) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
return getUsage({Used: aliveCount, Limit: totalCount});
|
|
27
|
+
}
|
|
@@ -22,6 +22,19 @@
|
|
|
22
22
|
"label_overview": "Overview",
|
|
23
23
|
"field_state": "State",
|
|
24
24
|
"field_nodes": "Nodes",
|
|
25
|
+
"field_storage-nodes": "Storage nodes",
|
|
26
|
+
"field_compute-nodes": "Compute nodes",
|
|
27
|
+
"value_nodes-alive": "{{alive}} / {{total}} alive",
|
|
28
|
+
"field_healthcheck": "Healthcheck",
|
|
29
|
+
"context_bridge-pile-current": "You are viewing the cluster from this pile’s perspective",
|
|
30
|
+
"context_bridge-pile-no-issues": "No issues reported for this pile",
|
|
31
|
+
"field_bridge-databases": "Bridge databases",
|
|
32
|
+
"context_bridge-sync-status": "Sync status: {{status}}",
|
|
33
|
+
"value_bridge-sync-synced": "Synchronised",
|
|
34
|
+
"value_bridge-sync-syncing": "Syncing",
|
|
35
|
+
"value_bridge-sync-pending": "Pending",
|
|
36
|
+
"value_bridge-sync-unknown": "Unknown",
|
|
37
|
+
"value_bridge-sync-not-required": "Not applicable",
|
|
25
38
|
"value_nodes": {
|
|
26
39
|
"one": "{{formattedCount}} node",
|
|
27
40
|
"other": "{{formattedCount}} nodes"
|
|
@@ -10,6 +10,7 @@ import {useStorageQueryParams} from '../useStorageQueryParams';
|
|
|
10
10
|
|
|
11
11
|
import {GroupedStorageGroupsComponent} from './GroupedStorageGroupsComponent';
|
|
12
12
|
import {StorageGroupsComponent} from './StorageGroupsComponent';
|
|
13
|
+
import {useStorageGroupsBridgeGrouping} from './useStorageGroupsBridgeGrouping';
|
|
13
14
|
|
|
14
15
|
import '../Storage.scss';
|
|
15
16
|
|
|
@@ -19,6 +20,10 @@ export function PaginatedStorageGroups(props: PaginatedStorageProps) {
|
|
|
19
20
|
|
|
20
21
|
const capabilitiesLoaded = useCapabilitiesLoaded();
|
|
21
22
|
const storageGroupsHandlerHasGrouping = useStorageGroupsHandlerHasGrouping();
|
|
23
|
+
const {bridgeModeEnabled, bridgeSyncGroupingAvailable} = useStorageGroupsBridgeGrouping();
|
|
24
|
+
const groupingUnavailable =
|
|
25
|
+
(storageGroupsGroupByParam === 'PileName' && !bridgeModeEnabled) ||
|
|
26
|
+
(storageGroupsGroupByParam === 'BridgeSyncStatus' && !bridgeSyncGroupingAvailable);
|
|
22
27
|
|
|
23
28
|
// Other filters do not fit with grouping
|
|
24
29
|
// Reset them if grouping available
|
|
@@ -29,7 +34,7 @@ export function PaginatedStorageGroups(props: PaginatedStorageProps) {
|
|
|
29
34
|
}, [handleShowAllGroups, storageGroupsHandlerHasGrouping, visibleEntities]);
|
|
30
35
|
|
|
31
36
|
const renderContent = () => {
|
|
32
|
-
if (storageGroupsHandlerHasGrouping && storageGroupsGroupByParam) {
|
|
37
|
+
if (storageGroupsHandlerHasGrouping && storageGroupsGroupByParam && !groupingUnavailable) {
|
|
33
38
|
return <GroupedStorageGroupsComponent {...props} />;
|
|
34
39
|
}
|
|
35
40
|
|
|
@@ -9,7 +9,6 @@ import {Search} from '../../../components/Search/Search';
|
|
|
9
9
|
import {
|
|
10
10
|
useBlobStorageCapacityMetricsAvailable,
|
|
11
11
|
useBlobStorageCapacityMetricsEnabled,
|
|
12
|
-
useBridgeModeEnabled,
|
|
13
12
|
} from '../../../store/reducers/capabilities/hooks';
|
|
14
13
|
import {SETTING_KEYS} from '../../../store/reducers/settings/constants';
|
|
15
14
|
import {useSetting} from '../../../utils/hooks';
|
|
@@ -26,6 +25,8 @@ import i18n from '../i18n';
|
|
|
26
25
|
import {b} from '../shared';
|
|
27
26
|
import {useIsStorageExpertMode, useStorageQueryParams} from '../useStorageQueryParams';
|
|
28
27
|
|
|
28
|
+
import {useStorageGroupsBridgeGrouping} from './useStorageGroupsBridgeGrouping';
|
|
29
|
+
|
|
29
30
|
interface StorageControlsProps {
|
|
30
31
|
withTypeSelector?: boolean;
|
|
31
32
|
withGroupBySelect?: boolean;
|
|
@@ -70,16 +71,26 @@ export function StorageGroupsControls({
|
|
|
70
71
|
);
|
|
71
72
|
const isStorageExpertMode = useIsStorageExpertMode();
|
|
72
73
|
const storageExpertModeAvailable = useBlobStorageCapacityMetricsAvailable();
|
|
73
|
-
const bridgeModeEnabled = useBridgeModeEnabled();
|
|
74
74
|
const blobMetricsEnabled = useBlobStorageCapacityMetricsEnabled();
|
|
75
|
+
const {bridgeModeEnabled, bridgeSyncGroupingAvailable} = useStorageGroupsBridgeGrouping();
|
|
75
76
|
|
|
76
77
|
const isVDisksPDisksColumnVisible = React.useMemo(() => {
|
|
77
78
|
return columns.some((column) => column.name === STORAGE_GROUPS_COLUMNS_IDS.VDisksPDisks);
|
|
78
79
|
}, [columns]);
|
|
79
80
|
|
|
80
81
|
const groupByOptions = React.useMemo(() => {
|
|
81
|
-
return getStorageGroupsGroupByOptions(
|
|
82
|
-
|
|
82
|
+
return getStorageGroupsGroupByOptions(
|
|
83
|
+
blobMetricsEnabled,
|
|
84
|
+
bridgeModeEnabled,
|
|
85
|
+
bridgeSyncGroupingAvailable,
|
|
86
|
+
);
|
|
87
|
+
}, [bridgeModeEnabled, blobMetricsEnabled, bridgeSyncGroupingAvailable]);
|
|
88
|
+
|
|
89
|
+
const groupByValue =
|
|
90
|
+
storageGroupsGroupByParam &&
|
|
91
|
+
groupByOptions.some(({value}) => value === storageGroupsGroupByParam)
|
|
92
|
+
? [storageGroupsGroupByParam]
|
|
93
|
+
: [];
|
|
83
94
|
|
|
84
95
|
const handleGroupBySelectUpdate = (value: string[]) => {
|
|
85
96
|
handleStorageGroupsGroupByParamChange(value[0]);
|
|
@@ -118,9 +129,7 @@ export function StorageGroupsControls({
|
|
|
118
129
|
qa="storage-groups-group-by"
|
|
119
130
|
placeholder={'-'}
|
|
120
131
|
width={150}
|
|
121
|
-
|
|
122
|
-
storageGroupsGroupByParam ? [storageGroupsGroupByParam] : undefined
|
|
123
|
-
}
|
|
132
|
+
value={groupByValue}
|
|
124
133
|
onUpdate={handleGroupBySelectUpdate}
|
|
125
134
|
options={groupByOptions}
|
|
126
135
|
/>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useBridgeModeEnabled,
|
|
3
|
+
useStorageGroupsHandlerHasBridgeSyncStatus,
|
|
4
|
+
} from '../../../store/reducers/capabilities/hooks';
|
|
5
|
+
|
|
6
|
+
export function useStorageGroupsBridgeGrouping() {
|
|
7
|
+
const bridgeModeEnabled = useBridgeModeEnabled();
|
|
8
|
+
const handlerHasBridgeSyncStatus = useStorageGroupsHandlerHasBridgeSyncStatus();
|
|
9
|
+
return {
|
|
10
|
+
bridgeModeEnabled,
|
|
11
|
+
bridgeSyncGroupingAvailable: bridgeModeEnabled && handlerHasBridgeSyncStatus,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {Flex, Text} from '@gravity-ui/uikit';
|
|
2
|
+
|
|
3
|
+
import {BridgeSyncStatusLabel} from '../../../../../components/BridgeSyncStatusLabel';
|
|
4
|
+
import {HoverPopup} from '../../../../../components/HoverPopup/HoverPopup';
|
|
5
|
+
import type {PreparedStorageGroup} from '../../../../../store/reducers/storage/types';
|
|
6
|
+
import {BridgeSyncStatus} from '../../../../../types/api/cluster';
|
|
7
|
+
import {cn} from '../../../../../utils/cn';
|
|
8
|
+
import {StorageGroupSyncDetails} from '../../../StorageGroupSyncDetails/StorageGroupSyncDetails';
|
|
9
|
+
|
|
10
|
+
import i18n from './i18n';
|
|
11
|
+
|
|
12
|
+
import './StorageGroupSyncPopover.scss';
|
|
13
|
+
|
|
14
|
+
const b = cn('ydb-storage-group-sync-popover');
|
|
15
|
+
|
|
16
|
+
function hasSyncDetails(group: PreparedStorageGroup) {
|
|
17
|
+
return (
|
|
18
|
+
group.BridgeSyncStatus === BridgeSyncStatus.SYNCING ||
|
|
19
|
+
group.BridgeSyncStatus === BridgeSyncStatus.PENDING
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function SyncDetails({group}: {group: PreparedStorageGroup}) {
|
|
24
|
+
return (
|
|
25
|
+
<div
|
|
26
|
+
className={b()}
|
|
27
|
+
data-qa="storage-group-sync-details"
|
|
28
|
+
role="presentation"
|
|
29
|
+
onClick={(event) => event.stopPropagation()}
|
|
30
|
+
>
|
|
31
|
+
<Flex direction="column" gap={4} className={b('body')}>
|
|
32
|
+
<Text variant="subheader-2">{i18n('title_sync')}</Text>
|
|
33
|
+
<StorageGroupSyncDetails group={group} />
|
|
34
|
+
</Flex>
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function StorageGroupSyncPopover({group}: {group: PreparedStorageGroup}) {
|
|
40
|
+
if (!hasSyncDetails(group)) {
|
|
41
|
+
return <BridgeSyncStatusLabel status={group.BridgeSyncStatus} />;
|
|
42
|
+
}
|
|
43
|
+
return (
|
|
44
|
+
<HoverPopup
|
|
45
|
+
placement={['right-start', 'left-start', 'bottom-start']}
|
|
46
|
+
renderPopupContent={() => <SyncDetails group={group} />}
|
|
47
|
+
>
|
|
48
|
+
<Flex as="span" inline onClick={(event) => event.stopPropagation()}>
|
|
49
|
+
<BridgeSyncStatusLabel status={group.BridgeSyncStatus} withInfo interactive />
|
|
50
|
+
</Flex>
|
|
51
|
+
</HoverPopup>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {ShieldKeyhole} from '@gravity-ui/icons';
|
|
3
|
+
import {NodesRight, ShieldKeyhole} from '@gravity-ui/icons';
|
|
4
4
|
import DataTable from '@gravity-ui/react-data-table';
|
|
5
5
|
import {Flex, Icon, Label, Popover} from '@gravity-ui/uikit';
|
|
6
6
|
import {isNil} from 'lodash';
|
|
@@ -39,12 +39,14 @@ import {getDegradedSeverity} from '../../utils';
|
|
|
39
39
|
import {getStorageGroupStateLabel} from '../../utils/getStorageGroupStateLabel';
|
|
40
40
|
import i18n from '../i18n';
|
|
41
41
|
|
|
42
|
+
import {StorageGroupSyncPopover} from './StorageGroupSyncPopover/StorageGroupSyncPopover';
|
|
42
43
|
import {
|
|
43
44
|
STORAGE_GROUPS_COLUMNS_IDS,
|
|
44
45
|
STORAGE_GROUPS_COLUMNS_TITLES,
|
|
45
46
|
STORAGE_GROUPS_DISKS_COLUMN_TITLES,
|
|
46
47
|
isSortableStorageGroupsColumn,
|
|
47
48
|
} from './constants';
|
|
49
|
+
import columnsI18n from './i18n';
|
|
48
50
|
import type {GetStorageColumnsData, StorageColumnsGetter, StorageGroupsColumn} from './types';
|
|
49
51
|
|
|
50
52
|
import './StorageGroupsColumns.scss';
|
|
@@ -82,6 +84,31 @@ const pileNameColumn: StorageGroupsColumn = {
|
|
|
82
84
|
align: DataTable.LEFT,
|
|
83
85
|
};
|
|
84
86
|
|
|
87
|
+
const bridgeModeColumn: StorageGroupsColumn = {
|
|
88
|
+
name: STORAGE_GROUPS_COLUMNS_IDS.BridgeMode,
|
|
89
|
+
header: STORAGE_GROUPS_COLUMNS_TITLES.BridgeMode,
|
|
90
|
+
width: 100,
|
|
91
|
+
render: ({row}) => {
|
|
92
|
+
if (row.BridgeMode === true) {
|
|
93
|
+
return (
|
|
94
|
+
<Label theme="utility" size="xs" icon={<Icon data={NodesRight} size={12} />}>
|
|
95
|
+
{columnsI18n('value_bridge')}
|
|
96
|
+
</Label>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
return row.BridgeMode === false ? columnsI18n('value_non-bridge') : EMPTY_DATA_PLACEHOLDER;
|
|
100
|
+
},
|
|
101
|
+
align: DataTable.LEFT,
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const bridgeSyncStatusColumn: StorageGroupsColumn = {
|
|
105
|
+
name: STORAGE_GROUPS_COLUMNS_IDS.BridgeSyncStatus,
|
|
106
|
+
header: STORAGE_GROUPS_COLUMNS_TITLES.BridgeSyncStatus,
|
|
107
|
+
width: 170,
|
|
108
|
+
render: ({row}) => <StorageGroupSyncPopover group={row} />,
|
|
109
|
+
align: DataTable.LEFT,
|
|
110
|
+
};
|
|
111
|
+
|
|
85
112
|
const typeColumn: StorageGroupsColumn = {
|
|
86
113
|
name: STORAGE_GROUPS_COLUMNS_IDS.MediaType,
|
|
87
114
|
header: STORAGE_GROUPS_COLUMNS_TITLES.MediaType,
|
|
@@ -378,9 +405,11 @@ export const getStorageGroupsColumns: StorageColumnsGetter = (data) => {
|
|
|
378
405
|
const columns = [
|
|
379
406
|
groupIdColumn,
|
|
380
407
|
poolNameColumn,
|
|
381
|
-
pileNameColumn,
|
|
382
408
|
typeColumn,
|
|
383
409
|
erasureColumn,
|
|
410
|
+
bridgeModeColumn,
|
|
411
|
+
pileNameColumn,
|
|
412
|
+
bridgeSyncStatusColumn,
|
|
384
413
|
degradedColumn,
|
|
385
414
|
stateColumn,
|
|
386
415
|
usageColumn,
|