ydb-embedded-ui 6.21.0 → 6.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (459) hide show
  1. package/dist/components/AutoRefreshControl/i18n/index.d.ts +1 -1
  2. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.d.ts +2 -1
  3. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js +2 -2
  4. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js.map +1 -1
  5. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +4 -0
  6. package/dist/components/GroupInfo/i18n/index.d.ts +1 -1
  7. package/dist/components/PDiskInfo/PDiskInfo.js +1 -3
  8. package/dist/components/PDiskInfo/PDiskInfo.js.map +1 -1
  9. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  10. package/dist/components/PDiskPopup/PDiskPopup.d.ts +2 -4
  11. package/dist/components/PDiskPopup/PDiskPopup.js +10 -5
  12. package/dist/components/PDiskPopup/PDiskPopup.js.map +1 -1
  13. package/dist/components/PaginatedTable/PaginatedTable.d.ts +2 -1
  14. package/dist/components/PaginatedTable/PaginatedTable.js +9 -7
  15. package/dist/components/PaginatedTable/PaginatedTable.js.map +1 -1
  16. package/dist/components/PaginatedTable/TableChunk.d.ts +2 -1
  17. package/dist/components/PaginatedTable/TableChunk.js +5 -2
  18. package/dist/components/PaginatedTable/TableChunk.js.map +1 -1
  19. package/dist/components/QueryResultTable/Cell/Cell.js +1 -4
  20. package/dist/components/QueryResultTable/Cell/Cell.js.map +1 -1
  21. package/dist/components/QueryResultTable/QueryResultTable.js +11 -16
  22. package/dist/components/QueryResultTable/QueryResultTable.js.map +1 -1
  23. package/dist/components/QueryResultTable/utils/getColumnWidth.d.ts +7 -0
  24. package/dist/components/QueryResultTable/utils/getColumnWidth.js +16 -0
  25. package/dist/components/QueryResultTable/utils/getColumnWidth.js.map +1 -0
  26. package/dist/components/QueryResultTable/utils/getColumnWidth.test.d.ts +1 -0
  27. package/dist/components/QueryResultTable/utils/getColumnWidth.test.js +32 -0
  28. package/dist/components/QueryResultTable/utils/getColumnWidth.test.js.map +1 -0
  29. package/dist/components/StorageGroupInfo/StorageGroupInfo.js +7 -7
  30. package/dist/components/StorageGroupInfo/StorageGroupInfo.js.map +1 -1
  31. package/dist/components/StorageGroupInfo/i18n/index.d.ts +1 -1
  32. package/dist/components/TableSkeleton/TableSkeleton.d.ts +2 -1
  33. package/dist/components/TableSkeleton/TableSkeleton.js +5 -1
  34. package/dist/components/TableSkeleton/TableSkeleton.js.map +1 -1
  35. package/dist/components/TableSkeleton/TableSkeleton.scss +7 -1
  36. package/dist/components/VDisk/VDisk.d.ts +2 -3
  37. package/dist/components/VDisk/VDisk.js +2 -2
  38. package/dist/components/VDisk/VDisk.js.map +1 -1
  39. package/dist/components/VDiskInfo/VDiskInfo.js +1 -3
  40. package/dist/components/VDiskInfo/VDiskInfo.js.map +1 -1
  41. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
  42. package/dist/components/VDiskPopup/VDiskPopup.d.ts +1 -3
  43. package/dist/components/VDiskPopup/VDiskPopup.js +7 -2
  44. package/dist/components/VDiskPopup/VDiskPopup.js.map +1 -1
  45. package/dist/containers/App/App.scss +1 -1
  46. package/dist/containers/Cluster/Cluster.js +1 -1
  47. package/dist/containers/Cluster/Cluster.js.map +1 -1
  48. package/dist/containers/Cluster/Cluster.scss +2 -3
  49. package/dist/containers/Cluster/i18n/index.d.ts +1 -1
  50. package/dist/containers/Clusters/Clusters.js +3 -3
  51. package/dist/containers/Clusters/Clusters.js.map +1 -1
  52. package/dist/containers/Clusters/columns.js +2 -2
  53. package/dist/containers/Clusters/columns.js.map +1 -1
  54. package/dist/containers/Clusters/constants.d.ts +4 -4
  55. package/dist/containers/Clusters/constants.js +3 -3
  56. package/dist/containers/Clusters/constants.js.map +1 -1
  57. package/dist/containers/Header/breadcrumbs.js +2 -3
  58. package/dist/containers/Header/breadcrumbs.js.map +1 -1
  59. package/dist/containers/Node/Node.js +14 -4
  60. package/dist/containers/Node/Node.js.map +1 -1
  61. package/dist/containers/Node/NodePages.js +4 -5
  62. package/dist/containers/Node/NodePages.js.map +1 -1
  63. package/dist/containers/Nodes/Nodes.js +10 -11
  64. package/dist/containers/Nodes/Nodes.js.map +1 -1
  65. package/dist/containers/Nodes/PaginatedNodes.js +10 -11
  66. package/dist/containers/Nodes/PaginatedNodes.js.map +1 -1
  67. package/dist/containers/Nodes/{getNodesColumns.d.ts → columns/columns.d.ts} +3 -10
  68. package/dist/containers/Nodes/{getNodesColumns.js → columns/columns.js} +37 -39
  69. package/dist/containers/Nodes/columns/columns.js.map +1 -0
  70. package/dist/containers/Nodes/columns/constants.d.ts +41 -0
  71. package/dist/containers/Nodes/columns/constants.js +83 -0
  72. package/dist/containers/Nodes/columns/constants.js.map +1 -0
  73. package/dist/containers/Nodes/columns/hooks.d.ts +6 -0
  74. package/dist/containers/Nodes/columns/hooks.js +11 -0
  75. package/dist/containers/Nodes/columns/hooks.js.map +1 -0
  76. package/dist/containers/Nodes/columns/i18n/en.json +17 -0
  77. package/dist/containers/Nodes/columns/i18n/index.d.ts +2 -0
  78. package/dist/containers/Nodes/columns/i18n/index.js +5 -0
  79. package/dist/containers/Nodes/columns/i18n/index.js.map +1 -0
  80. package/dist/containers/Nodes/columns/types.d.ts +9 -0
  81. package/dist/containers/Nodes/columns/types.js +2 -0
  82. package/dist/containers/Nodes/columns/types.js.map +1 -0
  83. package/dist/containers/Nodes/getNodes.d.ts +3 -2
  84. package/dist/containers/Nodes/getNodes.js +6 -3
  85. package/dist/containers/Nodes/getNodes.js.map +1 -1
  86. package/dist/containers/PDiskPage/PDiskPage.js +12 -10
  87. package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
  88. package/dist/containers/PDiskPage/PDiskPage.scss +14 -14
  89. package/dist/containers/PDiskPage/i18n/en.json +1 -1
  90. package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
  91. package/dist/containers/ReduxTooltip/ReduxTooltip.js +7 -7
  92. package/dist/containers/ReduxTooltip/ReduxTooltip.js.map +1 -1
  93. package/dist/containers/Storage/Disks/Disks.d.ts +3 -3
  94. package/dist/containers/Storage/Disks/Disks.js +6 -7
  95. package/dist/containers/Storage/Disks/Disks.js.map +1 -1
  96. package/dist/containers/Storage/PDisk/PDisk.d.ts +5 -4
  97. package/dist/containers/Storage/PDisk/PDisk.js +3 -2
  98. package/dist/containers/Storage/PDisk/PDisk.js.map +1 -1
  99. package/dist/containers/Storage/PDisk/PDisk.scss +1 -1
  100. package/dist/containers/Storage/PaginatedStorage.d.ts +5 -6
  101. package/dist/containers/Storage/PaginatedStorage.js +9 -54
  102. package/dist/containers/Storage/PaginatedStorage.js.map +1 -1
  103. package/dist/containers/Storage/PaginatedStorageGroups.d.ts +3 -0
  104. package/dist/containers/Storage/PaginatedStorageGroups.js +84 -0
  105. package/dist/containers/Storage/PaginatedStorageGroups.js.map +1 -0
  106. package/dist/containers/Storage/PaginatedStorageNodes.d.ts +3 -0
  107. package/dist/containers/Storage/PaginatedStorageNodes.js +98 -0
  108. package/dist/containers/Storage/PaginatedStorageNodes.js.map +1 -0
  109. package/dist/containers/Storage/Storage.d.ts +4 -4
  110. package/dist/containers/Storage/Storage.js +46 -67
  111. package/dist/containers/Storage/Storage.js.map +1 -1
  112. package/dist/containers/Storage/Storage.scss +4 -0
  113. package/dist/containers/Storage/StorageControls/StorageControls.d.ts +6 -16
  114. package/dist/containers/Storage/StorageControls/StorageControls.js +18 -9
  115. package/dist/containers/Storage/StorageControls/StorageControls.js.map +1 -1
  116. package/dist/containers/Storage/StorageGroups/PaginatedStorageGroupsTable.d.ts +22 -0
  117. package/dist/containers/Storage/StorageGroups/{PaginatedStorageGroups.js → PaginatedStorageGroupsTable.js} +24 -8
  118. package/dist/containers/Storage/StorageGroups/PaginatedStorageGroupsTable.js.map +1 -0
  119. package/dist/containers/Storage/StorageGroups/StorageGroupsTable.d.ts +14 -0
  120. package/dist/containers/Storage/StorageGroups/{StorageGroups.js → StorageGroupsTable.js} +5 -6
  121. package/dist/containers/Storage/StorageGroups/StorageGroupsTable.js.map +1 -0
  122. package/dist/containers/Storage/StorageGroups/columns/columns.d.ts +4 -0
  123. package/dist/containers/Storage/StorageGroups/columns/{getStorageGroupsColumns.js → columns.js} +66 -89
  124. package/dist/containers/Storage/StorageGroups/columns/columns.js.map +1 -0
  125. package/dist/containers/Storage/StorageGroups/columns/constants.d.ts +54 -0
  126. package/dist/containers/Storage/StorageGroups/columns/constants.js +120 -0
  127. package/dist/containers/Storage/StorageGroups/columns/constants.js.map +1 -0
  128. package/dist/containers/Storage/StorageGroups/columns/hooks.d.ts +7 -3
  129. package/dist/containers/Storage/StorageGroups/columns/hooks.js +21 -16
  130. package/dist/containers/Storage/StorageGroups/columns/hooks.js.map +1 -1
  131. package/dist/containers/Storage/StorageGroups/columns/i18n/en.json +21 -0
  132. package/dist/containers/Storage/StorageGroups/columns/i18n/index.d.ts +2 -0
  133. package/dist/containers/Storage/StorageGroups/columns/i18n/index.js +5 -0
  134. package/dist/containers/Storage/StorageGroups/columns/i18n/index.js.map +1 -0
  135. package/dist/containers/Storage/StorageGroups/columns/types.d.ts +5 -7
  136. package/dist/containers/Storage/StorageGroups/getGroups.js +10 -6
  137. package/dist/containers/Storage/StorageGroups/getGroups.js.map +1 -1
  138. package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.d.ts +23 -0
  139. package/dist/containers/Storage/StorageNodes/{PaginatedStorageNodes.js → PaginatedStorageNodesTable.js} +24 -9
  140. package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.js.map +1 -0
  141. package/dist/containers/Storage/StorageNodes/StorageNodes.scss +1 -27
  142. package/dist/containers/Storage/StorageNodes/StorageNodesTable.d.ts +16 -0
  143. package/dist/containers/Storage/StorageNodes/{StorageNodes.js → StorageNodesTable.js} +9 -9
  144. package/dist/containers/Storage/StorageNodes/StorageNodesTable.js.map +1 -0
  145. package/dist/containers/Storage/StorageNodes/columns/StorageNodesColumns.scss +24 -0
  146. package/dist/containers/Storage/StorageNodes/columns/columns.d.ts +39 -0
  147. package/dist/containers/Storage/StorageNodes/{getStorageNodesColumns.js → columns/columns.js} +20 -31
  148. package/dist/containers/Storage/StorageNodes/columns/columns.js.map +1 -0
  149. package/dist/containers/Storage/StorageNodes/columns/constants.d.ts +34 -0
  150. package/dist/containers/Storage/StorageNodes/columns/constants.js +74 -0
  151. package/dist/containers/Storage/StorageNodes/columns/constants.js.map +1 -0
  152. package/dist/containers/Storage/StorageNodes/columns/hooks.d.ts +43 -0
  153. package/dist/containers/Storage/StorageNodes/columns/hooks.js +18 -0
  154. package/dist/containers/Storage/StorageNodes/columns/hooks.js.map +1 -0
  155. package/dist/containers/Storage/StorageNodes/columns/i18n/en.json +11 -0
  156. package/dist/containers/Storage/StorageNodes/columns/i18n/index.d.ts +2 -0
  157. package/dist/containers/Storage/StorageNodes/columns/i18n/index.js +5 -0
  158. package/dist/containers/Storage/StorageNodes/columns/i18n/index.js.map +1 -0
  159. package/dist/containers/Storage/StorageNodes/columns/types.d.ts +11 -0
  160. package/dist/containers/Storage/StorageNodes/columns/types.js +2 -0
  161. package/dist/containers/Storage/StorageNodes/columns/types.js.map +1 -0
  162. package/dist/containers/Storage/StorageNodes/getNodes.d.ts +2 -2
  163. package/dist/containers/Storage/StorageNodes/getNodes.js +13 -9
  164. package/dist/containers/Storage/StorageNodes/getNodes.js.map +1 -1
  165. package/dist/containers/Storage/StorageNodes/shared.js +1 -1
  166. package/dist/containers/Storage/StorageNodes/shared.js.map +1 -1
  167. package/dist/containers/Storage/StorageWrapper.d.ts +0 -2
  168. package/dist/containers/Storage/StorageWrapper.js.map +1 -1
  169. package/dist/containers/Storage/TableGroup/TableGroup.d.ts +12 -0
  170. package/dist/containers/Storage/TableGroup/TableGroup.js +21 -0
  171. package/dist/containers/Storage/TableGroup/TableGroup.js.map +1 -0
  172. package/dist/containers/Storage/TableGroup/TableGroup.scss +49 -0
  173. package/dist/containers/Storage/TableGroup/useExpandedTableGroups.d.ts +5 -0
  174. package/dist/containers/Storage/TableGroup/useExpandedTableGroups.js +28 -0
  175. package/dist/containers/Storage/TableGroup/useExpandedTableGroups.js.map +1 -0
  176. package/dist/containers/Storage/i18n/en.json +4 -1
  177. package/dist/containers/Storage/i18n/index.d.ts +1 -1
  178. package/dist/containers/Storage/i18n/index.js +1 -2
  179. package/dist/containers/Storage/i18n/index.js.map +1 -1
  180. package/dist/containers/Storage/shared.d.ts +2 -0
  181. package/dist/containers/Storage/shared.js +9 -0
  182. package/dist/containers/Storage/shared.js.map +1 -1
  183. package/dist/containers/Storage/useStorageQueryParams.d.ts +18 -0
  184. package/dist/containers/Storage/useStorageQueryParams.js +64 -0
  185. package/dist/containers/Storage/useStorageQueryParams.js.map +1 -0
  186. package/dist/containers/Storage/utils/index.d.ts +6 -2
  187. package/dist/containers/Storage/utils/index.js +17 -11
  188. package/dist/containers/Storage/utils/index.js.map +1 -1
  189. package/dist/containers/StorageGroupPage/StorageGroupPage.js +14 -57
  190. package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
  191. package/dist/containers/StorageGroupPage/StorageGroupPage.scss +14 -17
  192. package/dist/containers/StorageGroupPage/i18n/en.json +1 -2
  193. package/dist/containers/StorageGroupPage/i18n/index.d.ts +1 -1
  194. package/dist/containers/Tablets/i18n/index.d.ts +1 -1
  195. package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +17 -3
  196. package/dist/containers/Tenant/Diagnostics/Describe/Describe.js.map +1 -1
  197. package/dist/containers/Tenant/Diagnostics/Diagnostics.js +1 -1
  198. package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
  199. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +6 -3
  200. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +4 -4
  201. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js.map +1 -1
  202. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +10 -3
  203. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js.map +1 -1
  204. package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +2 -3
  205. package/dist/containers/Tenant/Diagnostics/Overview/Overview.js.map +1 -1
  206. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +4 -4
  207. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js.map +1 -1
  208. package/dist/containers/Tenant/Diagnostics/Partitions/utils/index.d.ts +2 -2
  209. package/dist/containers/Tenant/Diagnostics/Partitions/utils/index.js +5 -5
  210. package/dist/containers/Tenant/Diagnostics/Partitions/utils/index.js.map +1 -1
  211. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +12 -5
  212. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js.map +1 -1
  213. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js +12 -5
  214. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js.map +1 -1
  215. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +13 -5
  216. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js.map +1 -1
  217. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +8 -2
  218. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js.map +1 -1
  219. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +2 -1
  220. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js.map +1 -1
  221. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  222. package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.d.ts +5 -0
  223. package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js +21 -0
  224. package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js.map +1 -0
  225. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.d.ts +1 -3
  226. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +32 -37
  227. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js.map +1 -1
  228. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.d.ts +6 -0
  229. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js +33 -0
  230. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js.map +1 -0
  231. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.d.ts +2 -0
  232. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js +26 -0
  233. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js.map +1 -1
  234. package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/en.json +7 -1
  235. package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/index.d.ts +1 -1
  236. package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/index.js +1 -2
  237. package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/index.js.map +1 -1
  238. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +71 -62
  239. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js.map +1 -1
  240. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +6 -7
  241. package/dist/containers/Tenant/ObjectSummary/ObjectTree.d.ts +6 -0
  242. package/dist/containers/Tenant/ObjectSummary/ObjectTree.js +25 -0
  243. package/dist/containers/Tenant/ObjectSummary/ObjectTree.js.map +1 -0
  244. package/dist/containers/Tenant/ObjectSummary/SchemaActions.d.ts +1 -0
  245. package/dist/containers/Tenant/ObjectSummary/SchemaActions.js +18 -0
  246. package/dist/containers/Tenant/ObjectSummary/SchemaActions.js.map +1 -0
  247. package/dist/containers/Tenant/ObjectSummary/__test__/transformPath.test.js +27 -3
  248. package/dist/containers/Tenant/ObjectSummary/__test__/transformPath.test.js.map +1 -1
  249. package/dist/containers/Tenant/ObjectSummary/i18n/en.json +21 -0
  250. package/dist/containers/Tenant/ObjectSummary/i18n/index.d.ts +2 -0
  251. package/dist/containers/Tenant/ObjectSummary/i18n/index.js +5 -0
  252. package/dist/containers/Tenant/ObjectSummary/i18n/index.js.map +1 -0
  253. package/dist/containers/Tenant/ObjectSummary/shared.d.ts +1 -0
  254. package/dist/containers/Tenant/ObjectSummary/shared.js +3 -0
  255. package/dist/containers/Tenant/ObjectSummary/shared.js.map +1 -0
  256. package/dist/containers/Tenant/ObjectSummary/transformPath.d.ts +2 -0
  257. package/dist/containers/Tenant/ObjectSummary/transformPath.js +10 -0
  258. package/dist/containers/Tenant/ObjectSummary/transformPath.js.map +1 -1
  259. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +14 -12
  260. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js.map +1 -1
  261. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +8 -0
  262. package/dist/containers/Tenant/Query/ExecuteResult/i18n/en.json +3 -1
  263. package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +1 -1
  264. package/dist/containers/Tenant/Query/NewSQL/NewSQL.d.ts +1 -0
  265. package/dist/containers/Tenant/Query/NewSQL/NewSQL.js +135 -0
  266. package/dist/containers/Tenant/Query/NewSQL/NewSQL.js.map +1 -0
  267. package/dist/containers/Tenant/Query/NewSQL/i18n/en.json +32 -0
  268. package/dist/containers/Tenant/Query/NewSQL/i18n/index.d.ts +2 -0
  269. package/dist/containers/Tenant/Query/NewSQL/i18n/index.js +5 -0
  270. package/dist/containers/Tenant/Query/NewSQL/i18n/index.js.map +1 -0
  271. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +2 -1
  272. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js.map +1 -1
  273. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.scss +1 -0
  274. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.js +3 -1
  275. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.js.map +1 -1
  276. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.js +5 -10
  277. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.js.map +1 -1
  278. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.js +5 -3
  279. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.js.map +1 -1
  280. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.js +6 -10
  281. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.js.map +1 -1
  282. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js +11 -2
  283. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js.map +1 -1
  284. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.scss +1 -0
  285. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.d.ts +1 -0
  286. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.js +1 -1
  287. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.js.map +1 -1
  288. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +3 -0
  289. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +3 -0
  290. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js.map +1 -1
  291. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/en.json +3 -0
  292. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.d.ts +1 -1
  293. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/ru.json +3 -0
  294. package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js +1 -1
  295. package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js.map +1 -1
  296. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +10 -2
  297. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js.map +1 -1
  298. package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.d.ts +2 -1
  299. package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.js.map +1 -1
  300. package/dist/containers/Tenant/Tenant.js +7 -3
  301. package/dist/containers/Tenant/Tenant.js.map +1 -1
  302. package/dist/containers/Tenant/utils/newSQLQueryActions.d.ts +27 -0
  303. package/dist/containers/Tenant/utils/newSQLQueryActions.js +35 -0
  304. package/dist/containers/Tenant/utils/newSQLQueryActions.js.map +1 -0
  305. package/dist/containers/Tenant/utils/newSQLQueryTemplates.d.ts +24 -0
  306. package/dist/containers/Tenant/utils/newSQLQueryTemplates.js +228 -0
  307. package/dist/containers/Tenant/utils/newSQLQueryTemplates.js.map +1 -0
  308. package/dist/containers/Tenant/utils/schema.js +1 -0
  309. package/dist/containers/Tenant/utils/schema.js.map +1 -1
  310. package/dist/containers/Tenant/utils/schemaActions.d.ts +1 -1
  311. package/dist/containers/Tenant/utils/schemaActions.js +8 -6
  312. package/dist/containers/Tenant/utils/schemaActions.js.map +1 -1
  313. package/dist/containers/Tenant/utils/{queryTemplates.js → schemaQueryTemplates.js} +1 -1
  314. package/dist/containers/Tenant/utils/schemaQueryTemplates.js.map +1 -0
  315. package/dist/containers/UserSettings/i18n/en.json +0 -2
  316. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  317. package/dist/containers/UserSettings/settings.d.ts +0 -1
  318. package/dist/containers/UserSettings/settings.js +2 -7
  319. package/dist/containers/UserSettings/settings.js.map +1 -1
  320. package/dist/containers/VDiskPage/VDiskPage.d.ts +0 -3
  321. package/dist/containers/VDiskPage/VDiskPage.js +9 -33
  322. package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
  323. package/dist/containers/VDiskPage/VDiskPage.scss +10 -19
  324. package/dist/containers/VDiskPage/i18n/en.json +1 -1
  325. package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
  326. package/dist/services/api.d.ts +16 -5
  327. package/dist/services/api.js +53 -14
  328. package/dist/services/api.js.map +1 -1
  329. package/dist/services/settings.d.ts +2 -2
  330. package/dist/services/settings.js +2 -3
  331. package/dist/services/settings.js.map +1 -1
  332. package/dist/store/configureStore.d.ts +2 -2
  333. package/dist/store/defaultStore.d.ts +1 -1
  334. package/dist/store/reducers/capabilities/capabilities.d.ts +8 -1
  335. package/dist/store/reducers/capabilities/capabilities.js +6 -1
  336. package/dist/store/reducers/capabilities/capabilities.js.map +1 -1
  337. package/dist/store/reducers/capabilities/hooks.d.ts +2 -0
  338. package/dist/store/reducers/capabilities/hooks.js +6 -0
  339. package/dist/store/reducers/capabilities/hooks.js.map +1 -1
  340. package/dist/store/reducers/executeQuery.js +3 -0
  341. package/dist/store/reducers/executeQuery.js.map +1 -1
  342. package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +4 -0
  343. package/dist/store/reducers/executeTopQueries/executeTopQueries.js +27 -1
  344. package/dist/store/reducers/executeTopQueries/executeTopQueries.js.map +1 -1
  345. package/dist/store/reducers/index.d.ts +2 -2
  346. package/dist/store/reducers/nodes/nodes.d.ts +2 -2
  347. package/dist/store/reducers/nodes/nodes.js.map +1 -1
  348. package/dist/store/reducers/nodes/types.d.ts +3 -24
  349. package/dist/store/reducers/nodesList.d.ts +5 -5
  350. package/dist/store/reducers/nodesList.js +2 -2
  351. package/dist/store/reducers/nodesList.js.map +1 -1
  352. package/dist/store/reducers/overview/overview.js +5 -1
  353. package/dist/store/reducers/overview/overview.js.map +1 -1
  354. package/dist/store/reducers/pdisk/pdisk.js +29 -2
  355. package/dist/store/reducers/pdisk/pdisk.js.map +1 -1
  356. package/dist/store/reducers/pdisk/utils.js +1 -1
  357. package/dist/store/reducers/pdisk/utils.js.map +1 -1
  358. package/dist/store/reducers/storage/requestStorageData.d.ts +3 -3
  359. package/dist/store/reducers/storage/requestStorageData.js.map +1 -1
  360. package/dist/store/reducers/storage/selectors.d.ts +2 -3
  361. package/dist/store/reducers/storage/selectors.js +1 -27
  362. package/dist/store/reducers/storage/selectors.js.map +1 -1
  363. package/dist/store/reducers/storage/storage.d.ts +4 -4
  364. package/dist/store/reducers/storage/storage.js.map +1 -1
  365. package/dist/store/reducers/storage/types.d.ts +19 -10
  366. package/dist/store/reducers/storage/utils.js +27 -3
  367. package/dist/store/reducers/storage/utils.js.map +1 -1
  368. package/dist/store/reducers/tablet.js +5 -3
  369. package/dist/store/reducers/tablet.js.map +1 -1
  370. package/dist/store/reducers/tablets.d.ts +3 -3
  371. package/dist/store/reducers/tablets.js +4 -4
  372. package/dist/store/reducers/tablets.js.map +1 -1
  373. package/dist/store/reducers/tooltip.d.ts +1 -1
  374. package/dist/styles/mixins.scss +3 -3
  375. package/dist/types/api/capabilities.d.ts +1 -1
  376. package/dist/types/api/common.d.ts +1 -0
  377. package/dist/types/api/nodes.d.ts +34 -0
  378. package/dist/types/api/nodes.js.map +1 -1
  379. package/dist/types/api/query.d.ts +1 -0
  380. package/dist/types/api/storage.d.ts +29 -8
  381. package/dist/types/store/nodesList.d.ts +1 -1
  382. package/dist/types/store/query.d.ts +5 -8
  383. package/dist/utils/constants.d.ts +0 -8
  384. package/dist/utils/constants.js +0 -9
  385. package/dist/utils/constants.js.map +1 -1
  386. package/dist/utils/filters.d.ts +2 -1
  387. package/dist/utils/filters.js +1 -4
  388. package/dist/utils/filters.js.map +1 -1
  389. package/dist/utils/hooks/useChangedQuerySettings.d.ts +2 -2
  390. package/dist/utils/hooks/useChangedQuerySettings.js +2 -1
  391. package/dist/utils/hooks/useChangedQuerySettings.js.map +1 -1
  392. package/dist/utils/hooks/useLastQueryExecutionSettings.d.ts +15 -2
  393. package/dist/utils/hooks/useLastQueryExecutionSettings.js +8 -9
  394. package/dist/utils/hooks/useLastQueryExecutionSettings.js.map +1 -1
  395. package/dist/utils/hooks/useQueryExecutionSettings.d.ts +15 -2
  396. package/dist/utils/hooks/useQueryExecutionSettings.js +5 -7
  397. package/dist/utils/hooks/useQueryExecutionSettings.js.map +1 -1
  398. package/dist/utils/hooks/useSelectedColumns.d.ts +8 -0
  399. package/dist/utils/hooks/useSelectedColumns.js +40 -0
  400. package/dist/utils/hooks/useSelectedColumns.js.map +1 -0
  401. package/dist/utils/nodes.d.ts +5 -24
  402. package/dist/utils/nodes.js +20 -23
  403. package/dist/utils/nodes.js.map +1 -1
  404. package/dist/utils/query.d.ts +129 -0
  405. package/dist/utils/query.js +33 -1
  406. package/dist/utils/query.js.map +1 -1
  407. package/dist/utils/storage.d.ts +1 -1
  408. package/dist/utils/storage.js +2 -0
  409. package/dist/utils/storage.js.map +1 -1
  410. package/dist/utils/utils.js +2 -1
  411. package/dist/utils/utils.js.map +1 -1
  412. package/package.json +2 -1
  413. package/dist/containers/Clusters/useSelectedColumns.d.ts +0 -7
  414. package/dist/containers/Clusters/useSelectedColumns.js +0 -26
  415. package/dist/containers/Clusters/useSelectedColumns.js.map +0 -1
  416. package/dist/containers/Nodes/getNodesColumns.js.map +0 -1
  417. package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.d.ts +0 -6
  418. package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js +0 -30
  419. package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js.map +0 -1
  420. package/dist/containers/PDiskPage/PDiskGroups/utils.d.ts +0 -2
  421. package/dist/containers/PDiskPage/PDiskGroups/utils.js +0 -14
  422. package/dist/containers/PDiskPage/PDiskGroups/utils.js.map +0 -1
  423. package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.d.ts +0 -14
  424. package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.js.map +0 -1
  425. package/dist/containers/Storage/StorageGroups/StorageGroups.d.ts +0 -13
  426. package/dist/containers/Storage/StorageGroups/StorageGroups.js.map +0 -1
  427. package/dist/containers/Storage/StorageGroups/columns/getStorageGroupsColumns.d.ts +0 -21
  428. package/dist/containers/Storage/StorageGroups/columns/getStorageGroupsColumns.js.map +0 -1
  429. package/dist/containers/Storage/StorageNodes/PaginatedStorageNodes.d.ts +0 -17
  430. package/dist/containers/Storage/StorageNodes/PaginatedStorageNodes.js.map +0 -1
  431. package/dist/containers/Storage/StorageNodes/StorageNodes.d.ts +0 -19
  432. package/dist/containers/Storage/StorageNodes/StorageNodes.js.map +0 -1
  433. package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.d.ts +0 -50
  434. package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.js.map +0 -1
  435. package/dist/containers/Storage/UsageFilter/UsageFilter.d.ts +0 -14
  436. package/dist/containers/Storage/UsageFilter/UsageFilter.js +0 -39
  437. package/dist/containers/Storage/UsageFilter/UsageFilter.js.map +0 -1
  438. package/dist/containers/Storage/UsageFilter/UsageFilter.scss +0 -38
  439. package/dist/containers/Storage/UsageFilter/i18n/en.json +0 -5
  440. package/dist/containers/Storage/UsageFilter/i18n/index.d.ts +0 -2
  441. package/dist/containers/Storage/UsageFilter/i18n/index.js +0 -6
  442. package/dist/containers/Storage/UsageFilter/i18n/index.js.map +0 -1
  443. package/dist/containers/Storage/UsageFilter/i18n/ru.json +0 -5
  444. package/dist/containers/Storage/UsageFilter/index.d.ts +0 -1
  445. package/dist/containers/Storage/UsageFilter/index.js +0 -2
  446. package/dist/containers/Storage/UsageFilter/index.js.map +0 -1
  447. package/dist/containers/Storage/i18n/ru.json +0 -6
  448. package/dist/containers/Tenant/Diagnostics/TopQueries/i18n/ru.json +0 -4
  449. package/dist/containers/Tenant/utils/queryTemplates.js.map +0 -1
  450. package/dist/containers/VDiskPage/utils.d.ts +0 -2
  451. package/dist/containers/VDiskPage/utils.js +0 -7
  452. package/dist/containers/VDiskPage/utils.js.map +0 -1
  453. package/dist/store/reducers/describe.d.ts +0 -7
  454. package/dist/store/reducers/describe.js +0 -25
  455. package/dist/store/reducers/describe.js.map +0 -1
  456. package/dist/store/reducers/tenantOverview/topNodes/topNodes.d.ts +0 -4
  457. package/dist/store/reducers/tenantOverview/topNodes/topNodes.js +0 -27
  458. package/dist/store/reducers/tenantOverview/topNodes/topNodes.js.map +0 -1
  459. /package/dist/containers/Tenant/utils/{queryTemplates.d.ts → schemaQueryTemplates.d.ts} +0 -0
