ydb-embedded-ui 21.1.0 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/dist/components/ComponentsProvider/ComponentsProvider.d.ts +0 -4
  2. package/dist/components/ComponentsProvider/componentsRegistry.d.ts +0 -2
  3. package/dist/components/ComponentsProvider/componentsRegistry.js +1 -3
  4. package/dist/components/ComponentsProvider/componentsRegistry.js.map +1 -1
  5. package/dist/components/ContentWithPopup/ContentWithPopup.d.ts +1 -1
  6. package/dist/components/ContentWithPopup/ContentWithPopup.js +4 -2
  7. package/dist/components/ContentWithPopup/ContentWithPopup.js.map +1 -1
  8. package/dist/components/FullNodeViewer/i18n/index.d.ts +1 -1
  9. package/dist/components/HoverPopup/HoverPopup.js +27 -4
  10. package/dist/components/HoverPopup/HoverPopup.js.map +1 -1
  11. package/dist/components/HoverPopup/getPopupScrollContainer.d.ts +1 -0
  12. package/dist/components/HoverPopup/getPopupScrollContainer.js +20 -0
  13. package/dist/components/HoverPopup/getPopupScrollContainer.js.map +1 -0
  14. package/dist/components/MetricChart/reducer.d.ts +2 -2
  15. package/dist/components/SegmentedProgress/SegmentedProgress.d.ts +22 -1
  16. package/dist/components/SegmentedProgress/SegmentedProgress.js +44 -3
  17. package/dist/components/SegmentedProgress/SegmentedProgress.js.map +1 -1
  18. package/dist/components/SegmentedProgress/SegmentedProgress.scss +5 -0
  19. package/dist/components/StorageGroupInfo/StorageGroupInfo.js +1 -13
  20. package/dist/components/StorageGroupInfo/StorageGroupInfo.js.map +1 -1
  21. package/dist/components/StorageGroupInfo/i18n/en.json +0 -1
  22. package/dist/components/StorageGroupInfo/i18n/index.d.ts +1 -1
  23. package/dist/components/nodesColumns/i18n/index.d.ts +1 -1
  24. package/dist/containers/App/App.js +3 -3
  25. package/dist/containers/App/App.js.map +1 -1
  26. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +8 -5
  27. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js.map +1 -1
  28. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +8 -0
  29. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.d.ts +4 -3
  30. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.js +62 -25
  31. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.js.map +1 -1
  32. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.scss +18 -0
  33. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/utils.d.ts +22 -0
  34. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/utils.js +49 -0
  35. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/utils.js.map +1 -0
  36. package/dist/containers/Cluster/i18n/en.json +13 -4
  37. package/dist/containers/Cluster/i18n/index.d.ts +1 -1
  38. package/dist/containers/Node/Node.js +20 -17
  39. package/dist/containers/Node/Node.js.map +1 -1
  40. package/dist/containers/Node/NodePages.d.ts +3 -9
  41. package/dist/containers/Node/NodePages.js +2 -10
  42. package/dist/containers/Node/NodePages.js.map +1 -1
  43. package/dist/containers/Node/i18n/en.json +0 -3
  44. package/dist/containers/Node/i18n/index.d.ts +1 -1
  45. package/dist/containers/Nodes/NodesTable.js +2 -2
  46. package/dist/containers/Nodes/NodesTable.js.map +1 -1
  47. package/dist/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.js +0 -1
  48. package/dist/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.js.map +1 -1
  49. package/dist/containers/Storage/PaginatedStorageGroupsTable/PaginatedStorageGroupsTable.js +2 -3
  50. package/dist/containers/Storage/PaginatedStorageGroupsTable/PaginatedStorageGroupsTable.js.map +1 -1
  51. package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/constants.d.ts +2 -2
  52. package/dist/containers/Storage/PaginatedStorageGroupsTable/getGroups.d.ts +1 -1
  53. package/dist/containers/Storage/PaginatedStorageGroupsTable/getGroups.js +2 -3
  54. package/dist/containers/Storage/PaginatedStorageGroupsTable/getGroups.js.map +1 -1
  55. package/dist/containers/StorageGroupPage/StorageGroupPage.js +2 -3
  56. package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
  57. package/dist/containers/Tenant/Diagnostics/Partitions/utils/constants.d.ts +2 -2
  58. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +1 -3
  59. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js.map +1 -1
  60. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/useTenantStorageNewData.d.ts +5 -5
  61. package/dist/containers/Tenant/Diagnostics/useDiagnosticsPages.js +2 -4
  62. package/dist/containers/Tenant/Diagnostics/useDiagnosticsPages.js.map +1 -1
  63. package/dist/routes.d.ts +1 -0
  64. package/dist/routes.js.map +1 -1
  65. package/dist/services/api/viewer.d.ts +1 -2
  66. package/dist/services/api/viewer.js +0 -11
  67. package/dist/services/api/viewer.js.map +1 -1
  68. package/dist/store/configureStore.d.ts +12 -12
  69. package/dist/store/defaultStore.d.ts +6 -6
  70. package/dist/store/reducers/api.d.ts +1 -1
  71. package/dist/store/reducers/api.js +3 -0
  72. package/dist/store/reducers/api.js.map +1 -1
  73. package/dist/store/reducers/authentication/authentication.d.ts +4 -4
  74. package/dist/store/reducers/cancelQuery.d.ts +2 -2
  75. package/dist/store/reducers/capabilities/capabilities.d.ts +43 -43
  76. package/dist/store/reducers/capabilities/hooks.d.ts +5 -6
  77. package/dist/store/reducers/capabilities/hooks.js +0 -3
  78. package/dist/store/reducers/capabilities/hooks.js.map +1 -1
  79. package/dist/store/reducers/cluster/cluster.d.ts +5 -5
  80. package/dist/store/reducers/cluster/cluster.js +3 -2
  81. package/dist/store/reducers/cluster/cluster.js.map +1 -1
  82. package/dist/store/reducers/clusters/clusters.d.ts +2 -2
  83. package/dist/store/reducers/clusters/clusters.js +2 -1
  84. package/dist/store/reducers/clusters/clusters.js.map +1 -1
  85. package/dist/store/reducers/codeAssist/codeAssist.d.ts +6 -6
  86. package/dist/store/reducers/configs.d.ts +3 -3
  87. package/dist/store/reducers/entityDataTags.d.ts +21 -0
  88. package/dist/store/reducers/entityDataTags.js +24 -0
  89. package/dist/store/reducers/entityDataTags.js.map +1 -0
  90. package/dist/store/reducers/environments/environments.d.ts +2 -2
  91. package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +4 -4
  92. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +111 -111
  93. package/dist/store/reducers/heatmap.d.ts +2 -2
  94. package/dist/store/reducers/hotKeys/hotKeys.d.ts +2 -2
  95. package/dist/store/reducers/index.d.ts +8 -8
  96. package/dist/store/reducers/network/network.d.ts +2 -2
  97. package/dist/store/reducers/node/node.d.ts +2 -5
  98. package/dist/store/reducers/node/node.js +0 -12
  99. package/dist/store/reducers/node/node.js.map +1 -1
  100. package/dist/store/reducers/node/types.d.ts +0 -14
  101. package/dist/store/reducers/nodes/nodes.d.ts +2 -2
  102. package/dist/store/reducers/nodesList.d.ts +12 -12
  103. package/dist/store/reducers/operations.d.ts +5 -5
  104. package/dist/store/reducers/overview/overview.d.ts +2 -2
  105. package/dist/store/reducers/partitions/partitions.d.ts +3 -3
  106. package/dist/store/reducers/pdisk/pdisk.d.ts +2 -2
  107. package/dist/store/reducers/planToSvg.d.ts +2 -2
  108. package/dist/store/reducers/preview.d.ts +2 -2
  109. package/dist/store/reducers/query/api.d.ts +4 -4
  110. package/dist/store/reducers/replication.d.ts +2 -2
  111. package/dist/store/reducers/schema/schema.d.ts +16 -16
  112. package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +40 -40
  113. package/dist/store/reducers/settings/api.d.ts +4 -4
  114. package/dist/store/reducers/settings/settings.d.ts +1 -1
  115. package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +2 -2
  116. package/dist/store/reducers/showCreateTable/showCreateTable.d.ts +2 -2
  117. package/dist/store/reducers/storage/requestStorageData.d.ts +2 -4
  118. package/dist/store/reducers/storage/requestStorageData.js +4 -10
  119. package/dist/store/reducers/storage/requestStorageData.js.map +1 -1
  120. package/dist/store/reducers/storage/storage.d.ts +4 -6
  121. package/dist/store/reducers/storage/storage.js.map +1 -1
  122. package/dist/store/reducers/storage/types.d.ts +0 -9
  123. package/dist/store/reducers/storage/utils.d.ts +1 -2
  124. package/dist/store/reducers/storage/utils.js +0 -111
  125. package/dist/store/reducers/storage/utils.js.map +1 -1
  126. package/dist/store/reducers/storageUsage/StorageUsage.d.ts +2 -2
  127. package/dist/store/reducers/streamingQuery/streamingQuery.d.ts +2 -2
  128. package/dist/store/reducers/table/table.d.ts +4 -4
  129. package/dist/store/reducers/tableData.d.ts +1 -1
  130. package/dist/store/reducers/tablePartitioning/tablePartitioning.d.ts +2 -2
  131. package/dist/store/reducers/tableSchemaData.d.ts +2 -2
  132. package/dist/store/reducers/tablet.d.ts +8 -8
  133. package/dist/store/reducers/tablets.d.ts +3 -3
  134. package/dist/store/reducers/tenant/tenant.d.ts +2 -2
  135. package/dist/store/reducers/tenant/tenant.js +14 -1
  136. package/dist/store/reducers/tenant/tenant.js.map +1 -1
  137. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +2 -2
  138. package/dist/store/reducers/tenantOverview/storage/tenantOverviewStorage.d.ts +2 -2
  139. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +2 -2
  140. package/dist/store/reducers/tenants/tenants.d.ts +3 -3
  141. package/dist/store/reducers/tenants/tenants.js +2 -1
  142. package/dist/store/reducers/tenants/tenants.js.map +1 -1
  143. package/dist/store/reducers/topic/topic.d.ts +84 -84
  144. package/dist/store/reducers/vdisk/vdisk.d.ts +3 -3
  145. package/dist/store/reducers/viewSchema/viewSchema.d.ts +2 -2
  146. package/dist/store/state-url-mapping.js +5 -1
  147. package/dist/store/state-url-mapping.js.map +1 -1
  148. package/dist/types/api/storage.d.ts +2 -111
  149. package/dist/types/api/storage.js.map +1 -1
  150. package/dist/uiFactory/types.d.ts +2 -0
  151. package/dist/utils/hooks/useWhoami.d.ts +5 -5
  152. package/package.json +1 -1
  153. package/src/components/ComponentsProvider/componentsRegistry.ts +1 -4
  154. package/src/components/ContentWithPopup/ContentWithPopup.tsx +7 -0
  155. package/src/components/HoverPopup/HoverPopup.tsx +32 -3
  156. package/src/components/HoverPopup/getPopupScrollContainer.ts +20 -0
  157. package/src/components/SegmentedProgress/SegmentedProgress.scss +5 -0
  158. package/src/components/SegmentedProgress/SegmentedProgress.tsx +99 -10
  159. package/src/components/StorageGroupInfo/StorageGroupInfo.tsx +0 -13
  160. package/src/components/StorageGroupInfo/i18n/en.json +0 -1
  161. package/src/containers/App/App.tsx +3 -3
  162. package/src/containers/Cluster/ClusterInfo/ClusterInfo.scss +8 -0
  163. package/src/containers/Cluster/ClusterInfo/ClusterInfo.tsx +12 -11
  164. package/src/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.scss +18 -0
  165. package/src/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.tsx +143 -58
  166. package/src/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/utils.ts +89 -0
  167. package/src/containers/Cluster/i18n/en.json +13 -4
  168. package/src/containers/Node/Node.tsx +32 -18
  169. package/src/containers/Node/NodePages.ts +5 -10
  170. package/src/containers/Node/i18n/en.json +0 -4
  171. package/src/containers/Nodes/NodesTable.tsx +7 -1
  172. package/src/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.tsx +0 -1
  173. package/src/containers/Storage/PaginatedStorageGroupsTable/PaginatedStorageGroupsTable.tsx +2 -6
  174. package/src/containers/Storage/PaginatedStorageGroupsTable/columns/constants.ts +2 -2
  175. package/src/containers/Storage/PaginatedStorageGroupsTable/getGroups.ts +40 -47
  176. package/src/containers/StorageGroupPage/StorageGroupPage.tsx +2 -6
  177. package/src/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.tsx +1 -6
  178. package/src/containers/Tenant/Diagnostics/useDiagnosticsPages.ts +1 -4
  179. package/src/routes.ts +1 -1
  180. package/src/services/api/viewer.ts +1 -25
  181. package/src/store/reducers/api.ts +4 -0
  182. package/src/store/reducers/capabilities/hooks.ts +0 -4
  183. package/src/store/reducers/cluster/cluster.ts +3 -2
  184. package/src/store/reducers/clusters/clusters.ts +2 -1
  185. package/src/store/reducers/entityDataTags.ts +34 -0
  186. package/src/store/reducers/node/node.ts +0 -11
  187. package/src/store/reducers/node/types.ts +0 -18
  188. package/src/store/reducers/storage/requestStorageData.ts +5 -17
  189. package/src/store/reducers/storage/storage.ts +2 -6
  190. package/src/store/reducers/storage/types.ts +0 -9
  191. package/src/store/reducers/storage/utils.ts +2 -175
  192. package/src/store/reducers/tenant/tenant.ts +17 -1
  193. package/src/store/reducers/tenants/tenants.ts +2 -1
  194. package/src/store/state-url-mapping.ts +5 -1
  195. package/src/types/api/storage.ts +7 -131
  196. package/src/uiFactory/types.ts +3 -0
  197. package/dist/containers/Node/NodeStructure/NodeStructure.d.ts +0 -7
  198. package/dist/containers/Node/NodeStructure/NodeStructure.js +0 -76
  199. package/dist/containers/Node/NodeStructure/NodeStructure.js.map +0 -1
  200. package/dist/containers/Node/NodeStructure/NodeStructure.scss +0 -155
  201. package/dist/containers/Node/NodeStructure/PDiskTitleBadge.d.ts +0 -7
  202. package/dist/containers/Node/NodeStructure/PDiskTitleBadge.js +0 -7
  203. package/dist/containers/Node/NodeStructure/PDiskTitleBadge.js.map +0 -1
  204. package/dist/containers/Node/NodeStructure/Pdisk.d.ts +0 -10
  205. package/dist/containers/Node/NodeStructure/Pdisk.js +0 -125
  206. package/dist/containers/Node/NodeStructure/Pdisk.js.map +0 -1
  207. package/dist/store/reducers/node/selectors.d.ts +0 -47
  208. package/dist/store/reducers/node/selectors.js +0 -43
  209. package/dist/store/reducers/node/selectors.js.map +0 -1
  210. package/src/containers/Node/NodeStructure/NodeStructure.scss +0 -155
  211. package/src/containers/Node/NodeStructure/NodeStructure.tsx +0 -121
  212. package/src/containers/Node/NodeStructure/PDiskTitleBadge.tsx +0 -18
  213. package/src/containers/Node/NodeStructure/Pdisk.tsx +0 -274
  214. package/src/store/reducers/node/selectors.ts +0 -68
