ydb-embedded-ui 6.1.0 → 6.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. package/dist/components/DateRange/DateRange.scss +7 -0
  2. package/dist/components/EntityStatus/EntityStatus.d.ts +3 -1
  3. package/dist/components/EntityStatus/EntityStatus.js +4 -4
  4. package/dist/components/EntityStatus/EntityStatus.scss +2 -10
  5. package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -2
  6. package/dist/components/NodeHostWrapper/NodeHostWrapper.scss +1 -10
  7. package/dist/components/QueryResultTable/QueryResultTable.d.ts +2 -2
  8. package/dist/components/QueryResultTable/QueryResultTable.js +2 -1
  9. package/dist/components/QueryResultTable/QueryResultTable.scss +1 -0
  10. package/dist/components/ResizeableDataTable/ResizeableDataTable.d.ts +7 -0
  11. package/dist/components/ResizeableDataTable/ResizeableDataTable.js +14 -0
  12. package/dist/components/ResizeableDataTable/ResizeableDataTable.scss +8 -0
  13. package/dist/components/VirtualTable/ResizeHandler.d.ts +8 -0
  14. package/dist/components/VirtualTable/ResizeHandler.js +62 -0
  15. package/dist/components/VirtualTable/ResizeableVirtualTable.d.ts +6 -0
  16. package/dist/components/VirtualTable/ResizeableVirtualTable.js +16 -0
  17. package/dist/components/VirtualTable/TableHead.d.ts +3 -3
  18. package/dist/components/VirtualTable/TableHead.js +16 -31
  19. package/dist/components/VirtualTable/VirtualTable.d.ts +2 -4
  20. package/dist/components/VirtualTable/VirtualTable.scss +24 -4
  21. package/dist/components/VirtualTable/types.d.ts +3 -0
  22. package/dist/components/VirtualTable/utils.d.ts +2 -0
  23. package/dist/components/VirtualTable/utils.js +21 -0
  24. package/dist/containers/ClusterModeGuard/ClusterModeGuard.js +1 -1
  25. package/dist/containers/Clusters/Clusters.js +3 -2
  26. package/dist/containers/Clusters/Clusters.scss +5 -0
  27. package/dist/containers/Clusters/columns.d.ts +1 -0
  28. package/dist/containers/Clusters/columns.js +4 -3
  29. package/dist/containers/Nodes/Nodes.js +4 -4
  30. package/dist/containers/Nodes/Nodes.scss +0 -5
  31. package/dist/containers/Nodes/VirtualNodes.js +4 -6
  32. package/dist/containers/Nodes/getNodesColumns.d.ts +1 -0
  33. package/dist/containers/Nodes/getNodesColumns.js +9 -1
  34. package/dist/containers/PDiskPage/PDiskGroups.js +3 -3
  35. package/dist/containers/Storage/Storage.scss +0 -4
  36. package/dist/containers/Storage/StorageGroups/StorageGroups.js +3 -3
  37. package/dist/containers/Storage/StorageGroups/VirtualStorageGroups.js +3 -3
  38. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.d.ts +3 -0
  39. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +7 -3
  40. package/dist/containers/Storage/StorageNodes/StorageNodes.js +3 -3
  41. package/dist/containers/Storage/StorageNodes/VirtualStorageNodes.js +3 -3
  42. package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.d.ts +3 -0
  43. package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.js +2 -0
  44. package/dist/containers/Tablet/Tablet.scss +0 -4
  45. package/dist/containers/Tablet/TabletTable/TabletTable.js +5 -3
  46. package/dist/containers/Tenant/Acl/Acl.js +3 -2
  47. package/dist/containers/Tenant/Acl/Acl.scss +0 -6
  48. package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.js +3 -3
  49. package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.scss +2 -0
  50. package/dist/containers/Tenant/Diagnostics/Consumers/columns/columns.d.ts +1 -0
  51. package/dist/containers/Tenant/Diagnostics/Consumers/columns/columns.js +2 -0
  52. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +5 -4
  53. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.scss +1 -5
  54. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +8 -4
  55. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.scss +2 -0
  56. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js +1 -1
  57. package/dist/containers/Tenant/Diagnostics/Partitions/columns/Columns.scss +0 -8
  58. package/dist/containers/Tenant/Diagnostics/Partitions/columns/columns.d.ts +1 -0
  59. package/dist/containers/Tenant/Diagnostics/Partitions/columns/columns.js +11 -4
  60. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +2 -2
  61. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js +2 -2
  62. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +3 -2
  63. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +2 -2
  64. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +2 -2
  65. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +3 -7
  66. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.d.ts +2 -2
  67. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.js +2 -2
  68. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +2 -2
  69. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +4 -2
  70. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +8 -11
  71. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.scss +2 -24
  72. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.d.ts +1 -0
  73. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js +7 -0
  74. package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.d.ts +1 -2
  75. package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.js +3 -4
  76. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.d.ts +0 -1
  77. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +8 -10
  78. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.scss +4 -15
  79. package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.d.ts +1 -0
  80. package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.js +5 -0
  81. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +1 -1
  82. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +0 -6
  83. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +1 -21
  84. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +4 -4
  85. package/dist/containers/Tenant/Query/ExplainResult/utils.d.ts +0 -3
  86. package/dist/containers/Tenant/Query/ExplainResult/utils.js +0 -34
  87. package/dist/containers/Tenant/Query/Preview/Preview.js +3 -2
  88. package/dist/containers/Tenant/Query/Preview/Preview.scss +6 -3
  89. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +4 -2
  90. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.scss +0 -1
  91. package/dist/containers/Tenant/Query/QueryEditor/helpers.js +2 -1
  92. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +4 -1
  93. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.scss +0 -1
  94. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.d.ts +1 -2
  95. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +4 -3
  96. package/dist/containers/Tenant/Schema/SchemaViewer/helpers.d.ts +1 -0
  97. package/dist/containers/Tenant/Schema/SchemaViewer/helpers.js +4 -2
  98. package/dist/containers/Tenants/Tenants.js +12 -7
  99. package/dist/containers/Tenants/Tenants.scss +15 -9
  100. package/dist/containers/Versions/GroupedNodesTree/GroupedNodesTree.scss +0 -2
  101. package/dist/containers/Versions/NodesTable/NodesTable.js +14 -9
  102. package/dist/styles/mixins.scss +0 -47
  103. package/dist/utils/constants.d.ts +25 -10
  104. package/dist/utils/hooks/useTableResize.d.ts +2 -7
  105. package/dist/utils/hooks/useTableResize.js +12 -24
  106. package/package.json +10 -10
  107. package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.scss +0 -8
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import DataTable from '@gravity-ui/react-data-table';
4
3
  import { ASCENDING } from '@gravity-ui/react-data-table/build/esm/lib/constants';