@@ -0,0 +1,84 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { ResponseError } from '../../components/Errors/ResponseError/ResponseError';
4
+ import { LoaderWrapper } from '../../components/LoaderWrapper/LoaderWrapper';
5
+ import { TableWithControlsLayout } from '../../components/TableWithControlsLayout/TableWithControlsLayout';
6
+ import { useCapabilitiesLoaded, useStorageGroupsHandlerHasGrouping, } from '../../store/reducers/capabilities/hooks';
7
+ import { storageApi } from '../../store/reducers/storage/storage';
8
+ import { useAutoRefreshInterval } from '../../utils/hooks';
9
+ import { StorageGroupsControls } from './StorageControls/StorageControls';
10
+ import { PaginatedStorageGroupsTable } from './StorageGroups/PaginatedStorageGroupsTable';
11
+ import { useStorageGroupsSelectedColumns } from './StorageGroups/columns/hooks';
12
+ import { TableGroup } from './TableGroup/TableGroup';
13
+ import { useExpandedGroups } from './TableGroup/useExpandedTableGroups';
14
+ import i18n from './i18n';
15
+ import { b, renderPaginatedTableErrorMessage } from './shared';
16
+ import { useStorageQueryParams } from './useStorageQueryParams';
17
+ import './Storage.scss';
18
+ export function PaginatedStorageGroups(props) {
19
+ const { storageGroupsGroupByParam, visibleEntities, handleShowAllGroups } = useStorageQueryParams();
20
+ const capabilitiesLoaded = useCapabilitiesLoaded();
21
+ const storageGroupsHandlerHasGroupping = useStorageGroupsHandlerHasGrouping();
22
+ // Other filters do not fit with grouping
23
+ // Reset them if grouping available
24
+ React.useEffect(() => {
25
+ if (storageGroupsHandlerHasGroupping && visibleEntities !== 'all') {
26
+ handleShowAllGroups();
27
+ }
28
+ }, [handleShowAllGroups, storageGroupsHandlerHasGroupping, visibleEntities]);
29
+ const renderContent = () => {
30
+ if (storageGroupsHandlerHasGroupping && storageGroupsGroupByParam) {
31
+ return _jsx(GroupedStorageGroupsComponent, { ...props });
32
+ }
33
+ return _jsx(StorageGroupsComponent, { ...props });
34
+ };
35
+ return _jsx(LoaderWrapper, { loading: !capabilitiesLoaded, children: renderContent() });
36
+ }
37
+ function StorageGroupsComponent({ database, nodeId, groupId, pDiskId, parentContainer, }) {
38
+ const { searchValue, visibleEntities, handleShowAllGroups } = useStorageQueryParams();
39
+ const { columnsToShow, columnsToSelect, setColumns } = useStorageGroupsSelectedColumns({
40
+ visibleEntities,
41
+ nodeId: nodeId === null || nodeId === void 0 ? void 0 : nodeId.toString(),
42
+ });
43
+ const renderControls = ({ totalEntities, foundEntities, inited }) => {
44
+ return (_jsx(StorageGroupsControls, { withTypeSelector: true, withGroupBySelect: true, entitiesCountCurrent: foundEntities, entitiesCountTotal: totalEntities, entitiesLoading: !inited, columnsToSelect: columnsToSelect, handleSelectedColumnsUpdate: setColumns }));
45
+ };
46
+ return (_jsx(PaginatedStorageGroupsTable, { database: database, nodeId: nodeId, groupId: groupId, pDiskId: pDiskId, searchValue: searchValue, visibleEntities: visibleEntities, onShowAll: handleShowAllGroups, parentContainer: parentContainer, renderControls: renderControls, renderErrorMessage: renderPaginatedTableErrorMessage, columns: columnsToShow }));
47
+ }
48
+ function GroupedStorageGroupsComponent({ database, nodeId, groupId, pDiskId, }) {
49
+ const [autoRefreshInterval] = useAutoRefreshInterval();
50
+ const { searchValue, storageGroupsGroupByParam, visibleEntities, handleShowAllGroups } = useStorageQueryParams();
51
+ const { columnsToShow, columnsToSelect, setColumns } = useStorageGroupsSelectedColumns({
52
+ visibleEntities,
53
+ nodeId: nodeId === null || nodeId === void 0 ? void 0 : nodeId.toString(),
54
+ });
55
+ const { currentData, isFetching, error } = storageApi.useGetStorageGroupsInfoQuery({
56
+ database,
57
+ with: 'all',
58
+ nodeId,
59
+ groupId,
60
+ pDiskId,
61
+ filter: searchValue,
62
+ shouldUseGroupsHandler: true,
63
+ group: storageGroupsGroupByParam,
64
+ }, {
65
+ pollingInterval: autoRefreshInterval,
66
+ });
67
+ const isLoading = currentData === undefined && isFetching;
68
+ const { tableGroups, found = 0, total = 0 } = currentData || {};
69
+ const { expandedGroups, setIsGroupExpanded } = useExpandedGroups(tableGroups);
70
+ const renderControls = () => {
71
+ return (_jsx(StorageGroupsControls, { withTypeSelector: true, withGroupBySelect: true, entitiesCountCurrent: found, entitiesCountTotal: total, entitiesLoading: isLoading, columnsToSelect: columnsToSelect, handleSelectedColumnsUpdate: setColumns }));
72
+ };
73
+ const renderGroups = () => {
74
+ if (tableGroups === null || tableGroups === void 0 ? void 0 : tableGroups.length) {
75
+ return tableGroups.map(({ name, count }) => {
76
+ const isExpanded = expandedGroups[name];
77
+ return (_jsx(TableGroup, { title: name, count: count, entityName: i18n('groups'), expanded: isExpanded, onIsExpandedChange: setIsGroupExpanded, children: _jsx(PaginatedStorageGroupsTable, { database: database, nodeId: nodeId, groupId: groupId, pDiskId: pDiskId, filterGroup: name, filterGroupBy: storageGroupsGroupByParam, searchValue: searchValue, visibleEntities: 'all', onShowAll: handleShowAllGroups, renderErrorMessage: renderPaginatedTableErrorMessage, columns: columnsToShow, initialEntitiesCount: count }) }, name));
78
+ });
79
+ }
80
+ return i18n('no-groups');
81
+ };
82
+ 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() })] }));
83
+ }
84
+ //# sourceMappingURL=PaginatedStorageGroups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaginatedStorageGroups.js","sourceRoot":"","sources":["../../../src/containers/Storage/PaginatedStorageGroups.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,aAAa,EAAC,MAAM,qDAAqD,CAAC;AAClF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 +1,3 @@
1
+ import type { PaginatedStorageProps } from './PaginatedStorage';
2
+ import './Storage.scss';
3
+ export declare const PaginatedStorageNodes: (props: PaginatedStorageProps) => import("react/jsx-runtime").JSX.Element;
@@ -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,MAAM,qBAAqB,GAAG,CAAC,K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,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,9 +1,9 @@
1
- import type { AdditionalNodesProps } from '../../types/additionalProps';
2
1
  import './Storage.scss';
