ydb-embedded-ui 6.17.1 → 6.18.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/icons/decommission.svg +6 -0
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +3 -2
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +10 -16
- package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js.map +1 -1
- package/dist/components/CriticalActionDialog/CriticalActionDialog.d.ts +4 -2
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js +7 -4
- package/dist/components/CriticalActionDialog/CriticalActionDialog.js.map +1 -1
- package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +23 -1
- package/dist/components/CriticalActionDialog/utils.d.ts +5 -0
- package/dist/components/CriticalActionDialog/utils.js +4 -0
- package/dist/components/CriticalActionDialog/utils.js.map +1 -0
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +5 -3
- package/dist/components/EntityPageTitle/EntityPageTitle.d.ts +1 -2
- package/dist/components/EntityPageTitle/EntityPageTitle.js +2 -2
- package/dist/components/EntityPageTitle/EntityPageTitle.js.map +1 -1
- package/dist/components/InfoViewerSkeleton/InfoViewerSkeleton.js +1 -1
- package/dist/components/InfoViewerSkeleton/InfoViewerSkeleton.js.map +1 -1
- package/dist/components/LinkWithIcon/LinkWithIcon.d.ts +2 -1
- package/dist/components/LinkWithIcon/LinkWithIcon.js +3 -3
- package/dist/components/LinkWithIcon/LinkWithIcon.js.map +1 -1
- package/dist/components/Loader/Loader.js +1 -1
- package/dist/components/Loader/Loader.js.map +1 -1
- package/dist/components/PDiskInfo/PDiskInfo.js +1 -7
- package/dist/components/PDiskInfo/PDiskInfo.js.map +1 -1
- package/dist/components/PDiskInfo/i18n/en.json +0 -1
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/PDiskPopup/PDiskPopup.js +3 -5
- package/dist/components/PDiskPopup/PDiskPopup.js.map +1 -1
- package/dist/components/PaginatedTable/PaginatedTable.d.ts +2 -1
- package/dist/components/PaginatedTable/PaginatedTable.js +2 -2
- package/dist/components/PaginatedTable/PaginatedTable.js.map +1 -1
- package/dist/components/PaginatedTable/PaginatedTable.scss +12 -14
- package/dist/components/PaginatedTable/ResizeablePaginatedTable.js +2 -1
- package/dist/components/PaginatedTable/ResizeablePaginatedTable.js.map +1 -1
- package/dist/components/PaginatedTable/TableChunk.js +7 -2
- package/dist/components/PaginatedTable/TableChunk.js.map +1 -1
- package/dist/components/PaginatedTable/TableHead.js +14 -10
- package/dist/components/PaginatedTable/TableHead.js.map +1 -1
- package/dist/components/PaginatedTable/TableRow.js +14 -6
- package/dist/components/PaginatedTable/TableRow.js.map +1 -1
- package/dist/components/PaginatedTable/types.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/TableWithControlsLayout/TableWithControlsLayout.scss +5 -0
- package/dist/components/VDisk/VDisk.d.ts +6 -3
- package/dist/components/VDisk/VDisk.js +6 -4
- package/dist/components/VDisk/VDisk.js.map +1 -1
- package/dist/components/VDisk/VDiskWithDonorsStack.d.ts +3 -5
- package/dist/components/VDisk/VDiskWithDonorsStack.js +4 -4
- package/dist/components/VDisk/VDiskWithDonorsStack.js.map +1 -1
- package/dist/components/VDiskPopup/VDiskPopup.js +1 -1
- package/dist/components/VDiskPopup/VDiskPopup.js.map +1 -1
- package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.d.ts +11 -0
- package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.js +91 -0
- package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.js.map +1 -0
- package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.scss +6 -0
- package/dist/containers/PDiskPage/DecommissionLabel/DecommissionLabel.d.ts +6 -0
- package/dist/containers/PDiskPage/DecommissionLabel/DecommissionLabel.js +20 -0
- package/dist/containers/PDiskPage/DecommissionLabel/DecommissionLabel.js.map +1 -0
- package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js +4 -8
- package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskPage.js +32 -14
- package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskPage.scss +7 -0
- package/dist/containers/PDiskPage/i18n/en.json +16 -2
- package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/Disks/Disks.d.ts +9 -0
- package/dist/containers/Storage/Disks/Disks.js +37 -0
- package/dist/containers/Storage/Disks/Disks.js.map +1 -0
- package/dist/containers/Storage/Disks/Disks.scss +46 -0
- package/dist/containers/Storage/PDisk/PDisk.d.ts +6 -2
- package/dist/containers/Storage/PDisk/PDisk.js +14 -7
- package/dist/containers/Storage/PDisk/PDisk.js.map +1 -1
- package/dist/containers/Storage/PDisk/PDisk.scss +4 -2
- package/dist/containers/Storage/PaginatedStorage.js +1 -4
- package/dist/containers/Storage/PaginatedStorage.js.map +1 -1
- package/dist/containers/Storage/Storage.js +2 -4
- package/dist/containers/Storage/Storage.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.d.ts +1 -3
- package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.js +4 -5
- package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/StorageGroups.d.ts +1 -4
- package/dist/containers/Storage/StorageGroups/StorageGroups.js +4 -7
- package/dist/containers/Storage/StorageGroups/StorageGroups.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/{StorageGroups.scss → columns/StorageGroupsColumns.scss} +3 -2
- package/dist/containers/Storage/StorageGroups/columns/getStorageGroupsColumns.d.ts +21 -0
- package/dist/containers/Storage/StorageGroups/{getStorageGroupsColumns.js → columns/getStorageGroupsColumns.js} +41 -21
- package/dist/containers/Storage/StorageGroups/columns/getStorageGroupsColumns.js.map +1 -0
- package/dist/containers/Storage/StorageGroups/columns/hooks.d.ts +3 -0
- package/dist/containers/Storage/StorageGroups/columns/hooks.js +19 -0
- package/dist/containers/Storage/StorageGroups/columns/hooks.js.map +1 -0
- package/dist/containers/Storage/StorageGroups/columns/types.d.ts +14 -0
- package/dist/containers/Storage/StorageGroups/columns/types.js +2 -0
- package/dist/containers/Storage/StorageGroups/columns/types.js.map +1 -0
- package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.d.ts +1 -1
- package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.js +1 -1
- package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.js.map +1 -1
- package/dist/containers/Tablet/Tablet.js +13 -11
- package/dist/containers/Tablet/Tablet.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 +6 -3
- package/dist/containers/Tablet/i18n/index.d.ts +1 -1
- package/dist/containers/Tablets/Tablets.js +1 -1
- package/dist/containers/Tablets/Tablets.js.map +1 -1
- package/dist/containers/Tablets/i18n/en.json +2 -1
- package/dist/containers/Tablets/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js.map +1 -1
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +3 -1
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js.map +1 -1
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +6 -0
- package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.d.ts +5 -0
- package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.js +43 -0
- package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.js.map +1 -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.test.js +4 -4
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.js +4 -4
- package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.js.map +1 -1
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js +1 -1
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js.map +1 -1
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.d.ts +2 -2
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +14 -4
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +22 -17
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js.map +1 -1
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/en.json +1 -1
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/ru.json +1 -1
- package/dist/containers/Tenant/Query/i18n/en.json +5 -4
- package/dist/containers/Tenant/Query/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/utils/__test__/replaceParams.test.d.ts +1 -0
- package/dist/containers/Tenant/Query/utils/__test__/replaceParams.test.js +50 -0
- package/dist/containers/Tenant/Query/utils/__test__/replaceParams.test.js.map +1 -0
- package/dist/containers/Tenant/Query/utils/replaceParams.d.ts +1 -0
- package/dist/containers/Tenant/Query/utils/replaceParams.js +6 -0
- package/dist/containers/Tenant/Query/utils/replaceParams.js.map +1 -0
- package/dist/containers/UserSettings/i18n/en.json +2 -0
- package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
- package/dist/containers/UserSettings/settings.d.ts +1 -0
- package/dist/containers/UserSettings/settings.js +12 -2
- package/dist/containers/UserSettings/settings.js.map +1 -1
- package/dist/containers/VDiskPage/VDiskPage.js +5 -8
- package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
- package/dist/containers/VDiskPage/i18n/en.json +2 -1
- package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
- package/dist/services/api.d.ts +12 -3
- package/dist/services/api.js +51 -8
- package/dist/services/api.js.map +1 -1
- package/dist/services/parsers/parseMetaCluster.js +34 -1
- package/dist/services/parsers/parseMetaCluster.js.map +1 -1
- package/dist/services/settings.d.ts +2 -1
- package/dist/services/settings.js +2 -1
- package/dist/services/settings.js.map +1 -1
- package/dist/store/reducers/cluster/cluster.js.map +1 -1
- package/dist/store/reducers/executeQuery.js +5 -1
- package/dist/store/reducers/executeQuery.js.map +1 -1
- package/dist/store/reducers/explainQuery/explainQuery.js +3 -1
- package/dist/store/reducers/explainQuery/explainQuery.js.map +1 -1
- package/dist/store/reducers/trace.d.ts +8 -0
- package/dist/store/reducers/trace.js +21 -0
- package/dist/store/reducers/trace.js.map +1 -0
- package/dist/types/api/cluster.d.ts +3 -0
- package/dist/types/api/meta.d.ts +2 -0
- package/dist/types/api/modifyDisk.d.ts +1 -0
- package/dist/types/api/pdisk.d.ts +1 -1
- package/dist/types/api/query.d.ts +8 -4
- package/dist/types/api/trace.d.ts +7 -0
- package/dist/types/api/trace.js +2 -0
- package/dist/types/api/trace.js.map +1 -0
- package/dist/types/store/query.d.ts +4 -3
- package/dist/utils/constants.d.ts +2 -1
- package/dist/utils/constants.js +3 -2
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/disks/helpers.d.ts +1 -1
- package/dist/utils/disks/helpers.js +5 -1
- package/dist/utils/disks/helpers.js.map +1 -1
- package/dist/utils/disks/prepareDisks.js +10 -5
- package/dist/utils/disks/prepareDisks.js.map +1 -1
- package/dist/utils/hooks/useDelayed.d.ts +1 -1
- package/dist/utils/hooks/useDelayed.js +6 -1
- package/dist/utils/hooks/useDelayed.js.map +1 -1
- package/dist/utils/hooks/useLastQueryExecutionSettings.d.ts +1 -1
- package/dist/utils/hooks/useLastQueryExecutionSettings.js +11 -1
- package/dist/utils/hooks/useLastQueryExecutionSettings.js.map +1 -1
- package/dist/utils/hooks/useQueryExecutionSettings.d.ts +1 -7
- package/dist/utils/hooks/useQueryExecutionSettings.js +12 -10
- package/dist/utils/hooks/useQueryExecutionSettings.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/query.d.ts +4 -3
- package/dist/utils/query.js +9 -7
- package/dist/utils/query.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/CriticalActionDialog/index.d.ts +0 -1
- package/dist/components/CriticalActionDialog/index.js +0 -2
- package/dist/components/CriticalActionDialog/index.js.map +0 -1
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.d.ts +0 -62
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js.map +0 -1
@@ -19,13 +19,16 @@ import { selectIsUserAllowedToMakeChanges } from '../../store/reducers/authentic
|
|
19
19
|
import { setHeaderBreadcrumbs } from '../../store/reducers/header/header';
|
20
20
|
import { pDiskApi } from '../../store/reducers/pdisk/pdisk';
|
21
21
|
import { valueIsDefined } from '../../utils';
|
22
|
+
import { cn } from '../../utils/cn';
|
22
23
|
import { getPDiskId, getSeverityColor } from '../../utils/disks/helpers';
|
23
24
|
import { useAutoRefreshInterval, useTypedDispatch, useTypedSelector } from '../../utils/hooks';
|
25
|
+
import { DecommissionButton } from './DecommissionButton/DecommissionButton';
|
26
|
+
import { DecommissionLabel } from './DecommissionLabel/DecommissionLabel';
|
24
27
|
import { PDiskGroups } from './PDiskGroups/PDiskGroups';
|
25
28
|
import { PDiskSpaceDistribution } from './PDiskSpaceDistribution/PDiskSpaceDistribution';
|
26
29
|
import { pDiskPageKeyset } from './i18n';
|
27
|
-
import { pdiskPageCn } from './shared';
|
28
30
|
import './PDiskPage.scss';
|
31
|
+
const pdiskPageCn = cn('ydb-pdisk-page');
|
29
32
|
const PDISK_TABS_IDS = {
|
30
33
|
diskDistribution: 'diskDistribution',
|
31
34
|
groups: 'groups',
|
@@ -65,22 +68,37 @@ export function PDiskPage() {
|
|
65
68
|
});
|
66
69
|
const pDiskLoading = pdiskDataQuery.isFetching && pdiskDataQuery.currentData === undefined;
|
67
70
|
const pDiskData = pdiskDataQuery.currentData;
|
68
|
-
const { NodeHost, NodeId, NodeType, NodeDC, Severity } = pDiskData || {};
|
71
|
+
const { NodeHost, NodeId, NodeType, NodeDC, Severity, DecommitStatus } = pDiskData || {};
|
69
72
|
const handleRestart = async (isRetry) => {
|
70
73
|
if (pDiskParamsDefined) {
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
74
|
+
const response = await window.api.restartPDisk({ nodeId, pDiskId, force: isRetry });
|
75
|
+
if ((response === null || response === void 0 ? void 0 : response.result) === false) {
|
76
|
+
const err = {
|
77
|
+
statusText: response.error,
|
78
|
+
retryPossible: response.forceRetryPossible,
|
79
|
+
};
|
80
|
+
throw err;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
};
|
84
|
+
const handleDecommissionChange = async (newDecommissionStatus, isRetry) => {
|
85
|
+
if (pDiskParamsDefined) {
|
86
|
+
const response = await window.api.changePDiskStatus({
|
87
|
+
nodeId,
|
88
|
+
pDiskId,
|
89
|
+
force: isRetry,
|
90
|
+
decommissionStatus: newDecommissionStatus,
|
79
91
|
});
|
92
|
+
if ((response === null || response === void 0 ? void 0 : response.result) === false) {
|
93
|
+
const err = {
|
94
|
+
statusText: response.error,
|
95
|
+
retryPossible: response.forceRetryPossible,
|
96
|
+
};
|
97
|
+
throw err;
|
98
|
+
}
|
80
99
|
}
|
81
|
-
return undefined;
|
82
100
|
};
|
83
|
-
const
|
101
|
+
const handleAfterAction = () => {
|
84
102
|
if (pDiskParamsDefined) {
|
85
103
|
dispatch(api.util.invalidateTags([{ type: 'PDiskData', id: getPDiskId(nodeId, pDiskId) }]));
|
86
104
|
}
|
@@ -98,10 +116,10 @@ export function PDiskPage() {
|
|
98
116
|
return (_jsx(PageMetaWithAutorefresh, { loading: pDiskLoading, items: [hostItem, nodeIdItem, NodeType, NodeDC], className: pdiskPageCn('meta') }));
|
99
117
|
};
|
100
118
|
const renderPageTitle = () => {
|
101
|
-
return (_jsx(EntityPageTitle, { entityName: pDiskPageKeyset('pdisk'), status: getSeverityColor(Severity), id:
|
119
|
+
return (_jsxs("div", { className: pdiskPageCn('title'), children: [_jsx(EntityPageTitle, { entityName: pDiskPageKeyset('pdisk'), status: getSeverityColor(Severity), id: getPDiskId(nodeId, pDiskId) }), _jsx(DecommissionLabel, { decommission: DecommitStatus })] }));
|
102
120
|
};
|
103
121
|
const renderControls = () => {
|
104
|
-
return (
|
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 })] }));
|
105
123
|
};
|
106
124
|
const renderInfo = () => {
|
107
125
|
if (pDiskLoading) {
|
@@ -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,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAC,kBAAkB,EAAC,MAAM,wDAAwD,CAAC;AAC1F,OAAO,EAAC,YAAY,EAAC,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAC,SAAS,EAAC,MAAM,sCAAsC,CAAC;AAC/D,OAAO,EAAC,uBAAuB,EAAC,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,GAAG,EAAC,MAAM,0BAA0B,CAAC;AAC7C,OAAO,EAAC,gCAAgC,EAAC,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAC,QAAQ,EAAC,MAAM,kCAAkC,CAAC;
|
1
|
+
{"version":3,"file":"PDiskPage.js","sourceRoot":"","sources":["../../../src/containers/PDiskPage/PDiskPage.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,C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Y,IAAC,EAAE,EAAE,IAAI,YACjB,OAAO,IADiB,EAAE,CAEhB,CAClB,CAAC;gBACN,CAAC,GACH,GACA,CACT,CAAC;IACN,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,GAAG,EAAE;QAC3B,QAAQ,QAAQ,EAAE,CAAC;YACf,KAAK,kBAAkB,CAAC,CAAC,CAAC;gBACtB,OAAO,SAAS,CAAC,CAAC,CAAC,KAAC,sBAAsB,IAAC,IAAI,EAAE,SAAS,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC;YAC1E,CAAC;YACD,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACZ,OAAO,kBAAkB,CAAC,CAAC,CAAC,CACxB,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAI,CACpD,CAAC,CAAC,CAAC,IAAI,CAAC;YACb,CAAC;YACD;gBACI,OAAO,IAAI,CAAC;QACpB,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,WAAW,GAAG,GAAG,EAAE;QACrB,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;YACxB,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,KAAC,aAAa,IAAC,KAAK,EAAE,cAAc,CAAC,KAAK,GAAI,CAAC;IAC1D,CAAC,CAAC;IAEF,OAAO,CACH,eAAK,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,aAC5B,YAAY,EAAE,EACd,cAAc,EAAE,EAChB,eAAe,EAAE,EACjB,cAAc,EAAE,EAChB,WAAW,EAAE,EACb,UAAU,EAAE,EACZ,UAAU,EAAE,EACZ,iBAAiB,EAAE,IAClB,CACT,CAAC;AACN,CAAC"}
|
@@ -12,6 +12,20 @@
|
|
12
12
|
"no-slots-data": "No slots data",
|
13
13
|
"restart-pdisk-button": "Restart PDisk",
|
14
14
|
"force-restart-pdisk-button": "Restart anyway",
|
15
|
-
"restart-pdisk-
|
16
|
-
"restart-pdisk-
|
15
|
+
"restart-pdisk-not-allowed": "You don't have enough rights to restart PDisk",
|
16
|
+
"restart-pdisk-dialog-header": "Restart PDisk",
|
17
|
+
"restart-pdisk-dialog-text": "PDisk will be restarted. Do you want to proceed?",
|
18
|
+
"decommission-none": "None",
|
19
|
+
"decommission-imminent": "Imminent",
|
20
|
+
"decommission-pending": "Pending",
|
21
|
+
"decommission-rejected": "Rejected",
|
22
|
+
"decommission-label": "{{decommission}} decommission",
|
23
|
+
"decommission-button": "Decommission",
|
24
|
+
"decommission-change-not-allowed": "You don't have enough rights to change PDisk decommission",
|
25
|
+
"decommission-dialog-title": "Change decommission status",
|
26
|
+
"decommission-dialog-force-change": "Change anyway",
|
27
|
+
"decommission-dialog-imminent-warning": "This will start imminent decommission. Existing slots will be moved from the disk",
|
28
|
+
"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",
|
29
|
+
"decommission-dialog-rejected-warning": "This will start rejected decommission. No slots from other disks are placed on this disk in the process of decommission",
|
30
|
+
"decommission-dialog-none-warning": "This will reset decommission mode, allowing the disk to be used by the storage"
|
17
31
|
}
|
@@ -1 +1 @@
|
|
1
|
-
export declare const pDiskPageKeyset: (key: "node" | "groups" | "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-dialog" | "restart-pdisk-not-allowed", params?: import("@gravity-ui/i18n").Params) => string;
|
1
|
+
export declare const pDiskPageKeyset: (key: "node" | "groups" | "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;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { NodesMap } from '../../../types/store/nodesList';
|
2
|
+
import type { PreparedVDisk } from '../../../utils/disks/types';
|
3
|
+
import './Disks.scss';
|
4
|
+
interface DisksProps {
|
5
|
+
vDisks?: PreparedVDisk[];
|
6
|
+
nodes?: NodesMap;
|
7
|
+
}
|
8
|
+
export declare function Disks({ vDisks, nodes }: DisksProps): import("react/jsx-runtime").JSX.Element | null;
|
9
|
+
export {};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import { VDiskWithDonorsStack } from '../../../components/VDisk/VDiskWithDonorsStack';
|
4
|
+
import { cn } from '../../../utils/cn';
|
5
|
+
import { stringifyVdiskId } from '../../../utils/dataFormatters/dataFormatters';
|
6
|
+
import { getPDiskId } from '../../../utils/disks/helpers';
|
7
|
+
import { PDisk } from '../PDisk';
|
8
|
+
import './Disks.scss';
|
9
|
+
const b = cn('ydb-storage-disks');
|
10
|
+
export function Disks({ vDisks = [], nodes }) {
|
11
|
+
const [highlightedVDisk, setHighlightedVDisk] = React.useState();
|
12
|
+
if (!vDisks.length) {
|
13
|
+
return null;
|
14
|
+
}
|
15
|
+
return (_jsxs("div", { className: b(null), children: [_jsx("div", { className: b('vdisks-wrapper'), children: vDisks === null || vDisks === void 0 ? void 0 : vDisks.map((vDisk) => {
|
16
|
+
return (_jsx(VDiskItem, { vDisk: vDisk, nodes: nodes, highlightedVDisk: highlightedVDisk, setHighlightedVDisk: setHighlightedVDisk }, stringifyVdiskId(vDisk.VDiskId)));
|
17
|
+
}) }), _jsx("div", { className: b('pdisks-wrapper'), children: vDisks === null || vDisks === void 0 ? void 0 : vDisks.map((vDisk) => {
|
18
|
+
var _a;
|
19
|
+
return (_jsx(PDiskItem, { vDisk: vDisk, nodes: nodes, highlightedVDisk: highlightedVDisk, setHighlightedVDisk: setHighlightedVDisk }, getPDiskId(vDisk.NodeId, (_a = vDisk === null || vDisk === void 0 ? void 0 : vDisk.PDisk) === null || _a === void 0 ? void 0 : _a.PDiskId)));
|
20
|
+
}) })] }));
|
21
|
+
}
|
22
|
+
function VDiskItem({ nodes, vDisk, highlightedVDisk, setHighlightedVDisk }) {
|
23
|
+
// Do not show PDisk popup for VDisk
|
24
|
+
const vDiskToShow = { ...vDisk, PDisk: undefined };
|
25
|
+
const vDiskId = stringifyVdiskId(vDisk.VDiskId);
|
26
|
+
return (_jsx("div", { style: {
|
27
|
+
flexGrow: Number(vDisk.AllocatedSize) || 1,
|
28
|
+
}, className: b('vdisk-item'), children: _jsx(VDiskWithDonorsStack, { data: vDiskToShow, nodes: nodes, compact: true, showPopup: highlightedVDisk === vDiskId, onShowPopup: () => setHighlightedVDisk(vDiskId), onHidePopup: () => setHighlightedVDisk(undefined), progressBarClassName: b('vdisk-progress-bar') }) }));
|
29
|
+
}
|
30
|
+
function PDiskItem({ vDisk, highlightedVDisk, setHighlightedVDisk }) {
|
31
|
+
const vDiskId = stringifyVdiskId(vDisk.VDiskId);
|
32
|
+
if (!vDisk.PDisk) {
|
33
|
+
return null;
|
34
|
+
}
|
35
|
+
return (_jsx(PDisk, { className: b('pdisk-item'), progressBarClassName: b('pdisk-progress-bar'), data: vDisk.PDisk, showPopup: highlightedVDisk === vDiskId, onShowPopup: () => setHighlightedVDisk(vDiskId), onHidePopup: () => setHighlightedVDisk(undefined) }));
|
36
|
+
}
|
37
|
+
//# sourceMappingURL=Disks.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Disks.js","sourceRoot":"","sources":["../../../../src/containers/Storage/Disks/Disks.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAA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C1B,oBAAoB,EAAE,CAAC,CAAC,oBAAoB,CAAC,EAC7C,IAAI,EAAE,KAAK,CAAC,KAAK,EACjB,SAAS,EAAE,gBAAgB,KAAK,OAAO,EACvC,WAAW,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAC/C,WAAW,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,SAAS,CAAC,GACnD,CACL,CAAC;AACN,CAAC"}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
.ydb-storage-disks {
|
2
|
+
display: flex;
|
3
|
+
flex-direction: row;
|
4
|
+
align-items: center;
|
5
|
+
gap: 20px;
|
6
|
+
|
7
|
+
width: max-content;
|
8
|
+
|
9
|
+
&__vdisks-wrapper {
|
10
|
+
display: flex;
|
11
|
+
flex-grow: 1;
|
12
|
+
flex-direction: row;
|
13
|
+
gap: 4px;
|
14
|
+
|
15
|
+
width: 300px;
|
16
|
+
}
|
17
|
+
|
18
|
+
&__pdisks-wrapper {
|
19
|
+
display: flex;
|
20
|
+
flex-direction: row;
|
21
|
+
justify-content: left;
|
22
|
+
gap: 6px;
|
23
|
+
|
24
|
+
width: max-content;
|
25
|
+
}
|
26
|
+
|
27
|
+
&__vdisk-item {
|
28
|
+
flex-basis: 8px;
|
29
|
+
flex-shrink: 0;
|
30
|
+
}
|
31
|
+
&__vdisk-progress-bar {
|
32
|
+
--progress-bar-compact-height: 18px;
|
33
|
+
|
34
|
+
border-radius: 4px;
|
35
|
+
}
|
36
|
+
|
37
|
+
&__pdisk-item {
|
38
|
+
width: 80px;
|
39
|
+
}
|
40
|
+
&__pdisk-progress-bar {
|
41
|
+
--progress-bar-full-height: 20px;
|
42
|
+
padding-left: var(--g-spacing-2);
|
43
|
+
|
44
|
+
text-align: left;
|
45
|
+
}
|
46
|
+
}
|
@@ -2,9 +2,13 @@ import type { TVDiskStateInfo } from '../../../types/api/vdisk';
|
|
2
2
|
import type { PreparedPDisk } from '../../../utils/disks/types';
|
3
3
|
import './PDisk.scss';
|
4
4
|
interface PDiskProps {
|
5
|
-
nodeId: number;
|
6
5
|
data?: PreparedPDisk;
|
7
6
|
vDisks?: TVDiskStateInfo[];
|
7
|
+
showPopup?: boolean;
|
8
|
+
onShowPopup?: VoidFunction;
|
9
|
+
onHidePopup?: VoidFunction;
|
10
|
+
className?: string;
|
11
|
+
progressBarClassName?: string;
|
8
12
|
}
|
9
|
-
export declare const PDisk: ({
|
13
|
+
export declare const PDisk: ({ data, vDisks, showPopup, onShowPopup, onHidePopup, className, progressBarClassName, }: PDiskProps) => import("react/jsx-runtime").JSX.Element;
|
10
14
|
export {};
|
@@ -12,15 +12,19 @@ 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 = ({
|
15
|
+
export const PDisk = ({ data = {}, vDisks, 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);
|
19
|
-
const
|
19
|
+
const { NodeId, PDiskId } = data;
|
20
|
+
const pDiskIdsDefined = valueIsDefined(NodeId) && valueIsDefined(PDiskId);
|
21
|
+
const handleShowPopup = () => {
|
20
22
|
setIsPopupVisible(true);
|
23
|
+
onShowPopup === null || onShowPopup === void 0 ? void 0 : onShowPopup();
|
21
24
|
};
|
22
|
-
const
|
25
|
+
const handleHidePopup = () => {
|
23
26
|
setIsPopupVisible(false);
|
27
|
+
onHidePopup === null || onHidePopup === void 0 ? void 0 : onHidePopup();
|
24
28
|
};
|
25
29
|
const renderVDisks = () => {
|
26
30
|
if (!(vDisks === null || vDisks === void 0 ? void 0 : vDisks.length)) {
|
@@ -34,10 +38,13 @@ export const PDisk = ({ nodeId, data = {}, vDisks }) => {
|
|
34
38
|
}, children: _jsx(VDiskWithDonorsStack, { data: vdisk, compact: true, stackClassName: b('donors-stack') }) }, stringifyVdiskId(vdisk.VDiskId)));
|
35
39
|
}) }));
|
36
40
|
};
|
37
|
-
let pDiskPath
|
38
|
-
if (
|
39
|
-
pDiskPath =
|
41
|
+
let pDiskPath;
|
42
|
+
if (pDiskIdsDefined) {
|
43
|
+
pDiskPath = createHref(routes.node, { id: NodeId, activeTab: STRUCTURE }, { pdiskId: PDiskId });
|
40
44
|
}
|
41
|
-
|
45
|
+
if (pDiskIdsDefined && diskPagesAvailable) {
|
46
|
+
pDiskPath = getPDiskPagePath(PDiskId, NodeId);
|
47
|
+
}
|
48
|
+
return (_jsxs(React.Fragment, { children: [_jsxs("div", { className: b(null, className), ref: anchor, children: [renderVDisks(), _jsxs(InternalLink, { to: pDiskPath, className: b('content'), onMouseEnter: handleShowPopup, onMouseLeave: handleHidePopup, children: [_jsx(DiskStateProgressBar, { diskAllocatedPercent: data.AllocatedPercent, severity: data.Severity, className: progressBarClassName }), _jsx("div", { className: b('media-type'), children: data.Type })] })] }), _jsx(PDiskPopup, { data: data, anchorRef: anchor, open: isPopupVisible || showPopup })] }));
|
42
49
|
};
|
43
50
|
//# sourceMappingURL=PDisk.js.map
|
@@ -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,EA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line-height: var(--g-text-body-
|
47
|
+
line-height: var(--g-text-body-1-line-height);
|
48
48
|
|
49
49
|
color: var(--g-color-text-secondary);
|
50
|
+
|
51
|
+
transform: translateY(-50%);
|
50
52
|
}
|
51
53
|
}
|
@@ -2,10 +2,8 @@ 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 { selectNodesMap } from '../../store/reducers/nodesList';
|
6
5
|
import { STORAGE_TYPES, VISIBLE_ENTITIES } from '../../store/reducers/storage/constants';
|
7
6
|
import { storageTypeSchema, visibleEntitiesSchema } from '../../store/reducers/storage/types';
|
8
|
-
import { useTypedSelector } from '../../utils/hooks';
|
9
7
|
import { NodesUptimeFilterValues, nodesUptimeFilterValuesSchema } from '../../utils/nodes';
|
10
8
|
import { StorageControls } from './StorageControls/StorageControls';
|
11
9
|
import { PaginatedStorageGroups } from './StorageGroups/PaginatedStorageGroups';
|
@@ -34,7 +32,6 @@ export const PaginatedStorage = ({ database, nodeId, parentContainer, additional
|
|
34
32
|
const handleUptimeFilterChange = (value) => {
|
35
33
|
setQueryParams({ uptimeFilter: value }, 'replaceIn');
|
36
34
|
};
|
37
|
-
const nodesMap = useTypedSelector(selectNodesMap);
|
38
35
|
const handleShowAllGroups = () => {
|
39
36
|
handleGroupVisibilityChange(VISIBLE_ENTITIES.all);
|
40
37
|
};
|
@@ -56,6 +53,6 @@ export const PaginatedStorage = ({ database, nodeId, parentContainer, additional
|
|
56
53
|
if (storageType === STORAGE_TYPES.nodes) {
|
57
54
|
return (_jsx(PaginatedStorageNodes, { searchValue: searchValue, visibleEntities: visibleEntities, nodesUptimeFilter: nodesUptimeFilter, database: database, additionalNodesProps: additionalNodesProps, onShowAll: handleShowAllNodes, parentContainer: parentContainer, renderControls: renderControls, renderErrorMessage: renderErrorMessage }));
|
58
55
|
}
|
59
|
-
return (_jsx(PaginatedStorageGroups, { searchValue: searchValue, visibleEntities: visibleEntities, database: database, nodeId: nodeId,
|
56
|
+
return (_jsx(PaginatedStorageGroups, { searchValue: searchValue, visibleEntities: visibleEntities, database: database, nodeId: nodeId, onShowAll: handleShowAllGroups, parentContainer: parentContainer, renderControls: renderControls, renderErrorMessage: renderErrorMessage }));
|
60
57
|
};
|
61
58
|
//# 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,aAAa,EAAE,gBAAgB,EAAC,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAC,iBAAiB,EAAE,qBAAqB,EAAC,MAAM,oCAAoC,CAAC;AAG5F,OAAO,EAAC,uBAAuB,EAAE,6BAA6B,EAAC,MAAM,mBAAmB,CAAC;AAEzF,OAAO,EAAC,eAAe,EAAC,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAC,sBAAsB,EAAC,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAC,qBAAqB,EAAC,MAAM,sCAAsC,CAAC;AAS3E,MAAM,CAAC,M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AAkB,EAC7B,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,kBAAkB,EAAE,kBAAkB,GACxC,CACL,CAAC;IACN,CAAC;IAED,OAAO,CACH,KAAC,sBAAsB,IACnB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,mBAAmB,EAC9B,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,kBAAkB,EAAE,kBAAkB,GACxC,CACL,CAAC;AACN,CAAC,CAAC"}
|
@@ -5,13 +5,12 @@ import { AccessDenied } from '../../components/Errors/403';
|
|
5
5
|
import { isAccessError } from '../../components/Errors/PageError/PageError';
|
6
6
|
import { ResponseError } from '../../components/Errors/ResponseError';
|
7
7
|
import { TableWithControlsLayout } from '../../components/TableWithControlsLayout/TableWithControlsLayout';
|
8
|
-
import { selectNodesMap } from '../../store/reducers/nodesList';
|
9
8
|
import { STORAGE_TYPES, VISIBLE_ENTITIES } from '../../store/reducers/storage/constants';
|
10
9
|
import { filterGroups, filterNodes, getUsageFilterOptions, } from '../../store/reducers/storage/selectors';
|
11
10
|
import { storageApi } from '../../store/reducers/storage/storage';
|
12
11
|
import { storageTypeSchema, visibleEntitiesSchema } from '../../store/reducers/storage/types';
|
13
12
|
import { DEFAULT_TABLE_SETTINGS } from '../../utils/constants';
|
14
|
-
import { useAutoRefreshInterval, useTableSort
|
13
|
+
import { useAutoRefreshInterval, useTableSort } from '../../utils/hooks';
|
15
14
|
import { NodesUptimeFilterValues, nodesUptimeFilterValuesSchema } from '../../utils/nodes';
|
16
15
|
import { StorageControls } from './StorageControls/StorageControls';
|
17
16
|
import { StorageGroups } from './StorageGroups/StorageGroups';
|
@@ -46,7 +45,6 @@ export const Storage = ({ additionalNodesProps, database, nodeId }) => {
|
|
46
45
|
const filter = (_a = queryParams.search) !== null && _a !== void 0 ? _a : '';
|
47
46
|
const uptimeFilter = nodesUptimeFilterValuesSchema.parse(queryParams.uptimeFilter);
|
48
47
|
const usageFilter = queryParams.usageFilter;
|
49
|
-
const nodesMap = useTypedSelector(selectNodesMap);
|
50
48
|
const [nodeSort, setNodeSort] = React.useState({
|
51
49
|
sortOrder: undefined,
|
52
50
|
sortValue: undefined,
|
@@ -98,7 +96,7 @@ export const Storage = ({ additionalNodesProps, database, nodeId }) => {
|
|
98
96
|
handleUptimeFilterChange(NodesUptimeFilterValues.All);
|
99
97
|
};
|
100
98
|
const renderDataTable = () => {
|
101
|
-
return (_jsxs(React.Fragment, { children: [storageType === STORAGE_TYPES.groups && (_jsx(StorageGroups, { visibleEntities: visibleEntities, data: storageGroups, tableSettings: DEFAULT_TABLE_SETTINGS,
|
99
|
+
return (_jsxs(React.Fragment, { children: [storageType === STORAGE_TYPES.groups && (_jsx(StorageGroups, { visibleEntities: visibleEntities, data: storageGroups, tableSettings: DEFAULT_TABLE_SETTINGS, onShowAll: () => handleGroupVisibilityChange(VISIBLE_ENTITIES.all), sort: groupsSort, handleSort: handleGroupsSort }, "groups")), storageType === STORAGE_TYPES.nodes && (_jsx(StorageNodes, { visibleEntities: visibleEntities, nodesUptimeFilter: uptimeFilter, data: storageNodes, tableSettings: DEFAULT_TABLE_SETTINGS, onShowAll: handleShowAllNodes, additionalNodesProps: additionalNodesProps, sort: nodesSort, handleSort: handleNodesSort, database: database }, "nodes"))] }));
|
102
100
|
};
|
103
101
|
const renderControls = () => {
|
104
102
|
return (_jsx(StorageControls, { searchValue: filter, handleSearchValueChange: handleTextFilterChange, withTypeSelector: !isNodePage, storageType: storageType, handleStorageTypeChange: handleStorageTypeChange, visibleEntities: visibleEntities, handleVisibleEntitiesChange: handleGroupVisibilityChange, nodesUptimeFilter: uptimeFilter, handleNodesUptimeFilterChange: handleUptimeFilterChange, groupsUsageFilter: usageFilter, groupsUsageFilterOptions: usageFilterOptions, handleGroupsUsageFilterChange: handleUsageFilterChange, entitiesCountCurrent: storageType === STORAGE_TYPES.groups
|
@@ -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;AAEzG,OAAO,EAAC,
|
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;AAEzG,OAAO,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,wCAAwC,CAAC;AACvF,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;AAO5F,OAAO,EAAC,sBAAsB,EAAC,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAC,sBAAsB,EAAE,YAAY,EA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kBAAkB,EAAE,aAAa,CAAC,KAAK,EACvC,eAAe,EAAE,SAAS,GAC5B,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,IAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,YACnE,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,IAAI,GACX,IACV,CAC7B,CAAC;AACN,CAAC,CAAC"}
|
@@ -1,16 +1,14 @@
|
|
1
1
|
import type { RenderControls, RenderErrorMessage } from '../../../components/PaginatedTable';
|
2
2
|
import type { VisibleEntities } from '../../../store/reducers/storage/types';
|
3
|
-
import type { NodesMap } from '../../../types/store/nodesList';
|
4
3
|
interface PaginatedStorageGroupsProps {
|
5
4
|
searchValue: string;
|
6
5
|
visibleEntities: VisibleEntities;
|
7
6
|
database?: string;
|
8
7
|
nodeId?: string;
|
9
|
-
nodesMap?: NodesMap;
|
10
8
|
onShowAll: VoidFunction;
|
11
9
|
parentContainer?: Element | null;
|
12
10
|
renderControls: RenderControls;
|
13
11
|
renderErrorMessage: RenderErrorMessage;
|
14
12
|
}
|
15
|
-
export declare const PaginatedStorageGroups: ({ searchValue, visibleEntities, database, nodeId,
|
13
|
+
export declare const PaginatedStorageGroups: ({ searchValue, visibleEntities, database, nodeId, onShowAll, parentContainer, renderControls, renderErrorMessage, }: PaginatedStorageGroupsProps) => import("react/jsx-runtime").JSX.Element;
|
16
14
|
export {};
|
@@ -3,16 +3,15 @@ import React from 'react';
|
|
3
3
|
import { ResizeablePaginatedTable } from '../../../components/PaginatedTable';
|
4
4
|
import { VISIBLE_ENTITIES } from '../../../store/reducers/storage/constants';
|
5
5
|
import { StorageGroupsEmptyDataMessage } from './StorageGroupsEmptyDataMessage';
|
6
|
+
import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY } from './columns/getStorageGroupsColumns';
|
7
|
+
import { useGetStorageGroupsColumns } from './columns/hooks';
|
6
8
|
import { getStorageGroups } from './getGroups';
|
7
|
-
import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, getPreparedStorageGroupsColumns, } from './getStorageGroupsColumns';
|
8
9
|
import i18n from './i18n';
|
9
|
-
export const PaginatedStorageGroups = ({ searchValue, visibleEntities, database, nodeId,
|
10
|
+
export const PaginatedStorageGroups = ({ searchValue, visibleEntities, database, nodeId, onShowAll, parentContainer, renderControls, renderErrorMessage, }) => {
|
11
|
+
const columns = useGetStorageGroupsColumns(visibleEntities);
|
10
12
|
const tableFilters = React.useMemo(() => {
|
11
13
|
return { searchValue, visibleEntities, database, nodeId };
|
12
14
|
}, [searchValue, visibleEntities, database, nodeId]);
|
13
|
-
const columns = React.useMemo(() => {
|
14
|
-
return getPreparedStorageGroupsColumns(nodesMap, visibleEntities);
|
15
|
-
}, [nodesMap, visibleEntities]);
|
16
15
|
const renderEmptyDataMessage = () => {
|
17
16
|
if (visibleEntities !== VISIBLE_ENTITIES.all) {
|
18
17
|
return (_jsx(StorageGroupsEmptyDataMessage, { onShowAll: onShowAll, visibleEntities: visibleEntities }));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PaginatedStorageGroups.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageGroups/PaginatedStorageGroups.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,wBAAwB,EAAC,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC;
|
1
|
+
{"version":3,"file":"PaginatedStorageGroups.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageGroups/PaginatedStorageGroups.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,wBAAwB,EAAC,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC;AAG3E,OAAO,EAAC,6BAA6B,EAAC,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAC,mCAAmC,EAAC,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAC,0BAA0B,EAAC,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAC7C,OAAO,IAAI,MAAM,QAAQ,CAAC;AAe1B,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACnC,WAAW,EACX,eAAe,EACf,QAAQ,EACR,MAAM,EACN,SAAS,EACT,eAAe,EACf,cAAc,EACd,kBAAkB,GACQ,EAAE,EAAE;IAC9B,MAAM,OAAO,GAAG,0BAA0B,CAAC,eAAe,CAAC,CAAC;IAE5D,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACpC,OAAO,EAAC,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,EAAC,CAAC;IAC5D,CAAC,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IAErD,MAAM,sBAAsB,GAAG,GAAG,EAAE;QAChC,IAAI,eAAe,KAAK,gBAAgB,CAAC,GAAG,EAAE,CAAC;YAC3C,OAAO,CACH,KAAC,6BAA6B,IAC1B,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,eAAe,GAClC,CACL,CAAC;QACN,CAAC;QAED,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC;IACjC,CAAC,CAAC;IAEF,OAAO,CACH,KAAC,wBAAwB,IACrB,iBAAiB,EAAE,mCAAmC,EACtD,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,gBAAgB,EAC3B,KAAK,EAAE,EAAE,EACT,cAAc,EAAE,cAAc,EAC9B,kBAAkB,EAAE,kBAAkB,EACtC,sBAAsB,EAAE,sBAAsB,EAC9C,OAAO,EAAE,YAAY,EACrB,SAAS,EAAC,gBAAgB,GAC5B,CACL,CAAC;AACN,CAAC,CAAC"}
|
@@ -1,16 +1,13 @@
|
|
1
1
|
import type { Settings, SortOrder } from '@gravity-ui/react-data-table';
|
2
2
|
import type { PreparedStorageGroup, VisibleEntities } from '../../../store/reducers/storage/types';
|
3
|
-
import type { NodesMap } from '../../../types/store/nodesList';
|
4
3
|
import type { HandleSort } from '../../../utils/hooks/useTableSort';
|
5
|
-
import './StorageGroups.scss';
|
6
4
|
interface StorageGroupsProps {
|
7
5
|
data: PreparedStorageGroup[];
|
8
|
-
nodes?: NodesMap;
|
9
6
|
tableSettings: Settings;
|
10
7
|
visibleEntities: VisibleEntities;
|
11
8
|
onShowAll?: VoidFunction;
|
12
9
|
sort?: SortOrder;
|
13
10
|
handleSort?: HandleSort;
|
14
11
|
}
|
15
|
-
export declare function StorageGroups({ data, tableSettings, visibleEntities,
|
12
|
+
export declare function StorageGroups({ data, tableSettings, visibleEntities, onShowAll, sort, handleSort, }: StorageGroupsProps): import("react/jsx-runtime").JSX.Element;
|
16
13
|
export {};
|
@@ -1,15 +1,12 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import React from 'react';
|
3
2
|
import { ResizeableDataTable } from '../../../components/ResizeableDataTable/ResizeableDataTable';
|
4
3
|
import { VISIBLE_ENTITIES } from '../../../store/reducers/storage/constants';
|
5
4
|
import { StorageGroupsEmptyDataMessage } from './StorageGroupsEmptyDataMessage';
|
6
|
-
import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY
|
5
|
+
import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY } from './columns/getStorageGroupsColumns';
|
6
|
+
import { useGetStorageGroupsColumns } from './columns/hooks';
|
7
7
|
import i18n from './i18n';
|
8
|
-
|
9
|
-
|
10
|
-
const columns = React.useMemo(() => {
|
11
|
-
return getPreparedStorageGroupsColumns(nodes, visibleEntities);
|
12
|
-
}, [nodes, visibleEntities]);
|
8
|
+
export function StorageGroups({ data, tableSettings, visibleEntities, onShowAll, sort, handleSort, }) {
|
9
|
+
const columns = useGetStorageGroupsColumns(visibleEntities);
|
13
10
|
if (!data.length && visibleEntities !== VISIBLE_ENTITIES.all) {
|
14
11
|
return (_jsx(StorageGroupsEmptyDataMessage, { onShowAll: onShowAll, visibleEntities: visibleEntities }));
|
15
12
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StorageGroups.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageGroups/StorageGroups.tsx"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"StorageGroups.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageGroups/StorageGroups.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,mBAAmB,EAAC,MAAM,6DAA6D,CAAC;AAChG,OAAO,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC;AAI3E,OAAO,EAAC,6BAA6B,EAAC,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAC,mCAAmC,EAAC,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAC,0BAA0B,EAAC,MAAM,iBAAiB,CAAC;AAC3D,OAAO,IAAI,MAAM,QAAQ,CAAC;AAW1B,MAAM,UAAU,aAAa,CAAC,EAC1B,IAAI,EACJ,aAAa,EACb,eAAe,EACf,SAAS,EACT,IAAI,EACJ,UAAU,GACO;IACjB,MAAM,OAAO,GAAG,0BAA0B,CAAC,eAAe,CAAC,CAAC;IAE5D,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,eAAe,KAAK,gBAAgB,CAAC,GAAG,EAAE,CAAC;QAC3D,OAAO,CACH,KAAC,6BAA6B,IAC1B,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,eAAe,GAClC,CACL,CAAC;IACN,CAAC;IAED,OAAO,CACH,KAAC,mBAAmB,IAChB,iBAAiB,EAAE,mCAAmC,EAEtD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,aAAa,EACvB,gBAAgB,EAAE,IAAI,CAAC,eAAe,CAAC,EACvC,SAAS,EAAE,IAAI,EACf,MAAM,EAAE,UAAU,IANb,eAAe,CAOtB,CACL,CAAC;AACN,CAAC"}
|