5
4
  import { skipToken } from '@reduxjs/toolkit/query';
6
5
  import { EntitiesCount } from '../../components/EntitiesCount';
@@ -8,6 +7,7 @@ import { AccessDenied } from '../../components/Errors/403';
8
7
  import { ResponseError } from '../../components/Errors/ResponseError';
9
8
  import { Illustration } from '../../components/Illustration';
10
9
  import { ProblemFilter } from '../../components/ProblemFilter';
10
+ import { ResizeableDataTable } from '../../components/ResizeableDataTable/ResizeableDataTable';
11
11
  import { Search } from '../../components/Search';
12
12
  import { TableWithControlsLayout } from '../../components/TableWithControlsLayout/TableWithControlsLayout';
13
13
  import { UptimeFilter } from '../../components/UptimeFIlter';
@@ -18,7 +18,7 @@ import { cn } from '../../utils/cn';
18
18
  import { DEFAULT_POLLING_INTERVAL, DEFAULT_TABLE_SETTINGS, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY, } from '../../utils/constants';
19
19
  import { useSetting, useTableSort, useTypedDispatch, useTypedSelector } from '../../utils/hooks';
20
20
  import { NodesUptimeFilterValues, isSortableNodesProperty, isUnavailableNode, } from '../../utils/nodes';
21
- import { getNodesColumns } from './getNodesColumns';
21
+ import { NODES_COLUMNS_WIDTH_LS_KEY, getNodesColumns } from './getNodesColumns';
22
22
  import i18n from './i18n';
23
23
  import './Nodes.scss';
24
24
  const b = cn('ydb-nodes');
@@ -78,7 +78,7 @@ export const Nodes = ({ path, additionalNodesProps = {} }) => {
78
78
  return _jsx(Illustration, { name: "thumbsUp", width: "200" });
79
79
  }
80
80
  }
81
- return (_jsx(DataTable, { theme: "yandex-cloud", data: nodes || [], columns: columns, settings: DEFAULT_TABLE_SETTINGS, sortOrder: sort, onSort: handleSort, emptyDataMessage: i18n('empty.default'), rowClassName: (row) => b('node', { unavailable: isUnavailableNode(row) }) }));
81
+ return (_jsx(ResizeableDataTable, { columnsWidthLSKey: NODES_COLUMNS_WIDTH_LS_KEY, data: nodes || [], columns: columns, settings: DEFAULT_TABLE_SETTINGS, sortOrder: sort, onSort: handleSort, emptyDataMessage: i18n('empty.default'), rowClassName: (row) => b('node', { unavailable: isUnavailableNode(row) }) }));
82
82
  };
83
83
  if (error) {
84
84
  if (error.status === 403) {
@@ -86,5 +86,5 @@ export const Nodes = ({ path, additionalNodesProps = {} }) => {
86
86
  }
87
87
  return _jsx(ResponseError, { error: error });
88
88
  }
89
- return (_jsxs(TableWithControlsLayout, { children: [_jsx(TableWithControlsLayout.Controls, { children: renderControls() }), _jsx(TableWithControlsLayout.Table, { loading: isLoading, className: b('table'), children: renderTable() })] }));
89
+ return (_jsxs(TableWithControlsLayout, { children: [_jsx(TableWithControlsLayout.Controls, { children: renderControls() }), _jsx(TableWithControlsLayout.Table, { loading: isLoading, children: renderTable() })] }));
90
90
  };
@@ -12,11 +12,6 @@
12
12
  margin-bottom: 15px;
13
13
  }
14
14
 
15
- &__table {
16
- @include table-styles;
17
- @include table-sticky-styles;
18
- }
19
-
20
15
  &__node_unavailable {
21
16
  opacity: 0.6;
22
17
  }
@@ -7,13 +7,12 @@ import { Illustration } from '../../components/Illustration';
7
7
  import { ProblemFilter } from '../../components/ProblemFilter';
8
8
  import { Search } from '../../components/Search';
9
9
  import { UptimeFilter } from '../../components/UptimeFIlter';
10
- import { VirtualTable } from '../../components/VirtualTable';
10
+ import { ResizeableVirtualTable } from '../../components/VirtualTable/ResizeableVirtualTable';
11
11
  import { ProblemFilterValues } from '../../store/reducers/settings/settings';
12
12
  import { cn } from '../../utils/cn';
13
- import { updateColumnsWidth, useTableResize } from '../../utils/hooks/useTableResize';
14
13
  import { NodesUptimeFilterValues, getProblemParamValue, getUptimeParamValue, isSortableNodesProperty, isUnavailableNode, } from '../../utils/nodes';
15
14
  import { getNodes } from './getNodes';
16
- import { getNodesColumns } from './getNodesColumns';
15
+ import { NODES_COLUMNS_WIDTH_LS_KEY, getNodesColumns } from './getNodesColumns';
17
16
  import i18n from './i18n';
18
17
  import './Nodes.scss';
19
18
  const b = cn('ydb-nodes');
@@ -21,7 +20,6 @@ export const VirtualNodes = ({ path, parentContainer, additionalNodesProps }) =>
21
20
  const [searchValue, setSearchValue] = React.useState('');
22
21
  const [problemFilter, setProblemFilter] = React.useState(ProblemFilterValues.ALL);
23
22
  const [uptimeFilter, setUptimeFilter] = React.useState(NodesUptimeFilterValues.All);
24
- const [tableColumnsWidthSetup, setTableColumnsWidth] = useTableResize('nodesTableColumnsWidth');
25
23
  const filters = React.useMemo(() => {
26
24
  return [path, searchValue, problemFilter, uptimeFilter];
27
25
  }, [path, searchValue, problemFilter, uptimeFilter]);