3
2
  interface StorageProps {
4
- additionalNodesProps?: AdditionalNodesProps;
5
3
  database?: string;
6
- nodeId?: string;
4
+ nodeId?: string | number;
5
+ groupId?: string | number;
6
+ pDiskId?: string | number;
7
7
  }
8
- export declare const Storage: ({ additionalNodesProps, database, nodeId }: StorageProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const Storage: ({ database, nodeId, groupId, pDiskId }: StorageProps) => import("react/jsx-runtime").JSX.Element;
9
9
  export {};
@@ -1,53 +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
- import { STORAGE_TYPES, VISIBLE_ENTITIES } from '../../store/reducers/storage/constants';
10
- import { filterGroups, filterNodes, getUsageFilterOptions, } from '../../store/reducers/storage/selectors';
8
+ import { useClusterBaseInfo } from '../../store/reducers/cluster/cluster';
9
+ import { filterGroups, filterNodes } from '../../store/reducers/storage/selectors';
11
10
  import { storageApi } from '../../store/reducers/storage/storage';
12
- import { storageTypeSchema, visibleEntitiesSchema } from '../../store/reducers/storage/types';
13
- import { DEFAULT_TABLE_SETTINGS } from '../../utils/constants';
14
11
  import { useAutoRefreshInterval, useTableSort } from '../../utils/hooks';
15
- import { NodesUptimeFilterValues, nodesUptimeFilterValuesSchema } from '../../utils/nodes';
16
- import { StorageControls } from './StorageControls/StorageControls';
17
- import { StorageGroups } from './StorageGroups/StorageGroups';
18
- import { StorageNodes } from './StorageNodes/StorageNodes';
12
+ import { useAdditionalNodeProps } from '../AppWithClusters/useClusterData';
13
+ import { StorageGroupsControls, StorageNodesControls } from './StorageControls/StorageControls';
14
+ import { StorageGroupsTable } from './StorageGroups/StorageGroupsTable';
15
+ import { useStorageGroupsSelectedColumns } from './StorageGroups/columns/hooks';
16
+ import { StorageNodesTable } from './StorageNodes/StorageNodesTable';
17
+ import { useStorageNodesSelectedColumns } from './StorageNodes/columns/hooks';
19
18
  import { b } from './shared';
19
+ import { useStorageQueryParams } from './useStorageQueryParams';
20
20
  import { defaultSortNode, getDefaultSortGroup } from './utils';
21
21
  import './Storage.scss';
22
- const UsageFilterParam = withDefault({
23
- encode: ArrayParam.encode,
24
- decode: (input) => {
25
- if (input === null || input === undefined) {
26
- return input;
27
- }
28
- if (!Array.isArray(input)) {
29
- return input ? [input] : [];
30
- }
31
- return input.filter(Boolean);
32
- },
33
- }, []);
34
- export const Storage = ({ additionalNodesProps, database, nodeId }) => {
35
- var _a;
22
+ export const Storage = ({ database, nodeId, groupId, pDiskId }) => {
23
+ var _a, _b;
24
+ const { balancer } = useClusterBaseInfo();
25
+ const { additionalNodesProps } = useAdditionalNodeProps({ balancer });
26
+ const { storageType, searchValue, visibleEntities, nodesUptimeFilter, handleShowAllGroups, handleShowAllNodes, } = useStorageQueryParams();
36
27
  const capabilitiesLoaded = useCapabilitiesLoaded();
37
28
  const groupsHandlerAvailable = useStorageGroupsHandlerAvailable();
38
29
  const [autoRefreshInterval] = useAutoRefreshInterval();
39
- const [queryParams, setQueryParams] = useQueryParams({
40
- type: StringParam,
41
- visible: StringParam,
42
- search: StringParam,
43
- uptimeFilter: StringParam,
44
- usageFilter: UsageFilterParam,
45
- });
46
- const storageType = storageTypeSchema.parse(queryParams.type);
47
- const visibleEntities = visibleEntitiesSchema.parse(queryParams.visible);
48
- const filter = (_a = queryParams.search) !== null && _a !== void 0 ? _a : '';
49
- const uptimeFilter = nodesUptimeFilterValuesSchema.parse(queryParams.uptimeFilter);
50
- const usageFilter = queryParams.usageFilter;
30
+ const isGroups = storageType === 'groups';
31
+ const isNodes = storageType === 'nodes';
51
32
  const [nodeSort, setNodeSort] = React.useState({
52
33
  sortOrder: undefined,
53
34
  sortValue: undefined,
@@ -58,50 +39,48 @@ export const Storage = ({ additionalNodesProps, database, nodeId }) => {
58
39
  sortValue: undefined,
59
40
  });
60
41
  const groupsSortParams = groupSort.sortOrder ? groupSort : getDefaultSortGroup(visibleEntities);
61
- const nodesQuery = storageApi.useGetStorageNodesInfoQuery({ database, visibleEntities, node_id: nodeId }, {
62
- skip: storageType !== STORAGE_TYPES.nodes,
42
+ const { columnsToShow: storageNodesColumnsToShow, columnsToSelect: storageNodesColumnsToSelect, setColumns: setStorageNodesSelectedColumns, } = useStorageNodesSelectedColumns({
43
+ additionalNodesProps,
44
+ visibleEntities,
45
+ database,
46
+ groupId: groupId === null || groupId === void 0 ? void 0 : groupId.toString(),
47
+ });
48
+ const { columnsToShow: storageGroupsColumnsToShow, columnsToSelect: storageGroupsColumnsToSelect, setColumns: setStorageGroupsSelectedColumns, } = useStorageGroupsSelectedColumns({ visibleEntities, nodeId: nodeId === null || nodeId === void 0 ? void 0 : nodeId.toString() });
49
+ const nodesQuery = storageApi.useGetStorageNodesInfoQuery({
50
+ database,
51
+ with: visibleEntities,
52
+ node_id: nodeId,
53
+ group_id: groupId,
54
+ }, {
55
+ skip: !isNodes,
63
56
  pollingInterval: autoRefreshInterval,
64
57
  });
65
- const groupsQuery = storageApi.useGetStorageGroupsInfoQuery({ database, with: visibleEntities, nodeId, shouldUseGroupsHandler: groupsHandlerAvailable }, {
66
- skip: storageType !== STORAGE_TYPES.groups || !capabilitiesLoaded,
58
+ const groupsQuery = storageApi.useGetStorageGroupsInfoQuery({
59
+ database,
60
+ with: visibleEntities,
61
+ nodeId,
62
+ groupId,
63
+ pDiskId,
64
+ shouldUseGroupsHandler: groupsHandlerAvailable,
65
+ }, {
66
+ skip: !isGroups || !capabilitiesLoaded,
67
67
  pollingInterval: autoRefreshInterval,
68
68
  });
69
- const { currentData, isFetching, error } = storageType === STORAGE_TYPES.nodes ? nodesQuery : groupsQuery;
69
+ const { currentData, isFetching, error } = isNodes ? nodesQuery : groupsQuery;
70
70
  const { currentData: { nodes = [] } = {} } = nodesQuery;
71
71
  const { currentData: { groups = [] } = {} } = groupsQuery;
72
- const { nodes: _, groups: __, ...entitiesCount } = currentData !== null && currentData !== void 0 ? currentData : { found: 0, total: 0 };
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;
73
74
  const isLoading = currentData === undefined && isFetching;
74
- const storageNodes = React.useMemo(() => filterNodes(nodes, filter, uptimeFilter), [filter, nodes, uptimeFilter]);
75
- const storageGroups = React.useMemo(() => filterGroups(groups, filter, usageFilter), [filter, groups, usageFilter]);
76
- 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]);
77
77
  const [nodesSort, handleNodesSort] = useTableSort(nodesSortParams, (params) => setNodeSort(params));
78
78
  const [groupsSort, handleGroupsSort] = useTableSort(groupsSortParams, (params) => setGroupSort(params));
79
- const handleUsageFilterChange = (value) => {
80
- setQueryParams({ usageFilter: value.length ? value : undefined }, 'replaceIn');
81
- };
82
- const handleTextFilterChange = (value) => {
83
- setQueryParams({ search: value || undefined }, 'replaceIn');
84
- };
85
- const handleGroupVisibilityChange = (value) => {
86
- setQueryParams({ visible: value }, 'replaceIn');
87
- };
88
- const handleStorageTypeChange = (value) => {
89
- setQueryParams({ type: value }, 'replaceIn');
90
- };
91
- const handleUptimeFilterChange = (value) => {
92
- setQueryParams({ uptimeFilter: value }, 'replaceIn');
93
- };
94
- const handleShowAllNodes = () => {
95
- handleGroupVisibilityChange(VISIBLE_ENTITIES.all);
96
- handleUptimeFilterChange(NodesUptimeFilterValues.All);
97
- };
98
79
  const renderDataTable = () => {
99
- return (_jsxs(React.Fragment, { children: [storageType === STORAGE_TYPES.groups && (_jsx(StorageGroups, { visibleEntities: visibleEntities, data: storageGroups, tableSettings: DEFAULT_TABLE_SETTINGS, onShowAll: () => handleGroupVisibilityChange(VISIBLE_ENTITIES.all), sort: groupsSort, handleSort: handleGroupsSort }, "groups")), storageType === STORAGE_TYPES.nodes && (_jsx(StorageNodes, { visibleEntities: visibleEntities, nodesUptimeFilter: uptimeFilter, data: storageNodes, tableSettings: DEFAULT_TABLE_SETTINGS, onShowAll: handleShowAllNodes, additionalNodesProps: additionalNodesProps, sort: nodesSort, handleSort: handleNodesSort, database: database }, "nodes"))] }));
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] }));
100
81
  };
101
82
  const renderControls = () => {
102
- 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: storageType === STORAGE_TYPES.groups
103
- ? storageGroups.length
104
- : storageNodes.length, entitiesCountTotal: entitiesCount.total, entitiesLoading: isLoading }));
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] }));
105
84
  };
