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,274 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {ArrowUpRightFromSquare, CircleInfoFill} from '@gravity-ui/icons';
|
|
4
|
-
import DataTable from '@gravity-ui/react-data-table';
|
|
5
|
-
import type {Column} from '@gravity-ui/react-data-table';
|
|
6
|
-
import {ArrowToggle, Button, Icon, Popover} from '@gravity-ui/uikit';
|
|
7
|
-
import isEmpty from 'lodash/isEmpty';
|
|
8
|
-
|
|
9
|
-
import {PDiskInfo} from '../../../components/PDiskInfo/PDiskInfo';
|
|
10
|
-
import {ProgressViewer} from '../../../components/ProgressViewer/ProgressViewer';
|
|
11
|
-
import {StatusIcon} from '../../../components/StatusIcon/StatusIcon';
|
|
12
|
-
import {VDiskInfo} from '../../../components/VDiskInfo/VDiskInfo';
|
|
13
|
-
import type {
|
|
14
|
-
PreparedStructurePDisk,
|
|
15
|
-
PreparedStructureVDisk,
|
|
16
|
-
} from '../../../store/reducers/node/types';
|
|
17
|
-
import {EFlag} from '../../../types/api/enums';
|
|
18
|
-
import {EVDiskState} from '../../../types/api/vdisk';
|
|
19
|
-
import type {ValueOf} from '../../../types/common';
|
|
20
|
-
import {valueIsDefined} from '../../../utils';
|
|
21
|
-
import {cn} from '../../../utils/cn';
|
|
22
|
-
import {DEFAULT_TABLE_SETTINGS, EMPTY_DATA_PLACEHOLDER} from '../../../utils/constants';
|
|
23
|
-
import {formatStorageValuesToGb} from '../../../utils/dataFormatters/dataFormatters';
|
|
24
|
-
import {
|
|
25
|
-
createVDiskDeveloperUILink,
|
|
26
|
-
useHasDeveloperUi,
|
|
27
|
-
} from '../../../utils/developerUI/developerUI';
|
|
28
|
-
import {isNumeric} from '../../../utils/utils';
|
|
29
|
-
import i18n from '../i18n';
|
|
30
|
-
|
|
31
|
-
import {PDiskTitleBadge} from './PDiskTitleBadge';
|
|
32
|
-
|
|
33
|
-
const b = cn('kv-node-structure');
|
|
34
|
-
|
|
35
|
-
interface PDiskProps {
|
|
36
|
-
data: PreparedStructurePDisk;
|
|
37
|
-
unfolded?: boolean;
|
|
38
|
-
id: string;
|
|
39
|
-
selectedVdiskId?: string;
|
|
40
|
-
nodeId: string | number;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
enum VDiskTableColumnsIds {
|
|
44
|
-
slotId = 'VDiskSlotId',
|
|
45
|
-
VDiskState = 'VDiskState',
|
|
46
|
-
Size = 'Size',
|
|
47
|
-
Info = 'Info',
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
type VDiskTableColumnsIdsValues = ValueOf<typeof VDiskTableColumnsIds>;
|
|
51
|
-
|
|
52
|
-
const vDiskTableColumnsNames: Record<VDiskTableColumnsIdsValues, string> = {
|
|
53
|
-
VDiskSlotId: 'Slot id',
|
|
54
|
-
VDiskState: 'Status',
|
|
55
|
-
Size: 'Size',
|
|
56
|
-
Info: '',
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
function getColumns({
|
|
60
|
-
pDiskId,
|
|
61
|
-
selectedVdiskId,
|
|
62
|
-
nodeId,
|
|
63
|
-
withDeveloperUILink,
|
|
64
|
-
}: {
|
|
65
|
-
pDiskId: number | undefined;
|
|
66
|
-
selectedVdiskId?: string;
|
|
67
|
-
nodeId?: string | number;
|
|
68
|
-
withDeveloperUILink?: boolean;
|
|
69
|
-
}) {
|
|
70
|
-
const columns: Column<PreparedStructureVDisk>[] = [
|
|
71
|
-
{
|
|
72
|
-
name: VDiskTableColumnsIds.slotId,
|
|
73
|
-
header: vDiskTableColumnsNames[VDiskTableColumnsIds.slotId],
|
|
74
|
-
width: 100,
|
|
75
|
-
render: ({row}) => {
|
|
76
|
-
const vDiskSlotId = row.VDiskSlotId;
|
|
77
|
-
let vdiskInternalViewerLink = null;
|
|
78
|
-
|
|
79
|
-
if (
|
|
80
|
-
valueIsDefined(nodeId) &&
|
|
81
|
-
valueIsDefined(pDiskId) &&
|
|
82
|
-
valueIsDefined(vDiskSlotId)
|
|
83
|
-
) {
|
|
84
|
-
vdiskInternalViewerLink = createVDiskDeveloperUILink({
|
|
85
|
-
nodeId,
|
|
86
|
-
pDiskId,
|
|
87
|
-
vDiskSlotId,
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return (
|
|
92
|
-
<div className={b('vdisk-id', {selected: row.id === selectedVdiskId})}>
|
|
93
|
-
<span>{vDiskSlotId}</span>
|
|
94
|
-
{vdiskInternalViewerLink && withDeveloperUILink ? (
|
|
95
|
-
<Button
|
|
96
|
-
size="s"
|
|
97
|
-
className={b('external-button', {hidden: true})}
|
|
98
|
-
href={vdiskInternalViewerLink}
|
|
99
|
-
target="_blank"
|
|
100
|
-
title={i18n('vdisk.developer-ui-button-title')}
|
|
101
|
-
>
|
|
102
|
-
<Icon data={ArrowUpRightFromSquare} />
|
|
103
|
-
</Button>
|
|
104
|
-
) : null}
|
|
105
|
-
</div>
|
|
106
|
-
);
|
|
107
|
-
},
|
|
108
|
-
align: DataTable.LEFT,
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
name: VDiskTableColumnsIds.VDiskState,
|
|
112
|
-
header: vDiskTableColumnsNames[VDiskTableColumnsIds.VDiskState],
|
|
113
|
-
width: 70,
|
|
114
|
-
render: ({row}) => {
|
|
115
|
-
return (
|
|
116
|
-
<StatusIcon
|
|
117
|
-
status={row.VDiskState === EVDiskState.OK ? EFlag.Green : EFlag.Red}
|
|
118
|
-
/>
|
|
119
|
-
);
|
|
120
|
-
},
|
|
121
|
-
sortAccessor: (row) => (row.VDiskState === EVDiskState.OK ? 1 : 0),
|
|
122
|
-
align: DataTable.CENTER,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
name: VDiskTableColumnsIds.Size,
|
|
126
|
-
header: vDiskTableColumnsNames[VDiskTableColumnsIds.Size],
|
|
127
|
-
width: 170,
|
|
128
|
-
render: ({row}) => {
|
|
129
|
-
const allocated = row.AllocatedSize;
|
|
130
|
-
|
|
131
|
-
if (!isNumeric(allocated)) {
|
|
132
|
-
return EMPTY_DATA_PLACEHOLDER;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
return (
|
|
136
|
-
<ProgressViewer
|
|
137
|
-
value={allocated}
|
|
138
|
-
capacity={Number(row.AllocatedSize) + Number(row.AvailableSize)}
|
|
139
|
-
formatValues={formatStorageValuesToGb}
|
|
140
|
-
colorizeProgress={true}
|
|
141
|
-
/>
|
|
142
|
-
);
|
|
143
|
-
},
|
|
144
|
-
sortAccessor: (row) => Number(row.AllocatedSize),
|
|
145
|
-
align: DataTable.CENTER,
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
name: VDiskTableColumnsIds.Info,
|
|
149
|
-
header: vDiskTableColumnsNames[VDiskTableColumnsIds.Info],
|
|
150
|
-
width: 70,
|
|
151
|
-
render: ({row}) => {
|
|
152
|
-
return (
|
|
153
|
-
<Popover
|
|
154
|
-
placement={['right']}
|
|
155
|
-
content={
|
|
156
|
-
<VDiskInfo
|
|
157
|
-
data={row}
|
|
158
|
-
withTitle
|
|
159
|
-
withVDiskPageLink
|
|
160
|
-
className={b('vdisk-details')}
|
|
161
|
-
/>
|
|
162
|
-
}
|
|
163
|
-
>
|
|
164
|
-
<Button
|
|
165
|
-
view="flat-secondary"
|
|
166
|
-
className={b('vdisk-details-button', {
|
|
167
|
-
selected: row.id === selectedVdiskId,
|
|
168
|
-
})}
|
|
169
|
-
>
|
|
170
|
-
<Icon data={CircleInfoFill} size={18} />
|
|
171
|
-
</Button>
|
|
172
|
-
</Popover>
|
|
173
|
-
);
|
|
174
|
-
},
|
|
175
|
-
sortable: false,
|
|
176
|
-
},
|
|
177
|
-
];
|
|
178
|
-
return columns;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export function PDisk({
|
|
182
|
-
id,
|
|
183
|
-
data,
|
|
184
|
-
selectedVdiskId,
|
|
185
|
-
nodeId,
|
|
186
|
-
unfolded: unfoldedFromProps,
|
|
187
|
-
}: PDiskProps) {
|
|
188
|
-
const hasDeveloperUi = useHasDeveloperUi();
|
|
189
|
-
|
|
190
|
-
const [unfolded, setUnfolded] = React.useState(unfoldedFromProps ?? false);
|
|
191
|
-
|
|
192
|
-
const {TotalSize = 0, AvailableSize = 0, Device, PDiskId, Type, vDisks} = data;
|
|
193
|
-
|
|
194
|
-
const total = Number(TotalSize);
|
|
195
|
-
const available = Number(AvailableSize);
|
|
196
|
-
|
|
197
|
-
const onOpenPDiskDetails = () => {
|
|
198
|
-
setUnfolded(true);
|
|
199
|
-
};
|
|
200
|
-
const onClosePDiskDetails = () => {
|
|
201
|
-
setUnfolded(false);
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
const renderVDisks = () => {
|
|
205
|
-
return (
|
|
206
|
-
<DataTable
|
|
207
|
-
theme="yandex-cloud"
|
|
208
|
-
data={vDisks}
|
|
209
|
-
columns={getColumns({
|
|
210
|
-
nodeId,
|
|
211
|
-
pDiskId: PDiskId,
|
|
212
|
-
selectedVdiskId,
|
|
213
|
-
withDeveloperUILink: hasDeveloperUi,
|
|
214
|
-
})}
|
|
215
|
-
settings={{...DEFAULT_TABLE_SETTINGS, dynamicRender: false}}
|
|
216
|
-
rowClassName={(row) => {
|
|
217
|
-
return row.id === selectedVdiskId ? b('selected-vdisk') : '';
|
|
218
|
-
}}
|
|
219
|
-
/>
|
|
220
|
-
);
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
const renderPDiskDetails = () => {
|
|
224
|
-
if (isEmpty(data)) {
|
|
225
|
-
return <div>No information about PDisk</div>;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
return (
|
|
229
|
-
<div>
|
|
230
|
-
<PDiskInfo
|
|
231
|
-
pDisk={data}
|
|
232
|
-
nodeId={nodeId}
|
|
233
|
-
className={b('pdisk-details')}
|
|
234
|
-
withPDiskPageLink
|
|
235
|
-
/>
|
|
236
|
-
<div className={b('vdisks-container')}>
|
|
237
|
-
<div className={b('vdisks-header')}>VDisks</div>
|
|
238
|
-
{renderVDisks()}
|
|
239
|
-
</div>
|
|
240
|
-
</div>
|
|
241
|
-
);
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
return (
|
|
245
|
-
<div className={b('pdisk')} id={id}>
|
|
246
|
-
<div className={b('pdisk-header')}>
|
|
247
|
-
<div className={b('pdisk-title-wrapper')}>
|
|
248
|
-
<StatusIcon status={Device} />
|
|
249
|
-
<PDiskTitleBadge
|
|
250
|
-
label="PDiskID"
|
|
251
|
-
value={PDiskId}
|
|
252
|
-
className={b('pdisk-title-id')}
|
|
253
|
-
/>
|
|
254
|
-
<PDiskTitleBadge value={Type} className={b('pdisk-title-type')} />
|
|
255
|
-
<ProgressViewer
|
|
256
|
-
value={total - available}
|
|
257
|
-
capacity={total}
|
|
258
|
-
formatValues={formatStorageValuesToGb}
|
|
259
|
-
colorizeProgress={true}
|
|
260
|
-
className={b('pdisk-title-size')}
|
|
261
|
-
/>
|
|
262
|
-
<PDiskTitleBadge label="VDisks" value={vDisks.length} />
|
|
263
|
-
</div>
|
|
264
|
-
<Button
|
|
265
|
-
onClick={unfolded ? onClosePDiskDetails : onOpenPDiskDetails}
|
|
266
|
-
view="flat-secondary"
|
|
267
|
-
>
|
|
268
|
-
<ArrowToggle direction={unfolded ? 'top' : 'bottom'} />
|
|
269
|
-
</Button>
|
|
270
|
-
</div>
|
|
271
|
-
{unfolded && renderPDiskDetails()}
|
|
272
|
-
</div>
|
|
273
|
-
);
|
|
274
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import {createSelector} from '@reduxjs/toolkit';
|
|
2
|
-
|
|
3
|
-
import {stringifyVdiskId} from '../../../utils/dataFormatters/dataFormatters';
|
|
4
|
-
import {prepareWhiteboardVDiskData} from '../../../utils/disks/prepareDisks';
|
|
5
|
-
import type {RootState} from '../../defaultStore';
|
|
6
|
-
|
|
7
|
-
import {nodeApi} from './node';
|
|
8
|
-
import type {PreparedNodeStructure, PreparedStructureVDisk, RawNodeStructure} from './types';
|
|
9
|
-
|
|
10
|
-
const getNodeStructureSelector = createSelector(
|
|
11
|
-
(nodeId: string) => nodeId,
|
|
12
|
-
(nodeId) => nodeApi.endpoints.getNodeStructure.select({nodeId}),
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
const selectGetNodeStructureData = createSelector(
|
|
16
|
-
(state: RootState) => state,
|
|
17
|
-
(_state: RootState, nodeId: string) => getNodeStructureSelector(nodeId),
|
|
18
|
-
(state, selectGetNodeStructure) => selectGetNodeStructure(state).data,
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
export const selectNodeStructure = createSelector(
|
|
22
|
-
(_state: RootState, nodeId: string) => Number(nodeId),
|
|
23
|
-
(state: RootState, nodeId: string) => selectGetNodeStructureData(state, nodeId),
|
|
24
|
-
(nodeId, storageInfo) => {
|
|
25
|
-
const pools = storageInfo?.StoragePools;
|
|
26
|
-
const structure: RawNodeStructure = {};
|
|
27
|
-
|
|
28
|
-
pools?.forEach((pool) => {
|
|
29
|
-
const groups = pool.Groups;
|
|
30
|
-
groups?.forEach((group) => {
|
|
31
|
-
const vDisks = group.VDisks?.filter((el) => el.NodeId === nodeId).map(
|
|
32
|
-
prepareWhiteboardVDiskData,
|
|
33
|
-
);
|
|
34
|
-
vDisks?.forEach((vd) => {
|
|
35
|
-
const vDiskId = stringifyVdiskId(vd.VDiskId);
|
|
36
|
-
const pDiskId = vd.PDisk?.PDiskId;
|
|
37
|
-
if (!structure[String(pDiskId)]) {
|
|
38
|
-
structure[String(pDiskId)] = {vDisks: {}, ...vd.PDisk};
|
|
39
|
-
}
|
|
40
|
-
structure[String(pDiskId)].vDisks[vDiskId] = {
|
|
41
|
-
...vd,
|
|
42
|
-
PDiskId: pDiskId,
|
|
43
|
-
NodeId: nodeId,
|
|
44
|
-
// VDisk doesn't have its own StoragePoolName when located inside StoragePool data
|
|
45
|
-
StoragePoolName: pool.Name,
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
const structureWithVDisksArray = Object.keys(structure).reduce<PreparedNodeStructure>(
|
|
52
|
-
(preparedStructure, el) => {
|
|
53
|
-
const vDisks = structure[el].vDisks;
|
|
54
|
-
const vDisksArray = Object.keys(vDisks).reduce<PreparedStructureVDisk[]>(
|
|
55
|
-
(acc, key, index) => {
|
|
56
|
-
acc.push({...vDisks[key], id: key, order: index});
|
|
57
|
-
return acc;
|
|
58
|
-
},
|
|
59
|
-
[],
|
|
60
|
-
);
|
|
61
|
-
preparedStructure[el] = {...structure[el], vDisks: vDisksArray};
|
|
62
|
-
return preparedStructure;
|
|
63
|
-
},
|
|
64
|
-
{},
|
|
65
|
-
);
|
|
66
|
-
return structureWithVDisksArray;
|
|
67
|
-
},
|
|
68
|
-
);
|