@@ -59,8 +57,8 @@ export const VirtualNodes = ({ path, parentContainer, additionalNodesProps }) =>
59
57
  const rawColumns = getNodesColumns({
60
58
  getNodeRef: additionalNodesProps === null || additionalNodesProps === void 0 ? void 0 : additionalNodesProps.getNodeRef,
61
59
  });
62
- const columns = updateColumnsWidth(rawColumns, tableColumnsWidthSetup).map((column) => {
60
+ const columns = rawColumns.map((column) => {
63
61
  return Object.assign(Object.assign({}, column), { sortable: isSortableNodesProperty(column.name) });
64
62
  });
65
- return (_jsx(VirtualTable, { parentContainer: parentContainer, columns: columns, fetchData: fetchData, limit: 50, renderControls: renderControls, renderErrorMessage: renderErrorMessage, renderEmptyDataMessage: renderEmptyDataMessage, dependencyArray: filters, getRowClassName: getRowClassName, onColumnsResize: setTableColumnsWidth }));
63
+ return (_jsx(ResizeableVirtualTable, { columnsWidthLSKey: NODES_COLUMNS_WIDTH_LS_KEY, parentContainer: parentContainer, columns: columns, fetchData: fetchData, limit: 50, renderControls: renderControls, renderErrorMessage: renderErrorMessage, renderEmptyDataMessage: renderEmptyDataMessage, dependencyArray: filters, getRowClassName: getRowClassName }));
66
64
  };
@@ -2,6 +2,7 @@ import type { Column as DataTableColumn } from '@gravity-ui/react-data-table';
2
2
  import type { Column as VirtualTableColumn } from '../../components/VirtualTable';
3
3
  import type { NodesPreparedEntity } from '../../store/reducers/nodes/types';
4
4
  import type { GetNodeRefFunc } from '../../types/additionalProps';
5
+ export declare const NODES_COLUMNS_WIDTH_LS_KEY = "nodesTableColumnsWidth";
5
6
  interface GetNodesColumnsProps {
6
7
  tabletsPath?: string;
7
8
  getNodeRef?: GetNodeRefFunc;
@@ -9,6 +9,7 @@ import { UsageLabel } from '../../components/UsageLabel/UsageLabel';
9
9
  import { getLoadSeverityForNode } from '../../store/reducers/nodes/utils';
10
10
  import { EMPTY_DATA_PLACEHOLDER } from '../../utils/constants';
11
11
  import { formatBytesToGigabyte, formatStorageValuesToGb, } from '../../utils/dataFormatters/dataFormatters';
12
+ export const NODES_COLUMNS_WIDTH_LS_KEY = 'nodesTableColumnsWidth';
12
13
  const NODES_COLUMNS_IDS = {
13
14
  NodeId: 'NodeId',
14
15
  Host: 'Host',
@@ -102,6 +103,7 @@ const cpuColumn = {
102
103
  render: ({ row }) => (row.PoolStats ? _jsx(PoolsGraph, { pools: row.PoolStats }) : '—'),
103
104
  align: DataTable.LEFT,
104
105
  width: 80,
106
+ resizeMinWidth: 60,
105
107
  sortable: false,
106
108
  };
107
109
  const loadAverageColumn = {
@@ -112,11 +114,13 @@ const loadAverageColumn = {
112
114
  render: ({ row }) => row.LoadAverage && row.LoadAverage.length > 0 ? (_jsx(ProgressViewer, { value: row.LoadAverage[0], percents: true, colorizeProgress: true, capacity: 100 })) : ('—'),
113
115
  align: DataTable.LEFT,
114
116
  width: 140,
117
+ resizeMinWidth: 140,
115
118
  sortable: false,
116
119
  };
117
120
  const getTabletsColumn = (tabletsPath) => ({
118
121
  name: NODES_COLUMNS_IDS.Tablets,
119
- width: 430,
122
+ width: 500,
123
+ resizeMinWidth: 500,
120
124
  render: ({ row }) => {
121
125
  return row.Tablets ? (_jsx(TabletsStatistic, { path: tabletsPath !== null && tabletsPath !== void 0 ? tabletsPath : row.TenantName, nodeIds: [row.NodeId], tablets: row.Tablets })) : ('—');
122
126
  },
@@ -129,6 +133,7 @@ const topNodesLoadAverageColumn = {
129
133
  render: ({ row }) => row.LoadAverage && row.LoadAverage.length > 0 ? (_jsx(UsageLabel, { value: row.LoadAverage[0].toFixed(), theme: getLoadSeverityForNode(row.LoadAverage[0]) })) : ('—'),
130
134
  align: DataTable.LEFT,
131
135
  width: 80,
136
+ resizeMinWidth: 70,
132
137
  sortable: false,
133
138
  };
134
139
  const topNodesMemoryColumn = {
@@ -137,6 +142,7 @@ const topNodesMemoryColumn = {
137
142
  render: ({ row }) => (_jsx(ProgressViewer, { value: row.MemoryUsed, capacity: row.MemoryLimit, formatValues: formatStorageValuesToGb, colorizeProgress: true })),
138
143
  align: DataTable.LEFT,
139
144
  width: 140,
145
+ resizeMinWidth: 140,
140
146
  sortable: false,
141
147
  };
142
148
  const sharedCacheUsageColumn = {
@@ -145,6 +151,7 @@ const sharedCacheUsageColumn = {
145
151
  render: ({ row }) => (_jsx(ProgressViewer, { value: row.SharedCacheUsed, capacity: row.SharedCacheLimit, formatValues: formatStorageValuesToGb, colorizeProgress: true })),
146
152
  align: DataTable.LEFT,
147
153
  width: 140,
154
+ resizeMinWidth: 140,
148
155
  sortable: false,
149
156
  };
150
157
  const memoryUsedInAllocColumn = {
@@ -153,6 +160,7 @@ const memoryUsedInAllocColumn = {
153
160
  render: ({ row }) => (_jsx(ProgressViewer, { value: row.MemoryUsedInAlloc, capacity: row.MemoryLimit, formatValues: formatStorageValuesToGb, colorizeProgress: true })),
154
161
  align: DataTable.LEFT,
155
162
  width: 140,
163
+ resizeMinWidth: 140,
156
164
  sortable: false,
157
165
  };
158
166
  const sessionsColumn = {
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import DataTable from '@gravity-ui/react-data-table';
3
+ import { ResizeableDataTable } from '../../components/ResizeableDataTable/ResizeableDataTable';
4
4
  import { TableSkeleton } from '../../components/TableSkeleton/TableSkeleton';
5
5
  import { DEFAULT_TABLE_SETTINGS } from '../../utils/constants';
6
- import { getPDiskStorageColumns } from '../Storage/StorageGroups/getStorageGroupsColumns';
6
+ import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, getPDiskStorageColumns, } from '../Storage/StorageGroups/getStorageGroupsColumns';
7
7
  import { pDiskPageKeyset } from './i18n';
8
8
  import { pdiskPageCn } from './shared';
9
9
  export function PDiskGroups({ data, nodesMap, loading }) {
@@ -14,7 +14,7 @@ export function PDiskGroups({ data, nodesMap, loading }) {
14
14
  if (loading) {
15
15
  return _jsx(TableSkeleton, {});
16
16
  }
17
- return (_jsx(DataTable, { theme: "yandex-cloud", data: data, columns: pDiskStorageColumns, settings: DEFAULT_TABLE_SETTINGS }));
17
+ return (_jsx(ResizeableDataTable, { columnsWidthLSKey: STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, data: data, columns: pDiskStorageColumns, settings: DEFAULT_TABLE_SETTINGS }));
18
18
  };
19
19
  return (_jsxs(React.Fragment, { children: [_jsx("div", { className: pdiskPageCn('groups-title'), children: pDiskPageKeyset('groups') }), _jsx("div", { children: renderContent() })] }));
20
20
  }
@@ -10,10 +10,6 @@
10
10
  // stylelint-disable-next-line declaration-no-important
11
11
  height: var(--g-text-body-2-line-height) !important;
12
12
  }
13
-
14
- table {
15
- min-width: 100%;
16
- }
17
13
  }
18
14
 
19
15
  .entity-status {
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import DataTable from '@gravity-ui/react-data-table';
3
+ import { ResizeableDataTable } from '../../../components/ResizeableDataTable/ResizeableDataTable';
4
4
  import { VISIBLE_ENTITIES } from '../../../store/reducers/storage/constants';
5
5
  import { StorageGroupsEmptyDataMessage } from './StorageGroupsEmptyDataMessage';
6
- import { getPreparedStorageGroupsColumns } from './getStorageGroupsColumns';
6
+ import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, getPreparedStorageGroupsColumns, } from './getStorageGroupsColumns';
7
7
  import i18n from './i18n';
8
8
  import './StorageGroups.scss';
9
9
  export function StorageGroups({ data, tableSettings, visibleEntities, nodes, onShowAll, sort, handleSort, }) {
@@ -13,5 +13,5 @@ export function StorageGroups({ data, tableSettings, visibleEntities, nodes, onS
13
13
  if (!data.length && visibleEntities !== VISIBLE_ENTITIES.all) {
14
14
  return (_jsx(StorageGroupsEmptyDataMessage, { onShowAll: onShowAll, visibleEntities: visibleEntities }));
15
15
  }
16
- return (_jsx(DataTable, { theme: "yandex-cloud", data: data, columns: columns, settings: tableSettings, emptyDataMessage: i18n('empty.default'), sortOrder: sort, onSort: handleSort }, visibleEntities));
16
+ return (_jsx(ResizeableDataTable, { columnsWidthLSKey: STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, data: data, columns: columns, settings: tableSettings, emptyDataMessage: i18n('empty.default'), sortOrder: sort, onSort: handleSort }, visibleEntities));
17
17
  }
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { VirtualTable } from '../../../components/VirtualTable';
3
+ import { ResizeableVirtualTable } from '../../../components/VirtualTable/ResizeableVirtualTable';
4
4
  import { VISIBLE_ENTITIES } from '../../../store/reducers/storage/constants';
5
5
  import { StorageGroupsEmptyDataMessage } from './StorageGroupsEmptyDataMessage';
6
6
  import { getStorageGroups } from './getGroups';
7
- import { getPreparedStorageGroupsColumns } from './getStorageGroupsColumns';
7
+ import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, getPreparedStorageGroupsColumns, } from './getStorageGroupsColumns';
8
8
  import i18n from './i18n';
9
9
  export const VirtualStorageGroups = ({ searchValue, visibleEntities, tenant, nodeId, nodesMap, onShowAll, parentContainer, renderControls, renderErrorMessage, }) => {
10
10
  const filters = React.useMemo(() => {
@@ -31,5 +31,5 @@ export const VirtualStorageGroups = ({ searchValue, visibleEntities, tenant, nod
31
31
  }
32
32
  return i18n('empty.default');
33
33
  };
34
- return (_jsx(VirtualTable, { parentContainer: parentContainer, columns: columns, fetchData: fetchData, limit: 50, renderControls: renderControls, renderErrorMessage: renderErrorMessage, renderEmptyDataMessage: renderEmptyDataMessage, dependencyArray: filters }));
34
+ return (_jsx(ResizeableVirtualTable, { columnsWidthLSKey: STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, parentContainer: parentContainer, columns: columns, fetchData: fetchData, limit: 50, renderControls: renderControls, renderErrorMessage: renderErrorMessage, renderEmptyDataMessage: renderEmptyDataMessage, dependencyArray: filters }));
35
35
  };
@@ -4,6 +4,7 @@ import type { Column as VirtualTableColumn } from '../../../components/VirtualTa
4
4
  import type { PreparedStorageGroup, VisibleEntities } from '../../../store/reducers/storage/types';
5
5
  import type { NodesMap } from '../../../types/store/nodesList';
6
6
  import './StorageGroups.scss';
7
+ export declare const STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY = "storageGroupsColumnsWidth";
7
8
  type StorageGroupsColumn = VirtualTableColumn<PreparedStorageGroup> & DataTableColumn<PreparedStorageGroup>;
8
9
  export declare const GROUPS_COLUMNS_IDS: {
9
10
  readonly PoolName: "PoolName";
@@ -38,6 +39,8 @@ export declare const getPreparedStorageGroupsColumns: (nodesMap: NodesMap | unde
38
39
  headerData?: boolean | undefined;
39
40
  }) => React.ReactNode);
40
41
  width: number;
42
+ resizeMaxWidth?: number | undefined;
43
+ resizeMinWidth?: number | undefined;
41
44
  align: "center" | "left" | "right";
42
45
  headerTitle?: string | undefined;
43
46
  accessor?: string | ((row: PreparedStorageGroup) => any) | undefined;
@@ -17,6 +17,7 @@ import i18n from './i18n';
17
17
  import shieldIcon from '../../../assets/icons/shield.svg';
18
18
  import './StorageGroups.scss';
19
19
  const b = cn('global-storage-groups');
20
+ export const STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY = 'storageGroupsColumnsWidth';
20
21
  export const GROUPS_COLUMNS_IDS = {
21
22
  PoolName: 'PoolName',
22
23
  MediaType: 'MediaType',
@@ -46,6 +47,7 @@ const typeColumn = {
46
47
  name: GROUPS_COLUMNS_IDS.MediaType,
47
48
  header: 'Type',
48
49
  width: 100,
50
+ resizeMinWidth: 100,
49
51
  align: DataTable.LEFT,
50
52
  render: ({ row }) => (_jsxs(React.Fragment, { children: [_jsx(Label, { children: row.MediaType || '—' }), '\u00a0', row.Encryption && (_jsx(Popover, { content: i18n('encrypted'), placement: "right", behavior: PopoverBehavior.Immediate, children: _jsx(Label, { children: _jsx(Icon, { data: shieldIcon }) }) }))] })),
51
53
  sortable: false,
@@ -70,6 +72,7 @@ const usageColumn = {
70
72
  name: GROUPS_COLUMNS_IDS.Usage,
71
73
  header: 'Usage',
72
74
  width: 100,
75
+ resizeMinWidth: 70,
73
76
  render: ({ row }) => {
74
77
  // without a limit the usage can be evaluated as 0,
75
78
  // but the absence of a value is more clear
@@ -149,7 +152,7 @@ const writeColumn = {
149
152
  },
150
153
  align: DataTable.RIGHT,
151
154
  };
152
- const getVdiscksColumn = (nodes) => ({
155
+ const getVDisksColumn = (nodes) => ({
153
156
  name: GROUPS_COLUMNS_IDS.VDisks,
154
157
  className: b('vdisks-column'),
155
158
  header: 'VDisks',
@@ -161,6 +164,7 @@ const getVdiscksColumn = (nodes) => ({
161
164
  },
162
165
  align: DataTable.CENTER,
163
166
  width: 900,
167
+ resizeable: false,
164
168
  });
165
169
  export const getStorageTopGroupsColumns = () => {
166
170
  return [groupIdColumn, typeColumn, erasureColumn, usageColumn, usedColumn, limitColumn];
@@ -174,7 +178,7 @@ export const getPDiskStorageColumns = (nodes) => {
174
178
  groupIdColumn,
175
179
  usageColumn,
176
180
  usedColumn,
177
- getVdiscksColumn(nodes),
181
+ getVDisksColumn(nodes),
178
182
  ];
179
183
  };
180
184
  const getStorageGroupsColumns = (nodes) => {
@@ -190,7 +194,7 @@ const getStorageGroupsColumns = (nodes) => {
190
194
  usedSpaceFlagColumn,
191
195
  readColumn,
192
196
  writeColumn,
193
- getVdiscksColumn(nodes),
197
+ getVDisksColumn(nodes),
194
198
  ];
195
199
  };
196
200
  const filterStorageGroupsColumns = (columns, visibleEntities) => {
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import DataTable from '@gravity-ui/react-data-table';
2
+ import { ResizeableDataTable } from '../../../components/ResizeableDataTable/ResizeableDataTable';
3
3
  import { VISIBLE_ENTITIES } from '../../../store/reducers/storage/constants';
4
4
  import { NodesUptimeFilterValues } from '../../../utils/nodes';
5
5
  import { StorageNodesEmptyDataMessage } from './StorageNodesEmptyDataMessage';
6
- import { getPreparedStorageNodesColumns } from './getStorageNodesColumns';
6
+ import { STORAGE_NODES_COLUMNS_WIDTH_LS_KEY, getPreparedStorageNodesColumns, } from './getStorageNodesColumns';
7
7
  import i18n from './i18n';
8
8
  import { getRowUnavailableClassName } from './shared';
9
9
  import './StorageNodes.scss';
@@ -14,5 +14,5 @@ export function StorageNodes({ data, tableSettings, visibleEntities, onShowAll,
14
14
  nodesUptimeFilter !== NodesUptimeFilterValues.All)) {
15
15
  return (_jsx(StorageNodesEmptyDataMessage, { visibleEntities: visibleEntities, nodesUptimeFilter: nodesUptimeFilter, onShowAll: onShowAll }));
16
16
  }
17
- return (_jsx(DataTable, { theme: "yandex-cloud", data: data, columns: columns, settings: Object.assign(Object.assign({}, tableSettings), { dynamicRenderType: 'variable' }), emptyDataMessage: i18n('empty.default'), rowClassName: getRowUnavailableClassName, sortOrder: sort, onSort: handleSort }, visibleEntities));
17
+ return (_jsx(ResizeableDataTable, { columnsWidthLSKey: STORAGE_NODES_COLUMNS_WIDTH_LS_KEY, data: data, columns: columns, settings: Object.assign(Object.assign({}, tableSettings), { dynamicRenderType: 'variable' }), emptyDataMessage: i18n('empty.default'), rowClassName: getRowUnavailableClassName, sortOrder: sort, onSort: handleSort }, visibleEntities));
18
18
  }
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { VirtualTable } from '../../../components/VirtualTable';
3
+ import { ResizeableVirtualTable } from '../../../components/VirtualTable/ResizeableVirtualTable';
4
4
  import { VISIBLE_ENTITIES } from '../../../store/reducers/storage/constants';
5
5
  import { NodesUptimeFilterValues, getUptimeParamValue } from '../../../utils/nodes';
6
6
  import { StorageNodesEmptyDataMessage } from './StorageNodesEmptyDataMessage';
7
7
  import { getStorageNodes } from './getNodes';
8
- import { getPreparedStorageNodesColumns } from './getStorageNodesColumns';
8
+ import { STORAGE_NODES_COLUMNS_WIDTH_LS_KEY, getPreparedStorageNodesColumns, } from './getStorageNodesColumns';
9
9
  import i18n from './i18n';
10
10
  import { getRowUnavailableClassName } from './shared';
11
11
  export const VirtualStorageNodes = ({ searchValue, visibleEntities, nodesUptimeFilter, tenant, additionalNodesProps, onShowAll, parentContainer, renderControls, renderErrorMessage, }) => {
@@ -34,5 +34,5 @@ export const VirtualStorageNodes = ({ searchValue, visibleEntities, nodesUptimeF
34
34
  }
35
35
  return i18n('empty.default');
36
36
  };
37
- return (_jsx(VirtualTable, { parentContainer: parentContainer, columns: columns, fetchData: fetchData, rowHeight: 50, limit: 50, renderControls: renderControls, renderErrorMessage: renderErrorMessage, renderEmptyDataMessage: renderEmptyDataMessage, getRowClassName: getRowUnavailableClassName, dependencyArray: filters }));
37
+ return (_jsx(ResizeableVirtualTable, { columnsWidthLSKey: STORAGE_NODES_COLUMNS_WIDTH_LS_KEY, parentContainer: parentContainer, columns: columns, fetchData: fetchData, rowHeight: 50, limit: 50, renderControls: renderControls, renderErrorMessage: renderErrorMessage, renderEmptyDataMessage: renderEmptyDataMessage, getRowClassName: getRowUnavailableClassName, dependencyArray: filters }));
38
38
  };
@@ -2,6 +2,7 @@
2
2
  import type { Column as DataTableColumn } from '@gravity-ui/react-data-table';
3
3
  import type { PreparedStorageNode, VisibleEntities } from '../../../store/reducers/storage/types';
4
4
  import type { AdditionalNodesProps } from '../../../types/additionalProps';
5
+ export declare const STORAGE_NODES_COLUMNS_WIDTH_LS_KEY = "storageNodesColumnsWidth";
5
6
  export declare const STORAGE_NODES_COLUMNS_IDS: {
6
7
  readonly NodeId: "NodeId";
7
8
  readonly Host: "Host";
@@ -28,6 +29,8 @@ export declare const getPreparedStorageNodesColumns: (additionalNodesProps: Addi
28
29
  headerData?: boolean | undefined;
29
30
  }) => import("react").ReactNode);
30
31
  width: number;
32
+ resizeMaxWidth?: number | undefined;
33
+ resizeMinWidth?: number | undefined;
31
34
  align: "center" | "left" | "right";
32
35
  headerTitle?: string | undefined;
33
36
  accessor?: string | ((row: PreparedStorageNode) => any) | undefined;
@@ -6,6 +6,7 @@ import { EMPTY_DATA_PLACEHOLDER } from '../../../utils/constants';
6
6
  import { isSortableNodesProperty } from '../../../utils/nodes';
7
7
  import { PDisk } from '../PDisk/PDisk';
8
8
  import { b } from './shared';
9
+ export const STORAGE_NODES_COLUMNS_WIDTH_LS_KEY = 'storageNodesColumnsWidth';
9
10
  export const STORAGE_NODES_COLUMNS_IDS = {
10
11
  NodeId: 'NodeId',
11
12
  Host: 'Host',
@@ -79,6 +80,7 @@ const getStorageNodesColumns = (additionalNodesProps) => {
79
80
  align: DataTable.CENTER,
80
81
  sortable: false,
81
82
  width: 900,
83
+ resizeable: false,
82
84
  },
83
85
  ];
84
86
  return columns;
@@ -93,8 +93,4 @@
93
93
 
94
94
  @include body-2-typography();
95
95
  }
96
-
97
- &__host {
98
- width: 300px;
99
- }
100
96
  }
@@ -2,9 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import DataTable from '@gravity-ui/react-data-table';
3
3
  import { EntityStatus } from '../../../components/EntityStatus/EntityStatus';
4
4
  import { InternalLink } from '../../../components/InternalLink/InternalLink';
5
+ import { ResizeableDataTable } from '../../../components/ResizeableDataTable/ResizeableDataTable';
5
6
  import { calcUptime } from '../../../utils/dataFormatters/dataFormatters';
6
7
  import { getDefaultNodePath } from '../../Node/NodePages';
7
- import { b } from '../Tablet';
8
+ const TABLET_COLUMNS_WIDTH_LS_KEY = 'tabletTableColumnsWidth';
8
9
  const columns = [
9
10
  {
10
11
  name: 'Generation',
@@ -40,11 +41,12 @@ const columns = [
40
41
  {
41
42
  name: 'Node FQDN',
42
43
  sortable: false,
44
+ width: 300,
43
45
  render: ({ row }) => {
44
46
  if (!row.fqdn) {
45
47
  return _jsx("span", { children: "\u2014" });
46
48
  }
47
- return (_jsx("div", { className: b('host'), children: _jsx(EntityStatus, { name: row.fqdn, showStatus: false, hasClipboardButton: true }) }));
49
+ return _jsx(EntityStatus, { name: row.fqdn, showStatus: false, hasClipboardButton: true });
48
50
  },
49
51
  },
50
52
  ];
@@ -52,7 +54,7 @@ const TABLE_SETTINGS = {
52
54
  displayIndices: false,
53
55
  };
54
56
  export const TabletTable = ({ history }) => {
55
- return (_jsx(DataTable, { theme: "yandex-cloud", data: history, columns: columns, settings: TABLE_SETTINGS, initialSortOrder: {
57
+ return (_jsx(ResizeableDataTable, { columnsWidthLSKey: TABLET_COLUMNS_WIDTH_LS_KEY, data: history, columns: columns, settings: TABLE_SETTINGS, initialSortOrder: {
56
58
  columnId: 'Generation',
57
59
  order: DataTable.DESCENDING,
58
60
  } }));
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import DataTable from '@gravity-ui/react-data-table';
4
3
  import { ResponseError } from '../../../components/Errors/ResponseError';
5
4
  import { Loader } from '../../../components/Loader';
5
+ import { ResizeableDataTable } from '../../../components/ResizeableDataTable/ResizeableDataTable';
6
6
  import { getSchemaAcl, setAclWasNotLoaded } from '../../../store/reducers/schemaAcl/schemaAcl';
7
7
  import { cn } from '../../../utils/cn';
8
8
  import { DEFAULT_TABLE_SETTINGS } from '../../../utils/constants';
@@ -10,6 +10,7 @@ import { useTypedDispatch, useTypedSelector } from '../../../utils/hooks';
10
10
  import i18n from '../i18n';
11
11
  import './Acl.scss';
12
12
  const b = cn('ydb-acl');
13
+ const ACL_COLUMNS_WIDTH_LS_KEY = 'aclTableColumnsWidth';
13
14
  const TABLE_SETTINGS = Object.assign(Object.assign({}, DEFAULT_TABLE_SETTINGS), { dynamicRender: false, stickyTop: 36 });
14
15
  const prepareLogin = (value) => {
15
16
  if (value && value.endsWith('@staff') && !value.startsWith('svc_')) {
@@ -73,7 +74,7 @@ export const Acl = () => {
73
74
  if (!acl || !acl.length) {
74
75
  return null;
75
76
  }
76
- return (_jsx(DataTable, { theme: "yandex-cloud", columns: columns, data: acl, settings: TABLE_SETTINGS }));
77
+ return (_jsx(ResizeableDataTable, { columnsWidthLSKey: ACL_COLUMNS_WIDTH_LS_KEY, columns: columns, data: acl, settings: TABLE_SETTINGS }));
77
78
  };
78
79
  const renderOwner = () => {
79
80
  if (!owner) {
@@ -1,12 +1,6 @@
1
1
  @import '../../../styles/mixins.scss';
2
2
 
3
3
  .ydb-acl {
4
- display: flex;
5
- overflow: auto;
6
- flex-grow: 1;
7
-
8
- @include query-data-table;
9
-
10
4
  &__result {
11
5
  align-self: flex-start;
12
6
  }
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import DataTable from '@gravity-ui/react-data-table';
4
3
  import escapeRegExp from 'lodash/escapeRegExp';
5
4
  import { ResponseError } from '../../../../components/Errors/ResponseError';
6
5
  import { Loader } from '../../../../components/Loader';
6
+ import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
7
7
  import { Search } from '../../../../components/Search';
8
8
  import { selectPreparedConsumersData, selectPreparedTopicStats, topicApi, } from '../../../../store/reducers/topic';
9
9
  import { cn } from '../../../../utils/cn';
@@ -11,7 +11,7 @@ import { DEFAULT_TABLE_SETTINGS } from '../../../../utils/constants';
11
11
  import { useTypedSelector } from '../../../../utils/hooks';
12
12
  import { isCdcStreamEntityType } from '../../utils/schema';
13
13
  import { ConsumersTopicStats } from './TopicStats';
14
- import { columns } from './columns';
14
+ import { CONSUMERS_COLUMNS_WIDTH_LS_KEY, columns } from './columns';
15
15
  import i18n from './i18n';
16
16
  import './Consumers.scss';
17
17
  const b = cn('ydb-diagnostics-consumers');
@@ -44,5 +44,5 @@ export const Consumers = ({ path, type }) => {
44
44
  if (!consumers || !consumers.length) {
45
45
  return _jsx("div", { children: i18n(`noConsumersMessage.${isCdcStream ? 'stream' : 'topic'}`) });
46
46
  }
47
- return (_jsxs("div", { className: b(), children: [_jsxs("div", { className: b('controls'), children: [_jsx(Search, { onChange: handleSearchChange, placeholder: i18n('controls.search'), className: b('search'), value: searchValue }), topic && _jsx(ConsumersTopicStats, { data: topic })] }), _jsx("div", { className: b('table-wrapper'), children: _jsx("div", { className: b('table-content'), children: _jsx(DataTable, { theme: "yandex-cloud", data: dataToRender, columns: columns, settings: DEFAULT_TABLE_SETTINGS, emptyDataMessage: i18n('table.emptyDataMessage') }) }) })] }));
47
+ return (_jsxs("div", { className: b(), children: [_jsxs("div", { className: b('controls'), children: [_jsx(Search, { onChange: handleSearchChange, placeholder: i18n('controls.search'), className: b('search'), value: searchValue }), topic && _jsx(ConsumersTopicStats, { data: topic })] }), _jsx("div", { className: b('table-wrapper'), children: _jsx("div", { className: b('table-content'), children: _jsx(ResizeableDataTable, { columnsWidthLSKey: CONSUMERS_COLUMNS_WIDTH_LS_KEY, wrapperClassName: b('table'), data: dataToRender, columns: columns, settings: DEFAULT_TABLE_SETTINGS, emptyDataMessage: i18n('table.emptyDataMessage') }) }) })] }));
48
48
  };
@@ -25,7 +25,9 @@
25
25
  overflow: auto;
26
26
 
27
27
  height: 100%;
28
+ }
28
29
 
30
+ &__table {
29
31
  @include freeze-nth-column(1);
30
32
  }
31
33
  }
@@ -1,4 +1,5 @@
1
1
  import type { Column } from '@gravity-ui/react-data-table';
2
2
  import type { IPreparedConsumerData } from '../../../../../types/store/topic';
3
3
  import './Columns.scss';
4
+ export declare const CONSUMERS_COLUMNS_WIDTH_LS_KEY = "consumersColumnsWidth";
4
5
  export declare const columns: Column<IPreparedConsumerData>[];
@@ -12,6 +12,7 @@ import { ReadLagsHeader } from '../Headers';
12
12
  import { CONSUMERS_COLUMNS_IDS, CONSUMERS_COLUMNS_TITILES, CONSUMERS_READ_LAGS_SUB_COLUMNS_IDS, CONSUMERS_READ_LAGS_SUB_COLUMNS_TITLES, } from '../utils/constants';
13
13
  import './Columns.scss';
14
14
  const b = cn('ydb-diagnostics-consumers-columns');
15
+ export const CONSUMERS_COLUMNS_WIDTH_LS_KEY = 'consumersColumnsWidth';
15
16
  export const columns = [
16
17
  {
17
18
  name: CONSUMERS_COLUMNS_IDS.CONSUMER,
@@ -31,6 +32,7 @@ export const columns = [
31
32
  name: CONSUMERS_COLUMNS_IDS.READ_SPEED,
32
33
  header: CONSUMERS_COLUMNS_TITILES[CONSUMERS_COLUMNS_IDS.READ_SPEED],
33
34
  align: DataTable.RIGHT,
35
+ resizeMinWidth: 140,
34
36
  sortAccessor: (row) => row.readSpeed.perMinute,
35
37
  render: ({ row }) => _jsx(SpeedMultiMeter, { data: row.readSpeed }),
36
38
  },
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import DataTable from '@gravity-ui/react-data-table';
4
4
  import { ResponseError } from '../../../../components/Errors/ResponseError';
5
5
  import { Icon } from '../../../../components/Icon';
6
+ import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
6
7
  import { setHotKeysData, setHotKeysDataWasNotLoaded, setHotKeysError, setHotKeysLoading, } from '../../../../store/reducers/hotKeys/hotKeys';
7
8
  import { cn } from '../../../../utils/cn';
8
9
  import { DEFAULT_TABLE_SETTINGS } from '../../../../utils/constants';
@@ -93,8 +94,8 @@ export function HotKeys({ path }) {
93
94
  if (!data) {
94
95
  return _jsx("div", { children: i18n('no-data') });
95
96
  }
96
- return (_jsx("div", { className: b('table-content'), children: _jsx(DataTable, { columns: tableColumns, data: data, settings: DEFAULT_TABLE_SETTINGS, theme: "yandex-cloud", initialSortOrder: {
97
- columnId: tableColumnsIds.accessSample,
98
- order: DataTable.DESCENDING,
99
- } }) }));
97
+ return (_jsx(ResizeableDataTable, { wrapperClassName: b('table'), columns: tableColumns, data: data, settings: DEFAULT_TABLE_SETTINGS, initialSortOrder: {
98
+ columnId: tableColumnsIds.accessSample,
99
+ order: DataTable.DESCENDING,
100
+ } }));
100
101
  }
@@ -1,11 +1,7 @@
1
1
  @import '../../../../styles/mixins.scss';
2
2
 
3
3
  .ydb-hot-keys {
4
- &__table-content {
5
- overflow: auto;
6
-
7
- width: 100%;
8
- height: 100%;
4
+ &__table {
9
5
  @include freeze-nth-column(1);
10
6
  }
11
7
 
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import DataTable from '@gravity-ui/react-data-table';
4
3
  import { skipToken } from '@reduxjs/toolkit/query';
5
4
  import { ResponseError } from '../../../../components/Errors/ResponseError';
5
+ import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
6
6
  import { TableSkeleton } from '../../../../components/TableSkeleton/TableSkeleton';
7
7
  import { nodesListApi, selectNodesMap } from '../../../../store/reducers/nodesList';
8
8
  import { partitionsApi, setSelectedConsumer } from '../../../../store/reducers/partitions/partitions';
@@ -11,6 +11,7 @@ import { cn } from '../../../../utils/cn';
11
11
  import { DEFAULT_TABLE_SETTINGS, PARTITIONS_HIDDEN_COLUMNS_KEY } from '../../../../utils/constants';
12
12
  import { useSetting, useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
13
13
  import { PartitionsControls } from './PartitionsControls/PartitionsControls';
14
+ import { PARTITIONS_COLUMNS_WIDTH_LS_KEY } from './columns';
14
15
  import i18n from './i18n';
15
16
  import { addHostToPartitions } from './utils';
16
17
  import { useGetPartitionsColumns } from './utils/useGetPartitionsColumns';
@@ -64,14 +65,17 @@ export const Partitions = ({ path }) => {
64
65
  };
65
66
  const loading = topicLoading || nodesLoading || partitionsLoading;
66
67
  const error = nodesError || topicError || partitionsError;
67
- const getContent = () => {
68
+ const renderControls = () => {
69
+ return (_jsx(PartitionsControls, { consumers: consumers, selectedConsumer: selectedConsumer, onSelectedConsumerChange: handleSelectedConsumerChange, selectDisabled: Boolean(error) || loading, partitions: partitionsWithHosts, onSearchChange: setPartitionsToRender, hiddenColumns: hiddenColumns, onHiddenColumnsChange: hadleTableColumnsSetupChange, initialColumnsIds: columnsIdsForSelector }));
70
+ };
71
+ const renderContent = () => {
68
72
  if (loading) {
69
73
  return _jsx(TableSkeleton, { className: b('loader') });
70
74
  }
71
75
  if (error) {
72
76
  return _jsx(ResponseError, { error: error });
73
77
  }
74
- return (_jsx(DataTable, { theme: "yandex-cloud", data: partitionsToRender, columns: columnsToShow, settings: DEFAULT_TABLE_SETTINGS, emptyDataMessage: i18n('table.emptyDataMessage') }));
78
+ return (_jsx(ResizeableDataTable, { columnsWidthLSKey: PARTITIONS_COLUMNS_WIDTH_LS_KEY, wrapperClassName: b('table'), data: partitionsToRender, columns: columnsToShow, settings: DEFAULT_TABLE_SETTINGS, emptyDataMessage: i18n('table.emptyDataMessage') }));
75
79
  };
76
- return (_jsxs("div", { className: b(), children: [_jsx(PartitionsControls, { consumers: consumers, selectedConsumer: selectedConsumer, onSelectedConsumerChange: handleSelectedConsumerChange, selectDisabled: Boolean(error) || loading, partitions: partitionsWithHosts, onSearchChange: setPartitionsToRender, hiddenColumns: hiddenColumns, onHiddenColumnsChange: hadleTableColumnsSetupChange, initialColumnsIds: columnsIdsForSelector }), _jsx("div", { className: b('table-wrapper'), children: _jsx("div", { className: b('table-content'), children: getContent() }) })] }));
80
+ return (_jsxs("div", { className: b(), children: [_jsx("div", { className: b('controls'), children: renderControls() }), _jsx("div", { className: b('table-wrapper'), children: _jsx("div", { className: b('table-content'), children: renderContent() }) })] }));
77
81
  };
@@ -39,7 +39,9 @@
39
39
  overflow: auto;
40
40
 
41
41
  height: 100%;
42
+ }
42
43
 
44
+ &__table {
43
45
  @include freeze-nth-column(1);
44
46
  }
45
47
  }