106
85
  if (isAccessError(error)) {
107
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,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAEtF,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAC,aAAa,EAAC,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAC,aAAa,EAAC,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAC,uBAAuB,EAAC,MAAM,kEAAkE,CAAC;AACzG,OAAO,EACH,qBAAqB,EACrB,gCAAgC,GACnC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,wCAAwC,CAAC;AACvF,OAAO,EACH,YAAY,EACZ,WAAW,EACX,qBAAqB,GACxB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAC,UAAU,EAAC,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAC,iBAAiB,EAAE,qBAAqB,EAAC,MAAM,oCAAoC,CAAC;AAO5F,OAAO,EAAC,sBAAsB,EAAC,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAC,sBAAsB,EAAE,YAAY,EAAC,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAC,uBAAuB,EAAE,6BAA6B,EAAC,MAAM,mBAAmB,CAAC;AAEzF,OAAO,EAAC,eAAe,EAAC,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAC,aAAa,EAAC,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAC,YAAY,EAAC,MAAM,6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O,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"}
@@ -15,4 +15,8 @@
15
15
  .entity-status {
16
16
  justify-content: center;
17
17
  }
18
+
19
+ &__groups-wrapper {
20
+ padding-right: 20px;
21
+ }
18
22
  }
@@ -1,23 +1,13 @@
1
- import type { StorageType, VisibleEntities } from '../../../store/reducers/storage/types';
2
- import type { NodesUptimeFilterValues } from '../../../utils/nodes';
3
- import type { UsageFilterItem } from '../UsageFilter/UsageFilter';
1
+ import type { TableColumnSetupItem } from '@gravity-ui/uikit';
4
2
  interface StorageControlsProps {
5
- searchValue?: string;
6
- handleSearchValueChange: (value: string) => void;
7
3
  withTypeSelector?: boolean;
8
- storageType: StorageType;
9
- handleStorageTypeChange: (value: StorageType) => void;
10
- visibleEntities: VisibleEntities;
11
- handleVisibleEntitiesChange: (value: VisibleEntities) => void;
12
- nodesUptimeFilter: NodesUptimeFilterValues;
13
- handleNodesUptimeFilterChange: (value: NodesUptimeFilterValues) => void;
14
- withGroupsUsageFilter?: boolean;
15
- groupsUsageFilter?: string[];
16
- groupsUsageFilterOptions?: UsageFilterItem[];
17
- handleGroupsUsageFilterChange?: (value: string[]) => void;
4
+ withGroupBySelect?: boolean;
18
5
  entitiesCountCurrent: number;
19
6
  entitiesCountTotal?: number;
20
7
  entitiesLoading: boolean;
8
+ columnsToSelect: TableColumnSetupItem[];
9
+ handleSelectedColumnsUpdate: (updated: TableColumnSetupItem[]) => void;
21
10
  }