@@ -1,9 +1,5 @@
1
1
  {
2
- "pdisk.developer-ui-button-title": "PDisk Developer UI page",
3
- "vdisk.developer-ui-button-title": "VDisk Developer UI page",
4
-
5
2
  "tabs.storage": "Storage",
6
- "tabs.structure": "Structure",
7
3
  "tabs.tablets": "Tablets",
8
4
  "tabs.threads": "Threads",
9
5
  "tabs.network": "Network",
@@ -2,7 +2,10 @@ import React from 'react';
2
2
 
3
3
  import type {PaginatedTableData} from '../../components/PaginatedTable';
4
4
  import {PAGINATED_TABLE_IDS, ResizeablePaginatedTable} from '../../components/PaginatedTable';
5
- import {NODES_COLUMNS_WIDTH_LS_KEY} from '../../components/nodesColumns/constants';
5
+ import {
6
+ NODES_COLUMNS_IDS,
7
+ NODES_COLUMNS_WIDTH_LS_KEY,
8
+ } from '../../components/nodesColumns/constants';
6
9
  import type {NodesColumn} from '../../components/nodesColumns/types';
7
10
  import {useClusterWithProxy} from '../../store/reducers/cluster/cluster';
8
11
  import type {NodesFilters} from '../../store/reducers/nodes/types';
@@ -94,6 +97,9 @@ export function NodesTable({
94
97
  columnsWidthLSKey={NODES_COLUMNS_WIDTH_LS_KEY}
95
98
  scrollContainerRef={scrollContainerRef}
96
99
  columns={columns}
100
+ rowHeight={
101
+ columns.some((column) => column.name === NODES_COLUMNS_IDS.PDisks) ? 51 : undefined
102
+ }
97
103
  fetchData={getNodes}
98
104
  initialEntitiesCount={initialEntitiesCount}
99
105
  renderErrorMessage={renderPaginatedTableErrorMessage}
@@ -112,7 +112,6 @@ export function GroupedStorageGroupsComponent({
112
112
  groupId,
113
113
  pDiskId,
114
114
  filter: groupsSearchValue.trim(),
115
- shouldUseGroupsHandler: true,
116
115
  group: storageGroupsGroupByParam,
117
116
  },
118
117
  {
@@ -3,10 +3,7 @@ import React from 'react';
3
3
  import {LoaderWrapper} from '../../../components/LoaderWrapper/LoaderWrapper';
4
4
  import type {RenderErrorMessage} from '../../../components/PaginatedTable';
5
5
  import {PAGINATED_TABLE_IDS, ResizeablePaginatedTable} from '../../../components/PaginatedTable';
6
- import {
7
- useCapabilitiesLoaded,
8
- useStorageGroupsHandlerAvailable,
9
- } from '../../../store/reducers/capabilities/hooks';
6
+ import {useCapabilitiesLoaded} from '../../../store/reducers/capabilities/hooks';
10
7
  import {VISIBLE_ENTITIES} from '../../../store/reducers/storage/constants';
11
8
  import type {VisibleEntities} from '../../../store/reducers/storage/types';
12
9
  import type {GroupsGroupByField} from '../../../types/api/storage';
@@ -65,9 +62,8 @@ export const PaginatedStorageGroupsTable = ({
65
62
  initialEntitiesCount,
66
63
  }: PaginatedStorageGroupsTableProps) => {
67
64
  const capabilitiesLoaded = useCapabilitiesLoaded();
68
- const groupsHandlerAvailable = useStorageGroupsHandlerAvailable();
69
65
 
70
- const fetchData = useGroupsGetter(groupsHandlerAvailable);
66
+ const fetchData = useGroupsGetter();
71
67
 
72
68
  const hasVDisksColumns = React.useMemo(() => {
73
69
  return columns.some((column) => columnsWithVDisks.has(column.name));
@@ -8,7 +8,7 @@ import {
8
8
  import type {
9
9
  GroupsGroupByField,
10
10
  GroupsRequiredField,
11
- StorageV2SortValue,
11
+ GroupsSortField,
12
12
  } from '../../../../types/api/storage';
13
13
  import type {ValueOf} from '../../../../types/common';
14
14
 
@@ -295,7 +295,7 @@ export const GROUPS_COLUMNS_TO_DATA_FIELDS: Record<StorageGroupsColumnId, Groups
295
295
 
296
296
  const STORAGE_GROUPS_COLUMNS_TO_SORT_FIELDS: Record<
297
297
  StorageGroupsColumnId,
298
- StorageV2SortValue | undefined
298
+ GroupsSortField | undefined
299
299
  > = {
300
300
  GroupId: 'GroupId',
301
301
  PoolName: 'PoolName',
@@ -13,53 +13,46 @@ import {GROUPS_COLUMNS_TO_DATA_FIELDS, getStorageGroupsColumnSortField} from './
13
13
 
14
14
  type GetStorageGroups = FetchData<PreparedStorageGroup, PreparedStorageGroupFilters>;
15
15
 
16
- export function useGroupsGetter(shouldUseGroupsHandler: boolean) {
17
- const fetchData: GetStorageGroups = React.useCallback(
18
- async (params) => {
19
- const {limit, offset, sortParams, filters, columnsIds} = params;
20
- const {sortOrder, columnId} = sortParams ?? {};
21
- const {
22
- searchValue,
23
- visibleEntities,
24
- database,
25
- nodeId,
26
- groupId,
27
- pDiskId,
28
- filterGroup,
29
- filterGroupBy,
30
- } = filters ?? {};
31
-
32
- const sortField = getStorageGroupsColumnSortField(columnId);
33
- const sort = sortField ? prepareSortValue(sortField, sortOrder) : undefined;
34
- const dataFieldsRequired = getRequiredDataFields(
35
- columnsIds,
36
- GROUPS_COLUMNS_TO_DATA_FIELDS,
37
- );
38
-
39
- const {groups, found, total} = await requestStorageData({
40
- limit,
41
- offset,
42
- sort,
43
- filter: searchValue?.trim(),
44
- with: visibleEntities,
45
- database,
46
- nodeId,
47
- groupId,
48
- pDiskId,
49
- filter_group: filterGroup,
50
- filter_group_by: filterGroupBy,
51
- fieldsRequired: dataFieldsRequired,
52
- shouldUseGroupsHandler,
53
- });
54
-
55
- return {
56
- data: groups || [],
57
- found: found || 0,
58
- total: total || 0,
59
- };
60
- },
61
- [shouldUseGroupsHandler],
62
- );
16
+ export function useGroupsGetter() {
17
+ const fetchData: GetStorageGroups = React.useCallback(async (params) => {
18
+ const {limit, offset, sortParams, filters, columnsIds} = params;
19
+ const {sortOrder, columnId} = sortParams ?? {};
20
+ const {
21
+ searchValue,
22
+ visibleEntities,
23
+ database,
24
+ nodeId,
25
+ groupId,
26
+ pDiskId,
27
+ filterGroup,
28
+ filterGroupBy,
29
+ } = filters ?? {};
30
+
31
+ const sortField = getStorageGroupsColumnSortField(columnId);
32
+ const sort = sortField ? prepareSortValue(sortField, sortOrder) : undefined;
33
+ const dataFieldsRequired = getRequiredDataFields(columnsIds, GROUPS_COLUMNS_TO_DATA_FIELDS);
34
+
35
+ const {groups, found, total} = await requestStorageData({
36
+ limit,
37
+ offset,
38
+ sort,
39
+ filter: searchValue?.trim(),
40
+ with: visibleEntities,
41
+ database,
42
+ nodeId,
43
+ groupId,
44
+ pDiskId,
45
+ filter_group: filterGroup,
46
+ filter_group_by: filterGroupBy,
47
+ fieldsRequired: dataFieldsRequired,
48
+ });
49
+
50
+ return {
51
+ data: groups || [],
52
+ found: found || 0,
53
+ total: total || 0,
54
+ };
55
+ }, []);
63
56
 
64
57
  return fetchData;
65
58
  }
@@ -9,10 +9,7 @@ import {ResponseError} from '../../components/Errors/ResponseError';
9
9
  import {InfoViewerSkeleton} from '../../components/InfoViewerSkeleton/InfoViewerSkeleton';
10
10
  import {PageMetaWithAutorefresh} from '../../components/PageMeta/PageMeta';
11
11
  import {StorageGroupInfo} from '../../components/StorageGroupInfo/StorageGroupInfo';
12
- import {
13
- useCapabilitiesLoaded,
14
- useStorageGroupsHandlerAvailable,
15
- } from '../../store/reducers/capabilities/hooks';
12
+ import {useCapabilitiesLoaded} from '../../store/reducers/capabilities/hooks';
16
13
  import {setHeaderBreadcrumbs} from '../../store/reducers/header/header';
17
14
  import {storageApi} from '../../store/reducers/storage/storage';
18
15
  import {EFlag} from '../../types/api/enums';
@@ -41,11 +38,10 @@ export function StorageGroupPage() {
41
38
  }, [dispatch, groupId, database]);
42
39
 
43
40
  const [autoRefreshInterval] = useAutoRefreshInterval();
44
- const shouldUseGroupsHandler = useStorageGroupsHandlerAvailable();
45
41
  const capabilitiesLoaded = useCapabilitiesLoaded();
46
42
  const groupQuery = storageApi.useGetStorageGroupsInfoQuery(
47
43
  valueIsDefined(groupId)
48
- ? {groupId, shouldUseGroupsHandler, with: 'all', fieldsRequired: 'all', database}
44
+ ? {groupId, with: 'all', fieldsRequired: 'all', database}
49
45
  : skipToken,
50
46
  {
51
47
  pollingInterval: autoRefreshInterval,
@@ -1,10 +1,7 @@
1
1
  import React from 'react';
2
2
 
3
3
  import {ResizeableDataTable} from '../../../../../components/ResizeableDataTable/ResizeableDataTable';
4
- import {
5
- useCapabilitiesLoaded,
6
- useStorageGroupsHandlerAvailable,
7
- } from '../../../../../store/reducers/capabilities/hooks';
4
+ import {useCapabilitiesLoaded} from '../../../../../store/reducers/capabilities/hooks';
8
5
  import {storageApi} from '../../../../../store/reducers/storage/storage';
9
6
  import type {GroupsRequiredField} from '../../../../../types/api/storage';
10
7
  import {
@@ -45,7 +42,6 @@ interface TopGroupsProps {
45
42
 
46
43
  export function TopGroups({tenant, capacityMetricsEnabled}: TopGroupsProps) {
47
44
  const capabilitiesLoaded = useCapabilitiesLoaded();
48
- const groupsHandlerAvailable = useStorageGroupsHandlerAvailable();
49
45
  const [autoRefreshInterval] = useAutoRefreshInterval();
50
46
 
51
47
  const {columns, fieldsRequired, sort} = React.useMemo(
@@ -59,7 +55,6 @@ export function TopGroups({tenant, capacityMetricsEnabled}: TopGroupsProps) {
59
55
  sort,
60
56
  with: 'all',
61
57
  limit: TENANT_OVERVIEW_TABLES_LIMIT,
62
- shouldUseGroupsHandler: groupsHandlerAvailable,
63
58
  fieldsRequired,
64
59
  },
65
60
  {
@@ -3,7 +3,6 @@ import React from 'react';
3
3
  import {
4
4
  useConfigAvailable,
5
5
  useNewStorageViewEnabled,
6
- useStorageGroupsHandlerAvailable,
7
6
  useStorageStatsAvailable,
8
7
  useTopicDataAvailable,
9
8
  } from '../../../store/reducers/capabilities/hooks';
@@ -42,10 +41,8 @@ export function useDiagnosticsPages({
42
41
 
43
42
  const hasConfigs = useConfigAvailable();
44
43
  const newStorageViewEnabled = useNewStorageViewEnabled();
45
- const storageGroupsAvailable = useStorageGroupsHandlerAvailable();
46
44
  const storageStatsAvailable = useStorageStatsAvailable();
47
- const hasStorageUsageCapabilities = storageGroupsAvailable && storageStatsAvailable;
48
- const hasStorageUsage = newStorageViewEnabled && hasStorageUsageCapabilities;
45
+ const hasStorageUsage = newStorageViewEnabled && storageStatsAvailable;
49
46
  const hasTopicData = useTopicDataAvailable();
50
47
  const isViewerUser = useIsViewerUser();
51
48
  const userPermissions = useUserPermissions();
package/src/routes.ts CHANGED
@@ -169,7 +169,7 @@ export function getStorageGroupPath(groupId: string | number, query: Query = {})
169
169
  }
170
170
 
171
171
  export function getDefaultNodePath(
172
- params: {id: string | number; activeTab?: NodeTab},
172
+ params: {id: string | number; activeTab?: NodeTab; environment?: string},
173
173
  query: NodePageQuery = {},
174
174
  options?: CreateHrefOptions,
175
175
  ) {
@@ -28,12 +28,7 @@ import type {
28
28
  import type {JsonRenderRequestParams, JsonRenderResponse} from '../../types/api/render';
29
29
  import type {DescribeReplicationResult} from '../../types/api/replication';
30
30
  import type {TEvDescribeSchemeResult} from '../../types/api/schema';
31
- import type {
32
- StorageRequestParams,
33
- StorageStatsRequestParams,
34
- StorageStatsResponse,
35
- TStorageInfo,
36
- } from '../../types/api/storage';
31
+ import type {StorageStatsRequestParams, StorageStatsResponse} from '../../types/api/storage';
37
32
  import type {TEvSystemStateResponse} from '../../types/api/systemState';
38
33
  import type {
39
34
  TDomainKey,
@@ -524,25 +519,6 @@ export class ViewerAPI extends BaseYdbAPI {
524
519
  );
525
520
  }
526
521
 
527
- getStorageInfo(
528
- {database, nodeId, groupId, pDiskId, filter, ...params}: StorageRequestParams,
529
- {concurrentId, signal}: AxiosOptions = {},
530
- ) {
531
- return this.get<TStorageInfo>(
532
- this.getPath(`/viewer/json/storage?enums=true`),
533
- {
534
- database,
535
- node_id: nodeId,
536
- group_id: groupId,
537
- pdisk_id: pDiskId,
538
- // Do not send empty string
539
- filter: filter || undefined,
540
- ...params,
541
- },
542
- {concurrentId, requestConfig: {signal}},
543
- );
544
- }
545
-
546
522
  getStorageStats(
547
523
  {
548
524
  database,
@@ -1,6 +1,8 @@
1
1
  import type {BaseQueryFn} from '@reduxjs/toolkit/query';
2
2
  import {createApi} from '@reduxjs/toolkit/query/react';
3
3
 
4
+ import {CLUSTER_DATA_TAG, DATABASE_DATA_TAG} from './entityDataTags';
5
+
4
6
  export const api = createApi({
5
7
  baseQuery: fakeBaseQuery(),
6
8
  /**
@@ -27,6 +29,8 @@ export const api = createApi({
27
29
  'Backups',
28
30
  'BackupsSchedule',
29
31
  'OperationList',
32
+ DATABASE_DATA_TAG,
33
+ CLUSTER_DATA_TAG,
30
34
  ],
31
35
  });
32
36
 
@@ -81,10 +81,6 @@ export const useTracingLevelOptionAvailable = () => {
81
81
  return useGetFeatureVersion('/viewer/query') > 2;
82
82
  };
83
83
 
84
- export const useStorageGroupsHandlerAvailable = () => {
85
- return useGetFeatureVersion('/storage/groups') > 2;
86
- };
87
-
88
84
  export const useStorageStatsAvailable = () => {
89
85
  return useGetFeatureVersion('/viewer/storage_stats') > 0;
90
86
  };
@@ -13,6 +13,7 @@ import {useIsViewerUser} from '../../../utils/hooks/useIsUserAllowedToMakeChange
13
13
  import {isQueryErrorResponse} from '../../../utils/query';
14
14
  import type {RootState} from '../../defaultStore';
15
15
  import {api} from '../api';
16
+ import {getClusterDataTag} from '../entityDataTags';
16
17
  import {selectNodesMap} from '../nodesList';
17
18
 
18
19
  import {
@@ -117,7 +118,7 @@ export const clusterApi = api.injectEndpoints({
117
118
  return {error};
118
119
  }
119
120
  },
120
- providesTags: ['All'],
121
+ providesTags: (_result, _error, clusterName) => ['All', getClusterDataTag(clusterName)],
121
122
  }),
122
123
  getClusterBaseInfo: builder.query({
123
124
  queryFn: async (clusterName: string, {signal}) => {
@@ -131,7 +132,7 @@ export const clusterApi = api.injectEndpoints({
131
132
  return {error};
132
133
  }
133
134
  },
134
- providesTags: ['All'],
135
+ providesTags: (_result, _error, clusterName) => ['All', getClusterDataTag(clusterName)],
135
136
  }),
136
137
  }),
137
138
  overrideExisting: 'throw',
@@ -2,6 +2,7 @@ import {createSlice} from '@reduxjs/toolkit';
2
2
  import type {PayloadAction} from '@reduxjs/toolkit';
3
3
 
4
4
  import {api} from '../api';
5
+ import {CLUSTER_DATA_LIST_TAG} from '../entityDataTags';
5
6
 
6
7
  import type {ClustersFilters} from './types';
7
8
  import {prepareClustersData} from './utils';
@@ -43,7 +44,7 @@ export const clustersApi = api.injectEndpoints({
43
44
  return {error};
44
45
  }
45
46
  },
46
- providesTags: ['All'],
47
+ providesTags: ['All', CLUSTER_DATA_LIST_TAG],
47
48
  }),
48
49
  }),
49
50
  overrideExisting: 'throw',
@@ -0,0 +1,34 @@
1
+ export const DATABASE_DATA_TAG = 'DatabaseData';
2
+ export const CLUSTER_DATA_TAG = 'ClusterData';
3
+
4
+ const ENTITY_DATA_LIST_TAG_ID = 'LIST';
5
+
6
+ export const DATABASE_DATA_LIST_TAG = {
7
+ type: DATABASE_DATA_TAG,
8
+ id: ENTITY_DATA_LIST_TAG_ID,
9
+ } as const;
10
+
11
+ export const CLUSTER_DATA_LIST_TAG = {
12
+ type: CLUSTER_DATA_TAG,
13
+ id: ENTITY_DATA_LIST_TAG_ID,
14
+ } as const;
15
+
16
+ export function getDatabaseDataTag({
17
+ clusterName,
18
+ database,
19
+ }: {
20
+ clusterName?: string;
21
+ database: string;
22
+ }) {
23
+ return {
24
+ type: DATABASE_DATA_TAG,
25
+ id: JSON.stringify([clusterName ?? null, database]),
26
+ } as const;
27
+ }
28
+
29
+ export function getClusterDataTag(clusterName?: string) {
30
+ return {
31
+ type: CLUSTER_DATA_TAG,
32
+ id: JSON.stringify(clusterName ?? null),
33
+ } as const;
34
+ }
@@ -15,17 +15,6 @@ export const nodeApi = api.injectEndpoints({
15
15
  },
16
16
  providesTags: ['All'],
17
17
  }),
18
- getNodeStructure: build.query({
19
- queryFn: async ({nodeId}: {nodeId: string}, {signal}) => {
20
- try {
21
- const data = await window.api.viewer.getStorageInfo({nodeId}, {signal});
22
- return {data};
23
- } catch (error) {
24
- return {error};
25
- }
26
- },
27
- providesTags: ['All'],
28
- }),
29
18
  }),
30
19
  overrideExisting: 'throw',
31
20
  });
@@ -1,21 +1,3 @@
1
- import type {PreparedPDisk, PreparedVDisk} from '../../../utils/disks/types';
2
1
  import type {PreparedNodeSystemState} from '../../../utils/nodes';
3
2
 
4
- interface RawStructurePDisk extends PreparedPDisk {
5
- vDisks: Record<string, PreparedVDisk>;
6
- }
7
-
8
- export type RawNodeStructure = Record<string, RawStructurePDisk>;
9
-
10
- export interface PreparedStructureVDisk extends PreparedVDisk {
11
- id: string;
12
- order: number;
13
- }
14
-
15
- export interface PreparedStructurePDisk extends PreparedPDisk {
16
- vDisks: PreparedStructureVDisk[];
17
- }
18
-
19
- export type PreparedNodeStructure = Record<string, PreparedStructurePDisk>;
20
-
21
3
  export interface PreparedNode extends Partial<PreparedNodeSystemState> {}
@@ -1,21 +1,9 @@
1
1
  import type {AxiosOptions} from '../../../services/api/base';
2
- import type {GroupsRequestParams, StorageRequestParams} from '../../../types/api/storage';
2
+ import type {GroupsRequestParams} from '../../../types/api/storage';
3
3
 
4
- import {prepareGroupsResponse, prepareStorageResponse} from './utils';
4
+ import {prepareGroupsResponse} from './utils';
5
5
 
6
- export async function requestStorageData(
7
- {
8
- version = 'v2',
9
- shouldUseGroupsHandler,
10
- ...params
11
- }: StorageRequestParams & GroupsRequestParams & {shouldUseGroupsHandler?: boolean},
12
- options?: AxiosOptions,
13
- ) {
14
- if (shouldUseGroupsHandler && version !== 'v1') {
15
- const result = await window.api.storage.getStorageGroups({...params}, options);
16
- return prepareGroupsResponse(result);
17
- } else {
18
- const result = await window.api.viewer.getStorageInfo({version, ...params}, options);
19
- return prepareStorageResponse(result);
20
- }
6
+ export async function requestStorageData(params: GroupsRequestParams, options?: AxiosOptions) {
7
+ const result = await window.api.storage.getStorageGroups(params, options);
8
+ return prepareGroupsResponse(result);
21
9
  }
@@ -1,5 +1,5 @@
1
1
  import type {NodesRequestParams} from '../../../types/api/nodes';
2
- import type {GroupsRequestParams, StorageRequestParams} from '../../../types/api/storage';
2
+ import type {GroupsRequestParams} from '../../../types/api/storage';
3
3
  import {api} from '../api';
4
4
 
5
5
  import {requestStorageData} from './requestStorageData';
@@ -22,11 +22,7 @@ export const storageApi = api.injectEndpoints({
22
22
  providesTags: ['All', 'StorageData'],
23
23
  }),
24
24
  getStorageGroupsInfo: builder.query({
25
- queryFn: async (
26
- params: StorageRequestParams &
27
- GroupsRequestParams & {shouldUseGroupsHandler?: boolean},
28
- {signal},
29
- ) => {
25
+ queryFn: async (params: GroupsRequestParams, {signal}) => {
30
26
  try {
31
27
  const result = await requestStorageData(params, {signal});
32
28
  return {data: result};
@@ -83,16 +83,7 @@ export interface PreparedStorageGroup {
83
83
  VDisks?: PreparedVDisk[];
84
84
 
85
85
  Kind?: string;
86
- ChangeTime?: number | string;
87
86
  GroupGeneration?: string;
88
- Latency?: EFlag;
89
- AcquiredUnits?: string;
90
- AcquiredIOPS?: number;
91
- AcquiredThroughput?: string;
92
- AcquiredSize?: string;
93
- MaximumIOPS?: number;
94
- MaximumThroughput?: string;
95
- MaximumSize?: string;
96
87
 
97
88
  AllocationUnits?: string | number;
98
89
  GroupSizeInUnits?: number;