ydb-embedded-ui 21.0.0 → 22.0.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/ComponentsProvider/ComponentsProvider.d.ts +0 -4
- package/dist/components/ComponentsProvider/componentsRegistry.d.ts +0 -2
- package/dist/components/ComponentsProvider/componentsRegistry.js +1 -3
- package/dist/components/ComponentsProvider/componentsRegistry.js.map +1 -1
- package/dist/components/ContentWithPopup/ContentWithPopup.d.ts +1 -1
- package/dist/components/ContentWithPopup/ContentWithPopup.js +4 -2
- package/dist/components/ContentWithPopup/ContentWithPopup.js.map +1 -1
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js +10 -6
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js.map +1 -1
- package/dist/components/CriticalActionDialog/i18n/en.json +1 -2
- package/dist/components/CriticalActionDialog/i18n/index.d.ts +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +2 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/components/FullNodeViewer/i18n/index.d.ts +1 -1
- package/dist/components/HoverPopup/HoverPopup.js +27 -4
- package/dist/components/HoverPopup/HoverPopup.js.map +1 -1
- package/dist/components/HoverPopup/getPopupScrollContainer.d.ts +1 -0
- package/dist/components/HoverPopup/getPopupScrollContainer.js +20 -0
- package/dist/components/HoverPopup/getPopupScrollContainer.js.map +1 -0
- package/dist/components/MetricChart/reducer.d.ts +2 -2
- package/dist/components/SegmentedProgress/SegmentedProgress.d.ts +22 -1
- package/dist/components/SegmentedProgress/SegmentedProgress.js +44 -3
- package/dist/components/SegmentedProgress/SegmentedProgress.js.map +1 -1
- package/dist/components/SegmentedProgress/SegmentedProgress.scss +5 -0
- package/dist/components/StorageGroupInfo/StorageGroupInfo.js +1 -13
- package/dist/components/StorageGroupInfo/StorageGroupInfo.js.map +1 -1
- package/dist/components/StorageGroupInfo/i18n/en.json +0 -1
- package/dist/components/StorageGroupInfo/i18n/index.d.ts +1 -1
- package/dist/components/nodesColumns/i18n/index.d.ts +1 -1
- package/dist/containers/App/App.js +3 -3
- package/dist/containers/App/App.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +8 -5
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +8 -0
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.d.ts +4 -3
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.js +62 -25
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.scss +18 -0
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/utils.d.ts +22 -0
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/utils.js +49 -0
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/utils.js.map +1 -0
- package/dist/containers/Cluster/i18n/en.json +13 -4
- package/dist/containers/Cluster/i18n/index.d.ts +1 -1
- package/dist/containers/Header/HeaderActionsMenu.js +19 -3
- package/dist/containers/Header/HeaderActionsMenu.js.map +1 -1
- package/dist/containers/Header/hooks/useSharedDatabasePath.d.ts +4 -1
- package/dist/containers/Header/hooks/useSharedDatabasePath.js +14 -10
- package/dist/containers/Header/hooks/useSharedDatabasePath.js.map +1 -1
- package/dist/containers/Header/i18n/en.json +1 -0
- package/dist/containers/Header/i18n/index.d.ts +1 -1
- package/dist/containers/Node/Node.js +20 -17
- package/dist/containers/Node/Node.js.map +1 -1
- package/dist/containers/Node/NodePages.d.ts +3 -9
- package/dist/containers/Node/NodePages.js +2 -10
- package/dist/containers/Node/NodePages.js.map +1 -1
- package/dist/containers/Node/i18n/en.json +0 -3
- package/dist/containers/Node/i18n/index.d.ts +1 -1
- package/dist/containers/Nodes/NodesTable.js +2 -2
- package/dist/containers/Nodes/NodesTable.js.map +1 -1
- package/dist/containers/Operations/columns.js +2 -2
- package/dist/containers/Operations/columns.js.map +1 -1
- package/dist/containers/Operations/i18n/en.json +2 -2
- package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.js +1 -1
- package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskPage.js +1 -1
- package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
- package/dist/containers/PDiskPage/i18n/en.json +3 -3
- package/dist/containers/Storage/PDisks/PDisks.js +1 -1
- package/dist/containers/Storage/PDisks/PDisks.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.js +0 -1
- package/dist/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/PaginatedStorageGroupsTable.js +2 -3
- package/dist/containers/Storage/PaginatedStorageGroupsTable/PaginatedStorageGroupsTable.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/constants.d.ts +2 -2
- package/dist/containers/Storage/PaginatedStorageGroupsTable/getGroups.d.ts +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/getGroups.js +2 -3
- package/dist/containers/Storage/PaginatedStorageGroupsTable/getGroups.js.map +1 -1
- package/dist/containers/StorageGroupPage/StorageGroupPage.js +2 -3
- package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
- package/dist/containers/Tablet/components/TabletControls/TabletControls.js +1 -1
- package/dist/containers/Tablet/components/TabletControls/TabletControls.js.map +1 -1
- package/dist/containers/Tablet/i18n/en.json +3 -3
- package/dist/containers/Tablets/TabletsTable.js +1 -1
- package/dist/containers/Tablets/TabletsTable.js.map +1 -1
- package/dist/containers/Tablets/i18n/en.json +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/utils/constants.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js +3 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +1 -3
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/useTenantStorageNewData.d.ts +5 -5
- package/dist/containers/Tenant/Diagnostics/useDiagnosticsPages.js +2 -4
- package/dist/containers/Tenant/Diagnostics/useDiagnosticsPages.js.map +1 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.js +10 -2
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.js.map +1 -1
- package/dist/routes.d.ts +1 -0
- package/dist/routes.js.map +1 -1
- package/dist/services/api/viewer.d.ts +1 -2
- package/dist/services/api/viewer.js +0 -11
- package/dist/services/api/viewer.js.map +1 -1
- package/dist/store/configureStore.d.ts +12 -12
- package/dist/store/defaultStore.d.ts +6 -6
- package/dist/store/reducers/api.d.ts +1 -1
- package/dist/store/reducers/api.js +3 -0
- package/dist/store/reducers/api.js.map +1 -1
- package/dist/store/reducers/authentication/authentication.d.ts +4 -4
- package/dist/store/reducers/cancelQuery.d.ts +2 -2
- package/dist/store/reducers/capabilities/capabilities.d.ts +43 -43
- package/dist/store/reducers/capabilities/hooks.d.ts +5 -6
- package/dist/store/reducers/capabilities/hooks.js +0 -3
- package/dist/store/reducers/capabilities/hooks.js.map +1 -1
- package/dist/store/reducers/cluster/cluster.d.ts +5 -5
- package/dist/store/reducers/cluster/cluster.js +3 -2
- package/dist/store/reducers/cluster/cluster.js.map +1 -1
- package/dist/store/reducers/clusters/clusters.d.ts +2 -2
- package/dist/store/reducers/clusters/clusters.js +2 -1
- package/dist/store/reducers/clusters/clusters.js.map +1 -1
- package/dist/store/reducers/codeAssist/codeAssist.d.ts +6 -6
- package/dist/store/reducers/configs.d.ts +3 -3
- package/dist/store/reducers/entityDataTags.d.ts +21 -0
- package/dist/store/reducers/entityDataTags.js +24 -0
- package/dist/store/reducers/entityDataTags.js.map +1 -0
- package/dist/store/reducers/environments/environments.d.ts +2 -2
- package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +4 -4
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +111 -111
- package/dist/store/reducers/heatmap.d.ts +2 -2
- package/dist/store/reducers/hotKeys/hotKeys.d.ts +2 -2
- package/dist/store/reducers/index.d.ts +8 -8
- package/dist/store/reducers/network/network.d.ts +2 -2
- package/dist/store/reducers/node/node.d.ts +2 -5
- package/dist/store/reducers/node/node.js +0 -12
- package/dist/store/reducers/node/node.js.map +1 -1
- package/dist/store/reducers/node/types.d.ts +0 -14
- package/dist/store/reducers/nodes/nodes.d.ts +2 -2
- package/dist/store/reducers/nodesList.d.ts +12 -12
- package/dist/store/reducers/operations.d.ts +5 -5
- package/dist/store/reducers/overview/overview.d.ts +2 -2
- package/dist/store/reducers/partitions/partitions.d.ts +3 -3
- package/dist/store/reducers/pdisk/pdisk.d.ts +2 -2
- package/dist/store/reducers/planToSvg.d.ts +2 -2
- package/dist/store/reducers/preview.d.ts +2 -2
- package/dist/store/reducers/query/api.d.ts +4 -4
- package/dist/store/reducers/replication.d.ts +2 -2
- package/dist/store/reducers/schema/schema.d.ts +16 -16
- package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +40 -40
- package/dist/store/reducers/settings/api.d.ts +4 -4
- package/dist/store/reducers/settings/settings.d.ts +1 -1
- package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +2 -2
- package/dist/store/reducers/showCreateTable/showCreateTable.d.ts +2 -2
- package/dist/store/reducers/storage/requestStorageData.d.ts +2 -4
- package/dist/store/reducers/storage/requestStorageData.js +4 -10
- package/dist/store/reducers/storage/requestStorageData.js.map +1 -1
- package/dist/store/reducers/storage/storage.d.ts +4 -6
- package/dist/store/reducers/storage/storage.js.map +1 -1
- package/dist/store/reducers/storage/types.d.ts +0 -9
- package/dist/store/reducers/storage/utils.d.ts +1 -2
- package/dist/store/reducers/storage/utils.js +3 -114
- package/dist/store/reducers/storage/utils.js.map +1 -1
- package/dist/store/reducers/storageUsage/StorageUsage.d.ts +2 -2
- package/dist/store/reducers/streamingQuery/streamingQuery.d.ts +2 -2
- package/dist/store/reducers/table/table.d.ts +4 -4
- package/dist/store/reducers/tableData.d.ts +1 -1
- package/dist/store/reducers/tablePartitioning/tablePartitioning.d.ts +2 -2
- package/dist/store/reducers/tableSchemaData.d.ts +2 -2
- package/dist/store/reducers/tablet.d.ts +8 -8
- package/dist/store/reducers/tablets.d.ts +3 -3
- package/dist/store/reducers/tenant/tenant.d.ts +2 -2
- package/dist/store/reducers/tenant/tenant.js +14 -1
- package/dist/store/reducers/tenant/tenant.js.map +1 -1
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/storage/tenantOverviewStorage.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +2 -2
- package/dist/store/reducers/tenants/tenants.d.ts +3 -3
- package/dist/store/reducers/tenants/tenants.js +2 -1
- package/dist/store/reducers/tenants/tenants.js.map +1 -1
- package/dist/store/reducers/topic/topic.d.ts +84 -84
- package/dist/store/reducers/vdisk/vdisk.d.ts +3 -3
- package/dist/store/reducers/viewSchema/viewSchema.d.ts +2 -2
- package/dist/store/state-url-mapping.js +5 -1
- package/dist/store/state-url-mapping.js.map +1 -1
- package/dist/types/api/storage.d.ts +2 -111
- package/dist/types/api/storage.js.map +1 -1
- package/dist/uiFactory/types.d.ts +8 -0
- package/dist/uiFactory/uiFactory.js +5 -2
- package/dist/uiFactory/uiFactory.js.map +1 -1
- package/dist/utils/hooks/useWhoami.d.ts +5 -5
- package/package.json +2 -2
- package/src/components/ComponentsProvider/componentsRegistry.ts +1 -4
- package/src/components/ContentWithPopup/ContentWithPopup.tsx +7 -0
- package/src/components/CriticalActionDialog/CriticalActionDialog.tsx +12 -25
- package/src/components/CriticalActionDialog/i18n/en.json +1 -2
- package/src/components/DropdownMenu/DropdownMenu.tsx +3 -2
- package/src/components/HoverPopup/HoverPopup.tsx +32 -3
- package/src/components/HoverPopup/getPopupScrollContainer.ts +20 -0
- package/src/components/SegmentedProgress/SegmentedProgress.scss +5 -0
- package/src/components/SegmentedProgress/SegmentedProgress.tsx +99 -10
- package/src/components/StorageGroupInfo/StorageGroupInfo.tsx +0 -13
- package/src/components/StorageGroupInfo/i18n/en.json +0 -1
- package/src/containers/App/App.tsx +3 -3
- package/src/containers/Cluster/ClusterInfo/ClusterInfo.scss +8 -0
- package/src/containers/Cluster/ClusterInfo/ClusterInfo.tsx +12 -11
- package/src/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.scss +18 -0
- package/src/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.tsx +143 -58
- package/src/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/utils.ts +89 -0
- package/src/containers/Cluster/i18n/en.json +13 -4
- package/src/containers/Header/HeaderActionsMenu.tsx +22 -2
- package/src/containers/Header/hooks/useSharedDatabasePath.ts +33 -26
- package/src/containers/Header/i18n/en.json +1 -0
- package/src/containers/Node/Node.tsx +32 -18
- package/src/containers/Node/NodePages.ts +5 -10
- package/src/containers/Node/i18n/en.json +0 -4
- package/src/containers/Nodes/NodesTable.tsx +7 -1
- package/src/containers/Operations/columns.tsx +4 -0
- package/src/containers/Operations/i18n/en.json +2 -2
- package/src/containers/PDiskPage/DecommissionButton/DecommissionButton.tsx +2 -0
- package/src/containers/PDiskPage/PDiskPage.tsx +3 -1
- package/src/containers/PDiskPage/i18n/en.json +3 -3
- package/src/containers/Storage/PDisks/PDisks.tsx +1 -1
- package/src/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.tsx +0 -1
- package/src/containers/Storage/PaginatedStorageGroupsTable/PaginatedStorageGroupsTable.tsx +2 -6
- package/src/containers/Storage/PaginatedStorageGroupsTable/columns/constants.ts +2 -2
- package/src/containers/Storage/PaginatedStorageGroupsTable/getGroups.ts +40 -47
- package/src/containers/StorageGroupPage/StorageGroupPage.tsx +2 -6
- package/src/containers/Tablet/components/TabletControls/TabletControls.tsx +7 -1
- package/src/containers/Tablet/i18n/en.json +3 -3
- package/src/containers/Tablets/TabletsTable.tsx +3 -1
- package/src/containers/Tablets/i18n/en.json +1 -1
- package/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.tsx +3 -1
- package/src/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.tsx +2 -2
- package/src/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.tsx +1 -6
- package/src/containers/Tenant/Diagnostics/useDiagnosticsPages.ts +1 -4
- package/src/containers/Tenant/Healthcheck/components/HealthcheckDrawer.tsx +16 -1
- package/src/routes.ts +1 -1
- package/src/services/api/viewer.ts +1 -25
- package/src/store/reducers/api.ts +4 -0
- package/src/store/reducers/capabilities/hooks.ts +0 -4
- package/src/store/reducers/cluster/cluster.ts +3 -2
- package/src/store/reducers/clusters/clusters.ts +2 -1
- package/src/store/reducers/entityDataTags.ts +34 -0
- package/src/store/reducers/node/node.ts +0 -11
- package/src/store/reducers/node/types.ts +0 -18
- package/src/store/reducers/storage/requestStorageData.ts +5 -17
- package/src/store/reducers/storage/storage.ts +2 -6
- package/src/store/reducers/storage/types.ts +0 -9
- package/src/store/reducers/storage/utils.ts +5 -178
- package/src/store/reducers/tenant/tenant.ts +17 -1
- package/src/store/reducers/tenants/tenants.ts +2 -1
- package/src/store/state-url-mapping.ts +5 -1
- package/src/types/api/storage.ts +7 -131
- package/src/uiFactory/types.ts +9 -0
- package/src/uiFactory/uiFactory.ts +12 -2
- package/dist/containers/Node/NodeStructure/NodeStructure.d.ts +0 -7
- package/dist/containers/Node/NodeStructure/NodeStructure.js +0 -76
- package/dist/containers/Node/NodeStructure/NodeStructure.js.map +0 -1
- package/dist/containers/Node/NodeStructure/NodeStructure.scss +0 -155
- package/dist/containers/Node/NodeStructure/PDiskTitleBadge.d.ts +0 -7
- package/dist/containers/Node/NodeStructure/PDiskTitleBadge.js +0 -7
- package/dist/containers/Node/NodeStructure/PDiskTitleBadge.js.map +0 -1
- package/dist/containers/Node/NodeStructure/Pdisk.d.ts +0 -10
- package/dist/containers/Node/NodeStructure/Pdisk.js +0 -125
- package/dist/containers/Node/NodeStructure/Pdisk.js.map +0 -1
- package/dist/store/reducers/node/selectors.d.ts +0 -47
- package/dist/store/reducers/node/selectors.js +0 -43
- package/dist/store/reducers/node/selectors.js.map +0 -1
- package/src/containers/Node/NodeStructure/NodeStructure.scss +0 -155
- package/src/containers/Node/NodeStructure/NodeStructure.tsx +0 -121
- package/src/containers/Node/NodeStructure/PDiskTitleBadge.tsx +0 -18
- package/src/containers/Node/NodeStructure/Pdisk.tsx +0 -274
- package/src/store/reducers/node/selectors.ts +0 -68
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import {DatabaseArrowRight, Pencil, PlugConnection, TrashBin} from '@gravity-ui/icons';
|
|
4
|
+
import {Flex, Spin, Text} from '@gravity-ui/uikit';
|
|
4
5
|
import {useHistory} from 'react-router-dom';
|
|
5
6
|
|
|
6
7
|
import {getConnectToDBDialog} from '../../components/ConnectToDB/ConnectToDBDialog';
|
|
@@ -41,7 +42,7 @@ export function DBHeaderActionsMenu({
|
|
|
41
42
|
const history = useHistory();
|
|
42
43
|
|
|
43
44
|
const emMetaAvailable = useEmMetaAvailable();
|
|
44
|
-
const sharedDatabasePath = useSharedDatabasePath({
|
|
45
|
+
const {isSharedDatabaseLoading, sharedDatabasePath} = useSharedDatabasePath({
|
|
45
46
|
clusterName,
|
|
46
47
|
databaseData,
|
|
47
48
|
isViewerUser,
|
|
@@ -81,7 +82,25 @@ export function DBHeaderActionsMenu({
|
|
|
81
82
|
]);
|
|
82
83
|
}
|
|
83
84
|
|
|
84
|
-
if (
|
|
85
|
+
if (isSharedDatabaseLoading) {
|
|
86
|
+
menuItems.push([
|
|
87
|
+
{
|
|
88
|
+
title: (
|
|
89
|
+
<Flex alignItems="center" gap={2}>
|
|
90
|
+
<Spin size="xs" qa="shared-database-link-loader" />
|
|
91
|
+
<Text>{headerKeyset('action_go-to-shared-db')}</Text>
|
|
92
|
+
</Flex>
|
|
93
|
+
),
|
|
94
|
+
action: () => undefined,
|
|
95
|
+
disabled: true,
|
|
96
|
+
extraProps: {
|
|
97
|
+
'aria-busy': true,
|
|
98
|
+
'aria-disabled': true,
|
|
99
|
+
'aria-label': headerKeyset('status_loading-shared-db'),
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
]);
|
|
103
|
+
} else if (sharedDatabasePath) {
|
|
85
104
|
menuItems.push([
|
|
86
105
|
{
|
|
87
106
|
title: headerKeyset('action_go-to-shared-db'),
|
|
@@ -136,6 +155,7 @@ export function DBHeaderActionsMenu({
|
|
|
136
155
|
history,
|
|
137
156
|
isEditDBAvailable,
|
|
138
157
|
isDeleteDBAvailable,
|
|
158
|
+
isSharedDatabaseLoading,
|
|
139
159
|
sharedDatabasePath,
|
|
140
160
|
]);
|
|
141
161
|
|
|
@@ -132,28 +132,30 @@ export function useSharedDatabasePath({
|
|
|
132
132
|
const shouldResolveSharedDatabaseFromViewer =
|
|
133
133
|
shouldResolveSharedDatabaseName && !window.api.meta;
|
|
134
134
|
|
|
135
|
-
const {currentData: sharedDatabaseFromViewer} =
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
135
|
+
const {currentData: sharedDatabaseFromViewer, isFetching: isSharedDatabaseFromViewerFetching} =
|
|
136
|
+
tenantsApi.useGetSharedDatabaseQuery(
|
|
137
|
+
shouldResolveSharedDatabaseFromViewer && databaseData?.ResourceId
|
|
138
|
+
? {
|
|
139
|
+
clusterName,
|
|
140
|
+
database: databaseData.Name,
|
|
141
|
+
backend: activeBackend,
|
|
142
|
+
environmentName: environment,
|
|
143
|
+
isMonitoringAllowed: isMonitoringAllowed === true,
|
|
144
|
+
needNodeIds: needSharedDatabaseNodeIds,
|
|
145
|
+
resourceId: databaseData.ResourceId,
|
|
146
|
+
}
|
|
147
|
+
: skipToken,
|
|
148
|
+
);
|
|
148
149
|
|
|
149
150
|
const shouldResolveSharedDatabaseFromMetaList =
|
|
150
151
|
shouldResolveSharedDatabaseName && Boolean(window.api.meta);
|
|
151
152
|
|
|
152
|
-
const {currentData: databases} =
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
const {currentData: databases, isFetching: isDatabasesFetching} =
|
|
154
|
+
tenantsApi.useGetTenantsInfoQuery(
|
|
155
|
+
shouldResolveSharedDatabaseFromMetaList
|
|
156
|
+
? {clusterName, environmentName: environment, isMetaDatabasesAvailable}
|
|
157
|
+
: skipToken,
|
|
158
|
+
);
|
|
157
159
|
|
|
158
160
|
const sharedDatabaseTarget = React.useMemo<SharedDatabaseTarget | undefined>(() => {
|
|
159
161
|
if (databaseData?.sharedTenantName) {
|
|
@@ -184,12 +186,17 @@ export function useSharedDatabasePath({
|
|
|
184
186
|
const sharedDatabase = useDatabaseId ? databaseData?.ResourceId : sharedDatabaseTarget?.name;
|
|
185
187
|
const backend = getSharedDatabaseBackend(sharedDatabaseTarget, prepareTenantBackend);
|
|
186
188
|
|
|
187
|
-
return
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
189
|
+
return {
|
|
190
|
+
isSharedDatabaseLoading:
|
|
191
|
+
(isSharedDatabaseFromViewerFetching && sharedDatabaseFromViewer === undefined) ||
|
|
192
|
+
(isDatabasesFetching && databases === undefined),
|
|
193
|
+
sharedDatabasePath: getResolvedSharedDatabasePath({
|
|
194
|
+
backend,
|
|
195
|
+
clusterName,
|
|
196
|
+
databaseData,
|
|
197
|
+
isClusterBaseInfoResolved: isClusterBaseInfoAvailable,
|
|
198
|
+
isViewerUser,
|
|
199
|
+
sharedDatabase,
|
|
200
|
+
}),
|
|
201
|
+
};
|
|
195
202
|
}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"action_delete-cluster": "Delete Cluster",
|
|
17
17
|
"action_connect-to-db": "Connect to database",
|
|
18
18
|
"action_go-to-shared-db": "Go to shared database",
|
|
19
|
+
"status_loading-shared-db": "Loading shared database",
|
|
19
20
|
"action_manage": "Manage",
|
|
20
21
|
|
|
21
22
|
"title_developer-ui": "Developer UI",
|
|
@@ -16,7 +16,6 @@ import routes, {getDefaultNodePath} from '../../routes';
|
|
|
16
16
|
import {
|
|
17
17
|
useCapabilitiesLoaded,
|
|
18
18
|
useConfigAvailable,
|
|
19
|
-
useDiskPagesAvailable,
|
|
20
19
|
useViewerPeersHandlerAvailable,
|
|
21
20
|
} from '../../store/reducers/capabilities/hooks';
|
|
22
21
|
import {setHeaderBreadcrumbs} from '../../store/reducers/header/header';
|
|
@@ -34,7 +33,6 @@ import {Tablets} from '../Tablets/Tablets';
|
|
|
34
33
|
|
|
35
34
|
import type {NodeTab} from './NodePages';
|
|
36
35
|
import {NODE_TABS, nodePageQueryParams, nodePageTabSchema} from './NodePages';
|
|
37
|
-
import NodeStructure from './NodeStructure/NodeStructure';
|
|
38
36
|
import {Threads} from './Threads/Threads';
|
|
39
37
|
import i18n from './i18n';
|
|
40
38
|
|
|
@@ -52,12 +50,14 @@ export function Node() {
|
|
|
52
50
|
const dispatch = useTypedDispatch();
|
|
53
51
|
const history = useHistory();
|
|
54
52
|
|
|
55
|
-
const match = useRouteMatch<{id: string; activeTab: string}>(routes.node);
|
|
53
|
+
const match = useRouteMatch<{id: string; activeTab: string; environment?: string}>(routes.node);
|
|
56
54
|
|
|
57
55
|
const nodeId = match?.params.id;
|
|
58
56
|
const activeTabIdFromQuery = match?.params.activeTab;
|
|
57
|
+
const environment = match?.params.environment;
|
|
59
58
|
|
|
60
|
-
const [{database: tenantNameFromQuery}] =
|
|
59
|
+
const [{database: tenantNameFromQuery, clusterName, backend}] =
|
|
60
|
+
useQueryParams(nodePageQueryParams);
|
|
61
61
|
const database = tenantNameFromQuery?.toString();
|
|
62
62
|
|
|
63
63
|
const activeTabId = nodePageTabSchema.parse(activeTabIdFromQuery);
|
|
@@ -72,7 +72,6 @@ export function Node() {
|
|
|
72
72
|
} = nodeApi.useGetNodeInfoQuery(params, {pollingInterval: autoRefreshInterval});
|
|
73
73
|
|
|
74
74
|
const capabilitiesLoaded = useCapabilitiesLoaded();
|
|
75
|
-
const isDiskPagesAvailable = useDiskPagesAvailable();
|
|
76
75
|
const isPeersHandlerAvailable = useViewerPeersHandlerAvailable();
|
|
77
76
|
|
|
78
77
|
const pageLoading = isLoading || !capabilitiesLoaded;
|
|
@@ -89,9 +88,6 @@ export function Node() {
|
|
|
89
88
|
if (!configsAvailable) {
|
|
90
89
|
skippedTabs.push('configs');
|
|
91
90
|
}
|
|
92
|
-
if (isDiskPagesAvailable) {
|
|
93
|
-
skippedTabs.push('structure');
|
|
94
|
-
}
|
|
95
91
|
if ((!database && !isViewerUser) || !hasThreads) {
|
|
96
92
|
skippedTabs.push('threads');
|
|
97
93
|
}
|
|
@@ -111,7 +107,6 @@ export function Node() {
|
|
|
111
107
|
return {activeTab: actualActiveTab, nodeTabs: actualNodeTabs};
|
|
112
108
|
}, [
|
|
113
109
|
isStorageNode,
|
|
114
|
-
isDiskPagesAvailable,
|
|
115
110
|
isPeersHandlerAvailable,
|
|
116
111
|
activeTabId,
|
|
117
112
|
hasThreads,
|
|
@@ -142,12 +137,26 @@ export function Node() {
|
|
|
142
137
|
return;
|
|
143
138
|
}
|
|
144
139
|
|
|
145
|
-
if (activeTab.id !== activeTabId) {
|
|
146
|
-
const path = getDefaultNodePath(
|
|
140
|
+
if (activeTab.id !== activeTabId || activeTabIdFromQuery === 'structure') {
|
|
141
|
+
const path = getDefaultNodePath(
|
|
142
|
+
{id: nodeId, activeTab: activeTab.id, environment},
|
|
143
|
+
{database, clusterName: clusterName ?? undefined, backend: backend ?? undefined},
|
|
144
|
+
);
|
|
147
145
|
|
|
148
146
|
history.replace(path);
|
|
149
147
|
}
|
|
150
|
-
}, [
|
|
148
|
+
}, [
|
|
149
|
+
nodeId,
|
|
150
|
+
database,
|
|
151
|
+
clusterName,
|
|
152
|
+
backend,
|
|
153
|
+
environment,
|
|
154
|
+
activeTab.id,
|
|
155
|
+
activeTabId,
|
|
156
|
+
activeTabIdFromQuery,
|
|
157
|
+
history,
|
|
158
|
+
activeTab,
|
|
159
|
+
]);
|
|
151
160
|
|
|
152
161
|
return (
|
|
153
162
|
<div className={b(null)} ref={container}>
|
|
@@ -160,6 +169,9 @@ export function Node() {
|
|
|
160
169
|
<NodePageContent
|
|
161
170
|
nodeId={nodeId}
|
|
162
171
|
database={database}
|
|
172
|
+
clusterName={clusterName ?? undefined}
|
|
173
|
+
backend={backend ?? undefined}
|
|
174
|
+
environment={environment}
|
|
163
175
|
activeTabId={activeTab.id}
|
|
164
176
|
tabs={nodeTabs}
|
|
165
177
|
parentContainer={container}
|
|
@@ -233,6 +245,9 @@ function NodePageInfo({node, loading}: NodePageInfoProps) {
|
|
|
233
245
|
interface NodePageContentProps {
|
|
234
246
|
nodeId: string;
|
|
235
247
|
database?: string;
|
|
248
|
+
clusterName?: string;
|
|
249
|
+
backend?: string;
|
|
250
|
+
environment?: string;
|
|
236
251
|
|
|
237
252
|
activeTabId: NodeTab;
|
|
238
253
|
tabs: {id: string; title: string}[];
|
|
@@ -243,6 +258,9 @@ interface NodePageContentProps {
|
|
|
243
258
|
function NodePageContent({
|
|
244
259
|
nodeId,
|
|
245
260
|
database,
|
|
261
|
+
clusterName,
|
|
262
|
+
backend,
|
|
263
|
+
environment,
|
|
246
264
|
activeTabId,
|
|
247
265
|
tabs,
|
|
248
266
|
parentContainer,
|
|
@@ -254,8 +272,8 @@ function NodePageContent({
|
|
|
254
272
|
<TabList className={b('tab-list')} size="l">
|
|
255
273
|
{tabs.map(({id, title}) => {
|
|
256
274
|
const path = getDefaultNodePath(
|
|
257
|
-
{id: nodeId, activeTab: id as NodeTab},
|
|
258
|
-
{database},
|
|
275
|
+
{id: nodeId, activeTab: id as NodeTab, environment},
|
|
276
|
+
{database, clusterName, backend},
|
|
259
277
|
);
|
|
260
278
|
return (
|
|
261
279
|
<Tab value={id} key={id}>
|
|
@@ -296,10 +314,6 @@ function NodePageContent({
|
|
|
296
314
|
);
|
|
297
315
|
}
|
|
298
316
|
|
|
299
|
-
case 'structure': {
|
|
300
|
-
return <NodeStructure nodeId={nodeId} />;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
317
|
case 'threads': {
|
|
304
318
|
return (
|
|
305
319
|
<Threads
|
|
@@ -9,7 +9,6 @@ import i18n from './i18n';
|
|
|
9
9
|
const NODE_TABS_IDS = {
|
|
10
10
|
storage: 'storage',
|
|
11
11
|
tablets: 'tablets',
|
|
12
|
-
structure: 'structure',
|
|
13
12
|
threads: 'threads',
|
|
14
13
|
network: 'network',
|
|
15
14
|
configs: 'configs',
|
|
@@ -24,12 +23,6 @@ export const NODE_TABS = [
|
|
|
24
23
|
return i18n('tabs.storage');
|
|
25
24
|
},
|
|
26
25
|
},
|
|
27
|
-
{
|
|
28
|
-
id: NODE_TABS_IDS.structure,
|
|
29
|
-
get title() {
|
|
30
|
-
return i18n('tabs.structure');
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
26
|
{
|
|
34
27
|
id: NODE_TABS_IDS.tablets,
|
|
35
28
|
get title() {
|
|
@@ -56,13 +49,15 @@ export const NODE_TABS = [
|
|
|
56
49
|
},
|
|
57
50
|
];
|
|
58
51
|
|
|
59
|
-
export const nodePageTabSchema = z.
|
|
52
|
+
export const nodePageTabSchema = z.preprocess(
|
|
53
|
+
(value) => (value === 'structure' ? NODE_TABS_IDS.storage : value),
|
|
54
|
+
z.nativeEnum(NODE_TABS_IDS).catch(NODE_TABS_IDS.tablets),
|
|
55
|
+
);
|
|
60
56
|
|
|
61
57
|
export const nodePageQueryParams = {
|
|
62
58
|
database: StringParam,
|
|
63
|
-
pdiskId: StringParam,
|
|
64
|
-
vdiskId: StringParam,
|
|
65
59
|
clusterName: StringParam,
|
|
60
|
+
backend: StringParam,
|
|
66
61
|
};
|
|
67
62
|
|
|
68
63
|
export type NodePageQuery = QueryParamsTypeFromQueryObject<typeof nodePageQueryParams>;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"pdisk.developer-ui-button-title": "PDisk Developer UI page",
|
|
3
|
-
"vdisk.developer-ui-button-title": "VDisk Developer UI page",
|
|
4
|
-
|
|
5
2
|
"tabs.storage": "Storage",
|
|
6
|
-
"tabs.structure": "Structure",
|
|
7
3
|
"tabs.tablets": "Tablets",
|
|
8
4
|
"tabs.threads": "Threads",
|
|
9
5
|
"tabs.network": "Network",
|
|
@@ -2,7 +2,10 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import type {PaginatedTableData} from '../../components/PaginatedTable';
|
|
4
4
|
import {PAGINATED_TABLE_IDS, ResizeablePaginatedTable} from '../../components/PaginatedTable';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
NODES_COLUMNS_IDS,
|
|
7
|
+
NODES_COLUMNS_WIDTH_LS_KEY,
|
|
8
|
+
} from '../../components/nodesColumns/constants';
|
|
6
9
|
import type {NodesColumn} from '../../components/nodesColumns/types';
|
|
7
10
|
import {useClusterWithProxy} from '../../store/reducers/cluster/cluster';
|
|
8
11
|
import type {NodesFilters} from '../../store/reducers/nodes/types';
|
|
@@ -94,6 +97,9 @@ export function NodesTable({
|
|
|
94
97
|
columnsWidthLSKey={NODES_COLUMNS_WIDTH_LS_KEY}
|
|
95
98
|
scrollContainerRef={scrollContainerRef}
|
|
96
99
|
columns={columns}
|
|
100
|
+
rowHeight={
|
|
101
|
+
columns.some((column) => column.name === NODES_COLUMNS_IDS.PDisks) ? 51 : undefined
|
|
102
|
+
}
|
|
97
103
|
fetchData={getNodes}
|
|
98
104
|
initialEntitiesCount={initialEntitiesCount}
|
|
99
105
|
renderErrorMessage={renderPaginatedTableErrorMessage}
|
|
@@ -216,6 +216,8 @@ function OperationsActions({operation, database}: OperationsActionsProps) {
|
|
|
216
216
|
buttonView="outlined"
|
|
217
217
|
dialogHeader={i18n('header_forget')}
|
|
218
218
|
dialogText={i18n('text_forget')}
|
|
219
|
+
applyButtonText={i18n('header_forget')}
|
|
220
|
+
applyButtonView="outlined-danger"
|
|
219
221
|
onConfirmAction={() =>
|
|
220
222
|
forgetOperation({id, database})
|
|
221
223
|
.unwrap()
|
|
@@ -244,6 +246,8 @@ function OperationsActions({operation, database}: OperationsActionsProps) {
|
|
|
244
246
|
buttonView="outlined"
|
|
245
247
|
dialogHeader={i18n('header_cancel')}
|
|
246
248
|
dialogText={i18n('text_cancel')}
|
|
249
|
+
applyButtonText={i18n('header_cancel')}
|
|
250
|
+
applyButtonView="outlined-danger"
|
|
247
251
|
onConfirmAction={() =>
|
|
248
252
|
cancelOperation({id, database})
|
|
249
253
|
.unwrap()
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"value_progress_create_changefeeds": "Creating Changefeeds",
|
|
34
34
|
"header_cancel": "Cancel operation",
|
|
35
35
|
"header_forget": "Forget operation",
|
|
36
|
-
"text_cancel": "
|
|
37
|
-
"text_forget": "
|
|
36
|
+
"text_cancel": "This will cancel the operation in progress. This action cannot be undone.",
|
|
37
|
+
"text_forget": "This will remove the operation from the list. This action cannot be undone.",
|
|
38
38
|
"text_forgotten": "The operation {{id}} has been forgotten",
|
|
39
39
|
"text_cancelled": "The operation {{id}} has been cancelled"
|
|
40
40
|
}
|
|
@@ -139,6 +139,8 @@ export function DecommissionButton({
|
|
|
139
139
|
warningText={getDecommissionWarningText(newDecommission)}
|
|
140
140
|
withRetry={withRetry}
|
|
141
141
|
withCheckBox
|
|
142
|
+
applyButtonText={pDiskPageKeyset('decommission-dialog-title')}
|
|
143
|
+
applyButtonView="outlined-danger"
|
|
142
144
|
retryButtonText={pDiskPageKeyset('decommission-dialog-force-change')}
|
|
143
145
|
onConfirm={handleConfirmAction}
|
|
144
146
|
onConfirmActionSuccess={handleConfirmActionSuccess}
|
|
@@ -187,7 +187,9 @@ export function PDiskPage() {
|
|
|
187
187
|
buttonDisabled={!pDiskParamsDefined || !isUserAllowedToMakeChanges}
|
|
188
188
|
buttonView="normal"
|
|
189
189
|
dialogHeader={pDiskPageKeyset('restart-pdisk-dialog-header')}
|
|
190
|
-
|
|
190
|
+
dialogText={pDiskPageKeyset('restart-pdisk-dialog-text')}
|
|
191
|
+
applyButtonText={pDiskPageKeyset('restart-pdisk-button')}
|
|
192
|
+
applyButtonView="action"
|
|
191
193
|
retryButtonText={pDiskPageKeyset('force-restart-pdisk-button')}
|
|
192
194
|
withPopover
|
|
193
195
|
popoverContent={pDiskPageKeyset('restart-pdisk-not-allowed')}
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"no-slots-data": "No slots data",
|
|
17
17
|
|
|
18
18
|
"restart-pdisk-button": "Restart PDisk",
|
|
19
|
-
"force-restart-pdisk-button": "Restart anyway",
|
|
19
|
+
"force-restart-pdisk-button": "Restart PDisk anyway",
|
|
20
20
|
"restart-pdisk-not-allowed": "You don't have enough rights to restart PDisk",
|
|
21
21
|
|
|
22
22
|
"restart-pdisk-dialog-header": "Restart PDisk",
|
|
23
|
-
"restart-pdisk-dialog-text": "
|
|
23
|
+
"restart-pdisk-dialog-text": "Are you sure you want to restart this PDisk?",
|
|
24
24
|
|
|
25
25
|
"decommission-none": "None",
|
|
26
26
|
"decommission-imminent": "Imminent",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"decommission-dialog-title": "Change decommission status",
|
|
35
35
|
"decommission-dialog-force-change": "Change anyway",
|
|
36
36
|
|
|
37
|
-
"decommission-dialog-imminent-warning": "This will start imminent decommission.
|
|
37
|
+
"decommission-dialog-imminent-warning": "This will start imminent decommission. All existing slots will be moved from the disk.",
|
|
38
38
|
"decommission-dialog-pending-warning": "This will start pending decommission. Decommission will be planned for this disk, but will not start immediatelly. Existing slots will not be moved from the disk, but no new slots will be allocated on it",
|
|
39
39
|
"decommission-dialog-rejected-warning": "This will start rejected decommission. No slots from other disks are placed on this disk in the process of decommission",
|
|
40
40
|
"decommission-dialog-none-warning": "This will reset decommission mode, allowing the disk to be used by the storage"
|
|
@@ -31,7 +31,7 @@ export function PDisks({pDisks = [], vDisks = [], viewContext, pDiskWidth}: PDis
|
|
|
31
31
|
|
|
32
32
|
const relatedVDisks = vDisks.filter((vdisk) => vdisk.PDiskId === pDisk.PDiskId);
|
|
33
33
|
|
|
34
|
-
const highlighted = highlightedDisk === id;
|
|
34
|
+
const highlighted = id !== undefined && highlightedDisk === id;
|
|
35
35
|
|
|
36
36
|
return (
|
|
37
37
|
<div className={b('pdisks-item')} key={id}>
|
|
@@ -3,10 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import {LoaderWrapper} from '../../../components/LoaderWrapper/LoaderWrapper';
|
|
4
4
|
import type {RenderErrorMessage} from '../../../components/PaginatedTable';
|
|
5
5
|
import {PAGINATED_TABLE_IDS, ResizeablePaginatedTable} from '../../../components/PaginatedTable';
|
|
6
|
-
import {
|
|
7
|
-
useCapabilitiesLoaded,
|
|
8
|
-
useStorageGroupsHandlerAvailable,
|
|
9
|
-
} from '../../../store/reducers/capabilities/hooks';
|
|
6
|
+
import {useCapabilitiesLoaded} from '../../../store/reducers/capabilities/hooks';
|
|
10
7
|
import {VISIBLE_ENTITIES} from '../../../store/reducers/storage/constants';
|
|
11
8
|
import type {VisibleEntities} from '../../../store/reducers/storage/types';
|
|
12
9
|
import type {GroupsGroupByField} from '../../../types/api/storage';
|
|
@@ -65,9 +62,8 @@ export const PaginatedStorageGroupsTable = ({
|
|
|
65
62
|
initialEntitiesCount,
|
|
66
63
|
}: PaginatedStorageGroupsTableProps) => {
|
|
67
64
|
const capabilitiesLoaded = useCapabilitiesLoaded();
|
|
68
|
-
const groupsHandlerAvailable = useStorageGroupsHandlerAvailable();
|
|
69
65
|
|
|
70
|
-
const fetchData = useGroupsGetter(
|
|
66
|
+
const fetchData = useGroupsGetter();
|
|
71
67
|
|
|
72
68
|
const hasVDisksColumns = React.useMemo(() => {
|
|
73
69
|
return columns.some((column) => columnsWithVDisks.has(column.name));
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import type {
|
|
9
9
|
GroupsGroupByField,
|
|
10
10
|
GroupsRequiredField,
|
|
11
|
-
|
|
11
|
+
GroupsSortField,
|
|
12
12
|
} from '../../../../types/api/storage';
|
|
13
13
|
import type {ValueOf} from '../../../../types/common';
|
|
14
14
|
|
|
@@ -295,7 +295,7 @@ export const GROUPS_COLUMNS_TO_DATA_FIELDS: Record<StorageGroupsColumnId, Groups
|
|
|
295
295
|
|
|
296
296
|
const STORAGE_GROUPS_COLUMNS_TO_SORT_FIELDS: Record<
|
|
297
297
|
StorageGroupsColumnId,
|
|
298
|
-
|
|
298
|
+
GroupsSortField | undefined
|
|
299
299
|
> = {
|
|
300
300
|
GroupId: 'GroupId',
|
|
301
301
|
PoolName: 'PoolName',
|
|
@@ -13,53 +13,46 @@ import {GROUPS_COLUMNS_TO_DATA_FIELDS, getStorageGroupsColumnSortField} from './
|
|
|
13
13
|
|
|
14
14
|
type GetStorageGroups = FetchData<PreparedStorageGroup, PreparedStorageGroupFilters>;
|
|
15
15
|
|
|
16
|
-
export function useGroupsGetter(
|
|
17
|
-
const fetchData: GetStorageGroups = React.useCallback(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
data: groups || [],
|
|
57
|
-
found: found || 0,
|
|
58
|
-
total: total || 0,
|
|
59
|
-
};
|
|
60
|
-
},
|
|
61
|
-
[shouldUseGroupsHandler],
|
|
62
|
-
);
|
|
16
|
+
export function useGroupsGetter() {
|
|
17
|
+
const fetchData: GetStorageGroups = React.useCallback(async (params) => {
|
|
18
|
+
const {limit, offset, sortParams, filters, columnsIds} = params;
|
|
19
|
+
const {sortOrder, columnId} = sortParams ?? {};
|
|
20
|
+
const {
|
|
21
|
+
searchValue,
|
|
22
|
+
visibleEntities,
|
|
23
|
+
database,
|
|
24
|
+
nodeId,
|
|
25
|
+
groupId,
|
|
26
|
+
pDiskId,
|
|
27
|
+
filterGroup,
|
|
28
|
+
filterGroupBy,
|
|
29
|
+
} = filters ?? {};
|
|
30
|
+
|
|
31
|
+
const sortField = getStorageGroupsColumnSortField(columnId);
|
|
32
|
+
const sort = sortField ? prepareSortValue(sortField, sortOrder) : undefined;
|
|
33
|
+
const dataFieldsRequired = getRequiredDataFields(columnsIds, GROUPS_COLUMNS_TO_DATA_FIELDS);
|
|
34
|
+
|
|
35
|
+
const {groups, found, total} = await requestStorageData({
|
|
36
|
+
limit,
|
|
37
|
+
offset,
|
|
38
|
+
sort,
|
|
39
|
+
filter: searchValue?.trim(),
|
|
40
|
+
with: visibleEntities,
|
|
41
|
+
database,
|
|
42
|
+
nodeId,
|
|
43
|
+
groupId,
|
|
44
|
+
pDiskId,
|
|
45
|
+
filter_group: filterGroup,
|
|
46
|
+
filter_group_by: filterGroupBy,
|
|
47
|
+
fieldsRequired: dataFieldsRequired,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
data: groups || [],
|
|
52
|
+
found: found || 0,
|
|
53
|
+
total: total || 0,
|
|
54
|
+
};
|
|
55
|
+
}, []);
|
|
63
56
|
|
|
64
57
|
return fetchData;
|
|
65
58
|
}
|
|
@@ -9,10 +9,7 @@ import {ResponseError} from '../../components/Errors/ResponseError';
|
|
|
9
9
|
import {InfoViewerSkeleton} from '../../components/InfoViewerSkeleton/InfoViewerSkeleton';
|
|
10
10
|
import {PageMetaWithAutorefresh} from '../../components/PageMeta/PageMeta';
|
|
11
11
|
import {StorageGroupInfo} from '../../components/StorageGroupInfo/StorageGroupInfo';
|
|
12
|
-
import {
|
|
13
|
-
useCapabilitiesLoaded,
|
|
14
|
-
useStorageGroupsHandlerAvailable,
|
|
15
|
-
} from '../../store/reducers/capabilities/hooks';
|
|
12
|
+
import {useCapabilitiesLoaded} from '../../store/reducers/capabilities/hooks';
|
|
16
13
|
import {setHeaderBreadcrumbs} from '../../store/reducers/header/header';
|
|
17
14
|
import {storageApi} from '../../store/reducers/storage/storage';
|
|
18
15
|
import {EFlag} from '../../types/api/enums';
|
|
@@ -41,11 +38,10 @@ export function StorageGroupPage() {
|
|
|
41
38
|
}, [dispatch, groupId, database]);
|
|
42
39
|
|
|
43
40
|
const [autoRefreshInterval] = useAutoRefreshInterval();
|
|
44
|
-
const shouldUseGroupsHandler = useStorageGroupsHandlerAvailable();
|
|
45
41
|
const capabilitiesLoaded = useCapabilitiesLoaded();
|
|
46
42
|
const groupQuery = storageApi.useGetStorageGroupsInfoQuery(
|
|
47
43
|
valueIsDefined(groupId)
|
|
48
|
-
? {groupId,
|
|
44
|
+
? {groupId, with: 'all', fieldsRequired: 'all', database}
|
|
49
45
|
: skipToken,
|
|
50
46
|
{
|
|
51
47
|
pollingInterval: autoRefreshInterval,
|
|
@@ -42,7 +42,9 @@ export const TabletControls = ({tablet}: TabletControlsProps) => {
|
|
|
42
42
|
<Flex gap={2} wrap="nowrap">
|
|
43
43
|
<ButtonWithConfirmDialog
|
|
44
44
|
dialogHeader={i18n('dialog.kill-header')}
|
|
45
|
-
|
|
45
|
+
dialogText={i18n('dialog.kill-text')}
|
|
46
|
+
applyButtonText={i18n('dialog.kill-header')}
|
|
47
|
+
applyButtonView="action"
|
|
46
48
|
onConfirmAction={() => killTablet({id: TabletId}).unwrap()}
|
|
47
49
|
buttonDisabled={isDisabledRestart || !isUserAllowedToMakeChanges}
|
|
48
50
|
withPopover
|
|
@@ -59,6 +61,8 @@ export const TabletControls = ({tablet}: TabletControlsProps) => {
|
|
|
59
61
|
<ButtonWithConfirmDialog
|
|
60
62
|
dialogHeader={i18n('dialog.stop-header')}
|
|
61
63
|
dialogText={i18n('dialog.stop-text')}
|
|
64
|
+
applyButtonText={i18n('dialog.stop-header')}
|
|
65
|
+
applyButtonView="outlined-danger"
|
|
62
66
|
onConfirmAction={() => stopTablet({id: TabletId, hiveId: HiveId}).unwrap()}
|
|
63
67
|
buttonDisabled={isDisabledStop || !isUserAllowedToMakeChanges}
|
|
64
68
|
withPopover
|
|
@@ -73,6 +77,8 @@ export const TabletControls = ({tablet}: TabletControlsProps) => {
|
|
|
73
77
|
<ButtonWithConfirmDialog
|
|
74
78
|
dialogHeader={i18n('dialog.resume-header')}
|
|
75
79
|
dialogText={i18n('dialog.resume-text')}
|
|
80
|
+
applyButtonText={i18n('dialog.resume-header')}
|
|
81
|
+
applyButtonView="action"
|
|
76
82
|
onConfirmAction={() =>
|
|
77
83
|
resumeTablet({id: TabletId, hiveId: HiveId}).unwrap()
|
|
78
84
|
}
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"dialog.stop-header": "Stop tablet",
|
|
17
17
|
"dialog.resume-header": "Resume tablet",
|
|
18
18
|
|
|
19
|
-
"dialog.kill-text": "The tablet will be
|
|
20
|
-
"dialog.stop-text": "The tablet will be stopped.
|
|
21
|
-
"dialog.resume-text": "The tablet will be resumed
|
|
19
|
+
"dialog.kill-text": "The tablet will restart. A portion of table data will be temporarily unavailable. Active transactions and scans will be interrupted with a retriable error and can be retried.",
|
|
20
|
+
"dialog.stop-text": "The tablet will be stopped. The key range will be unavailable until the tablet is manually resumed. Data is not deleted and will be restored after resume.",
|
|
21
|
+
"dialog.resume-text": "The tablet will be resumed and return to Active state.",
|
|
22
22
|
|
|
23
23
|
"emptyState": "The tablet was not found",
|
|
24
24
|
|