22
- export declare const StorageControls: ({ searchValue, handleSearchValueChange, withTypeSelector, storageType, handleStorageTypeChange, visibleEntities, handleVisibleEntitiesChange, nodesUptimeFilter, handleNodesUptimeFilterChange, withGroupsUsageFilter, groupsUsageFilter, groupsUsageFilterOptions, handleGroupsUsageFilterChange, entitiesCountCurrent, entitiesCountTotal, entitiesLoading, }: StorageControlsProps) => import("react/jsx-runtime").JSX.Element;
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;
23
13
  export {};
@@ -1,19 +1,28 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
+ import { Select, TableColumnSetup, Text } from '@gravity-ui/uikit';
3
4
  import { EntitiesCount } from '../../../components/EntitiesCount/EntitiesCount';
4
5
  import { Search } from '../../../components/Search/Search';
5
6
  import { UptimeFilter } from '../../../components/UptimeFIlter';
6
- import { STORAGE_TYPES } from '../../../store/reducers/storage/constants';
7
+ import { STORAGE_GROUPS_GROUP_BY_OPTIONS } from '../StorageGroups/columns/constants';
8
+ import { STORAGE_NODES_GROUP_BY_OPTIONS } from '../StorageNodes/columns/constants';
7
9
  import { StorageTypeFilter } from '../StorageTypeFilter/StorageTypeFilter';
