ydb-embedded-ui 6.22.0 → 6.23.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/PDiskPopup/PDiskPopup.d.ts +2 -4
- package/dist/components/PDiskPopup/PDiskPopup.js +10 -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 +9 -7
- package/dist/components/PaginatedTable/PaginatedTable.js.map +1 -1
- package/dist/components/PaginatedTable/TableChunk.d.ts +2 -1
- package/dist/components/PaginatedTable/TableChunk.js +5 -2
- package/dist/components/PaginatedTable/TableChunk.js.map +1 -1
- package/dist/components/QueryResultTable/QueryResultTable.js +11 -16
- package/dist/components/QueryResultTable/QueryResultTable.js.map +1 -1
- package/dist/components/QueryResultTable/utils/getColumnWidth.d.ts +7 -0
- package/dist/components/QueryResultTable/utils/getColumnWidth.js +16 -0
- package/dist/components/QueryResultTable/utils/getColumnWidth.js.map +1 -0
- package/dist/components/QueryResultTable/utils/getColumnWidth.test.d.ts +1 -0
- package/dist/components/QueryResultTable/utils/getColumnWidth.test.js +32 -0
- package/dist/components/QueryResultTable/utils/getColumnWidth.test.js.map +1 -0
- package/dist/components/StorageGroupInfo/StorageGroupInfo.js +7 -7
- package/dist/components/StorageGroupInfo/StorageGroupInfo.js.map +1 -1
- package/dist/components/StorageGroupInfo/i18n/index.d.ts +1 -1
- package/dist/components/TableSkeleton/TableSkeleton.d.ts +2 -1
- package/dist/components/TableSkeleton/TableSkeleton.js +5 -1
- package/dist/components/TableSkeleton/TableSkeleton.js.map +1 -1
- package/dist/components/TableSkeleton/TableSkeleton.scss +7 -1
- package/dist/components/VDisk/VDisk.d.ts +1 -3
- package/dist/components/VDisk/VDisk.js +2 -2
- package/dist/components/VDisk/VDisk.js.map +1 -1
- package/dist/components/VDiskPopup/VDiskPopup.d.ts +1 -3
- package/dist/components/VDiskPopup/VDiskPopup.js +7 -2
- package/dist/components/VDiskPopup/VDiskPopup.js.map +1 -1
- package/dist/containers/Cluster/Cluster.scss +2 -3
- package/dist/containers/Header/breadcrumbs.js +2 -3
- package/dist/containers/Header/breadcrumbs.js.map +1 -1
- package/dist/containers/Nodes/columns/columns.js +8 -0
- package/dist/containers/Nodes/columns/columns.js.map +1 -1
- package/dist/containers/Nodes/columns/constants.d.ts +2 -0
- package/dist/containers/Nodes/columns/constants.js +4 -0
- package/dist/containers/Nodes/columns/constants.js.map +1 -1
- package/dist/containers/Nodes/columns/i18n/en.json +1 -0
- package/dist/containers/Nodes/columns/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/Disks/Disks.d.ts +3 -3
- package/dist/containers/Storage/Disks/Disks.js +6 -7
- package/dist/containers/Storage/Disks/Disks.js.map +1 -1
- package/dist/containers/Storage/PDisk/PDisk.d.ts +3 -2
- package/dist/containers/Storage/PDisk/PDisk.js +3 -2
- package/dist/containers/Storage/PDisk/PDisk.js.map +1 -1
- package/dist/containers/Storage/PDisk/PDisk.scss +1 -1
- package/dist/containers/Storage/PaginatedStorage.d.ts +5 -5
- package/dist/containers/Storage/PaginatedStorage.js +7 -73
- package/dist/containers/Storage/PaginatedStorage.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroups.d.ts +3 -0
- package/dist/containers/Storage/PaginatedStorageGroups.js +84 -0
- package/dist/containers/Storage/PaginatedStorageGroups.js.map +1 -0
- package/dist/containers/Storage/PaginatedStorageNodes.d.ts +3 -0
- package/dist/containers/Storage/PaginatedStorageNodes.js +98 -0
- package/dist/containers/Storage/PaginatedStorageNodes.js.map +1 -0
- package/dist/containers/Storage/Storage.js +15 -70
- package/dist/containers/Storage/Storage.js.map +1 -1
- package/dist/containers/Storage/Storage.scss +4 -0
- package/dist/containers/Storage/StorageControls/StorageControls.d.ts +3 -16
- package/dist/containers/Storage/StorageControls/StorageControls.js +18 -11
- package/dist/containers/Storage/StorageControls/StorageControls.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/PaginatedStorageGroupsTable.d.ts +22 -0
- package/dist/containers/Storage/StorageGroups/{PaginatedStorageGroups.js → PaginatedStorageGroupsTable.js} +23 -5
- package/dist/containers/Storage/StorageGroups/PaginatedStorageGroupsTable.js.map +1 -0
- package/dist/containers/Storage/StorageGroups/{StorageGroups.d.ts → StorageGroupsTable.d.ts} +3 -4
- package/dist/containers/Storage/StorageGroups/{StorageGroups.js → StorageGroupsTable.js} +4 -3
- package/dist/containers/Storage/StorageGroups/StorageGroupsTable.js.map +1 -0
- package/dist/containers/Storage/StorageGroups/columns/columns.js +35 -10
- package/dist/containers/Storage/StorageGroups/columns/columns.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/columns/constants.d.ts +17 -0
- package/dist/containers/Storage/StorageGroups/columns/constants.js +46 -1
- package/dist/containers/Storage/StorageGroups/columns/constants.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/columns/hooks.d.ts +3 -3
- package/dist/containers/Storage/StorageGroups/columns/hooks.js +5 -8
- package/dist/containers/Storage/StorageGroups/columns/hooks.js.map +1 -1
- package/dist/containers/Storage/StorageGroups/columns/i18n/en.json +6 -0
- package/dist/containers/Storage/StorageGroups/columns/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/StorageGroups/columns/types.d.ts +7 -5
- package/dist/containers/Storage/StorageGroups/getGroups.js +6 -5
- package/dist/containers/Storage/StorageGroups/getGroups.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.d.ts +23 -0
- package/dist/containers/Storage/StorageNodes/{PaginatedStorageNodes.js → PaginatedStorageNodesTable.js} +23 -5
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.js.map +1 -0
- package/dist/containers/Storage/StorageNodes/{StorageNodes.d.ts → StorageNodesTable.d.ts} +3 -4
- package/dist/containers/Storage/StorageNodes/{StorageNodes.js → StorageNodesTable.js} +8 -6
- package/dist/containers/Storage/StorageNodes/StorageNodesTable.js.map +1 -0
- package/dist/containers/Storage/StorageNodes/columns/StorageNodesColumns.scss +1 -0
- package/dist/containers/Storage/StorageNodes/columns/columns.d.ts +1 -1
- package/dist/containers/Storage/StorageNodes/columns/columns.js +4 -5
- package/dist/containers/Storage/StorageNodes/columns/columns.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/columns/constants.d.ts +9 -0
- package/dist/containers/Storage/StorageNodes/columns/constants.js +27 -0
- package/dist/containers/Storage/StorageNodes/columns/constants.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/columns/i18n/en.json +2 -0
- package/dist/containers/Storage/StorageNodes/columns/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/StorageNodes/getNodes.js +6 -5
- package/dist/containers/Storage/StorageNodes/getNodes.js.map +1 -1
- package/dist/containers/Storage/TableGroup/TableGroup.d.ts +12 -0
- package/dist/containers/Storage/TableGroup/TableGroup.js +21 -0
- package/dist/containers/Storage/TableGroup/TableGroup.js.map +1 -0
- package/dist/containers/Storage/TableGroup/TableGroup.scss +49 -0
- package/dist/containers/Storage/TableGroup/useExpandedTableGroups.d.ts +5 -0
- package/dist/containers/Storage/TableGroup/useExpandedTableGroups.js +28 -0
- package/dist/containers/Storage/TableGroup/useExpandedTableGroups.js.map +1 -0
- package/dist/containers/Storage/i18n/en.json +4 -1
- package/dist/containers/Storage/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/i18n/index.js +1 -2
- package/dist/containers/Storage/i18n/index.js.map +1 -1
- package/dist/containers/Storage/shared.d.ts +2 -0
- package/dist/containers/Storage/shared.js +9 -0
- package/dist/containers/Storage/shared.js.map +1 -1
- package/dist/containers/Storage/useStorageQueryParams.d.ts +18 -0
- package/dist/containers/Storage/useStorageQueryParams.js +64 -0
- package/dist/containers/Storage/useStorageQueryParams.js.map +1 -0
- package/dist/containers/Storage/utils/index.d.ts +6 -2
- package/dist/containers/Storage/utils/index.js +11 -6
- package/dist/containers/Storage/utils/index.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +17 -3
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +1 -1
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +0 -3
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +2 -2
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +10 -3
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +2 -3
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +4 -4
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/utils/index.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/Partitions/utils/index.js +5 -5
- package/dist/containers/Tenant/Diagnostics/Partitions/utils/index.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +8 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.d.ts +5 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js +21 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.d.ts +1 -3
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +32 -37
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.d.ts +6 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js +33 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js +26 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/en.json +7 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/index.js +1 -2
- package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/index.js.map +1 -1
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +27 -9
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js.map +1 -1
- package/dist/containers/Tenant/ObjectSummary/__test__/transformPath.test.js +27 -3
- package/dist/containers/Tenant/ObjectSummary/__test__/transformPath.test.js.map +1 -1
- package/dist/containers/Tenant/ObjectSummary/transformPath.d.ts +2 -0
- package/dist/containers/Tenant/ObjectSummary/transformPath.js +10 -0
- package/dist/containers/Tenant/ObjectSummary/transformPath.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/i18n/en.json +2 -1
- package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Query/NewSQL/NewSQL.d.ts +1 -0
- package/dist/containers/Tenant/Query/NewSQL/NewSQL.js +135 -0
- package/dist/containers/Tenant/Query/NewSQL/NewSQL.js.map +1 -0
- package/dist/containers/Tenant/Query/NewSQL/i18n/en.json +32 -0
- package/dist/containers/Tenant/Query/NewSQL/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Query/NewSQL/i18n/index.js +5 -0
- package/dist/containers/Tenant/Query/NewSQL/i18n/index.js.map +1 -0
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +2 -1
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.scss +1 -0
- package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js +1 -1
- package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js.map +1 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +10 -2
- package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js.map +1 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.d.ts +2 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.js.map +1 -1
- package/dist/containers/Tenant/Tenant.js +7 -3
- package/dist/containers/Tenant/Tenant.js.map +1 -1
- package/dist/containers/Tenant/utils/newSQLQueryActions.d.ts +27 -0
- package/dist/containers/Tenant/utils/newSQLQueryActions.js +35 -0
- package/dist/containers/Tenant/utils/newSQLQueryActions.js.map +1 -0
- package/dist/containers/Tenant/utils/newSQLQueryTemplates.d.ts +24 -0
- package/dist/containers/Tenant/utils/newSQLQueryTemplates.js +228 -0
- package/dist/containers/Tenant/utils/newSQLQueryTemplates.js.map +1 -0
- package/dist/containers/Tenant/utils/schemaActions.d.ts +1 -1
- package/dist/containers/Tenant/utils/schemaActions.js +8 -6
- package/dist/containers/Tenant/utils/schemaActions.js.map +1 -1
- package/dist/containers/Tenant/utils/{queryTemplates.js → schemaQueryTemplates.js} +1 -1
- package/dist/containers/Tenant/utils/schemaQueryTemplates.js.map +1 -0
- package/dist/services/api.js +3 -3
- package/dist/services/api.js.map +1 -1
- package/dist/store/reducers/capabilities/hooks.d.ts +2 -0
- package/dist/store/reducers/capabilities/hooks.js +6 -0
- package/dist/store/reducers/capabilities/hooks.js.map +1 -1
- package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +4 -0
- package/dist/store/reducers/executeTopQueries/executeTopQueries.js +27 -1
- package/dist/store/reducers/executeTopQueries/executeTopQueries.js.map +1 -1
- package/dist/store/reducers/nodes/types.d.ts +1 -0
- package/dist/store/reducers/nodesList.d.ts +5 -5
- package/dist/store/reducers/nodesList.js +2 -2
- package/dist/store/reducers/nodesList.js.map +1 -1
- package/dist/store/reducers/overview/overview.js +5 -1
- package/dist/store/reducers/overview/overview.js.map +1 -1
- package/dist/store/reducers/storage/requestStorageData.d.ts +3 -3
- package/dist/store/reducers/storage/requestStorageData.js.map +1 -1
- package/dist/store/reducers/storage/selectors.d.ts +2 -3
- package/dist/store/reducers/storage/selectors.js +1 -27
- package/dist/store/reducers/storage/selectors.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/storage/types.d.ts +19 -10
- package/dist/store/reducers/storage/utils.js +27 -3
- package/dist/store/reducers/storage/utils.js.map +1 -1
- package/dist/store/reducers/tablet.js +5 -3
- package/dist/store/reducers/tablet.js.map +1 -1
- package/dist/store/reducers/tablets.d.ts +3 -3
- package/dist/store/reducers/tablets.js +4 -4
- package/dist/store/reducers/tablets.js.map +1 -1
- package/dist/types/api/capabilities.d.ts +1 -1
- package/dist/types/api/nodes.d.ts +3 -2
- package/dist/types/api/nodes.js.map +1 -1
- package/dist/types/api/storage.d.ts +22 -4
- package/dist/types/store/nodesList.d.ts +1 -1
- package/dist/utils/hooks/useSelectedColumns.js +7 -2
- package/dist/utils/hooks/useSelectedColumns.js.map +1 -1
- package/dist/utils/nodes.d.ts +2 -2
- package/dist/utils/nodes.js +4 -4
- package/dist/utils/nodes.js.map +1 -1
- package/dist/utils/storage.js +2 -0
- package/dist/utils/storage.js.map +1 -1
- package/dist/utils/utils.js +2 -1
- package/dist/utils/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.d.ts +0 -16
- package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.js.map +0 -1
- package/dist/containers/Storage/StorageGroups/StorageGroups.js.map +0 -1
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodes.d.ts +0 -17
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodes.js.map +0 -1
- package/dist/containers/Storage/StorageNodes/StorageNodes.js.map +0 -1
- package/dist/containers/Storage/UsageFilter/UsageFilter.d.ts +0 -14
- package/dist/containers/Storage/UsageFilter/UsageFilter.js +0 -39
- package/dist/containers/Storage/UsageFilter/UsageFilter.js.map +0 -1
- package/dist/containers/Storage/UsageFilter/UsageFilter.scss +0 -38
- package/dist/containers/Storage/UsageFilter/i18n/en.json +0 -5
- package/dist/containers/Storage/UsageFilter/i18n/index.d.ts +0 -2
- package/dist/containers/Storage/UsageFilter/i18n/index.js +0 -6
- package/dist/containers/Storage/UsageFilter/i18n/index.js.map +0 -1
- package/dist/containers/Storage/UsageFilter/i18n/ru.json +0 -5
- package/dist/containers/Storage/UsageFilter/index.d.ts +0 -1
- package/dist/containers/Storage/UsageFilter/index.js +0 -2
- package/dist/containers/Storage/UsageFilter/index.js.map +0 -1
- package/dist/containers/Storage/i18n/ru.json +0 -6
- package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/ru.json +0 -4
- package/dist/containers/Tenant/utils/queryTemplates.js.map +0 -1
- package/dist/store/reducers/describe.d.ts +0 -7
- package/dist/store/reducers/describe.js +0 -25
- package/dist/store/reducers/describe.js.map +0 -1
- /package/dist/containers/Tenant/utils/{queryTemplates.d.ts → schemaQueryTemplates.d.ts} +0 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import { ResponseError } from '../../components/Errors/ResponseError';
|
4
|
+
import { LoaderWrapper } from '../../components/LoaderWrapper/LoaderWrapper';
|
5
|
+
import { TableWithControlsLayout } from '../../components/TableWithControlsLayout/TableWithControlsLayout';
|
6
|
+
import { useCapabilitiesLoaded, useViewerNodesHandlerHasGrouping, } from '../../store/reducers/capabilities/hooks';
|
7
|
+
import { useClusterBaseInfo } from '../../store/reducers/cluster/cluster';
|
8
|
+
import { storageApi } from '../../store/reducers/storage/storage';
|
9
|
+
import { useAutoRefreshInterval } from '../../utils/hooks';
|
10
|
+
import { NodesUptimeFilterValues } from '../../utils/nodes';
|
11
|
+
import { useAdditionalNodeProps } from '../AppWithClusters/useClusterData';
|
12
|
+
import { StorageNodesControls } from './StorageControls/StorageControls';
|
13
|
+
import { PaginatedStorageNodesTable } from './StorageNodes/PaginatedStorageNodesTable';
|
14
|
+
import { useStorageNodesSelectedColumns } from './StorageNodes/columns/hooks';
|
15
|
+
import { TableGroup } from './TableGroup/TableGroup';
|
16
|
+
import { useExpandedGroups } from './TableGroup/useExpandedTableGroups';
|
17
|
+
import i18n from './i18n';
|
18
|
+
import { b, renderPaginatedTableErrorMessage } from './shared';
|
19
|
+
import { useStorageQueryParams } from './useStorageQueryParams';
|
20
|
+
import './Storage.scss';
|
21
|
+
export const PaginatedStorageNodes = (props) => {
|
22
|
+
const { storageNodesGroupByParam, visibleEntities, nodesUptimeFilter, handleShowAllNodes } = useStorageQueryParams();
|
23
|
+
const capabilitiesLoaded = useCapabilitiesLoaded();
|
24
|
+
const viewerNodesHandlerHasGrouping = useViewerNodesHandlerHasGrouping();
|
25
|
+
// Other filters do not fit with grouping
|
26
|
+
// Reset them if grouping available
|
27
|
+
React.useEffect(() => {
|
28
|
+
if (viewerNodesHandlerHasGrouping &&
|
29
|
+
visibleEntities !== 'all' &&
|
30
|
+
nodesUptimeFilter !== NodesUptimeFilterValues.All) {
|
31
|
+
handleShowAllNodes();
|
32
|
+
}
|
33
|
+
}, [handleShowAllNodes, nodesUptimeFilter, viewerNodesHandlerHasGrouping, visibleEntities]);
|
34
|
+
const renderContent = () => {
|
35
|
+
if (viewerNodesHandlerHasGrouping && storageNodesGroupByParam) {
|
36
|
+
return _jsx(GroupedStorageNodesComponent, { ...props });
|
37
|
+
}
|
38
|
+
return _jsx(StorageNodesComponent, { ...props });
|
39
|
+
};
|
40
|
+
return _jsx(LoaderWrapper, { loading: !capabilitiesLoaded, children: renderContent() });
|
41
|
+
};
|
42
|
+
function StorageNodesComponent({ database, nodeId, groupId, parentContainer, }) {
|
43
|
+
const { searchValue, visibleEntities, nodesUptimeFilter, handleShowAllNodes } = useStorageQueryParams();
|
44
|
+
const { columnsToShow, columnsToSelect, setColumns } = useStorageNodesColumnsToSelect({
|
45
|
+
database,
|
46
|
+
groupId: groupId === null || groupId === void 0 ? void 0 : groupId.toString(),
|
47
|
+
});
|
48
|
+
const renderControls = ({ totalEntities, foundEntities, inited }) => {
|
49
|
+
return (_jsx(StorageNodesControls, { withTypeSelector: true, withGroupBySelect: true, entitiesCountCurrent: foundEntities, entitiesCountTotal: totalEntities, entitiesLoading: !inited, columnsToSelect: columnsToSelect, handleSelectedColumnsUpdate: setColumns }));
|
50
|
+
};
|
51
|
+
return (_jsx(PaginatedStorageNodesTable, { database: database, nodeId: nodeId, groupId: groupId, searchValue: searchValue, visibleEntities: visibleEntities, nodesUptimeFilter: nodesUptimeFilter, onShowAll: handleShowAllNodes, parentContainer: parentContainer, renderControls: renderControls, renderErrorMessage: renderPaginatedTableErrorMessage, columns: columnsToShow }));
|
52
|
+
}
|
53
|
+
function GroupedStorageNodesComponent({ database, groupId, nodeId }) {
|
54
|
+
const [autoRefreshInterval] = useAutoRefreshInterval();
|
55
|
+
const { searchValue, storageNodesGroupByParam, handleShowAllNodes } = useStorageQueryParams();
|
56
|
+
const { columnsToShow, columnsToSelect, setColumns } = useStorageNodesColumnsToSelect({
|
57
|
+
database,
|
58
|
+
groupId: groupId === null || groupId === void 0 ? void 0 : groupId.toString(),
|
59
|
+
});
|
60
|
+
const { currentData, isFetching, error } = storageApi.useGetStorageNodesInfoQuery({
|
61
|
+
database,
|
62
|
+
with: 'all',
|
63
|
+
filter: searchValue,
|
64
|
+
node_id: nodeId,
|
65
|
+
group_id: groupId,
|
66
|
+
group: storageNodesGroupByParam,
|
67
|
+
}, {
|
68
|
+
pollingInterval: autoRefreshInterval,
|
69
|
+
});
|
70
|
+
const isLoading = currentData === undefined && isFetching;
|
71
|
+
const { tableGroups, found = 0, total = 0 } = currentData || {};
|
72
|
+
const { expandedGroups, setIsGroupExpanded } = useExpandedGroups(tableGroups);
|
73
|
+
const renderControls = () => {
|
74
|
+
return (_jsx(StorageNodesControls, { withTypeSelector: true, withGroupBySelect: true, entitiesCountCurrent: found, entitiesCountTotal: total, entitiesLoading: isLoading, columnsToSelect: columnsToSelect, handleSelectedColumnsUpdate: setColumns }));
|
75
|
+
};
|
76
|
+
const renderGroups = () => {
|
77
|
+
if (tableGroups === null || tableGroups === void 0 ? void 0 : tableGroups.length) {
|
78
|
+
return tableGroups.map(({ name, count }) => {
|
79
|
+
const isExpanded = expandedGroups[name];
|
80
|
+
return (_jsx(TableGroup, { title: name, count: count, entityName: i18n('nodes'), expanded: isExpanded, onIsExpandedChange: setIsGroupExpanded, children: _jsx(PaginatedStorageNodesTable, { database: database, nodeId: nodeId, groupId: groupId, searchValue: searchValue, visibleEntities: 'all', nodesUptimeFilter: NodesUptimeFilterValues.All, onShowAll: handleShowAllNodes, filterGroup: name, filterGroupBy: storageNodesGroupByParam, renderErrorMessage: renderPaginatedTableErrorMessage, columns: columnsToShow, initialEntitiesCount: count }) }, name));
|
81
|
+
});
|
82
|
+
}
|
83
|
+
return i18n('no-nodes');
|
84
|
+
};
|
85
|
+
return (_jsxs(TableWithControlsLayout, { children: [_jsx(TableWithControlsLayout.Controls, { children: renderControls() }), error ? _jsx(ResponseError, { error: error }) : null, _jsx(TableWithControlsLayout.Table, { loading: isLoading, className: b('groups-wrapper'), children: renderGroups() })] }));
|
86
|
+
}
|
87
|
+
function useStorageNodesColumnsToSelect({ database, groupId, }) {
|
88
|
+
const { balancer } = useClusterBaseInfo();
|
89
|
+
const { additionalNodesProps } = useAdditionalNodeProps({ balancer });
|
90
|
+
const { visibleEntities } = useStorageQueryParams();
|
91
|
+
return useStorageNodesSelectedColumns({
|
92
|
+
additionalNodesProps,
|
93
|
+
visibleEntities,
|
94
|
+
database,
|
95
|
+
groupId,
|
96
|
+
});
|
97
|
+
}
|
98
|
+
//# sourceMappingURL=PaginatedStorageNodes.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PaginatedStorageNodes.js","sourceRoot":"","sources":["../../../src/containers/Storage/PaginatedStorageNodes.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,aAAa,EAAC,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,8CAA8C,CAAC;AAE3E,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;AACxE,OAAO,EAAC,UAAU,EAAC,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAC,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,uBAAuB,EAAC,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAC,sBAAsB,EAAC,MAAM,mCAAmC,CAAC;AAGzE,OAAO,EAAC,oBAAoB,EAAC,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAC,0BAA0B,EAAC,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAC,8BAA8B,EAAC,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAC,UAAU,EAAC,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAC,iBAAiB,EAAC,MAAM,qCAAqC,CAAC;AACtE,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAC,CAAC,EAAE,gCAAgC,EAAC,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAE9D,OAAO,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAA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ACjB,aAAa,EAAE,wBAAwB,EACvC,kBAAkB,EAAE,gCAAgC,EACpD,OAAO,EAAE,aAAa,EACtB,oBAAoB,EAAE,KAAK,GAC7B,IApBG,IAAI,CAqBA,CAChB,CAAC;YACN,CAAC,CAAC,CAAC;QACP,CAAC;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5B,CAAC,CAAC;IAEF,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,gBAAgB,CAAC,YAC5E,YAAY,EAAE,GACa,IACV,CAC7B,CAAC;AACN,CAAC;AAED,SAAS,8BAA8B,CAAC,EACpC,QAAQ,EACR,OAAO,GAIV;IACG,MAAM,EAAC,QAAQ,EAAC,GAAG,kBAAkB,EAAE,CAAC;IACxC,MAAM,EAAC,oBAAoB,EAAC,GAAG,sBAAsB,CAAC,EAAC,QAAQ,EAAC,CAAC,CAAC;IAClE,MAAM,EAAC,eAAe,EAAC,GAAG,qBAAqB,EAAE,CAAC;IAElD,OAAO,8BAA8B,CAAC;QAClC,oBAAoB;QACpB,eAAe;QACf,QAAQ;QACR,OAAO;KACV,CAAC,CAAC;AACP,CAAC"}
|
@@ -1,62 +1,34 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
|
-
import { ArrayParam, StringParam, useQueryParams, withDefault } from 'use-query-params';
|
4
3
|
import { AccessDenied } from '../../components/Errors/403';
|
5
4
|
import { isAccessError } from '../../components/Errors/PageError/PageError';
|
6
5
|
import { ResponseError } from '../../components/Errors/ResponseError';
|
7
6
|
import { TableWithControlsLayout } from '../../components/TableWithControlsLayout/TableWithControlsLayout';
|
8
7
|
import { useCapabilitiesLoaded, useStorageGroupsHandlerAvailable, } from '../../store/reducers/capabilities/hooks';
|
9
8
|
import { useClusterBaseInfo } from '../../store/reducers/cluster/cluster';
|
10
|
-
import {
|
11
|
-
import { filterGroups, filterNodes, getUsageFilterOptions, } from '../../store/reducers/storage/selectors';
|
9
|
+
import { filterGroups, filterNodes } from '../../store/reducers/storage/selectors';
|
12
10
|
import { storageApi } from '../../store/reducers/storage/storage';
|
13
|
-
import { storageTypeSchema, visibleEntitiesSchema } from '../../store/reducers/storage/types';
|
14
|
-
import { valueIsDefined } from '../../utils';
|
15
|
-
import { DEFAULT_TABLE_SETTINGS } from '../../utils/constants';
|
16
11
|
import { useAutoRefreshInterval, useTableSort } from '../../utils/hooks';
|
17
|
-
import { NodesUptimeFilterValues, nodesUptimeFilterValuesSchema } from '../../utils/nodes';
|
18
12
|
import { useAdditionalNodeProps } from '../AppWithClusters/useClusterData';
|
19
|
-
import {
|
20
|
-
import {
|
13
|
+
import { StorageGroupsControls, StorageNodesControls } from './StorageControls/StorageControls';
|
14
|
+
import { StorageGroupsTable } from './StorageGroups/StorageGroupsTable';
|
21
15
|
import { useStorageGroupsSelectedColumns } from './StorageGroups/columns/hooks';
|
22
|
-
import {
|
16
|
+
import { StorageNodesTable } from './StorageNodes/StorageNodesTable';
|
23
17
|
import { useStorageNodesSelectedColumns } from './StorageNodes/columns/hooks';
|
24
18
|
import { b } from './shared';
|
19
|
+
import { useStorageQueryParams } from './useStorageQueryParams';
|
25
20
|
import { defaultSortNode, getDefaultSortGroup } from './utils';
|
26
21
|
import './Storage.scss';
|
27
|
-
const UsageFilterParam = withDefault({
|
28
|
-
encode: ArrayParam.encode,
|
29
|
-
decode: (input) => {
|
30
|
-
if (input === null || input === undefined) {
|
31
|
-
return input;
|
32
|
-
}
|
33
|
-
if (!Array.isArray(input)) {
|
34
|
-
return input ? [input] : [];
|
35
|
-
}
|
36
|
-
return input.filter(Boolean);
|
37
|
-
},
|
38
|
-
}, []);
|
39
22
|
export const Storage = ({ database, nodeId, groupId, pDiskId }) => {
|
40
|
-
var _a;
|
23
|
+
var _a, _b;
|
41
24
|
const { balancer } = useClusterBaseInfo();
|
42
25
|
const { additionalNodesProps } = useAdditionalNodeProps({ balancer });
|
26
|
+
const { storageType, searchValue, visibleEntities, nodesUptimeFilter, handleShowAllGroups, handleShowAllNodes, } = useStorageQueryParams();
|
43
27
|
const capabilitiesLoaded = useCapabilitiesLoaded();
|
44
28
|
const groupsHandlerAvailable = useStorageGroupsHandlerAvailable();
|
45
29
|
const [autoRefreshInterval] = useAutoRefreshInterval();
|
46
|
-
const [queryParams, setQueryParams] = useQueryParams({
|
47
|
-
type: StringParam,
|
48
|
-
visible: StringParam,
|
49
|
-
search: StringParam,
|
50
|
-
uptimeFilter: StringParam,
|
51
|
-
usageFilter: UsageFilterParam,
|
52
|
-
});
|
53
|
-
const storageType = storageTypeSchema.parse(queryParams.type);
|
54
30
|
const isGroups = storageType === 'groups';
|
55
31
|
const isNodes = storageType === 'nodes';
|
56
|
-
const visibleEntities = visibleEntitiesSchema.parse(queryParams.visible);
|
57
|
-
const filter = (_a = queryParams.search) !== null && _a !== void 0 ? _a : '';
|
58
|
-
const uptimeFilter = nodesUptimeFilterValuesSchema.parse(queryParams.uptimeFilter);
|
59
|
-
const usageFilter = queryParams.usageFilter;
|
60
32
|
const [nodeSort, setNodeSort] = React.useState({
|
61
33
|
sortOrder: undefined,
|
62
34
|
sortValue: undefined,
|
@@ -73,13 +45,12 @@ export const Storage = ({ database, nodeId, groupId, pDiskId }) => {
|
|
73
45
|
database,
|
74
46
|
groupId: groupId === null || groupId === void 0 ? void 0 : groupId.toString(),
|
75
47
|
});
|
76
|
-
const { columnsToShow: storageGroupsColumnsToShow, columnsToSelect: storageGroupsColumnsToSelect, setColumns: setStorageGroupsSelectedColumns, } = useStorageGroupsSelectedColumns(visibleEntities);
|
48
|
+
const { columnsToShow: storageGroupsColumnsToShow, columnsToSelect: storageGroupsColumnsToSelect, setColumns: setStorageGroupsSelectedColumns, } = useStorageGroupsSelectedColumns({ visibleEntities, nodeId: nodeId === null || nodeId === void 0 ? void 0 : nodeId.toString() });
|
77
49
|
const nodesQuery = storageApi.useGetStorageNodesInfoQuery({
|
78
50
|
database,
|
79
51
|
with: visibleEntities,
|
80
52
|
node_id: nodeId,
|
81
|
-
|
82
|
-
group_id: valueIsDefined(nodeId) ? undefined : groupId,
|
53
|
+
group_id: groupId,
|
83
54
|
}, {
|
84
55
|
skip: !isNodes,
|
85
56
|
pollingInterval: autoRefreshInterval,
|
@@ -98,44 +69,18 @@ export const Storage = ({ database, nodeId, groupId, pDiskId }) => {
|
|
98
69
|
const { currentData, isFetching, error } = isNodes ? nodesQuery : groupsQuery;
|
99
70
|
const { currentData: { nodes = [] } = {} } = nodesQuery;
|
100
71
|
const { currentData: { groups = [] } = {} } = groupsQuery;
|
101
|
-
const
|
72
|
+
const nodesTotalCount = ((_a = nodesQuery.currentData) === null || _a === void 0 ? void 0 : _a.total) || 0;
|
73
|
+
const groupsTotalCount = ((_b = groupsQuery.currentData) === null || _b === void 0 ? void 0 : _b.total) || 0;
|
102
74
|
const isLoading = currentData === undefined && isFetching;
|
103
|
-
const storageNodes = React.useMemo(() => filterNodes(nodes,
|
104
|
-
const storageGroups = React.useMemo(() => filterGroups(groups,
|
105
|
-
const usageFilterOptions = React.useMemo(() => getUsageFilterOptions(groups), [groups]);
|
75
|
+
const storageNodes = React.useMemo(() => filterNodes(nodes, searchValue, nodesUptimeFilter), [nodes, nodesUptimeFilter, searchValue]);
|
76
|
+
const storageGroups = React.useMemo(() => filterGroups(groups, searchValue), [searchValue, groups]);
|
106
77
|
const [nodesSort, handleNodesSort] = useTableSort(nodesSortParams, (params) => setNodeSort(params));
|
107
78
|
const [groupsSort, handleGroupsSort] = useTableSort(groupsSortParams, (params) => setGroupSort(params));
|
108
|
-
const handleUsageFilterChange = (value) => {
|
109
|
-
setQueryParams({ usageFilter: value.length ? value : undefined }, 'replaceIn');
|
110
|
-
};
|
111
|
-
const handleTextFilterChange = (value) => {
|
112
|
-
setQueryParams({ search: value || undefined }, 'replaceIn');
|
113
|
-
};
|
114
|
-
const handleGroupVisibilityChange = (value) => {
|
115
|
-
setQueryParams({ visible: value }, 'replaceIn');
|
116
|
-
};
|
117
|
-
const handleStorageTypeChange = (value) => {
|
118
|
-
setQueryParams({ type: value }, 'replaceIn');
|
119
|
-
};
|
120
|
-
const handleUptimeFilterChange = (value) => {
|
121
|
-
setQueryParams({ uptimeFilter: value }, 'replaceIn');
|
122
|
-
};
|
123
|
-
const handleShowAllNodes = () => {
|
124
|
-
handleGroupVisibilityChange(VISIBLE_ENTITIES.all);
|
125
|
-
handleUptimeFilterChange(NodesUptimeFilterValues.All);
|
126
|
-
};
|
127
79
|
const renderDataTable = () => {
|
128
|
-
return (_jsxs(React.Fragment, { children: [isGroups ? (_jsx(
|
80
|
+
return (_jsxs(React.Fragment, { children: [isGroups ? (_jsx(StorageGroupsTable, { visibleEntities: visibleEntities, data: storageGroups, onShowAll: handleShowAllGroups, sort: groupsSort, handleSort: handleGroupsSort, columns: storageGroupsColumnsToShow }, "groups")) : null, isNodes ? (_jsx(StorageNodesTable, { visibleEntities: visibleEntities, nodesUptimeFilter: nodesUptimeFilter, data: storageNodes, onShowAll: handleShowAllNodes, sort: nodesSort, handleSort: handleNodesSort, columns: storageNodesColumnsToShow }, "nodes")) : null] }));
|
129
81
|
};
|
130
82
|
const renderControls = () => {
|
131
|
-
|
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 }));
|
83
|
+
return (_jsxs(React.Fragment, { children: [isGroups ? (_jsx(StorageGroupsControls, { withTypeSelector: true, entitiesCountCurrent: storageGroups.length, entitiesCountTotal: groupsTotalCount, entitiesLoading: isLoading, columnsToSelect: storageGroupsColumnsToSelect, handleSelectedColumnsUpdate: setStorageGroupsSelectedColumns })) : null, isNodes ? (_jsx(StorageNodesControls, { withTypeSelector: true, entitiesCountCurrent: storageNodes.length, entitiesCountTotal: nodesTotalCount, entitiesLoading: isLoading, columnsToSelect: storageNodesColumnsToSelect, handleSelectedColumnsUpdate: setStorageNodesSelectedColumns })) : null] }));
|
139
84
|
};
|
140
85
|
if (isAccessError(error)) {
|
141
86
|
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,
|
1
|
+
{"version":3,"file":"Storage.js","sourceRoot":"","sources":["../../../src/containers/Storage/Storage.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,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,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e,EAAE,SAAS,EAC1B,eAAe,EAAE,4BAA4B,EAC7C,2BAA2B,EAAE,+BAA+B,GAC9D,CACL,CAAC,CAAC,CAAC,IAAI,EACP,OAAO,CAAC,CAAC,CAAC,CACP,KAAC,oBAAoB,IACjB,gBAAgB,QAChB,oBAAoB,EAAE,YAAY,CAAC,MAAM,EACzC,kBAAkB,EAAE,eAAe,EACnC,eAAe,EAAE,SAAS,EAC1B,eAAe,EAAE,2BAA2B,EAC5C,2BAA2B,EAAE,8BAA8B,GAC7D,CACL,CAAC,CAAC,CAAC,IAAI,IACK,CACpB,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,26 +1,13 @@
|
|
1
1
|
import type { TableColumnSetupItem } from '@gravity-ui/uikit';
|
2
|
-
import type { StorageType, VisibleEntities } from '../../../store/reducers/storage/types';
|
3
|
-
import type { NodesUptimeFilterValues } from '../../../utils/nodes';
|
4
|
-
import type { UsageFilterItem } from '../UsageFilter/UsageFilter';
|
5
2
|
interface StorageControlsProps {
|
6
|
-
searchValue?: string;
|
7
|
-
handleSearchValueChange: (value: string) => void;
|
8
3
|
withTypeSelector?: boolean;
|
9
|
-
|
10
|
-
handleStorageTypeChange: (value: StorageType) => void;
|
11
|
-
visibleEntities: VisibleEntities;
|
12
|
-
handleVisibleEntitiesChange: (value: VisibleEntities) => void;
|
13
|
-
nodesUptimeFilter: NodesUptimeFilterValues;
|
14
|
-
handleNodesUptimeFilterChange: (value: NodesUptimeFilterValues) => void;
|
15
|
-
withGroupsUsageFilter?: boolean;
|
16
|
-
groupsUsageFilter?: string[];
|
17
|
-
groupsUsageFilterOptions?: UsageFilterItem[];
|
18
|
-
handleGroupsUsageFilterChange?: (value: string[]) => void;
|
4
|
+
withGroupBySelect?: boolean;
|
19
5
|
entitiesCountCurrent: number;
|
20
6
|
entitiesCountTotal?: number;
|
21
7
|
entitiesLoading: boolean;
|
22
8
|
columnsToSelect: TableColumnSetupItem[];
|
23
9
|
handleSelectedColumnsUpdate: (updated: TableColumnSetupItem[]) => void;
|
24
10
|
}
|
25
|
-
export declare
|
11
|
+
export declare function StorageGroupsControls({ withTypeSelector, withGroupBySelect, entitiesCountCurrent, entitiesCountTotal, entitiesLoading, columnsToSelect, handleSelectedColumnsUpdate, }: StorageControlsProps): import("react/jsx-runtime").JSX.Element;
|
12
|
+
export declare function StorageNodesControls({ withTypeSelector, withGroupBySelect, entitiesCountCurrent, entitiesCountTotal, entitiesLoading, columnsToSelect, handleSelectedColumnsUpdate, }: StorageControlsProps): import("react/jsx-runtime").JSX.Element;
|
26
13
|
export {};
|
@@ -1,21 +1,28 @@
|
|
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
|
+
import { Select, TableColumnSetup, Text } from '@gravity-ui/uikit';
|
4
4
|
import { EntitiesCount } from '../../../components/EntitiesCount/EntitiesCount';
|
5
5
|
import { Search } from '../../../components/Search/Search';
|
6
6
|
import { UptimeFilter } from '../../../components/UptimeFIlter';
|
7
|
-
import {
|
7
|
+
import { STORAGE_GROUPS_GROUP_BY_OPTIONS } from '../StorageGroups/columns/constants';
|
8
|
+
import { STORAGE_NODES_GROUP_BY_OPTIONS } from '../StorageNodes/columns/constants';
|
8
9
|
import { StorageTypeFilter } from '../StorageTypeFilter/StorageTypeFilter';
|
9
10
|
import { StorageVisibleEntitiesFilter } from '../StorageVisibleEntitiesFilter/StorageVisibleEntitiesFilter';
|
10
|
-
import { UsageFilter } from '../UsageFilter/UsageFilter';
|
11
11
|
import i18n from '../i18n';
|
12
12
|
import { b } from '../shared';
|
13
|
-
|
14
|
-
|
15
|
-
const
|
16
|
-
const
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
}
|
13
|
+
import { useStorageQueryParams } from '../useStorageQueryParams';
|
14
|
+
export function StorageGroupsControls({ withTypeSelector, withGroupBySelect, entitiesCountCurrent, entitiesCountTotal, entitiesLoading, columnsToSelect, handleSelectedColumnsUpdate, }) {
|
15
|
+
const { searchValue, storageType, visibleEntities, storageGroupsGroupByParam, handleTextFilterChange, handleStorageTypeChange, handleVisibleEntitiesChange, handleStorageGroupsGroupByParamChange, } = useStorageQueryParams();
|
16
|
+
const handleGroupBySelectUpdate = (value) => {
|
17
|
+
handleStorageGroupsGroupByParamChange(value[0]);
|
18
|
+
};
|
19
|
+
return (_jsxs(React.Fragment, { children: [_jsx(Search, { value: searchValue, onChange: handleTextFilterChange, placeholder: i18n('controls_groups-search-placeholder'), className: b('search') }), withTypeSelector && (_jsx(StorageTypeFilter, { value: storageType, onChange: handleStorageTypeChange })), withGroupBySelect ? null : (_jsx(StorageVisibleEntitiesFilter, { value: visibleEntities, onChange: handleVisibleEntitiesChange })), _jsx(EntitiesCount, { label: i18n('groups'), loading: entitiesLoading, total: entitiesCountTotal, current: entitiesCountCurrent }), _jsx(TableColumnSetup, { popupWidth: 200, items: columnsToSelect, showStatus: true, onUpdate: handleSelectedColumnsUpdate, sortable: false }), withGroupBySelect ? (_jsxs(React.Fragment, { children: [_jsx(Text, { variant: "body-2", children: i18n('controls_group-by-placeholder') }), _jsx(Select, { hasClear: true, placeholder: '-', width: 170, defaultValue: storageGroupsGroupByParam ? [storageGroupsGroupByParam] : undefined, onUpdate: handleGroupBySelectUpdate, options: STORAGE_GROUPS_GROUP_BY_OPTIONS })] })) : null] }));
|
20
|
+
}
|
21
|
+
export function StorageNodesControls({ withTypeSelector, withGroupBySelect, entitiesCountCurrent, entitiesCountTotal, entitiesLoading, columnsToSelect, handleSelectedColumnsUpdate, }) {
|
22
|
+
const { searchValue, storageType, visibleEntities, nodesUptimeFilter, storageNodesGroupByParam, handleTextFilterChange, handleStorageTypeChange, handleVisibleEntitiesChange, handleUptimeFilterChange, handleStorageNodesGroupByParamChange, } = useStorageQueryParams();
|
23
|
+
const handleGroupBySelectUpdate = (value) => {
|
24
|
+
handleStorageNodesGroupByParamChange(value[0]);
|
25
|
+
};
|
26
|
+
return (_jsxs(React.Fragment, { children: [_jsx(Search, { value: searchValue, onChange: handleTextFilterChange, placeholder: i18n('controls_nodes-search-placeholder'), className: b('search') }), withTypeSelector && (_jsx(StorageTypeFilter, { value: storageType, onChange: handleStorageTypeChange })), withGroupBySelect ? null : (_jsx(StorageVisibleEntitiesFilter, { value: visibleEntities, onChange: handleVisibleEntitiesChange })), withGroupBySelect ? null : (_jsx(UptimeFilter, { value: nodesUptimeFilter, onChange: handleUptimeFilterChange })), _jsx(EntitiesCount, { label: i18n('nodes'), loading: entitiesLoading, total: entitiesCountTotal, current: entitiesCountCurrent }), _jsx(TableColumnSetup, { popupWidth: 200, items: columnsToSelect, showStatus: true, onUpdate: handleSelectedColumnsUpdate, sortable: false }), withGroupBySelect ? (_jsxs(React.Fragment, { children: [_jsx(Text, { variant: "body-2", children: i18n('controls_group-by-placeholder') }), _jsx(Select, { hasClear: true, placeholder: '-', width: 170, defaultValue: storageNodesGroupByParam ? [storageNodesGroupByParam] : undefined, onUpdate: handleGroupBySelectUpdate, options: STORAGE_NODES_GROUP_BY_OPTIONS })] })) : null] }));
|
27
|
+
}
|
21
28
|
//# sourceMappingURL=StorageControls.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StorageControls.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageControls/StorageControls.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;
|
1
|
+
{"version":3,"file":"StorageControls.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageControls/StorageControls.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAEjE,OAAO,EAAC,aAAa,EAAC,MAAM,iDAAiD,CAAC;AAC9E,OAAO,EAAC,MAAM,EAAC,MAAM,mCAAmC,CAAC;AACzD,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAC,+BAA+B,EAAC,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAC,8BAA8B,EAAC,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAC,iBAAiB,EAAC,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAC,4BAA4B,EAAC,MAAM,8DAA8D,CAAC;AAC1G,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAC,CAAC,EAAC,MAAM,WAAW,CAAC;AAC5B,OAAO,EAAC,qBAAqB,EAAC,MAAM,0BAA0B,CAAC;AAc/D,MAAM,UAAU,qBAAqB,CAAC,EAClC,gBAAgB,EAChB,iBAAiB,EAEjB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EAEf,eAAe,EACf,2BAA2B,GACR;IACnB,MAAM,EACF,WAAW,EACX,WAAW,EACX,eAAe,EACf,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,2BAA2B,EAC3B,qCAAqC,GACxC,GAAG,qBAAqB,EAAE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C,gBAAgB,IACb,UAAU,EAAE,GAAG,EACf,KAAK,EAAE,eAAe,EACtB,UAAU,QACV,QAAQ,EAAE,2BAA2B,EACrC,QAAQ,EAAE,KAAK,GACjB,EACD,iBAAiB,CAAC,CAAC,CAAC,CACjB,MAAC,KAAK,CAAC,QAAQ,eACX,KAAC,IAAI,IAAC,OAAO,EAAC,QAAQ,YAAE,IAAI,CAAC,+BAA+B,CAAC,GAAQ,EACrE,KAAC,MAAM,IACH,QAAQ,QACR,WAAW,EAAE,GAAG,EAChB,KAAK,EAAE,GAAG,EACV,YAAY,EACR,wBAAwB,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,SAAS,EAErE,QAAQ,EAAE,yBAAyB,EACnC,OAAO,EAAE,8BAA8B,GACzC,IACW,CACpB,CAAC,CAAC,CAAC,IAAI,IACK,CACpB,CAAC;AACN,CAAC"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import type { RenderControls, RenderErrorMessage } from '../../../components/PaginatedTable';
|
2
|
+
import type { VisibleEntities } from '../../../store/reducers/storage/types';
|
3
|
+
import type { GroupsGroupByField } from '../../../types/api/storage';
|
4
|
+
import type { StorageGroupsColumn } from './columns/types';
|
5
|
+
interface PaginatedStorageGroupsTableProps {
|
6
|
+
columns: StorageGroupsColumn[];
|
7
|
+
database?: string;
|
8
|
+
nodeId?: string | number;
|
9
|
+
groupId?: string | number;
|
10
|
+
pDiskId?: string | number;
|
11
|
+
filterGroup?: string;
|
12
|
+
filterGroupBy?: GroupsGroupByField;
|
13
|
+
searchValue: string;
|
14
|
+
visibleEntities: VisibleEntities;
|
15
|
+
onShowAll: VoidFunction;
|
16
|
+
parentContainer?: Element | null;
|
17
|
+
renderControls?: RenderControls;
|
18
|
+
renderErrorMessage: RenderErrorMessage;
|
19
|
+
initialEntitiesCount?: number;
|
20
|
+
}
|
21
|
+
export declare const PaginatedStorageGroupsTable: ({ columns, database, nodeId, groupId, pDiskId, filterGroup, filterGroupBy, searchValue, visibleEntities, onShowAll, parentContainer, renderControls, renderErrorMessage, initialEntitiesCount, }: PaginatedStorageGroupsTableProps) => import("react/jsx-runtime").JSX.Element;
|
22
|
+
export {};
|
@@ -8,19 +8,37 @@ import { StorageGroupsEmptyDataMessage } from './StorageGroupsEmptyDataMessage';
|
|
8
8
|
import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY } from './columns/constants';
|
9
9
|
import { useGroupsGetter } from './getGroups';
|
10
10
|
import i18n from './i18n';
|
11
|
-
export const
|
11
|
+
export const PaginatedStorageGroupsTable = ({ columns, database, nodeId, groupId, pDiskId, filterGroup, filterGroupBy, searchValue, visibleEntities, onShowAll, parentContainer, renderControls, renderErrorMessage, initialEntitiesCount, }) => {
|
12
12
|
const capabilitiesLoaded = useCapabilitiesLoaded();
|
13
13
|
const groupsHandlerAvailable = useStorageGroupsHandlerAvailable();
|
14
14
|
const fetchData = useGroupsGetter(groupsHandlerAvailable);
|
15
15
|
const tableFilters = React.useMemo(() => {
|
16
|
-
return {
|
17
|
-
|
16
|
+
return {
|
17
|
+
searchValue,
|
18
|
+
visibleEntities,
|
19
|
+
database,
|
20
|
+
nodeId,
|
21
|
+
groupId,
|
22
|
+
pDiskId,
|
23
|
+
filterGroup,
|
24
|
+
filterGroupBy,
|
25
|
+
};
|
26
|
+
}, [
|
27
|
+
searchValue,
|
28
|
+
visibleEntities,
|
29
|
+
database,
|
30
|
+
nodeId,
|
31
|
+
groupId,
|
32
|
+
pDiskId,
|
33
|
+
filterGroup,
|
34
|
+
filterGroupBy,
|
35
|
+
]);
|
18
36
|
const renderEmptyDataMessage = () => {
|
19
37
|
if (visibleEntities !== VISIBLE_ENTITIES.all) {
|
20
38
|
return (_jsx(StorageGroupsEmptyDataMessage, { onShowAll: onShowAll, visibleEntities: visibleEntities }));
|
21
39
|
}
|
22
40
|
return i18n('empty.default');
|
23
41
|
};
|
24
|
-
return (_jsx(LoaderWrapper, { loading: !capabilitiesLoaded, children: _jsx(ResizeablePaginatedTable, { columnsWidthLSKey: STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, parentContainer: parentContainer, columns: columns, fetchData: fetchData, limit: 50, renderControls: renderControls, renderErrorMessage: renderErrorMessage, renderEmptyDataMessage: renderEmptyDataMessage, filters: tableFilters, tableName: "storage-groups" }) }));
|
42
|
+
return (_jsx(LoaderWrapper, { loading: !capabilitiesLoaded, children: _jsx(ResizeablePaginatedTable, { columnsWidthLSKey: STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, parentContainer: parentContainer, columns: columns, fetchData: fetchData, limit: 50, initialEntitiesCount: initialEntitiesCount, renderControls: renderControls, renderErrorMessage: renderErrorMessage, renderEmptyDataMessage: renderEmptyDataMessage, filters: tableFilters, tableName: "storage-groups" }) }));
|
25
43
|
};
|
26
|
-
//# sourceMappingURL=
|
44
|
+
//# sourceMappingURL=PaginatedStorageGroupsTable.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PaginatedStorageGroupsTable.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageGroups/PaginatedStorageGroupsTable.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,aAAa,EAAC,MAAM,iDAAiD,CAAC;AAE9E,OAAO,EAAC,wBAAwB,EAAC,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EACH,qBAAqB,EACrB,gCAAgC,GACnC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC;AAI3E,OAAO,EAAC,6BAA6B,EAAC,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAC,mCAAmC,EAAC,MAAM,qBAAqB,CAAC;AAExE,OAAO,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,QAAQ,CAAC;AAuB1B,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EACxC,OAAO,EACP,QAAQ,EAC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AC5B,GACU,CACnB,CAAC;AACN,CAAC,CAAC"}
|
package/dist/containers/Storage/StorageGroups/{StorageGroups.d.ts → StorageGroupsTable.d.ts}
RENAMED
@@ -1,15 +1,14 @@
|
|
1
|
-
import type {
|
1
|
+
import type { SortOrder } from '@gravity-ui/react-data-table';
|
2
2
|
import type { PreparedStorageGroup, VisibleEntities } from '../../../store/reducers/storage/types';
|
3
3
|
import type { HandleSort } from '../../../utils/hooks/useTableSort';
|
4
4
|
import type { StorageGroupsColumn } from './columns/types';
|
5
|
-
interface
|
5
|
+
interface StorageGroupsTableProps {
|
6
6
|
data: PreparedStorageGroup[];
|
7
7
|
columns: StorageGroupsColumn[];
|
8
|
-
tableSettings: Settings;
|
9
8
|
visibleEntities: VisibleEntities;
|
10
9
|
onShowAll?: VoidFunction;
|
11
10
|
sort?: SortOrder;
|
12
11
|
handleSort?: HandleSort;
|
13
12
|
}
|
14
|
-
export declare function
|
13
|
+
export declare function StorageGroupsTable({ data, columns, visibleEntities, onShowAll, sort, handleSort, }: StorageGroupsTableProps): import("react/jsx-runtime").JSX.Element;
|
15
14
|
export {};
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { ResizeableDataTable } from '../../../components/ResizeableDataTable/ResizeableDataTable';
|
3
3
|
import { VISIBLE_ENTITIES } from '../../../store/reducers/storage/constants';
|
4
|
+
import { DEFAULT_TABLE_SETTINGS } from '../../../utils/constants';
|
4
5
|
import { StorageGroupsEmptyDataMessage } from './StorageGroupsEmptyDataMessage';
|
5
6
|
import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY } from './columns/constants';
|
6
7
|
import i18n from './i18n';
|
7
|
-
export function
|
8
|
+
export function StorageGroupsTable({ data, columns, visibleEntities, onShowAll, sort, handleSort, }) {
|
8
9
|
if (!data.length && visibleEntities !== VISIBLE_ENTITIES.all) {
|
9
10
|
return (_jsx(StorageGroupsEmptyDataMessage, { onShowAll: onShowAll, visibleEntities: visibleEntities }));
|
10
11
|
}
|
11
|
-
return (_jsx(ResizeableDataTable, { columnsWidthLSKey: STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, data: data, columns: columns, settings:
|
12
|
+
return (_jsx(ResizeableDataTable, { columnsWidthLSKey: STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, data: data, columns: columns, settings: DEFAULT_TABLE_SETTINGS, emptyDataMessage: i18n('empty.default'), sortOrder: sort, onSort: handleSort }, visibleEntities));
|
12
13
|
}
|
13
|
-
//# sourceMappingURL=
|
14
|
+
//# sourceMappingURL=StorageGroupsTable.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"StorageGroupsTable.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageGroups/StorageGroupsTable.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,mBAAmB,EAAC,MAAM,6DAA6D,CAAC;AAChG,OAAO,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC;AAE3E,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EAAC,6BAA6B,EAAC,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAC,mCAAmC,EAAC,MAAM,qBAAqB,CAAC;AAExE,OAAO,IAAI,MAAM,QAAQ,CAAC;AAW1B,MAAM,UAAU,kBAAkB,CAAC,EAC/B,IAAI,EACJ,OAAO,EACP,eAAe,EACf,SAAS,EACT,IAAI,EACJ,UAAU,GACY;IACtB,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,sBAAsB,EAChC,gBAAgB,EAAE,IAAI,CAAC,eAAe,CAAC,EACvC,SAAS,EAAE,IAAI,EACf,MAAM,EAAE,UAAU,IANb,eAAe,CAOtB,CACL,CAAC;AACN,CAAC"}
|
@@ -9,12 +9,15 @@ import { InternalLink } from '../../../../components/InternalLink';
|
|
9
9
|
import { UsageLabel } from '../../../../components/UsageLabel/UsageLabel';
|
10
10
|
import { VDiskWithDonorsStack } from '../../../../components/VDisk/VDiskWithDonorsStack';
|
11
11
|
import { getStorageGroupPath } from '../../../../routes';
|
12
|
+
import { valueIsDefined } from '../../../../utils';
|
12
13
|
import { cn } from '../../../../utils/cn';
|
13
|
-
import {
|
14
|
+
import { EMPTY_DATA_PLACEHOLDER } from '../../../../utils/constants';
|
15
|
+
import { formatNumber, stringifyVdiskId } from '../../../../utils/dataFormatters/dataFormatters';
|
14
16
|
import { isSortableStorageProperty } from '../../../../utils/storage';
|
17
|
+
import { formatToMs, parseUsToMs } from '../../../../utils/timeParsers';
|
15
18
|
import { bytesToGB, bytesToSpeed } from '../../../../utils/utils';
|
16
19
|
import { Disks } from '../../Disks/Disks';
|
17
|
-
import { getDegradedSeverity, getUsageSeverityForStorageGroup } from '../../utils';
|
20
|
+
import { getDegradedSeverity, getUsageSeverityForStorageGroup, isVdiskActive } from '../../utils';
|
18
21
|
import i18n from '../i18n';
|
19
22
|
import { STORAGE_GROUPS_COLUMNS_IDS, STORAGE_GROUPS_COLUMNS_TITLES } from './constants';
|
20
23
|
import './StorageGroupsColumns.scss';
|
@@ -125,27 +128,47 @@ const writeColumn = {
|
|
125
128
|
},
|
126
129
|
align: DataTable.RIGHT,
|
127
130
|
};
|
128
|
-
const
|
131
|
+
const latencyColumn = {
|
132
|
+
name: STORAGE_GROUPS_COLUMNS_IDS.Latency,
|
133
|
+
header: STORAGE_GROUPS_COLUMNS_TITLES.Latency,
|
134
|
+
width: 100,
|
135
|
+
render: ({ row }) => {
|
136
|
+
return valueIsDefined(row.LatencyPutTabletLogMs)
|
137
|
+
? formatToMs(parseUsToMs(row.LatencyPutTabletLogMs))
|
138
|
+
: EMPTY_DATA_PLACEHOLDER;
|
139
|
+
},
|
140
|
+
align: DataTable.RIGHT,
|
141
|
+
};
|
142
|
+
const allocationUnitsColumn = {
|
143
|
+
name: STORAGE_GROUPS_COLUMNS_IDS.AllocationUnits,
|
144
|
+
header: STORAGE_GROUPS_COLUMNS_TITLES.AllocationUnits,
|
145
|
+
width: 150,
|
146
|
+
render: ({ row }) => {
|
147
|
+
return valueIsDefined(row.AllocationUnits)
|
148
|
+
? formatNumber(row.AllocationUnits)
|
149
|
+
: EMPTY_DATA_PLACEHOLDER;
|
150
|
+
},
|
151
|
+
align: DataTable.RIGHT,
|
152
|
+
};
|
153
|
+
const getVDisksColumn = (data) => ({
|
129
154
|
name: STORAGE_GROUPS_COLUMNS_IDS.VDisks,
|
130
155
|
header: STORAGE_GROUPS_COLUMNS_TITLES.VDisks,
|
131
156
|
className: b('vdisks-column'),
|
132
157
|
render: ({ row }) => {
|
133
158
|
var _a;
|
134
|
-
return (_jsx("div", { className: b('vdisks-wrapper'), children: (_a = row.VDisks) === null || _a === void 0 ? void 0 : _a.map((vDisk) => {
|
135
|
-
return (_jsx(VDiskWithDonorsStack, { data: vDisk, nodes: nodes, className: b('vdisks-item') }, stringifyVdiskId(vDisk.VDiskId)));
|
136
|
-
}) }));
|
159
|
+
return (_jsx("div", { className: b('vdisks-wrapper'), children: (_a = row.VDisks) === null || _a === void 0 ? void 0 : _a.map((vDisk) => (_jsx(VDiskWithDonorsStack, { data: vDisk, inactive: !isVdiskActive(vDisk, data), className: b('vdisks-item') }, stringifyVdiskId(vDisk.VDiskId)))) }));
|
137
160
|
},
|
138
161
|
align: DataTable.CENTER,
|
139
162
|
width: 900,
|
140
163
|
resizeable: false,
|
141
164
|
sortable: false,
|
142
165
|
});
|
143
|
-
const getDisksColumn = (
|
166
|
+
const getDisksColumn = (data) => ({
|
144
167
|
name: STORAGE_GROUPS_COLUMNS_IDS.VDisksPDisks,
|
145
168
|
header: STORAGE_GROUPS_COLUMNS_TITLES.VDisksPDisks,
|
146
169
|
className: b('disks-column'),
|
147
170
|
render: ({ row }) => {
|
148
|
-
return _jsx(Disks, { vDisks: row.VDisks,
|
171
|
+
return _jsx(Disks, { vDisks: row.VDisks, viewContext: data });
|
149
172
|
},
|
150
173
|
align: DataTable.CENTER,
|
151
174
|
width: 900,
|
@@ -181,8 +204,10 @@ export const getStorageGroupsColumns = (data) => {
|
|
181
204
|
usedSpaceFlagColumn,
|
182
205
|
readColumn,
|
183
206
|
writeColumn,
|
184
|
-
|
185
|
-
|
207
|
+
latencyColumn,
|
208
|
+
allocationUnitsColumn,
|
209
|
+
getVDisksColumn(data),
|
210
|
+
getDisksColumn(data),
|
186
211
|
];
|
187
212
|
return columns.map((column) => ({
|
188
213
|
...column,
|