ydb-embedded-ui 6.21.0 → 6.22.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/AutoRefreshControl/i18n/index.d.ts +1 -1
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.d.ts +2 -1
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js +2 -2
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js.map +1 -1
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +4 -0
- package/dist/components/GroupInfo/i18n/index.d.ts +1 -1
- package/dist/components/PDiskInfo/PDiskInfo.js +1 -3
- package/dist/components/PDiskInfo/PDiskInfo.js.map +1 -1
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/QueryResultTable/Cell/Cell.js +1 -4
- package/dist/components/QueryResultTable/Cell/Cell.js.map +1 -1
- package/dist/components/StorageGroupInfo/i18n/index.d.ts +1 -1
- package/dist/components/VDisk/VDisk.d.ts +2 -1
- package/dist/components/VDisk/VDisk.js +2 -2
- package/dist/components/VDisk/VDisk.js.map +1 -1
- package/dist/components/VDiskInfo/VDiskInfo.js +1 -3
- package/dist/components/VDiskInfo/VDiskInfo.js.map +1 -1
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- package/dist/containers/App/App.scss +1 -1
- package/dist/containers/Cluster/Cluster.js +1 -1
- package/dist/containers/Cluster/Cluster.js.map +1 -1
- package/dist/containers/Cluster/i18n/index.d.ts +1 -1
- package/dist/containers/Clusters/Clusters.js +3 -3
- package/dist/containers/Clusters/Clusters.js.map +1 -1
- package/dist/containers/Clusters/columns.js +2 -2
- package/dist/containers/Clusters/columns.js.map +1 -1
- package/dist/containers/Clusters/constants.d.ts +4 -4
- package/dist/containers/Clusters/constants.js +3 -3
- package/dist/containers/Clusters/constants.js.map +1 -1
- package/dist/containers/Node/Node.js +14 -4
- package/dist/containers/Node/Node.js.map +1 -1
- package/dist/containers/Node/NodePages.js +4 -5
- package/dist/containers/Node/NodePages.js.map +1 -1
- package/dist/containers/Nodes/Nodes.js +10 -11
- package/dist/containers/Nodes/Nodes.js.map +1 -1
- package/dist/containers/Nodes/PaginatedNodes.js +10 -11
- package/dist/containers/Nodes/PaginatedNodes.js.map +1 -1
- package/dist/containers/Nodes/{getNodesColumns.d.ts → columns/columns.d.ts} +3 -10
- package/dist/containers/Nodes/{getNodesColumns.js → columns/columns.js} +29 -39
- package/dist/containers/Nodes/columns/columns.js.map +1 -0
- package/dist/containers/Nodes/columns/constants.d.ts +39 -0
- package/dist/containers/Nodes/columns/constants.js +79 -0
- package/dist/containers/Nodes/columns/constants.js.map +1 -0
- package/dist/containers/Nodes/columns/hooks.d.ts +6 -0
- package/dist/containers/Nodes/columns/hooks.js +11 -0
- package/dist/containers/Nodes/columns/hooks.js.map +1 -0
- package/dist/containers/Nodes/columns/i18n/en.json +16 -0
- package/dist/containers/Nodes/columns/i18n/index.d.ts +2 -0
- package/dist/containers/Nodes/columns/i18n/index.js +5 -0
- package/dist/containers/Nodes/columns/i18n/index.js.map +1 -0
- package/dist/containers/Nodes/columns/types.d.ts +9 -0
- package/dist/containers/Nodes/columns/types.js +2 -0
- package/dist/containers/Nodes/columns/types.js.map +1 -0
- package/dist/containers/Nodes/getNodes.d.ts +3 -2
- package/dist/containers/Nodes/getNodes.js +6 -3
- package/dist/containers/Nodes/getNodes.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskPage.js +12 -10
- package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskPage.scss +14 -14
- package/dist/containers/PDiskPage/i18n/en.json +1 -1
- package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
- package/dist/containers/ReduxTooltip/ReduxTooltip.js +7 -7
- package/dist/containers/ReduxTooltip/ReduxTooltip.js.map +1 -1
- package/dist/containers/Storage/PDisk/PDisk.d.ts +4 -4
- package/dist/containers/Storage/PDisk/PDisk.js +2 -2
- package/dist/containers/Storage/PDisk/PDisk.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorage.d.ts +2 -3
- package/dist/containers/Storage/PaginatedStorage.js +27 -6
- package/dist/containers/Storage/PaginatedStorage.js.map +1 -1
- package/dist/containers/Storage/Storage.d.ts +4 -4
- package/dist/containers/Storage/Storage.js +45 -11
- package/dist/containers/Storage/Storage.js.map +1 -1
- package/dist/containers/Storage/StorageControls/StorageControls.d.ts +4 -1
- package/dist/containers/Storage/StorageControls/StorageControls.js +4 -2
- package/dist/containers/Storage/StorageControls/StorageControls.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.d.ts +3 -1
- package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.js +2 -4
- package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/StorageGroups.d.ts +3 -1
- package/dist/containers/Storage/StorageGroups/StorageGroups.js +2 -4
- package/dist/containers/Storage/StorageGroups/StorageGroups.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/columns/columns.d.ts +4 -0
- package/dist/containers/Storage/StorageGroups/columns/{getStorageGroupsColumns.js → columns.js} +33 -81
- package/dist/containers/Storage/StorageGroups/columns/columns.js.map +1 -0
- package/dist/containers/Storage/StorageGroups/columns/constants.d.ts +37 -0
- package/dist/containers/Storage/StorageGroups/columns/constants.js +75 -0
- package/dist/containers/Storage/StorageGroups/columns/constants.js.map +1 -0
- package/dist/containers/Storage/StorageGroups/columns/hooks.d.ts +6 -2
- package/dist/containers/Storage/StorageGroups/columns/hooks.js +22 -14
- package/dist/containers/Storage/StorageGroups/columns/hooks.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/columns/i18n/en.json +15 -0
- package/dist/containers/Storage/StorageGroups/columns/i18n/index.d.ts +2 -0
- package/dist/containers/Storage/StorageGroups/columns/i18n/index.js +5 -0
- package/dist/containers/Storage/StorageGroups/columns/i18n/index.js.map +1 -0
- package/dist/containers/Storage/StorageGroups/columns/types.d.ts +2 -6
- package/dist/containers/Storage/StorageGroups/getGroups.js +4 -1
- package/dist/containers/Storage/StorageGroups/getGroups.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodes.d.ts +3 -3
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodes.js +2 -5
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodes.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/StorageNodes.d.ts +4 -6
- package/dist/containers/Storage/StorageNodes/StorageNodes.js +2 -4
- package/dist/containers/Storage/StorageNodes/StorageNodes.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/StorageNodes.scss +1 -27
- package/dist/containers/Storage/StorageNodes/columns/StorageNodesColumns.scss +23 -0
- package/dist/containers/Storage/StorageNodes/columns/columns.d.ts +39 -0
- package/dist/containers/Storage/StorageNodes/{getStorageNodesColumns.js → columns/columns.js} +21 -31
- package/dist/containers/Storage/StorageNodes/columns/columns.js.map +1 -0
- package/dist/containers/Storage/StorageNodes/columns/constants.d.ts +25 -0
- package/dist/containers/Storage/StorageNodes/columns/constants.js +47 -0
- package/dist/containers/Storage/StorageNodes/columns/constants.js.map +1 -0
- package/dist/containers/Storage/StorageNodes/columns/hooks.d.ts +43 -0
- package/dist/containers/Storage/StorageNodes/columns/hooks.js +18 -0
- package/dist/containers/Storage/StorageNodes/columns/hooks.js.map +1 -0
- package/dist/containers/Storage/StorageNodes/columns/i18n/en.json +9 -0
- package/dist/containers/Storage/StorageNodes/columns/i18n/index.d.ts +2 -0
- package/dist/containers/Storage/StorageNodes/columns/i18n/index.js +5 -0
- package/dist/containers/Storage/StorageNodes/columns/i18n/index.js.map +1 -0
- package/dist/containers/Storage/StorageNodes/columns/types.d.ts +11 -0
- package/dist/containers/Storage/StorageNodes/columns/types.js +2 -0
- package/dist/containers/Storage/StorageNodes/columns/types.js.map +1 -0
- package/dist/containers/Storage/StorageNodes/getNodes.d.ts +2 -2
- package/dist/containers/Storage/StorageNodes/getNodes.js +7 -4
- package/dist/containers/Storage/StorageNodes/getNodes.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/shared.js +1 -1
- package/dist/containers/Storage/StorageNodes/shared.js.map +1 -1
- package/dist/containers/Storage/StorageWrapper.d.ts +0 -2
- package/dist/containers/Storage/StorageWrapper.js.map +1 -1
- package/dist/containers/Storage/utils/index.js +6 -5
- package/dist/containers/Storage/utils/index.js.map +1 -1
- package/dist/containers/StorageGroupPage/StorageGroupPage.js +14 -57
- package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
- package/dist/containers/StorageGroupPage/StorageGroupPage.scss +14 -17
- package/dist/containers/StorageGroupPage/i18n/en.json +1 -2
- package/dist/containers/StorageGroupPage/i18n/index.d.ts +1 -1
- package/dist/containers/Tablets/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +6 -0
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +2 -2
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +12 -5
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js +12 -5
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +13 -5
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +46 -55
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js.map +1 -1
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +6 -7
- package/dist/containers/Tenant/ObjectSummary/ObjectTree.d.ts +6 -0
- package/dist/containers/Tenant/ObjectSummary/ObjectTree.js +25 -0
- package/dist/containers/Tenant/ObjectSummary/ObjectTree.js.map +1 -0
- package/dist/containers/Tenant/ObjectSummary/SchemaActions.d.ts +1 -0
- package/dist/containers/Tenant/ObjectSummary/SchemaActions.js +18 -0
- package/dist/containers/Tenant/ObjectSummary/SchemaActions.js.map +1 -0
- package/dist/containers/Tenant/ObjectSummary/i18n/en.json +21 -0
- package/dist/containers/Tenant/ObjectSummary/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/ObjectSummary/i18n/index.js +5 -0
- package/dist/containers/Tenant/ObjectSummary/i18n/index.js.map +1 -0
- package/dist/containers/Tenant/ObjectSummary/shared.d.ts +1 -0
- package/dist/containers/Tenant/ObjectSummary/shared.js +3 -0
- package/dist/containers/Tenant/ObjectSummary/shared.js.map +1 -0
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +12 -12
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js.map +1 -1
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +8 -0
- package/dist/containers/Tenant/Query/ExecuteResult/i18n/en.json +2 -1
- package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.js +3 -1
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.js +5 -10
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.js +5 -3
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.js +6 -10
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.js.map +1 -1
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js +11 -2
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js.map +1 -1
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.scss +1 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.d.ts +1 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.js +1 -1
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.js.map +1 -1
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +3 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +3 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js.map +1 -1
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/en.json +3 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/ru.json +3 -0
- package/dist/containers/Tenant/utils/schema.js +1 -0
- package/dist/containers/Tenant/utils/schema.js.map +1 -1
- package/dist/containers/UserSettings/i18n/en.json +0 -2
- package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
- package/dist/containers/UserSettings/settings.d.ts +0 -1
- package/dist/containers/UserSettings/settings.js +2 -7
- package/dist/containers/UserSettings/settings.js.map +1 -1
- package/dist/containers/VDiskPage/VDiskPage.d.ts +0 -3
- package/dist/containers/VDiskPage/VDiskPage.js +9 -33
- package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
- package/dist/containers/VDiskPage/VDiskPage.scss +10 -19
- package/dist/containers/VDiskPage/i18n/en.json +1 -1
- package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
- package/dist/services/api.d.ts +16 -5
- package/dist/services/api.js +50 -11
- package/dist/services/api.js.map +1 -1
- package/dist/services/settings.d.ts +2 -2
- package/dist/services/settings.js +2 -3
- package/dist/services/settings.js.map +1 -1
- package/dist/store/configureStore.d.ts +2 -2
- package/dist/store/defaultStore.d.ts +1 -1
- package/dist/store/reducers/capabilities/capabilities.d.ts +8 -1
- package/dist/store/reducers/capabilities/capabilities.js +6 -1
- package/dist/store/reducers/capabilities/capabilities.js.map +1 -1
- package/dist/store/reducers/executeQuery.js +3 -0
- package/dist/store/reducers/executeQuery.js.map +1 -1
- package/dist/store/reducers/index.d.ts +2 -2
- package/dist/store/reducers/nodes/nodes.d.ts +2 -2
- package/dist/store/reducers/nodes/nodes.js.map +1 -1
- package/dist/store/reducers/nodes/types.d.ts +2 -24
- package/dist/store/reducers/pdisk/pdisk.js +29 -2
- package/dist/store/reducers/pdisk/pdisk.js.map +1 -1
- package/dist/store/reducers/pdisk/utils.js +1 -1
- package/dist/store/reducers/pdisk/utils.js.map +1 -1
- package/dist/store/reducers/storage/storage.d.ts +2 -2
- package/dist/store/reducers/storage/storage.js.map +1 -1
- package/dist/store/reducers/tooltip.d.ts +1 -1
- package/dist/styles/mixins.scss +3 -3
- package/dist/types/api/common.d.ts +1 -0
- package/dist/types/api/nodes.d.ts +33 -0
- package/dist/types/api/nodes.js.map +1 -1
- package/dist/types/api/query.d.ts +1 -0
- package/dist/types/api/storage.d.ts +8 -5
- package/dist/types/store/query.d.ts +5 -8
- package/dist/utils/constants.d.ts +0 -8
- package/dist/utils/constants.js +0 -9
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/filters.d.ts +2 -1
- package/dist/utils/filters.js +1 -4
- package/dist/utils/filters.js.map +1 -1
- package/dist/utils/hooks/useChangedQuerySettings.d.ts +2 -2
- package/dist/utils/hooks/useChangedQuerySettings.js +2 -1
- package/dist/utils/hooks/useChangedQuerySettings.js.map +1 -1
- package/dist/utils/hooks/useLastQueryExecutionSettings.d.ts +15 -2
- package/dist/utils/hooks/useLastQueryExecutionSettings.js +8 -9
- package/dist/utils/hooks/useLastQueryExecutionSettings.js.map +1 -1
- package/dist/utils/hooks/useQueryExecutionSettings.d.ts +15 -2
- package/dist/utils/hooks/useQueryExecutionSettings.js +5 -7
- package/dist/utils/hooks/useQueryExecutionSettings.js.map +1 -1
- package/dist/utils/hooks/useSelectedColumns.d.ts +8 -0
- package/dist/utils/hooks/useSelectedColumns.js +35 -0
- package/dist/utils/hooks/useSelectedColumns.js.map +1 -0
- package/dist/utils/nodes.d.ts +3 -22
- package/dist/utils/nodes.js +16 -19
- package/dist/utils/nodes.js.map +1 -1
- package/dist/utils/query.d.ts +129 -0
- package/dist/utils/query.js +33 -1
- package/dist/utils/query.js.map +1 -1
- package/dist/utils/storage.d.ts +1 -1
- package/dist/utils/storage.js.map +1 -1
- package/package.json +2 -1
- package/dist/containers/Clusters/useSelectedColumns.d.ts +0 -7
- package/dist/containers/Clusters/useSelectedColumns.js +0 -26
- package/dist/containers/Clusters/useSelectedColumns.js.map +0 -1
- package/dist/containers/Nodes/getNodesColumns.js.map +0 -1
- package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.d.ts +0 -6
- package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js +0 -30
- package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js.map +0 -1
- package/dist/containers/PDiskPage/PDiskGroups/utils.d.ts +0 -2
- package/dist/containers/PDiskPage/PDiskGroups/utils.js +0 -14
- package/dist/containers/PDiskPage/PDiskGroups/utils.js.map +0 -1
- package/dist/containers/Storage/StorageGroups/columns/getStorageGroupsColumns.d.ts +0 -21
- package/dist/containers/Storage/StorageGroups/columns/getStorageGroupsColumns.js.map +0 -1
- package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.d.ts +0 -50
- package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.js.map +0 -1
- package/dist/containers/VDiskPage/utils.d.ts +0 -2
- package/dist/containers/VDiskPage/utils.js +0 -7
- package/dist/containers/VDiskPage/utils.js.map +0 -1
- package/dist/store/reducers/tenantOverview/topNodes/topNodes.d.ts +0 -4
- package/dist/store/reducers/tenantOverview/topNodes/topNodes.js +0 -27
- package/dist/store/reducers/tenantOverview/topNodes/topNodes.js.map +0 -1
@@ -16,22 +16,23 @@ import { PageMetaWithAutorefresh } from '../../components/PageMeta/PageMeta';
|
|
16
16
|
import { getPDiskPagePath } from '../../routes';
|
17
17
|
import { api } from '../../store/reducers/api';
|
18
18
|
import { selectIsUserAllowedToMakeChanges } from '../../store/reducers/authentication/authentication';
|
19
|
+
import { useDiskPagesAvailable } from '../../store/reducers/capabilities/hooks';
|
19
20
|
import { setHeaderBreadcrumbs } from '../../store/reducers/header/header';
|
20
21
|
import { pDiskApi } from '../../store/reducers/pdisk/pdisk';
|
21
22
|
import { valueIsDefined } from '../../utils';
|
22
23
|
import { cn } from '../../utils/cn';
|
23
24
|
import { getPDiskId, getSeverityColor } from '../../utils/disks/helpers';
|
24
25
|
import { useAutoRefreshInterval, useTypedDispatch, useTypedSelector } from '../../utils/hooks';
|
26
|
+
import { Storage } from '../Storage/Storage';
|
25
27
|
import { DecommissionButton } from './DecommissionButton/DecommissionButton';
|
26
28
|
import { DecommissionLabel } from './DecommissionLabel/DecommissionLabel';
|
27
|
-
import { PDiskGroups } from './PDiskGroups/PDiskGroups';
|
28
29
|
import { PDiskSpaceDistribution } from './PDiskSpaceDistribution/PDiskSpaceDistribution';
|
29
30
|
import { pDiskPageKeyset } from './i18n';
|
30
31
|
import './PDiskPage.scss';
|
31
32
|
const pdiskPageCn = cn('ydb-pdisk-page');
|
32
33
|
const PDISK_TABS_IDS = {
|
33
34
|
diskDistribution: 'diskDistribution',
|
34
|
-
|
35
|
+
storage: 'storage',
|
35
36
|
};
|
36
37
|
const PDISK_PAGE_TABS = [
|
37
38
|
{
|
@@ -41,9 +42,9 @@ const PDISK_PAGE_TABS = [
|
|
41
42
|
},
|
42
43
|
},
|
43
44
|
{
|
44
|
-
id: PDISK_TABS_IDS.
|
45
|
+
id: PDISK_TABS_IDS.storage,
|
45
46
|
get title() {
|
46
|
-
return pDiskPageKeyset('
|
47
|
+
return pDiskPageKeyset('storage');
|
47
48
|
},
|
48
49
|
},
|
49
50
|
];
|
@@ -51,6 +52,7 @@ const pDiskTabSchema = z.nativeEnum(PDISK_TABS_IDS).catch(PDISK_TABS_IDS.diskDis
|
|
51
52
|
export function PDiskPage() {
|
52
53
|
const dispatch = useTypedDispatch();
|
53
54
|
const isUserAllowedToMakeChanges = useTypedSelector(selectIsUserAllowedToMakeChanges);
|
55
|
+
const newDiskApiAvailable = useDiskPagesAvailable();
|
54
56
|
const [{ nodeId, pDiskId, activeTab }] = useQueryParams({
|
55
57
|
activeTab: StringParam,
|
56
58
|
nodeId: StringParam,
|
@@ -71,7 +73,7 @@ export function PDiskPage() {
|
|
71
73
|
const { NodeHost, NodeId, NodeType, NodeDC, Severity, DecommitStatus } = pDiskData || {};
|
72
74
|
const handleRestart = async (isRetry) => {
|
73
75
|
if (pDiskParamsDefined) {
|
74
|
-
const response = await window.api
|
76
|
+
const response = await window.api[newDiskApiAvailable ? 'restartPDisk' : 'restartPDiskOld']({ nodeId, pDiskId, force: isRetry });
|
75
77
|
if ((response === null || response === void 0 ? void 0 : response.result) === false) {
|
76
78
|
const err = {
|
77
79
|
statusText: response.error,
|
@@ -119,7 +121,7 @@ export function PDiskPage() {
|
|
119
121
|
return (_jsxs("div", { className: pdiskPageCn('title'), children: [_jsx(EntityPageTitle, { entityName: pDiskPageKeyset('pdisk'), status: getSeverityColor(Severity), id: getPDiskId(nodeId, pDiskId) }), _jsx(DecommissionLabel, { decommission: DecommitStatus })] }));
|
120
122
|
};
|
121
123
|
const renderControls = () => {
|
122
|
-
return (_jsxs("div", { className: pdiskPageCn('controls'), children: [_jsxs(ButtonWithConfirmDialog, { onConfirmAction: handleRestart, onConfirmActionSuccess: handleAfterAction, buttonDisabled: !pDiskParamsDefined || !isUserAllowedToMakeChanges, buttonView: "normal", dialogHeader: pDiskPageKeyset('restart-pdisk-dialog-header'), dialogText: pDiskPageKeyset('restart-pdisk-dialog-text'), retryButtonText: pDiskPageKeyset('force-restart-pdisk-button'), withPopover: true, popoverContent: pDiskPageKeyset('restart-pdisk-not-allowed'), popoverDisabled: isUserAllowedToMakeChanges, children: [_jsx(Icon, { data: ArrowRotateLeft }), pDiskPageKeyset('restart-pdisk-button')] }), _jsx(DecommissionButton, { decommission: DecommitStatus, onConfirmAction: handleDecommissionChange, onConfirmActionSuccess: handleAfterAction, buttonDisabled: !pDiskParamsDefined || !isUserAllowedToMakeChanges, popoverDisabled: isUserAllowedToMakeChanges })] }));
|
124
|
+
return (_jsxs("div", { className: pdiskPageCn('controls'), children: [_jsxs(ButtonWithConfirmDialog, { onConfirmAction: handleRestart, onConfirmActionSuccess: handleAfterAction, buttonDisabled: !pDiskParamsDefined || !isUserAllowedToMakeChanges, buttonView: "normal", dialogHeader: pDiskPageKeyset('restart-pdisk-dialog-header'), dialogText: pDiskPageKeyset('restart-pdisk-dialog-text'), retryButtonText: pDiskPageKeyset('force-restart-pdisk-button'), withPopover: true, popoverContent: pDiskPageKeyset('restart-pdisk-not-allowed'), popoverDisabled: isUserAllowedToMakeChanges, children: [_jsx(Icon, { data: ArrowRotateLeft }), pDiskPageKeyset('restart-pdisk-button')] }), newDiskApiAvailable ? (_jsx(DecommissionButton, { decommission: DecommitStatus, onConfirmAction: handleDecommissionChange, onConfirmActionSuccess: handleAfterAction, buttonDisabled: !pDiskParamsDefined || !isUserAllowedToMakeChanges, popoverDisabled: isUserAllowedToMakeChanges })) : null] }));
|
123
125
|
};
|
124
126
|
const renderInfo = () => {
|
125
127
|
if (pDiskLoading) {
|
@@ -138,10 +140,10 @@ export function PDiskPage() {
|
|
138
140
|
const renderTabsContent = () => {
|
139
141
|
switch (pDiskTab) {
|
140
142
|
case 'diskDistribution': {
|
141
|
-
return pDiskData ? _jsx(PDiskSpaceDistribution, { data: pDiskData }) : null;
|
143
|
+
return pDiskData ? (_jsx("div", { className: pdiskPageCn('disk-distribution'), children: _jsx(PDiskSpaceDistribution, { data: pDiskData }) })) : null;
|
142
144
|
}
|
143
|
-
case '
|
144
|
-
return pDiskParamsDefined ?
|
145
|
+
case 'storage': {
|
146
|
+
return pDiskParamsDefined ? _jsx(Storage, { nodeId: nodeId, pDiskId: pDiskId }) : null;
|
145
147
|
}
|
146
148
|
default:
|
147
149
|
return null;
|
@@ -153,6 +155,6 @@ export function PDiskPage() {
|
|
153
155
|
}
|
154
156
|
return _jsx(ResponseError, { error: pdiskDataQuery.error });
|
155
157
|
};
|
156
|
-
return (_jsxs("div", { className: pdiskPageCn(null), children: [
|
158
|
+
return (_jsxs("div", { className: pdiskPageCn(null), children: [renderHelmet(), renderPageMeta(), renderPageTitle(), renderControls(), renderError(), renderInfo(), renderTabs(), renderTabsContent()] }));
|
157
159
|
}
|
158
160
|
//# sourceMappingURL=PDiskPage.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PDiskPage.js","sourceRoot":"","sources":["../../../src/containers/PDiskPage/PDiskPage.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAC,WAAW,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAC,uBAAuB,EAAC,MAAM,kEAAkE,CAAC;AACzG,OAAO,EAAC,eAAe,EAAC,MAAM,kDAAkD,CAAC;AACjF,OAAO,EAAC,aAAa,EAAC,MA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
flex-direction: column;
|
16
|
-
gap: 20px;
|
17
|
-
|
18
|
-
padding: 20px;
|
19
|
+
margin-bottom: 20px;
|
19
20
|
}
|
20
21
|
|
21
|
-
&
|
22
|
-
|
22
|
+
&__meta {
|
23
|
+
margin-top: 20px;
|
23
24
|
}
|
24
25
|
|
25
|
-
&__meta,
|
26
|
-
&__title,
|
27
|
-
&__info,
|
28
|
-
&__controls,
|
29
26
|
&__tabs {
|
30
|
-
|
31
|
-
|
27
|
+
margin-bottom: 0;
|
28
|
+
}
|
29
|
+
|
30
|
+
&__disk-distribution {
|
31
|
+
padding: 20px 0;
|
32
32
|
}
|
33
33
|
|
34
34
|
&__title {
|
@@ -1 +1 @@
|
|
1
|
-
export declare const pDiskPageKeyset: (key: "
|
1
|
+
export declare const pDiskPageKeyset: (key: "storage" | "node" | "log" | "fqdn" | "pdisk" | "disk-distribution" | "empty-slot" | "label.log-size" | "label.system-size" | "label.slot-size" | "no-slots-data" | "restart-pdisk-button" | "force-restart-pdisk-button" | "restart-pdisk-not-allowed" | "restart-pdisk-dialog-header" | "restart-pdisk-dialog-text" | "decommission-none" | "decommission-imminent" | "decommission-pending" | "decommission-rejected" | "decommission-label" | "decommission-button" | "decommission-change-not-allowed" | "decommission-dialog-title" | "decommission-dialog-force-change" | "decommission-dialog-imminent-warning" | "decommission-dialog-pending-warning" | "decommission-dialog-rejected-warning" | "decommission-dialog-none-warning", params?: import("@gravity-ui/i18n").Params) => string;
|
@@ -19,18 +19,18 @@ function ReduxTooltip(props) {
|
|
19
19
|
const fakeAnchor = useVirtualElementRef({
|
20
20
|
rect: { top: (_a = props.positions) === null || _a === void 0 ? void 0 : _a.top, left: (_b = props.positions) === null || _b === void 0 ? void 0 : _b.left },
|
21
21
|
});
|
22
|
+
const handleScroll = React.useCallback(() => {
|
23
|
+
const { hideTooltip, toolTipVisible } = props;
|
24
|
+
if (toolTipVisible) {
|
25
|
+
setTimeout(() => hideTooltip(), 500);
|
26
|
+
}
|
27
|
+
}, [props]);
|
22
28
|
React.useEffect(() => {
|
23
29
|
window.addEventListener('scroll', handleScroll, true);
|
24
30
|
return () => {
|
25
31
|
window.removeEventListener('scroll', handleScroll);
|
26
32
|
};
|
27
|
-
}, []);
|
28
|
-
const handleScroll = () => {
|
29
|
-
const { hideTooltip, toolTipVisible } = props;
|
30
|
-
if (toolTipVisible) {
|
31
|
-
setTimeout(() => hideTooltip(), 500);
|
32
|
-
}
|
33
|
-
};
|
33
|
+
}, [handleScroll]);
|
34
34
|
const renderPositionPopup = (visible, positions, data, additionalData) => {
|
35
35
|
const { template, popupClassName, hideTooltip } = props;
|
36
36
|
return (_jsx(React.Fragment, { children: _jsx(Popup, { open: visible, placement: ['top', 'bottom', 'left', 'right'], contentClassName: popupClassName, anchorRef: fakeAnchor, onOutsideClick: hideTooltip, children: data && template(data, additionalData) }) }));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ReduxTooltip.js","sourceRoot":"","sources":["../../../src/containers/ReduxTooltip/ReduxTooltip.js"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,KAAK,EAAE,oBAAoB,EAAC,MAAM,mBAAmB,CAAC;AAC9D,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAErD,OAAO,qBAAqB,CAAC;AAE7B,MAAM,SAAS,GAAG;IACd,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,cAAc,EAAE,SAAS,CAAC,IAAI;IAC9B,iBAAiB,EAAE,SAAS,CAAC,MAAM;IACnC,IAAI,EAAE,SAAS,CAAC,GAAG;IACnB,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,WAAW,EAAE,SAAS,CAAC,IAAI;CAC9B,CAAC;AAEF,SAAS,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C,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAC7C,SAAS,EAAE,cAAc,EACzB,cAAc,EAAE,WAAW,YAE1B,IAAI,IAAI,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC,GACnC,CACX,CAAC;IACN,CAAC,CAAC;IAEF,MAAM,EACF,SAAS,GAAG,EAAE,EACd,cAAc,EACd,iBAAiB,EACjB,IAAI,EACJ,cAAc,EACd,SAAS,GACZ,GAAG,KAAK,CAAC;IAEV,OAAO,CACH,cAAK,SAAS,EAAE,iBAAiB,SAAS,EAAE,YACvC,SAAS;YACN,CAAC,CAAC,mBAAmB,CAAC,cAAc,EAAE,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC;YACtE,CAAC,CAAC,iBAAiB,CAAC,cAAc,EAAE,iBAAiB,EAAE,IAAI,EAAE,cAAc,CAAC,GAC9E,CACT,CAAC;AACN,CAAC;AAED,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;IAC9B,MAAM,EAAC,cAAc,EAAE,iBAAiB,EAAE,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAC,GACpF,KAAK,CAAC,OAAO,CAAC;IAElB,MAAM,EAAC,cAAc,EAAC,GAAG,cAAc,IAAI,EAAE,CAAC;IAE9C,OAAO;QACH,cAAc;QACd,iBAAiB;QACjB,IAAI;QACJ,QAAQ,EAAE,gBAAgB,CAAC,YAAY,CAAC;QACxC,cAAc;QACd,SAAS;QACT,cAAc;KACjB,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC,eAAe,EAAE,EAAC,WAAW,EAAC,CAAC,CAAC,YAAY,CAAC,CAAC;AAErE,YAAY,CAAC,SAAS,GAAG,SAAS,CAAC"}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import type {
|
2
|
-
import type { PreparedPDisk } from '../../../utils/disks/types';
|
1
|
+
import type { PreparedPDisk, PreparedVDisk } from '../../../utils/disks/types';
|
3
2
|
import './PDisk.scss';
|
4
3
|
interface PDiskProps {
|
5
4
|
data?: PreparedPDisk;
|
6
|
-
vDisks?:
|
5
|
+
vDisks?: PreparedVDisk[];
|
6
|
+
inactiveVdisks?: PreparedVDisk[];
|
7
7
|
showPopup?: boolean;
|
8
8
|
onShowPopup?: VoidFunction;
|
9
9
|
onHidePopup?: VoidFunction;
|
10
10
|
className?: string;
|
11
11
|
progressBarClassName?: string;
|
12
12
|
}
|
13
|
-
export declare const PDisk: ({ data, vDisks, showPopup, onShowPopup, onHidePopup, className, progressBarClassName, }: PDiskProps) => import("react/jsx-runtime").JSX.Element;
|
13
|
+
export declare const PDisk: ({ data, vDisks, inactiveVdisks, showPopup, onShowPopup, onHidePopup, className, progressBarClassName, }: PDiskProps) => import("react/jsx-runtime").JSX.Element;
|
14
14
|
export {};
|
@@ -12,7 +12,7 @@ import { stringifyVdiskId } from '../../../utils/dataFormatters/dataFormatters';
|
|
12
12
|
import { STRUCTURE } from '../../Node/NodePages';
|
13
13
|
import './PDisk.scss';
|
14
14
|
const b = cn('pdisk-storage');
|
15
|
-
export const PDisk = ({ data = {}, vDisks, showPopup, onShowPopup, onHidePopup, className, progressBarClassName, }) => {
|
15
|
+
export const PDisk = ({ data = {}, vDisks, inactiveVdisks, showPopup, onShowPopup, onHidePopup, className, progressBarClassName, }) => {
|
16
16
|
const [isPopupVisible, setIsPopupVisible] = React.useState(false);
|
17
17
|
const diskPagesAvailable = useDiskPagesAvailable();
|
18
18
|
const anchor = React.useRef(null);
|
@@ -35,7 +35,7 @@ export const PDisk = ({ data = {}, vDisks, showPopup, onShowPopup, onHidePopup,
|
|
35
35
|
// 1 is small enough for empty disks to be of the minimum width
|
36
36
|
// but if all of them are empty, `flex-grow: 1` would size them evenly
|
37
37
|
flexGrow: Number(vdisk.AllocatedSize) || 1,
|
38
|
-
}, children: _jsx(VDiskWithDonorsStack, { data: vdisk,
|
38
|
+
}, children: _jsx(VDiskWithDonorsStack, { data: vdisk, inactive: inactiveVdisks === null || inactiveVdisks === void 0 ? void 0 : inactiveVdisks.includes(vdisk), stackClassName: b('donors-stack'), compact: true }) }, stringifyVdiskId(vdisk.VDiskId)));
|
39
39
|
}) }));
|
40
40
|
};
|
41
41
|
let pDiskPath;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PDisk.js","sourceRoot":"","sources":["../../../../src/containers/Storage/PDisk/PDisk.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,oBAAoB,EAAC,MAAM,+DAA+D,CAAC;AACnG,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAC,UAAU,EAAC,MAAM,2CAA2C,CAAC;AACrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gDAAgD,CAAC;AACpF,OAAO,MAAM,EAAE,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAC,qBAAqB,EAAC,MAAM,4CAA4C,CAAC;
|
1
|
+
{"version":3,"file":"PDisk.js","sourceRoot":"","sources":["../../../../src/containers/Storage/PDisk/PDisk.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,oBAAoB,EAAC,MAAM,+DAA+D,CAAC;AACnG,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAC,UAAU,EAAC,MAAM,2CAA2C,CAAC;AACrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gDAAgD,CAAC;AACpF,OAAO,MAAM,EAAE,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAC,qBAAqB,EAAC,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAC,EAAE,EAAC,MAAM,mBAAmB,CAAC;AACrC,OAAO,EAAC,gBAAgB,E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cAAK,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,YAAG,IAAI,CAAC,IAAI,GAAO,IACvC,IACb,EACN,KAAC,UAAU,IAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,IAAI,SAAS,GAAI,IACnE,CACpB,CAAC;AACN,CAAC,CAAC"}
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import type { AdditionalNodesProps } from '../../types/additionalProps';
|
2
1
|
interface PaginatedStorageProps {
|
3
2
|
database?: string;
|
4
3
|
nodeId?: string;
|
4
|
+
groupId?: string;
|
5
5
|
parentContainer?: Element | null;
|
6
|
-
additionalNodesProps?: AdditionalNodesProps;
|
7
6
|
}
|
8
|
-
export declare const PaginatedStorage: ({ database, nodeId,
|
7
|
+
export declare const PaginatedStorage: ({ database, nodeId, groupId, parentContainer, }: PaginatedStorageProps) => import("react/jsx-runtime").JSX.Element;
|
9
8
|
export {};
|
@@ -2,14 +2,20 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { StringParam, useQueryParams } from 'use-query-params';
|
3
3
|
import { AccessDenied } from '../../components/Errors/403/AccessDenied';
|
4
4
|
import { ResponseError } from '../../components/Errors/ResponseError/ResponseError';
|
5
|
-
import {
|
5
|
+
import { useClusterBaseInfo } from '../../store/reducers/cluster/cluster';
|
6
|
+
import { VISIBLE_ENTITIES } from '../../store/reducers/storage/constants';
|
6
7
|
import { storageTypeSchema, visibleEntitiesSchema } from '../../store/reducers/storage/types';
|
7
8
|
import { NodesUptimeFilterValues, nodesUptimeFilterValuesSchema } from '../../utils/nodes';
|
9
|
+
import { useAdditionalNodeProps } from '../AppWithClusters/useClusterData';
|
8
10
|
import { StorageControls } from './StorageControls/StorageControls';
|
9
11
|
import { PaginatedStorageGroups } from './StorageGroups/PaginatedStorageGroups';
|
12
|
+
import { useStorageGroupsSelectedColumns } from './StorageGroups/columns/hooks';
|
10
13
|
import { PaginatedStorageNodes } from './StorageNodes/PaginatedStorageNodes';
|
11
|
-
|
14
|
+
import { useStorageNodesSelectedColumns } from './StorageNodes/columns/hooks';
|
15
|
+
export const PaginatedStorage = ({ database, nodeId, groupId, parentContainer, }) => {
|
12
16
|
var _a;
|
17
|
+
const { balancer } = useClusterBaseInfo();
|
18
|
+
const { additionalNodesProps } = useAdditionalNodeProps({ balancer });
|
13
19
|
const [queryParams, setQueryParams] = useQueryParams({
|
14
20
|
type: StringParam,
|
15
21
|
visible: StringParam,
|
@@ -17,9 +23,18 @@ export const PaginatedStorage = ({ database, nodeId, parentContainer, additional
|
|
17
23
|
uptimeFilter: StringParam,
|
18
24
|
});
|
19
25
|
const storageType = storageTypeSchema.parse(queryParams.type);
|
26
|
+
const isGroups = storageType === 'groups';
|
27
|
+
const isNodes = storageType === 'nodes';
|
20
28
|
const visibleEntities = visibleEntitiesSchema.parse(queryParams.visible);
|
21
29
|
const searchValue = (_a = queryParams.search) !== null && _a !== void 0 ? _a : '';
|
22
30
|
const nodesUptimeFilter = nodesUptimeFilterValuesSchema.parse(queryParams.uptimeFilter);
|
31
|
+
const { columnsToShow: storageNodesColumnsToShow, columnsToSelect: storageNodesColumnsToSelect, setColumns: setStorageNodesSelectedColumns, } = useStorageNodesSelectedColumns({
|
32
|
+
additionalNodesProps,
|
33
|
+
visibleEntities,
|
34
|
+
database,
|
35
|
+
groupId,
|
36
|
+
});
|
37
|
+
const { columnsToShow: storageGroupsColumnsToShow, columnsToSelect: storageGroupsColumnsToSelect, setColumns: setStorageGroupsSelectedColumns, } = useStorageGroupsSelectedColumns(visibleEntities);
|
23
38
|
const handleTextFilterChange = (value) => {
|
24
39
|
setQueryParams({ search: value || undefined }, 'replaceIn');
|
25
40
|
};
|
@@ -42,7 +57,13 @@ export const PaginatedStorage = ({ database, nodeId, parentContainer, additional
|
|
42
57
|
}, 'replaceIn');
|
43
58
|
};
|
44
59
|
const renderControls = ({ totalEntities, foundEntities, inited }) => {
|
45
|
-
|
60
|
+
const columnsToSelect = isGroups
|
61
|
+
? storageGroupsColumnsToSelect
|
62
|
+
: storageNodesColumnsToSelect;
|
63
|
+
const handleSelectedColumnsUpdate = isGroups
|
64
|
+
? setStorageGroupsSelectedColumns
|
65
|
+
: setStorageNodesSelectedColumns;
|
66
|
+
return (_jsx(StorageControls, { searchValue: searchValue, handleSearchValueChange: handleTextFilterChange, withTypeSelector: true, storageType: storageType, handleStorageTypeChange: handleStorageTypeChange, visibleEntities: visibleEntities, handleVisibleEntitiesChange: handleGroupVisibilityChange, nodesUptimeFilter: nodesUptimeFilter, handleNodesUptimeFilterChange: handleUptimeFilterChange, withGroupsUsageFilter: false, entitiesCountCurrent: foundEntities, entitiesCountTotal: totalEntities, entitiesLoading: !inited, columnsToSelect: columnsToSelect, handleSelectedColumnsUpdate: handleSelectedColumnsUpdate }));
|
46
67
|
};
|
47
68
|
const renderErrorMessage = (error) => {
|
48
69
|
if (error.status === 403) {
|
@@ -50,9 +71,9 @@ export const PaginatedStorage = ({ database, nodeId, parentContainer, additional
|
|
50
71
|
}
|
51
72
|
return _jsx(ResponseError, { error: error });
|
52
73
|
};
|
53
|
-
if (
|
54
|
-
return (_jsx(PaginatedStorageNodes, { searchValue: searchValue, visibleEntities: visibleEntities, nodesUptimeFilter: nodesUptimeFilter, database: database,
|
74
|
+
if (isNodes) {
|
75
|
+
return (_jsx(PaginatedStorageNodes, { searchValue: searchValue, visibleEntities: visibleEntities, nodesUptimeFilter: nodesUptimeFilter, database: database, onShowAll: handleShowAllNodes, parentContainer: parentContainer, renderControls: renderControls, renderErrorMessage: renderErrorMessage, columns: storageNodesColumnsToShow }));
|
55
76
|
}
|
56
|
-
return (_jsx(PaginatedStorageGroups, { searchValue: searchValue, visibleEntities: visibleEntities, database: database, nodeId: nodeId, onShowAll: handleShowAllGroups, parentContainer: parentContainer, renderControls: renderControls, renderErrorMessage: renderErrorMessage }));
|
77
|
+
return (_jsx(PaginatedStorageGroups, { searchValue: searchValue, visibleEntities: visibleEntities, database: database, nodeId: nodeId, onShowAll: handleShowAllGroups, parentContainer: parentContainer, renderControls: renderControls, renderErrorMessage: renderErrorMessage, columns: storageGroupsColumnsToShow }));
|
57
78
|
};
|
58
79
|
//# sourceMappingURL=PaginatedStorage.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PaginatedStorage.js","sourceRoot":"","sources":["../../../src/containers/Storage/PaginatedStorage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,WAAW,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAC,YAAY,EAAC,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,qDAAqD,CAAC;AAElF,OAAO,EAAC,
|
1
|
+
{"version":3,"file":"PaginatedStorage.js","sourceRoot":"","sources":["../../../src/containers/Storage/PaginatedStorage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,WAAW,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAC,YAAY,EAAC,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,qDAAqD,CAAC;AAElF,OAAO,EAAC,kBAAkB,EAAC,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAC,gBAAgB,EAAC,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAC,iBAAiB,EAAE,qBAAqB,EAAC,MAAM,oCAAoC,CAAC;AAE5F,OAAO,EAAC,uBAAuB,EAAE,6BAA6B,EAAC,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAC,sBAAsB,EAAC,MAAM,mCAAmC,CAAC;AAEzE,OAAO,EAAC,eAAe,EAAC,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAC,sBAAsB,EAAC,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAC,+BAA+B,EAAC,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAC,qBAAqB,EAAC,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAC,8BA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 @@
|
|
1
|
-
import type { AdditionalNodesProps } from '../../types/additionalProps';
|
2
1
|
import './Storage.scss';
|
3
2
|
interface StorageProps {
|
4
|
-
additionalNodesProps?: AdditionalNodesProps;
|
5
3
|
database?: string;
|
6
|
-
nodeId?: string;
|
4
|
+
nodeId?: string | number;
|
5
|
+
groupId?: string | number;
|
6
|
+
pDiskId?: string | number;
|
7
7
|
}
|
8
|
-
export declare const Storage: ({
|
8
|
+
export declare const Storage: ({ database, nodeId, groupId, pDiskId }: StorageProps) => import("react/jsx-runtime").JSX.Element;
|
9
9
|
export {};
|
@@ -6,16 +6,21 @@ import { isAccessError } from '../../components/Errors/PageError/PageError';
|
|
6
6
|
import { ResponseError } from '../../components/Errors/ResponseError';
|
7
7
|
import { TableWithControlsLayout } from '../../components/TableWithControlsLayout/TableWithControlsLayout';
|
8
8
|
import { useCapabilitiesLoaded, useStorageGroupsHandlerAvailable, } from '../../store/reducers/capabilities/hooks';
|
9
|
-
import {
|
9
|
+
import { useClusterBaseInfo } from '../../store/reducers/cluster/cluster';
|
10
|
+
import { VISIBLE_ENTITIES } from '../../store/reducers/storage/constants';
|
10
11
|
import { filterGroups, filterNodes, getUsageFilterOptions, } from '../../store/reducers/storage/selectors';
|
11
12
|
import { storageApi } from '../../store/reducers/storage/storage';
|
12
13
|
import { storageTypeSchema, visibleEntitiesSchema } from '../../store/reducers/storage/types';
|
14
|
+
import { valueIsDefined } from '../../utils';
|
13
15
|
import { DEFAULT_TABLE_SETTINGS } from '../../utils/constants';
|
14
16
|
import { useAutoRefreshInterval, useTableSort } from '../../utils/hooks';
|
15
17
|
import { NodesUptimeFilterValues, nodesUptimeFilterValuesSchema } from '../../utils/nodes';
|
18
|
+
import { useAdditionalNodeProps } from '../AppWithClusters/useClusterData';
|
16
19
|
import { StorageControls } from './StorageControls/StorageControls';
|
17
20
|
import { StorageGroups } from './StorageGroups/StorageGroups';
|
21
|
+
import { useStorageGroupsSelectedColumns } from './StorageGroups/columns/hooks';
|
18
22
|
import { StorageNodes } from './StorageNodes/StorageNodes';
|
23
|
+
import { useStorageNodesSelectedColumns } from './StorageNodes/columns/hooks';
|
19
24
|
import { b } from './shared';
|
20
25
|
import { defaultSortNode, getDefaultSortGroup } from './utils';
|
21
26
|
import './Storage.scss';
|
@@ -31,8 +36,10 @@ const UsageFilterParam = withDefault({
|
|
31
36
|
return input.filter(Boolean);
|
32
37
|
},
|
33
38
|
}, []);
|
34
|
-
export const Storage = ({
|
39
|
+
export const Storage = ({ database, nodeId, groupId, pDiskId }) => {
|
35
40
|
var _a;
|
41
|
+
const { balancer } = useClusterBaseInfo();
|
42
|
+
const { additionalNodesProps } = useAdditionalNodeProps({ balancer });
|
36
43
|
const capabilitiesLoaded = useCapabilitiesLoaded();
|
37
44
|
const groupsHandlerAvailable = useStorageGroupsHandlerAvailable();
|
38
45
|
const [autoRefreshInterval] = useAutoRefreshInterval();
|
@@ -44,6 +51,8 @@ export const Storage = ({ additionalNodesProps, database, nodeId }) => {
|
|
44
51
|
usageFilter: UsageFilterParam,
|
45
52
|
});
|
46
53
|
const storageType = storageTypeSchema.parse(queryParams.type);
|
54
|
+
const isGroups = storageType === 'groups';
|
55
|
+
const isNodes = storageType === 'nodes';
|
47
56
|
const visibleEntities = visibleEntitiesSchema.parse(queryParams.visible);
|
48
57
|
const filter = (_a = queryParams.search) !== null && _a !== void 0 ? _a : '';
|
49
58
|
const uptimeFilter = nodesUptimeFilterValuesSchema.parse(queryParams.uptimeFilter);
|
@@ -58,15 +67,35 @@ export const Storage = ({ additionalNodesProps, database, nodeId }) => {
|
|
58
67
|
sortValue: undefined,
|
59
68
|
});
|
60
69
|
const groupsSortParams = groupSort.sortOrder ? groupSort : getDefaultSortGroup(visibleEntities);
|
61
|
-
const
|
62
|
-
|
70
|
+
const { columnsToShow: storageNodesColumnsToShow, columnsToSelect: storageNodesColumnsToSelect, setColumns: setStorageNodesSelectedColumns, } = useStorageNodesSelectedColumns({
|
71
|
+
additionalNodesProps,
|
72
|
+
visibleEntities,
|
73
|
+
database,
|
74
|
+
groupId: groupId === null || groupId === void 0 ? void 0 : groupId.toString(),
|
75
|
+
});
|
76
|
+
const { columnsToShow: storageGroupsColumnsToShow, columnsToSelect: storageGroupsColumnsToSelect, setColumns: setStorageGroupsSelectedColumns, } = useStorageGroupsSelectedColumns(visibleEntities);
|
77
|
+
const nodesQuery = storageApi.useGetStorageNodesInfoQuery({
|
78
|
+
database,
|
79
|
+
with: visibleEntities,
|
80
|
+
node_id: nodeId,
|
81
|
+
// node_id and group_id params don't work together
|
82
|
+
group_id: valueIsDefined(nodeId) ? undefined : groupId,
|
83
|
+
}, {
|
84
|
+
skip: !isNodes,
|
63
85
|
pollingInterval: autoRefreshInterval,
|
64
86
|
});
|
65
|
-
const groupsQuery = storageApi.useGetStorageGroupsInfoQuery({
|
66
|
-
|
87
|
+
const groupsQuery = storageApi.useGetStorageGroupsInfoQuery({
|
88
|
+
database,
|
89
|
+
with: visibleEntities,
|
90
|
+
nodeId,
|
91
|
+
groupId,
|
92
|
+
pDiskId,
|
93
|
+
shouldUseGroupsHandler: groupsHandlerAvailable,
|
94
|
+
}, {
|
95
|
+
skip: !isGroups || !capabilitiesLoaded,
|
67
96
|
pollingInterval: autoRefreshInterval,
|
68
97
|
});
|
69
|
-
const { currentData, isFetching, error } =
|
98
|
+
const { currentData, isFetching, error } = isNodes ? nodesQuery : groupsQuery;
|
70
99
|
const { currentData: { nodes = [] } = {} } = nodesQuery;
|
71
100
|
const { currentData: { groups = [] } = {} } = groupsQuery;
|
72
101
|
const { nodes: _, groups: __, ...entitiesCount } = currentData !== null && currentData !== void 0 ? currentData : { found: 0, total: 0 };
|
@@ -96,12 +125,17 @@ export const Storage = ({ additionalNodesProps, database, nodeId }) => {
|
|
96
125
|
handleUptimeFilterChange(NodesUptimeFilterValues.All);
|
97
126
|
};
|
98
127
|
const renderDataTable = () => {
|
99
|
-
return (_jsxs(React.Fragment, { children: [
|
128
|
+
return (_jsxs(React.Fragment, { children: [isGroups ? (_jsx(StorageGroups, { visibleEntities: visibleEntities, data: storageGroups, tableSettings: DEFAULT_TABLE_SETTINGS, onShowAll: () => handleGroupVisibilityChange(VISIBLE_ENTITIES.all), sort: groupsSort, handleSort: handleGroupsSort, columns: storageGroupsColumnsToShow }, "groups")) : null, isNodes ? (_jsx(StorageNodes, { visibleEntities: visibleEntities, nodesUptimeFilter: uptimeFilter, data: storageNodes, tableSettings: DEFAULT_TABLE_SETTINGS, onShowAll: handleShowAllNodes, sort: nodesSort, handleSort: handleNodesSort, columns: storageNodesColumnsToShow }, "nodes")) : null] }));
|
100
129
|
};
|
101
130
|
const renderControls = () => {
|
102
|
-
|
103
|
-
|
104
|
-
|
131
|
+
const entitiesCountCurrent = isGroups ? storageGroups.length : storageNodes.length;
|
132
|
+
const columnsToSelect = isGroups
|
133
|
+
? storageGroupsColumnsToSelect
|
134
|
+
: storageNodesColumnsToSelect;
|
135
|
+
const handleSelectedColumnsUpdate = isGroups
|
136
|
+
? setStorageGroupsSelectedColumns
|
137
|
+
: setStorageNodesSelectedColumns;
|
138
|
+
return (_jsx(StorageControls, { searchValue: filter, handleSearchValueChange: handleTextFilterChange, withTypeSelector: true, storageType: storageType, handleStorageTypeChange: handleStorageTypeChange, visibleEntities: visibleEntities, handleVisibleEntitiesChange: handleGroupVisibilityChange, nodesUptimeFilter: uptimeFilter, handleNodesUptimeFilterChange: handleUptimeFilterChange, groupsUsageFilter: usageFilter, groupsUsageFilterOptions: usageFilterOptions, handleGroupsUsageFilterChange: handleUsageFilterChange, entitiesCountCurrent: entitiesCountCurrent, entitiesCountTotal: entitiesCount.total, entitiesLoading: isLoading, columnsToSelect: columnsToSelect, handleSelectedColumnsUpdate: handleSelectedColumnsUpdate }));
|
105
139
|
};
|
106
140
|
if (isAccessError(error)) {
|
107
141
|
return _jsx(AccessDenied, { position: "left" });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Storage.js","sourceRoot":"","sources":["../../../src/containers/Storage/Storage.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAEtF,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAC,aAAa,EAAC,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAC,aAAa,EAAC,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAC,uBAAuB,EAAC,MAAM,kEAAkE,CAAC;AACzG,OAAO,EACH,qBAAqB,EACrB,gCAAgC,GACnC,MAAM,yCAAyC,CAAC;
|
1
|
+
{"version":3,"file":"Storage.js","sourceRoot":"","sources":["../../../src/containers/Storage/Storage.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAEtF,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAC,aAAa,EAAC,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAC,aAAa,EAAC,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAC,uBAAuB,EAAC,MAAM,kEAAkE,CAAC;AACzG,OAAO,EACH,qBAAqB,EACrB,gCAAgC,GACnC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAC,kBAAkB,EAAC,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAC,gBAAgB,EAAC,MAAM,wCAAwC,CAAC;AACxE,OAAO,EACH,YAAY,EACZ,WAAW,EACX,qBAAqB,GACxB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAC,UAAU,EAAC,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAC,iBAAiB,EAAE,qBAAqB,EAAC,MAAM,oCAAoC,CAAC;AAM5F,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa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Ae,EAAE,SAAS,EAC1B,eAAe,EAAE,eAAe,EAChC,2BAA2B,EAAE,2BAA2B,GAC1D,CACL,CAAC;IACN,CAAC,CAAC;IAEF,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,KAAC,YAAY,IAAC,QAAQ,EAAC,MAAM,GAAG,CAAC;IAC5C,CAAC;IAED,OAAO,CACH,MAAC,uBAAuB,eACpB,KAAC,uBAAuB,CAAC,QAAQ,cAAE,cAAc,EAAE,GAAoC,EACtF,KAAK,CAAC,CAAC,CAAC,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,EAC/C,KAAC,uBAAuB,CAAC,KAAK,IAC1B,OAAO,EAAE,SAAS,IAAI,CAAC,kBAAkB,EACzC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,YAEpB,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,IAAI,GACX,IACV,CAC7B,CAAC;AACN,CAAC,CAAC"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { TableColumnSetupItem } from '@gravity-ui/uikit';
|
1
2
|
import type { StorageType, VisibleEntities } from '../../../store/reducers/storage/types';
|
2
3
|
import type { NodesUptimeFilterValues } from '../../../utils/nodes';
|
3
4
|
import type { UsageFilterItem } from '../UsageFilter/UsageFilter';
|
@@ -18,6 +19,8 @@ interface StorageControlsProps {
|
|
18
19
|
entitiesCountCurrent: number;
|
19
20
|
entitiesCountTotal?: number;
|
20
21
|
entitiesLoading: boolean;
|
22
|
+
columnsToSelect: TableColumnSetupItem[];
|
23
|
+
handleSelectedColumnsUpdate: (updated: TableColumnSetupItem[]) => void;
|
21
24
|
}
|
22
|
-
export declare const StorageControls: ({ searchValue, handleSearchValueChange, withTypeSelector, storageType, handleStorageTypeChange, visibleEntities, handleVisibleEntitiesChange, nodesUptimeFilter, handleNodesUptimeFilterChange, withGroupsUsageFilter, groupsUsageFilter, groupsUsageFilterOptions, handleGroupsUsageFilterChange, entitiesCountCurrent, entitiesCountTotal, entitiesLoading, }: StorageControlsProps) => import("react/jsx-runtime").JSX.Element;
|
25
|
+
export declare const StorageControls: ({ searchValue, handleSearchValueChange, withTypeSelector, storageType, handleStorageTypeChange, visibleEntities, handleVisibleEntitiesChange, nodesUptimeFilter, handleNodesUptimeFilterChange, withGroupsUsageFilter, groupsUsageFilter, groupsUsageFilterOptions, handleGroupsUsageFilterChange, entitiesCountCurrent, entitiesCountTotal, entitiesLoading, columnsToSelect, handleSelectedColumnsUpdate, }: StorageControlsProps) => import("react/jsx-runtime").JSX.Element;
|
23
26
|
export {};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
|
+
import { TableColumnSetup } from '@gravity-ui/uikit';
|
3
4
|
import { EntitiesCount } from '../../../components/EntitiesCount/EntitiesCount';
|
4
5
|
import { Search } from '../../../components/Search/Search';
|
5
6
|
import { UptimeFilter } from '../../../components/UptimeFIlter';
|
@@ -9,11 +10,12 @@ import { StorageVisibleEntitiesFilter } from '../StorageVisibleEntitiesFilter/St
|
|
9
10
|
import { UsageFilter } from '../UsageFilter/UsageFilter';
|
10
11
|
import i18n from '../i18n';
|
11
12
|
import { b } from '../shared';
|
12
|
-
export const StorageControls = ({ searchValue, handleSearchValueChange, withTypeSelector, storageType, handleStorageTypeChange, visibleEntities, handleVisibleEntitiesChange, nodesUptimeFilter, handleNodesUptimeFilterChange, withGroupsUsageFilter, groupsUsageFilter, groupsUsageFilterOptions, handleGroupsUsageFilterChange, entitiesCountCurrent, entitiesCountTotal, entitiesLoading, }) => {
|
13
|
+
export const StorageControls = ({ searchValue, handleSearchValueChange, withTypeSelector, storageType, handleStorageTypeChange, visibleEntities, handleVisibleEntitiesChange, nodesUptimeFilter, handleNodesUptimeFilterChange, withGroupsUsageFilter, groupsUsageFilter, groupsUsageFilterOptions, handleGroupsUsageFilterChange, entitiesCountCurrent, entitiesCountTotal, entitiesLoading, columnsToSelect, handleSelectedColumnsUpdate, }) => {
|
13
14
|
const isNodes = storageType === STORAGE_TYPES.nodes;
|
15
|
+
const isGroups = storageType === STORAGE_TYPES.groups;
|
14
16
|
const entityName = isNodes ? i18n('nodes') : i18n('groups');
|
15
17
|
return (_jsxs(React.Fragment, { children: [_jsx(Search, { value: searchValue, onChange: handleSearchValueChange, placeholder: isNodes
|
16
18
|
? i18n('controls_nodes-search-placeholder')
|
17
|
-
: i18n('controls_groups-search-placeholder'), className: b('search') }), withTypeSelector && (_jsx(StorageTypeFilter, { value: storageType, onChange: handleStorageTypeChange })), _jsx(StorageVisibleEntitiesFilter, { value: visibleEntities, onChange: handleVisibleEntitiesChange }), isNodes && (_jsx(UptimeFilter, { value: nodesUptimeFilter, onChange: handleNodesUptimeFilterChange })),
|
19
|
+
: i18n('controls_groups-search-placeholder'), className: b('search') }), withTypeSelector && (_jsx(StorageTypeFilter, { value: storageType, onChange: handleStorageTypeChange })), _jsx(StorageVisibleEntitiesFilter, { value: visibleEntities, onChange: handleVisibleEntitiesChange }), isNodes && (_jsx(UptimeFilter, { value: nodesUptimeFilter, onChange: handleNodesUptimeFilterChange })), isGroups && withGroupsUsageFilter && (_jsx(UsageFilter, { value: groupsUsageFilter, onChange: handleGroupsUsageFilterChange, groups: groupsUsageFilterOptions })), _jsx(EntitiesCount, { label: entityName, loading: entitiesLoading, total: entitiesCountTotal, current: entitiesCountCurrent }), _jsx(TableColumnSetup, { popupWidth: 200, items: columnsToSelect, showStatus: true, onUpdate: handleSelectedColumnsUpdate, sortable: false })] }));
|
18
20
|
};
|
19
21
|
//# sourceMappingURL=StorageControls.js.map
|