8
10
  import { StorageVisibleEntitiesFilter } from '../StorageVisibleEntitiesFilter/StorageVisibleEntitiesFilter';
9
- import { UsageFilter } from '../UsageFilter/UsageFilter';
10
11
  import i18n from '../i18n';
11
12
  import { b } from '../shared';
12
- export const StorageControls = ({ searchValue, handleSearchValueChange, withTypeSelector, storageType, handleStorageTypeChange, visibleEntities, handleVisibleEntitiesChange, nodesUptimeFilter, handleNodesUptimeFilterChange, withGroupsUsageFilter, groupsUsageFilter, groupsUsageFilterOptions, handleGroupsUsageFilterChange, entitiesCountCurrent, entitiesCountTotal, entitiesLoading, }) => {
13
- const isNodes = storageType === STORAGE_TYPES.nodes;
14
- const entityName = isNodes ? i18n('nodes') : i18n('groups');
15
- return (_jsxs(React.Fragment, { children: [_jsx(Search, { value: searchValue, onChange: handleSearchValueChange, placeholder: isNodes
16
- ? i18n('controls_nodes-search-placeholder')
17
- : i18n('controls_groups-search-placeholder'), className: b('search') }), withTypeSelector && (_jsx(StorageTypeFilter, { value: storageType, onChange: handleStorageTypeChange })), _jsx(StorageVisibleEntitiesFilter, { value: visibleEntities, onChange: handleVisibleEntitiesChange }), isNodes && (_jsx(UptimeFilter, { value: nodesUptimeFilter, onChange: handleNodesUptimeFilterChange })), !isNodes && withGroupsUsageFilter && (_jsx(UsageFilter, { value: groupsUsageFilter, onChange: handleGroupsUsageFilterChange, groups: groupsUsageFilterOptions })), _jsx(EntitiesCount, { label: entityName, loading: entitiesLoading, total: entitiesCountTotal, current: entitiesCountCurrent })] }));
18
- };
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
+ }
19
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;AAE1B,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,aAAa,EAAC,MAAM,2CAA2C,CAAC;AAGxE,OAAO,EAAC,iBAAiB,EAAC,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAC,4BAA4B,EAAC,MAAM,8DAA8D,CAAC;AAC1G,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AAEvD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAC,CAAC,EAAC,MAAM,WAAW,CAAC;AA0B5B,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC5B,WAAW,EACX,uBAAuB,EAEvB,gBAAgB,EAChB,WAAW,EACX,uBAAuB,EAEvB,eAAe,EACf,2BAA2B,EAE3B,iBAAiB,EACjB,6BAA6B,EAE7B,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACxB,6BAA6B,EAE7B,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,GACI,EAAE,EAAE;IACvB,MAAM,OAAO,GAAG,WAAW,KAAK,aAAa,CAAC,KAAK,CAAC;IACpD,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAE5D,OAAO,CACH,MAAC,KAAK,CAAC,QAAQ,eACX,KAAC,MAAM,IACH,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,uBAAuB,EACjC,WAAW,EACP,OAAO;oBACH,CAAC,CAAC,IAAI,CAAC,mCAAmC,CAAC;oBAC3C,CAAC,CAAC,IAAI,CAAC,oCAAoC,CAAC,EAEpD,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,GACxB,EACD,gBAAgB,IAAI,CACjB,KAAC,iBAAiB,IAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,uBAAuB,GAAI,CAC/E,EACD,KAAC,4BAA4B,IACzB,KAAK,EAAE,eAAe,EACtB,QAAQ,EAAE,2BAA2B,GACvC,EAED,OAAO,IAAI,CACR,KAAC,YAAY,IAAC,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,6BAA6B,GAAI,CACtF,EACA,CAAC,OAAO,IAAI,qBAAqB,IAAI,CAClC,KAAC,WAAW,IACR,KAAK,EAAE,iBAAiB,EACxB,QAAQ,EAAE,6BAA6B,EACvC,MAAM,EAAE,wBAAwB,GAClC,CACL,EAED,KAAC,aAAa,IACV,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,kBAAkB,EACzB,OAAO,EAAE,oBAAoB,GAC/B,IACW,CACpB,CAAC;AACN,CAAC,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;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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 {};
@@ -5,24 +5,40 @@ import { ResizeablePaginatedTable } from '../../../components/PaginatedTable';
5
5
  import { useCapabilitiesLoaded, useStorageGroupsHandlerAvailable, } from '../../../store/reducers/capabilities/hooks';
6
6
  import { VISIBLE_ENTITIES } from '../../../store/reducers/storage/constants';
7
7
  import { StorageGroupsEmptyDataMessage } from './StorageGroupsEmptyDataMessage';
8
- import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY } from './columns/getStorageGroupsColumns';
9
- import { useGetStorageGroupsColumns } from './columns/hooks';
8
+ import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY } from './columns/constants';
10
9
  import { useGroupsGetter } from './getGroups';
11
10
  import i18n from './i18n';
12
- export const PaginatedStorageGroups = ({ searchValue, visibleEntities, database, nodeId, onShowAll, parentContainer, renderControls, renderErrorMessage, }) => {
13
- const columns = useGetStorageGroupsColumns(visibleEntities);
11
+ export const PaginatedStorageGroupsTable = ({ columns, database, nodeId, groupId, pDiskId, filterGroup, filterGroupBy, searchValue, visibleEntities, onShowAll, parentContainer, renderControls, renderErrorMessage, initialEntitiesCount, }) => {
14
12
  const capabilitiesLoaded = useCapabilitiesLoaded();
15
13
  const groupsHandlerAvailable = useStorageGroupsHandlerAvailable();
16
14
  const fetchData = useGroupsGetter(groupsHandlerAvailable);
17
15
  const tableFilters = React.useMemo(() => {
18
- return { searchValue, visibleEntities, database, nodeId };
19
- }, [searchValue, visibleEntities, database, nodeId]);
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
+ ]);
20
36
  const renderEmptyDataMessage = () => {
21
37
  if (visibleEntities !== VISIBLE_ENTITIES.all) {
22
38
  return (_jsx(StorageGroupsEmptyDataMessage, { onShowAll: onShowAll, visibleEntities: visibleEntities }));
23
39
  }
24
40
  return i18n('empty.default');
25
41
  };
26
- 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" }) }));
27
43
  };
28
- //# sourceMappingURL=PaginatedStorageGroups.js.map
44
+ //# sourceMappingURL=PaginatedStorageGroupsTable.js.map