ydb-embedded-ui 6.21.0 → 6.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (280) 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/QueryResultTable/Cell/Cell.js +1 -4
  11. package/dist/components/QueryResultTable/Cell/Cell.js.map +1 -1
  12. package/dist/components/StorageGroupInfo/i18n/index.d.ts +1 -1
  13. package/dist/components/VDisk/VDisk.d.ts +2 -1
  14. package/dist/components/VDisk/VDisk.js +2 -2
  15. package/dist/components/VDisk/VDisk.js.map +1 -1
  16. package/dist/components/VDiskInfo/VDiskInfo.js +1 -3
  17. package/dist/components/VDiskInfo/VDiskInfo.js.map +1 -1
  18. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
  19. package/dist/containers/App/App.scss +1 -1
  20. package/dist/containers/Cluster/Cluster.js +1 -1
  21. package/dist/containers/Cluster/Cluster.js.map +1 -1
  22. package/dist/containers/Cluster/i18n/index.d.ts +1 -1
  23. package/dist/containers/Clusters/Clusters.js +3 -3
  24. package/dist/containers/Clusters/Clusters.js.map +1 -1
  25. package/dist/containers/Clusters/columns.js +2 -2
  26. package/dist/containers/Clusters/columns.js.map +1 -1
  27. package/dist/containers/Clusters/constants.d.ts +4 -4
  28. package/dist/containers/Clusters/constants.js +3 -3
  29. package/dist/containers/Clusters/constants.js.map +1 -1
  30. package/dist/containers/Node/Node.js +14 -4
  31. package/dist/containers/Node/Node.js.map +1 -1
  32. package/dist/containers/Node/NodePages.js +4 -5
  33. package/dist/containers/Node/NodePages.js.map +1 -1
  34. package/dist/containers/Nodes/Nodes.js +10 -11
  35. package/dist/containers/Nodes/Nodes.js.map +1 -1
  36. package/dist/containers/Nodes/PaginatedNodes.js +10 -11
  37. package/dist/containers/Nodes/PaginatedNodes.js.map +1 -1
  38. package/dist/containers/Nodes/{getNodesColumns.d.ts → columns/columns.d.ts} +3 -10
  39. package/dist/containers/Nodes/{getNodesColumns.js → columns/columns.js} +29 -39
  40. package/dist/containers/Nodes/columns/columns.js.map +1 -0
  41. package/dist/containers/Nodes/columns/constants.d.ts +39 -0
  42. package/dist/containers/Nodes/columns/constants.js +79 -0
  43. package/dist/containers/Nodes/columns/constants.js.map +1 -0
  44. package/dist/containers/Nodes/columns/hooks.d.ts +6 -0
  45. package/dist/containers/Nodes/columns/hooks.js +11 -0
  46. package/dist/containers/Nodes/columns/hooks.js.map +1 -0
  47. package/dist/containers/Nodes/columns/i18n/en.json +16 -0
  48. package/dist/containers/Nodes/columns/i18n/index.d.ts +2 -0
  49. package/dist/containers/Nodes/columns/i18n/index.js +5 -0
  50. package/dist/containers/Nodes/columns/i18n/index.js.map +1 -0
  51. package/dist/containers/Nodes/columns/types.d.ts +9 -0
  52. package/dist/containers/Nodes/columns/types.js +2 -0
  53. package/dist/containers/Nodes/columns/types.js.map +1 -0
  54. package/dist/containers/Nodes/getNodes.d.ts +3 -2
  55. package/dist/containers/Nodes/getNodes.js +6 -3
  56. package/dist/containers/Nodes/getNodes.js.map +1 -1
  57. package/dist/containers/PDiskPage/PDiskPage.js +12 -10
  58. package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
  59. package/dist/containers/PDiskPage/PDiskPage.scss +14 -14
  60. package/dist/containers/PDiskPage/i18n/en.json +1 -1
  61. package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
  62. package/dist/containers/ReduxTooltip/ReduxTooltip.js +7 -7
  63. package/dist/containers/ReduxTooltip/ReduxTooltip.js.map +1 -1
  64. package/dist/containers/Storage/PDisk/PDisk.d.ts +4 -4
  65. package/dist/containers/Storage/PDisk/PDisk.js +2 -2
  66. package/dist/containers/Storage/PDisk/PDisk.js.map +1 -1
  67. package/dist/containers/Storage/PaginatedStorage.d.ts +2 -3
  68. package/dist/containers/Storage/PaginatedStorage.js +27 -6
  69. package/dist/containers/Storage/PaginatedStorage.js.map +1 -1
  70. package/dist/containers/Storage/Storage.d.ts +4 -4
  71. package/dist/containers/Storage/Storage.js +45 -11
  72. package/dist/containers/Storage/Storage.js.map +1 -1
  73. package/dist/containers/Storage/StorageControls/StorageControls.d.ts +4 -1
  74. package/dist/containers/Storage/StorageControls/StorageControls.js +4 -2
  75. package/dist/containers/Storage/StorageControls/StorageControls.js.map +1 -1
  76. package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.d.ts +3 -1
  77. package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.js +2 -4
  78. package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.js.map +1 -1
  79. package/dist/containers/Storage/StorageGroups/StorageGroups.d.ts +3 -1
  80. package/dist/containers/Storage/StorageGroups/StorageGroups.js +2 -4
  81. package/dist/containers/Storage/StorageGroups/StorageGroups.js.map +1 -1
  82. package/dist/containers/Storage/StorageGroups/columns/columns.d.ts +4 -0
  83. package/dist/containers/Storage/StorageGroups/columns/{getStorageGroupsColumns.js → columns.js} +33 -81
  84. package/dist/containers/Storage/StorageGroups/columns/columns.js.map +1 -0
  85. package/dist/containers/Storage/StorageGroups/columns/constants.d.ts +37 -0
  86. package/dist/containers/Storage/StorageGroups/columns/constants.js +75 -0
  87. package/dist/containers/Storage/StorageGroups/columns/constants.js.map +1 -0
  88. package/dist/containers/Storage/StorageGroups/columns/hooks.d.ts +6 -2
  89. package/dist/containers/Storage/StorageGroups/columns/hooks.js +22 -14
  90. package/dist/containers/Storage/StorageGroups/columns/hooks.js.map +1 -1
  91. package/dist/containers/Storage/StorageGroups/columns/i18n/en.json +15 -0
  92. package/dist/containers/Storage/StorageGroups/columns/i18n/index.d.ts +2 -0
  93. package/dist/containers/Storage/StorageGroups/columns/i18n/index.js +5 -0
  94. package/dist/containers/Storage/StorageGroups/columns/i18n/index.js.map +1 -0
  95. package/dist/containers/Storage/StorageGroups/columns/types.d.ts +2 -6
  96. package/dist/containers/Storage/StorageGroups/getGroups.js +4 -1
  97. package/dist/containers/Storage/StorageGroups/getGroups.js.map +1 -1
  98. package/dist/containers/Storage/StorageNodes/PaginatedStorageNodes.d.ts +3 -3
  99. package/dist/containers/Storage/StorageNodes/PaginatedStorageNodes.js +2 -5
  100. package/dist/containers/Storage/StorageNodes/PaginatedStorageNodes.js.map +1 -1
  101. package/dist/containers/Storage/StorageNodes/StorageNodes.d.ts +4 -6
  102. package/dist/containers/Storage/StorageNodes/StorageNodes.js +2 -4
  103. package/dist/containers/Storage/StorageNodes/StorageNodes.js.map +1 -1
  104. package/dist/containers/Storage/StorageNodes/StorageNodes.scss +1 -27
  105. package/dist/containers/Storage/StorageNodes/columns/StorageNodesColumns.scss +23 -0
  106. package/dist/containers/Storage/StorageNodes/columns/columns.d.ts +39 -0
  107. package/dist/containers/Storage/StorageNodes/{getStorageNodesColumns.js → columns/columns.js} +21 -31
  108. package/dist/containers/Storage/StorageNodes/columns/columns.js.map +1 -0
  109. package/dist/containers/Storage/StorageNodes/columns/constants.d.ts +25 -0
  110. package/dist/containers/Storage/StorageNodes/columns/constants.js +47 -0
  111. package/dist/containers/Storage/StorageNodes/columns/constants.js.map +1 -0
  112. package/dist/containers/Storage/StorageNodes/columns/hooks.d.ts +43 -0
  113. package/dist/containers/Storage/StorageNodes/columns/hooks.js +18 -0
  114. package/dist/containers/Storage/StorageNodes/columns/hooks.js.map +1 -0
  115. package/dist/containers/Storage/StorageNodes/columns/i18n/en.json +9 -0
  116. package/dist/containers/Storage/StorageNodes/columns/i18n/index.d.ts +2 -0
  117. package/dist/containers/Storage/StorageNodes/columns/i18n/index.js +5 -0
  118. package/dist/containers/Storage/StorageNodes/columns/i18n/index.js.map +1 -0
  119. package/dist/containers/Storage/StorageNodes/columns/types.d.ts +11 -0
  120. package/dist/containers/Storage/StorageNodes/columns/types.js +2 -0
  121. package/dist/containers/Storage/StorageNodes/columns/types.js.map +1 -0
  122. package/dist/containers/Storage/StorageNodes/getNodes.d.ts +2 -2
  123. package/dist/containers/Storage/StorageNodes/getNodes.js +7 -4
  124. package/dist/containers/Storage/StorageNodes/getNodes.js.map +1 -1
  125. package/dist/containers/Storage/StorageNodes/shared.js +1 -1
  126. package/dist/containers/Storage/StorageNodes/shared.js.map +1 -1
  127. package/dist/containers/Storage/StorageWrapper.d.ts +0 -2
  128. package/dist/containers/Storage/StorageWrapper.js.map +1 -1
  129. package/dist/containers/Storage/utils/index.js +6 -5
  130. package/dist/containers/Storage/utils/index.js.map +1 -1
  131. package/dist/containers/StorageGroupPage/StorageGroupPage.js +14 -57
  132. package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
  133. package/dist/containers/StorageGroupPage/StorageGroupPage.scss +14 -17
  134. package/dist/containers/StorageGroupPage/i18n/en.json +1 -2
  135. package/dist/containers/StorageGroupPage/i18n/index.d.ts +1 -1
  136. package/dist/containers/Tablets/i18n/index.d.ts +1 -1
  137. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +6 -0
  138. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +2 -2
  139. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js.map +1 -1
  140. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +12 -5
  141. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js.map +1 -1
  142. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js +12 -5
  143. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js.map +1 -1
  144. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +13 -5
  145. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js.map +1 -1
  146. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +2 -1
  147. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js.map +1 -1
  148. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  149. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +46 -55
  150. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js.map +1 -1
  151. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +6 -7
  152. package/dist/containers/Tenant/ObjectSummary/ObjectTree.d.ts +6 -0
  153. package/dist/containers/Tenant/ObjectSummary/ObjectTree.js +25 -0
  154. package/dist/containers/Tenant/ObjectSummary/ObjectTree.js.map +1 -0
  155. package/dist/containers/Tenant/ObjectSummary/SchemaActions.d.ts +1 -0
  156. package/dist/containers/Tenant/ObjectSummary/SchemaActions.js +18 -0
  157. package/dist/containers/Tenant/ObjectSummary/SchemaActions.js.map +1 -0
  158. package/dist/containers/Tenant/ObjectSummary/i18n/en.json +21 -0
  159. package/dist/containers/Tenant/ObjectSummary/i18n/index.d.ts +2 -0
  160. package/dist/containers/Tenant/ObjectSummary/i18n/index.js +5 -0
  161. package/dist/containers/Tenant/ObjectSummary/i18n/index.js.map +1 -0
  162. package/dist/containers/Tenant/ObjectSummary/shared.d.ts +1 -0
  163. package/dist/containers/Tenant/ObjectSummary/shared.js +3 -0
  164. package/dist/containers/Tenant/ObjectSummary/shared.js.map +1 -0
  165. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +12 -12
  166. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js.map +1 -1
  167. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +8 -0
  168. package/dist/containers/Tenant/Query/ExecuteResult/i18n/en.json +2 -1
  169. package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +1 -1
  170. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.js +3 -1
  171. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.js.map +1 -1
  172. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.js +5 -10
  173. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.js.map +1 -1
  174. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.js +5 -3
  175. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.js.map +1 -1
  176. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.js +6 -10
  177. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.js.map +1 -1
  178. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js +11 -2
  179. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js.map +1 -1
  180. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.scss +1 -0
  181. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.d.ts +1 -0
  182. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.js +1 -1
  183. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.js.map +1 -1
  184. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +3 -0
  185. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +3 -0
  186. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js.map +1 -1
  187. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/en.json +3 -0
  188. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.d.ts +1 -1
  189. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/ru.json +3 -0
  190. package/dist/containers/Tenant/utils/schema.js +1 -0
  191. package/dist/containers/Tenant/utils/schema.js.map +1 -1
  192. package/dist/containers/UserSettings/i18n/en.json +0 -2
  193. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  194. package/dist/containers/UserSettings/settings.d.ts +0 -1
  195. package/dist/containers/UserSettings/settings.js +2 -7
  196. package/dist/containers/UserSettings/settings.js.map +1 -1
  197. package/dist/containers/VDiskPage/VDiskPage.d.ts +0 -3
  198. package/dist/containers/VDiskPage/VDiskPage.js +9 -33
  199. package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
  200. package/dist/containers/VDiskPage/VDiskPage.scss +10 -19
  201. package/dist/containers/VDiskPage/i18n/en.json +1 -1
  202. package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
  203. package/dist/services/api.d.ts +16 -5
  204. package/dist/services/api.js +50 -11
  205. package/dist/services/api.js.map +1 -1
  206. package/dist/services/settings.d.ts +2 -2
  207. package/dist/services/settings.js +2 -3
  208. package/dist/services/settings.js.map +1 -1
  209. package/dist/store/configureStore.d.ts +2 -2
  210. package/dist/store/defaultStore.d.ts +1 -1
  211. package/dist/store/reducers/capabilities/capabilities.d.ts +8 -1
  212. package/dist/store/reducers/capabilities/capabilities.js +6 -1
  213. package/dist/store/reducers/capabilities/capabilities.js.map +1 -1
  214. package/dist/store/reducers/executeQuery.js +3 -0
  215. package/dist/store/reducers/executeQuery.js.map +1 -1
  216. package/dist/store/reducers/index.d.ts +2 -2
  217. package/dist/store/reducers/nodes/nodes.d.ts +2 -2
  218. package/dist/store/reducers/nodes/nodes.js.map +1 -1
  219. package/dist/store/reducers/nodes/types.d.ts +2 -24
  220. package/dist/store/reducers/pdisk/pdisk.js +29 -2
  221. package/dist/store/reducers/pdisk/pdisk.js.map +1 -1
  222. package/dist/store/reducers/pdisk/utils.js +1 -1
  223. package/dist/store/reducers/pdisk/utils.js.map +1 -1
  224. package/dist/store/reducers/storage/storage.d.ts +2 -2
  225. package/dist/store/reducers/storage/storage.js.map +1 -1
  226. package/dist/store/reducers/tooltip.d.ts +1 -1
  227. package/dist/styles/mixins.scss +3 -3
  228. package/dist/types/api/common.d.ts +1 -0
  229. package/dist/types/api/nodes.d.ts +33 -0
  230. package/dist/types/api/nodes.js.map +1 -1
  231. package/dist/types/api/query.d.ts +1 -0
  232. package/dist/types/api/storage.d.ts +8 -5
  233. package/dist/types/store/query.d.ts +5 -8
  234. package/dist/utils/constants.d.ts +0 -8
  235. package/dist/utils/constants.js +0 -9
  236. package/dist/utils/constants.js.map +1 -1
  237. package/dist/utils/filters.d.ts +2 -1
  238. package/dist/utils/filters.js +1 -4
  239. package/dist/utils/filters.js.map +1 -1
  240. package/dist/utils/hooks/useChangedQuerySettings.d.ts +2 -2
  241. package/dist/utils/hooks/useChangedQuerySettings.js +2 -1
  242. package/dist/utils/hooks/useChangedQuerySettings.js.map +1 -1
  243. package/dist/utils/hooks/useLastQueryExecutionSettings.d.ts +15 -2
  244. package/dist/utils/hooks/useLastQueryExecutionSettings.js +8 -9
  245. package/dist/utils/hooks/useLastQueryExecutionSettings.js.map +1 -1
  246. package/dist/utils/hooks/useQueryExecutionSettings.d.ts +15 -2
  247. package/dist/utils/hooks/useQueryExecutionSettings.js +5 -7
  248. package/dist/utils/hooks/useQueryExecutionSettings.js.map +1 -1
  249. package/dist/utils/hooks/useSelectedColumns.d.ts +8 -0
  250. package/dist/utils/hooks/useSelectedColumns.js +35 -0
  251. package/dist/utils/hooks/useSelectedColumns.js.map +1 -0
  252. package/dist/utils/nodes.d.ts +3 -22
  253. package/dist/utils/nodes.js +16 -19
  254. package/dist/utils/nodes.js.map +1 -1
  255. package/dist/utils/query.d.ts +129 -0
  256. package/dist/utils/query.js +33 -1
  257. package/dist/utils/query.js.map +1 -1
  258. package/dist/utils/storage.d.ts +1 -1
  259. package/dist/utils/storage.js.map +1 -1
  260. package/package.json +2 -1
  261. package/dist/containers/Clusters/useSelectedColumns.d.ts +0 -7
  262. package/dist/containers/Clusters/useSelectedColumns.js +0 -26
  263. package/dist/containers/Clusters/useSelectedColumns.js.map +0 -1
  264. package/dist/containers/Nodes/getNodesColumns.js.map +0 -1
  265. package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.d.ts +0 -6
  266. package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js +0 -30
  267. package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js.map +0 -1
  268. package/dist/containers/PDiskPage/PDiskGroups/utils.d.ts +0 -2
  269. package/dist/containers/PDiskPage/PDiskGroups/utils.js +0 -14
  270. package/dist/containers/PDiskPage/PDiskGroups/utils.js.map +0 -1
  271. package/dist/containers/Storage/StorageGroups/columns/getStorageGroupsColumns.d.ts +0 -21
  272. package/dist/containers/Storage/StorageGroups/columns/getStorageGroupsColumns.js.map +0 -1
  273. package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.d.ts +0 -50
  274. package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.js.map +0 -1
  275. package/dist/containers/VDiskPage/utils.d.ts +0 -2
  276. package/dist/containers/VDiskPage/utils.js +0 -7
  277. package/dist/containers/VDiskPage/utils.js.map +0 -1
  278. package/dist/store/reducers/tenantOverview/topNodes/topNodes.d.ts +0 -4
  279. package/dist/store/reducers/tenantOverview/topNodes/topNodes.js +0 -27
  280. package/dist/store/reducers/tenantOverview/topNodes/topNodes.js.map +0 -1
@@ -1,17 +1,17 @@
1
1
  import type { RenderControls, RenderErrorMessage } from '../../../components/PaginatedTable';
2
2
  import type { VisibleEntities } from '../../../store/reducers/storage/types';
3
- import type { AdditionalNodesProps } from '../../../types/additionalProps';
4
3
  import { NodesUptimeFilterValues } from '../../../utils/nodes';
4
+ import type { StorageNodesColumn } from './columns/types';
5
5
  interface PaginatedStorageNodesProps {
6
+ columns: StorageNodesColumn[];
6
7
  searchValue: string;
7
8
  visibleEntities: VisibleEntities;
8
9
  nodesUptimeFilter: NodesUptimeFilterValues;
9
10
  database?: string;
10
- additionalNodesProps?: AdditionalNodesProps;
11
11
  onShowAll: VoidFunction;
12
12
  parentContainer?: Element | null;
13
13
  renderControls: RenderControls;
14
14
  renderErrorMessage: RenderErrorMessage;
15
15
  }
16
- export declare const PaginatedStorageNodes: ({ searchValue, visibleEntities, nodesUptimeFilter, database, additionalNodesProps, onShowAll, parentContainer, renderControls, renderErrorMessage, }: PaginatedStorageNodesProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const PaginatedStorageNodes: ({ columns, searchValue, visibleEntities, nodesUptimeFilter, database, onShowAll, parentContainer, renderControls, renderErrorMessage, }: PaginatedStorageNodesProps) => import("react/jsx-runtime").JSX.Element;
17
17
  export {};
@@ -4,17 +4,14 @@ import { ResizeablePaginatedTable } from '../../../components/PaginatedTable';
4
4
  import { VISIBLE_ENTITIES } from '../../../store/reducers/storage/constants';
5
5
  import { NodesUptimeFilterValues } from '../../../utils/nodes';
6
6
  import { StorageNodesEmptyDataMessage } from './StorageNodesEmptyDataMessage';
7
+ import { STORAGE_NODES_COLUMNS_WIDTH_LS_KEY } from './columns/constants';
7
8
  import { getStorageNodes } from './getNodes';
8
- import { STORAGE_NODES_COLUMNS_WIDTH_LS_KEY, getPreparedStorageNodesColumns, } from './getStorageNodesColumns';
9
9
  import i18n from './i18n';
10
10
  import { getRowUnavailableClassName } from './shared';
11
- export const PaginatedStorageNodes = ({ searchValue, visibleEntities, nodesUptimeFilter, database, additionalNodesProps, onShowAll, parentContainer, renderControls, renderErrorMessage, }) => {
11
+ export const PaginatedStorageNodes = ({ columns, searchValue, visibleEntities, nodesUptimeFilter, database, onShowAll, parentContainer, renderControls, renderErrorMessage, }) => {
12
12
  const tableFilters = React.useMemo(() => {
13
13
  return { searchValue, visibleEntities, nodesUptimeFilter, database };
14
14
  }, [searchValue, visibleEntities, nodesUptimeFilter, database]);
15
- const columns = React.useMemo(() => {
16
- return getPreparedStorageNodesColumns(additionalNodesProps, visibleEntities, database);
17
- }, [additionalNodesProps, visibleEntities, database]);
18
15
  const renderEmptyDataMessage = () => {
19
16
  if (visibleEntities !== VISIBLE_ENTITIES.all ||
20
17
  nodesUptimeFilter !== NodesUptimeFilterValues.All) {
@@ -1 +1 @@
1
- {"version":3,"file":"PaginatedStorageNodes.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageNodes/PaginatedStorageNodes.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,wBAAwB,EAAC,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC;AAG3E,OAAO,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAC,4BAA4B,EAAC,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAC3C,OAAO,EACH,kCAAkC,EAClC,8BAA8B,GACjC,MAAM,0BAA0B,CAAC;AAClC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAC,0BAA0B,EAAC,MAAM,UAAU,CAAC;AAgBpD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAClC,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,oBAAoB,EACpB,SAAS,EACT,eAAe,EACf,cAAc,EACd,kBAAkB,GACO,EAAE,EAAE;IAC7B,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACpC,OAAO,EAAC,WAAW,EAAE,eAAe,EAAE,iBAAiB,EAAE,QAAQ,EAAC,CAAC;IACvE,CAAC,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEhE,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAC/B,OAAO,8BAA8B,CAAC,oBAAoB,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;IAC3F,CAAC,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEtD,MAAM,sBAAsB,GAAG,GAAG,EAAE;QAChC,IACI,eAAe,KAAK,gBAAgB,CAAC,GAAG;YACxC,iBAAiB,KAAK,uBAAuB,CAAC,GAAG,EACnD,CAAC;YACC,OAAO,CACH,KAAC,4BAA4B,IACzB,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,eAAe,GAClC,CACL,CAAC;QACN,CAAC;QAED,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC;IACjC,CAAC,CAAC;IAEF,OAAO,CACH,KAAC,wBAAwB,IACrB,iBAAiB,EAAE,kCAAkC,EACrD,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,eAAe,EAC1B,SAAS,EAAE,EAAE,EACb,KAAK,EAAE,EAAE,EACT,cAAc,EAAE,cAAc,EAC9B,kBAAkB,EAAE,kBAAkB,EACtC,sBAAsB,EAAE,sBAAsB,EAC9C,eAAe,EAAE,0BAA0B,EAC3C,OAAO,EAAE,YAAY,EACrB,SAAS,EAAC,eAAe,GAC3B,CACL,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"PaginatedStorageNodes.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageNodes/PaginatedStorageNodes.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,wBAAwB,EAAC,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC;AAE3E,OAAO,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAC,4BAA4B,EAAC,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAC,kCAAkC,EAAC,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EAAC,eAAe,EAAC,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
  import type { Settings, SortOrder } from '@gravity-ui/react-data-table';
2
2
  import type { PreparedStorageNode, VisibleEntities } from '../../../store/reducers/storage/types';
3
- import type { AdditionalNodesProps } from '../../../types/additionalProps';
4
3
  import type { HandleSort } from '../../../utils/hooks/useTableSort';
5
4
  import { NodesUptimeFilterValues } from '../../../utils/nodes';
6
- import './StorageNodes.scss';
5
+ import type { StorageNodesColumn } from './columns/types';
7
6
  interface StorageNodesProps {
8
7
  data: PreparedStorageNode[];
8
+ columns: StorageNodesColumn[];
9
9
  tableSettings: Settings;
10
10
  visibleEntities: VisibleEntities;
11
11
  nodesUptimeFilter: NodesUptimeFilterValues;
12
- onShowAll?: VoidFunction;
13
- additionalNodesProps?: AdditionalNodesProps;
14
12
  sort?: SortOrder;
13
+ onShowAll?: VoidFunction;
15
14
  handleSort?: HandleSort;
16
- database?: string;
17
15
  }
18
- export declare function StorageNodes({ data, tableSettings, visibleEntities, onShowAll, nodesUptimeFilter, additionalNodesProps, sort, handleSort, database, }: StorageNodesProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function StorageNodes({ data, columns, tableSettings, visibleEntities, nodesUptimeFilter, sort, onShowAll, handleSort, }: StorageNodesProps): import("react/jsx-runtime").JSX.Element;
19
17
  export {};
@@ -3,12 +3,10 @@ import { ResizeableDataTable } from '../../../components/ResizeableDataTable/Res
3
3
  import { VISIBLE_ENTITIES } from '../../../store/reducers/storage/constants';
4
4
  import { NodesUptimeFilterValues } from '../../../utils/nodes';
5
5
  import { StorageNodesEmptyDataMessage } from './StorageNodesEmptyDataMessage';
6
- import { STORAGE_NODES_COLUMNS_WIDTH_LS_KEY, getPreparedStorageNodesColumns, } from './getStorageNodesColumns';
6
+ import { STORAGE_NODES_COLUMNS_WIDTH_LS_KEY } from './columns/constants';
7
7
  import i18n from './i18n';
8
8
  import { getRowUnavailableClassName } from './shared';
9
- import './StorageNodes.scss';
10
- export function StorageNodes({ data, tableSettings, visibleEntities, onShowAll, nodesUptimeFilter, additionalNodesProps, sort, handleSort, database, }) {
11
- const columns = getPreparedStorageNodesColumns(additionalNodesProps, visibleEntities, database);
9
+ export function StorageNodes({ data, columns, tableSettings, visibleEntities, nodesUptimeFilter, sort, onShowAll, handleSort, }) {
12
10
  if (!data.length &&
13
11
  (visibleEntities !== VISIBLE_ENTITIES.all ||
14
12
  nodesUptimeFilter !== NodesUptimeFilterValues.All)) {
@@ -1 +1 @@
1
- {"version":3,"file":"StorageNodes.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageNodes/StorageNodes.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,mBAAmB,EAAC,MAAM,6DAA6D,CAAC;AAChG,OAAO,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC;AAI3E,OAAO,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAC,4BAA4B,EAAC,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EACH,kCAAkC,EAClC,8BAA8B,GACjC,MAAM,0BAA0B,CAAC;AAClC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAC,0BAA0B,EAAC,MAAM,UAAU,CAAC;AAEpD,OAAO,qBAAqB,CAAC;AAc7B,MAAM,UAAU,YAAY,CAAC,EACzB,IAAI,EACJ,aAAa,EACb,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,oBAAoB,EACpB,IAAI,EACJ,UAAU,EACV,QAAQ,GACQ;IAChB,MAAM,OAAO,GAAG,8BAA8B,CAAC,oBAAoB,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;IAEhG,IACI,CAAC,IAAI,CAAC,MAAM;QACZ,CAAC,eAAe,KAAK,gBAAgB,CAAC,GAAG;YACrC,iBAAiB,KAAK,uBAAuB,CAAC,GAAG,CAAC,EACxD,CAAC;QACC,OAAO,CACH,KAAC,4BAA4B,IACzB,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,SAAS,GACtB,CACL,CAAC;IACN,CAAC;IAED,OAAO,CACH,KAAC,mBAAmB,IAChB,iBAAiB,EAAE,kCAAkC,EAErD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE;YACN,GAAG,aAAa;YAChB,iBAAiB,EAAE,UAAU;SAChC,EACD,gBAAgB,EAAE,IAAI,CAAC,eAAe,CAAC,EACvC,YAAY,EAAE,0BAA0B,EACxC,SAAS,EAAE,IAAI,EACf,MAAM,EAAE,UAAU,IAVb,eAAyB,CAWhC,CACL,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"StorageNodes.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageNodes/StorageNodes.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,mBAAmB,EAAC,MAAM,6DAA6D,CAAC;AAChG,OAAO,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC;AAG3E,OAAO,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAC,4BAA4B,EAAC,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAC,kCAAkC,EAAC,MAAM,qBAAqB,CAAC;AAEvE,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAC,0BAA0B,EAAC,MAAM,UAAU,CAAC;AAapD,MAAM,UAAU,YAAY,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,IAAI,EACJ,SAAS,EACT,UAAU,GACM;IAChB,IACI,CAAC,IAAI,CAAC,MAAM;QACZ,CAAC,eAAe,KAAK,gBAAgB,CAAC,GAAG;YACrC,iBAAiB,KAAK,uBAAuB,CAAC,GAAG,CAAC,EACxD,CAAC;QACC,OAAO,CACH,KAAC,4BAA4B,IACzB,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,SAAS,GACtB,CACL,CAAC;IACN,CAAC;IAED,OAAO,CACH,KAAC,mBAAmB,IAChB,iBAAiB,EAAE,kCAAkC,EAErD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE;YACN,GAAG,aAAa;YAChB,iBAAiB,EAAE,UAAU;SAChC,EACD,gBAAgB,EAAE,IAAI,CAAC,eAAe,CAAC,EACvC,YAAY,EAAE,0BAA0B,EACxC,SAAS,EAAE,IAAI,EACf,MAAM,EAAE,UAAU,IAVb,eAAyB,CAWhC,CACL,CAAC;AACN,CAAC"}
@@ -1,30 +1,4 @@
1
- .global-storage-nodes {
2
- &__pdisks-column {
3
- overflow: visible; // to enable stacked disks overflow the row
4
- }
5
-
6
- &__pdisks-wrapper {
7
- display: flex;
8
- justify-content: left;
9
- align-items: flex-end;
10
-
11
- width: max-content;
12
- }
13
- &__pdisks-item {
14
- flex-grow: 1;
15
-
16
- max-width: 200px;
17
- margin-right: 10px;
18
-
19
- &:last-child {
20
- margin-right: 0px;
21
- }
22
- }
23
-
24
- &__group-id {
25
- font-weight: 500;
26
- }
27
-
1
+ .ydb-storage-nodes {
28
2
  &__node_unavailable {
29
3
  opacity: 0.6;
30
4
  }
@@ -0,0 +1,23 @@
1
+ .ydb-storage-nodes-columns {
2
+ &__pdisks-column {
3
+ overflow: visible; // to enable stacked disks overflow the row
4
+ }
5
+
6
+ &__pdisks-wrapper {
7
+ display: flex;
8
+ justify-content: left;
9
+ align-items: flex-end;
10
+
11
+ width: max-content;
12
+ }
13
+ &__pdisks-item {
14
+ flex-grow: 1;
15
+
16
+ max-width: 200px;
17
+ margin-right: 10px;
18
+
19
+ &:last-child {
20
+ margin-right: 0px;
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,39 @@
1
+ import type { GetStorageNodesColumnsParams } from './types';
2
+ import './StorageNodesColumns.scss';
3
+ export declare const getPreparedStorageNodesColumns: ({ additionalNodesProps, database, groupId, }: GetStorageNodesColumnsParams) => {
4
+ sortable: boolean;
5
+ name: string;
6
+ header?: React.ReactNode;
7
+ className?: string;
8
+ resizeable?: boolean;
9
+ render: ((props: {
10
+ row: import("../../../../store/reducers/storage/types").PreparedStorageNode;
11
+ index: number;
12
+ }) => React.ReactNode) & ((props: {
13
+ value?: unknown;
14
+ row: import("../../../../store/reducers/storage/types").PreparedStorageNode;
15
+ index: number;
16
+ footer?: boolean;
17
+ headerData?: boolean;
18
+ }) => import("react").ReactNode);
19
+ width?: number;
20
+ resizeMaxWidth?: number;
21
+ resizeMinWidth?: number;
22
+ align: "center" | "left" | "right";
23
+ headerTitle?: string;
24
+ accessor?: string | ((row: import("../../../../store/reducers/storage/types").PreparedStorageNode) => any) | undefined;
25
+ title?: string | ((row: import("../../../../store/reducers/storage/types").PreparedStorageNode) => string) | undefined;
26
+ customStyle?: ((props: import("@gravity-ui/react-data-table").CustomStyleParams<import("../../../../store/reducers/storage/types").PreparedStorageNode>) => import("react").CSSProperties) | undefined;
27
+ onClick?: ((data: {
28
+ row: import("../../../../store/reducers/storage/types").PreparedStorageNode;
29
+ index: number;
30
+ footer?: boolean;
31
+ headerData?: boolean;
32
+ }, column: import("@gravity-ui/react-data-table").Column<import("../../../../store/reducers/storage/types").PreparedStorageNode>, event: import("react").MouseEvent<HTMLTableCellElement>) => void) | undefined;
33
+ defaultOrder?: import("@gravity-ui/react-data-table").OrderType;
34
+ sortAccessor?: string | ((row: import("../../../../store/reducers/storage/types").PreparedStorageNode) => any) | undefined;
35
+ sortAscending?: import("@gravity-ui/react-data-table").Comparator<import("../../../../store/reducers/storage/types").PreparedStorageNode> | undefined;
36
+ sub?: import("@gravity-ui/react-data-table").Column<import("../../../../store/reducers/storage/types").PreparedStorageNode>[] | undefined;
37
+ group?: boolean;
38
+ autogroup?: boolean;
39
+ }[];
@@ -1,34 +1,26 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import DataTable from '@gravity-ui/react-data-table';
3
- import { NodeHostWrapper } from '../../../components/NodeHostWrapper/NodeHostWrapper';
4
- import { VISIBLE_ENTITIES } from '../../../store/reducers/storage/constants';
5
- import { EMPTY_DATA_PLACEHOLDER } from '../../../utils/constants';
6
- import { isSortableNodesProperty } from '../../../utils/nodes';
7
- import { PDisk } from '../PDisk/PDisk';
8
- import { b } from './shared';
9
- export const STORAGE_NODES_COLUMNS_WIDTH_LS_KEY = 'storageNodesColumnsWidth';
10
- export const STORAGE_NODES_COLUMNS_IDS = {
11
- NodeId: 'NodeId',
12
- Host: 'Host',
13
- DC: 'DC',
14
- Rack: 'Rack',
15
- Uptime: 'Uptime',
16
- PDisks: 'PDisks',
17
- Missing: 'Missing',
18
- };
19
- const getStorageNodesColumns = (additionalNodesProps, database) => {
3
+ import { NodeHostWrapper } from '../../../../components/NodeHostWrapper/NodeHostWrapper';
4
+ import { cn } from '../../../../utils/cn';
5
+ import { EMPTY_DATA_PLACEHOLDER } from '../../../../utils/constants';
6
+ import { isSortableNodesProperty } from '../../../../utils/nodes';
7
+ import { PDisk } from '../../PDisk/PDisk';
8
+ import { STORAGE_NODES_COLUMNS_IDS, STORAGE_NODES_COLUMNS_TITLES } from './constants';
9
+ import './StorageNodesColumns.scss';
10
+ const b = cn('ydb-storage-nodes-columns');
11
+ const getStorageNodesColumns = (additionalNodesProps, database, groupId) => {
20
12
  const getNodeRef = additionalNodesProps === null || additionalNodesProps === void 0 ? void 0 : additionalNodesProps.getNodeRef;
21
13
  const columns = [
22
14
  {
23
15
  name: STORAGE_NODES_COLUMNS_IDS.NodeId,
24
- header: 'Node ID',
16
+ header: STORAGE_NODES_COLUMNS_TITLES.NodeId,
25
17
  width: 100,
26
18
  align: DataTable.RIGHT,
27
19
  render: ({ row }) => row.NodeId,
28
20
  },
29
21
  {
30
22
  name: STORAGE_NODES_COLUMNS_IDS.Host,
31
- header: 'Host',
23
+ header: STORAGE_NODES_COLUMNS_TITLES.Host,
32
24
  width: 350,
33
25
  render: ({ row }) => {
34
26
  return _jsx(NodeHostWrapper, { node: row, getNodeRef: getNodeRef, database: database });
@@ -37,21 +29,21 @@ const getStorageNodesColumns = (additionalNodesProps, database) => {
37
29
  },
38
30
  {
39
31
  name: STORAGE_NODES_COLUMNS_IDS.DC,
40
- header: 'DC',
32
+ header: STORAGE_NODES_COLUMNS_TITLES.DC,
41
33
  width: 100,
42
34
  render: ({ row }) => row.DC || EMPTY_DATA_PLACEHOLDER,
43
35
  align: DataTable.LEFT,
44
36
  },
45
37
  {
46
38
  name: STORAGE_NODES_COLUMNS_IDS.Rack,
47
- header: 'Rack',
39
+ header: STORAGE_NODES_COLUMNS_TITLES.Rack,
48
40
  width: 100,
49
41
  render: ({ row }) => row.Rack || '—',
50
42
  align: DataTable.LEFT,
51
43
  },
52
44
  {
53
45
  name: STORAGE_NODES_COLUMNS_IDS.Uptime,
54
- header: 'Uptime',
46
+ header: STORAGE_NODES_COLUMNS_TITLES.Uptime,
55
47
  width: 130,
56
48
  sortAccessor: ({ StartTime }) => (StartTime ? -StartTime : 0),
57
49
  align: DataTable.RIGHT,
@@ -59,7 +51,7 @@ const getStorageNodesColumns = (additionalNodesProps, database) => {
59
51
  },
60
52
  {
61
53
  name: STORAGE_NODES_COLUMNS_IDS.Missing,
62
- header: 'Missing',
54
+ header: STORAGE_NODES_COLUMNS_TITLES.Missing,
63
55
  width: 100,
64
56
  align: DataTable.CENTER,
65
57
  defaultOrder: DataTable.DESCENDING,
@@ -67,14 +59,15 @@ const getStorageNodesColumns = (additionalNodesProps, database) => {
67
59
  },
68
60
  {
69
61
  name: STORAGE_NODES_COLUMNS_IDS.PDisks,
62
+ header: STORAGE_NODES_COLUMNS_TITLES.PDisks,
70
63
  className: b('pdisks-column'),
71
- header: 'PDisks',
72
64
  render: ({ row }) => {
73
65
  var _a;
74
66
  return (_jsx("div", { className: b('pdisks-wrapper'), children: (_a = row.PDisks) === null || _a === void 0 ? void 0 : _a.map((pDisk) => {
75
67
  var _a;
76
68
  const vDisks = (_a = row.VDisks) === null || _a === void 0 ? void 0 : _a.filter((vdisk) => vdisk.PDiskId === pDisk.PDiskId);
77
- return (_jsx("div", { className: b('pdisks-item'), children: _jsx(PDisk, { data: pDisk, vDisks: vDisks }) }, pDisk.PDiskId));
69
+ const inactiveVdisks = vDisks === null || vDisks === void 0 ? void 0 : vDisks.filter((vdisk) => { var _a; return groupId && ((_a = vdisk.VDiskId) === null || _a === void 0 ? void 0 : _a.GroupID) !== Number(groupId); });
70
+ return (_jsx("div", { className: b('pdisks-item'), children: _jsx(PDisk, { data: pDisk, vDisks: vDisks, inactiveVdisks: inactiveVdisks }) }, pDisk.PDiskId));
78
71
  }) }));
79
72
  },
80
73
  align: DataTable.CENTER,
@@ -85,15 +78,12 @@ const getStorageNodesColumns = (additionalNodesProps, database) => {
85
78
  ];
86
79
  return columns;
87
80
  };
88
- export const getPreparedStorageNodesColumns = (additionalNodesProps, visibleEntities, database) => {
89
- const rawColumns = getStorageNodesColumns(additionalNodesProps, database);
81
+ export const getPreparedStorageNodesColumns = ({ additionalNodesProps, database, groupId, }) => {
82
+ const rawColumns = getStorageNodesColumns(additionalNodesProps, database, groupId);
90
83
  const sortableColumns = rawColumns.map((column) => ({
91
84
  ...column,
92
85
  sortable: isSortableNodesProperty(column.name),
93
86
  }));
94
- if (visibleEntities !== VISIBLE_ENTITIES.missing) {
95
- return sortableColumns.filter((col) => col.name !== STORAGE_NODES_COLUMNS_IDS.Missing);
96
- }
97
87
  return sortableColumns;
98
88
  };
99
- //# sourceMappingURL=getStorageNodesColumns.js.map
89
+ //# sourceMappingURL=columns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"columns.js","sourceRoot":"","sources":["../../../../../src/containers/Storage/StorageNodes/columns/columns.tsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,8BAA8B,CAAC;AAErD,OAAO,EAAC,eAAe,EAAC,MAAM,wDAAwD,CAAC;AAEvF,OAAO,EAAC,EAAE,EAAC,MAAM,sBAAsB,CAAC;AACxC,OAAO,EAAC,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAC,uBAAuB,EAAC,MAA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KAAK,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,CAC7C,CAAC;wBAEF,MAAM,cAAc,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CACjC,CAAC,KAAK,EAAE,EAAE,WAAC,OAAA,OAAO,IAAI,CAAA,MAAA,KAAK,CAAC,OAAO,0CAAE,OAAO,MAAK,MAAM,CAAC,OAAO,CAAC,CAAA,EAAA,CACnE,CAAC;wBAEF,OAAO,CACH,cAAK,SAAS,EAAE,CAAC,CAAC,aAAa,CAAC,YAC5B,KAAC,KAAK,IACF,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc,GAChC,IALiC,KAAK,CAAC,OAAO,CAM9C,CACT,CAAC;oBACN,CAAC,CAAC,GACA,CACT,CAAC;YACN,CAAC;YACD,KAAK,EAAE,SAAS,CAAC,MAAM;YACvB,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,GAAG;YACV,UAAU,EAAE,KAAK;SACpB;KACJ,CAAC;IAEF,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,EAC3C,oBAAoB,EACpB,QAAQ,EACR,OAAO,GACoB,EAAE,EAAE;IAC/B,MAAM,UAAU,GAAG,sBAAsB,CAAC,oBAAoB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAEnF,MAAM,eAAe,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAChD,GAAG,MAAM;QACT,QAAQ,EAAE,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC;KACjD,CAAC,CAAC,CAAC;IAEJ,OAAO,eAAe,CAAC;AAC3B,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { ValueOf } from '../../../../types/common';
2
+ export declare const STORAGE_NODES_COLUMNS_WIDTH_LS_KEY = "storageNodesColumnsWidth";
3
+ export declare const STORAGE_NODES_SELECTED_COLUMNS_LS_KEY = "storageNodesSelectedColumns";
4
+ export declare const STORAGE_NODES_COLUMNS_IDS: {
5
+ readonly NodeId: "NodeId";
6
+ readonly Host: "Host";
7
+ readonly DC: "DC";
8
+ readonly Rack: "Rack";
9
+ readonly Uptime: "Uptime";
10
+ readonly PDisks: "PDisks";
11
+ readonly Missing: "Missing";
12
+ };
13
+ type StorageNodesColumnId = ValueOf<typeof STORAGE_NODES_COLUMNS_IDS>;
14
+ export declare const DEFAULT_STORAGE_NODES_COLUMNS: StorageNodesColumnId[];
15
+ export declare const REQUIRED_STORAGE_NODES_COLUMNS: StorageNodesColumnId[];
16
+ export declare const STORAGE_NODES_COLUMNS_TITLES: {
17
+ readonly NodeId: string;
18
+ readonly Host: string;
19
+ readonly DC: string;
20
+ readonly Rack: string;
21
+ readonly Uptime: string;
22
+ readonly PDisks: string;
23
+ readonly Missing: string;
24
+ };
25
+ export {};
@@ -0,0 +1,47 @@
1
+ import i18n from './i18n';
2
+ export const STORAGE_NODES_COLUMNS_WIDTH_LS_KEY = 'storageNodesColumnsWidth';
3
+ export const STORAGE_NODES_SELECTED_COLUMNS_LS_KEY = 'storageNodesSelectedColumns';
4
+ export const STORAGE_NODES_COLUMNS_IDS = {
5
+ NodeId: 'NodeId',
6
+ Host: 'Host',
7
+ DC: 'DC',
8
+ Rack: 'Rack',
9
+ Uptime: 'Uptime',
10
+ PDisks: 'PDisks',
11
+ Missing: 'Missing',
12
+ };
13
+ export const DEFAULT_STORAGE_NODES_COLUMNS = [
14
+ 'NodeId',
15
+ 'Host',
16
+ 'DC',
17
+ 'Rack',
18
+ 'Uptime',
19
+ 'PDisks',
20
+ ];
21
+ export const REQUIRED_STORAGE_NODES_COLUMNS = ['NodeId'];
22
+ // This code is running when module is initialized and correct language may not be set yet
23
+ // get functions guarantee that i18n fields will be inited on render with current render language
24
+ export const STORAGE_NODES_COLUMNS_TITLES = {
25
+ get NodeId() {
26
+ return i18n('nodes-id');
27
+ },
28
+ get Host() {
29
+ return i18n('host');
30
+ },
31
+ get DC() {
32
+ return i18n('dc');
33
+ },
34
+ get Rack() {
35
+ return i18n('rack');
36
+ },
37
+ get Uptime() {
38
+ return i18n('uptime');
39
+ },
40
+ get PDisks() {
41
+ return i18n('pdisks');
42
+ },
43
+ get Missing() {
44
+ return i18n('missing');
45
+ },
46
+ };
47
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/containers/Storage/StorageNodes/columns/constants.ts"],"names":[],"mappings":"AAEA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,CAAC,MAAM,kCAAkC,GAAG,0BAA0B,CAAC;AAC7E,MAAM,CAAC,MAAM,qCAAqC,GAAG,6BAA6B,CAAC;AAEnF,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACrC,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACZ,CAAC;AAIX,MAAM,CAAC,MAAM,6BAA6B,GAA2B;IACjE,QAAQ;IACR,MAAM;IACN,IAAI;IACJ,MAAM;IACN,QAAQ;IACR,QAAQ;CACX,CAAC;AACF,MAAM,CAAC,MAAM,8BAA8B,GAA2B,CAAC,QAAQ,CAAC,CAAC;AAEjF,0FAA0F;AAC1F,iGAAiG;AACjG,MAAM,CAAC,MAAM,4BAA4B,GAAG;IACxC,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5B,CAAC;IACD,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IACD,IAAI,EAAE;QACF,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IACD,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IACD,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC;IACD,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC;IACD,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;CACoD,CAAC"}
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import type { GetStorageNodesColumnsParams } from './types';
3
+ export declare function useStorageNodesSelectedColumns({ visibleEntities, database, additionalNodesProps, groupId, }: GetStorageNodesColumnsParams): {
4
+ columnsToShow: {
5
+ sortable: boolean;
6
+ name: string;
7
+ header?: React.ReactNode;
8
+ className?: string;
9
+ resizeable?: boolean;
10
+ render: ((props: {
11
+ row: import("../../../../store/reducers/storage/types").PreparedStorageNode;
12
+ index: number;
13
+ }) => React.ReactNode) & ((props: {
14
+ value?: unknown;
15
+ row: import("../../../../store/reducers/storage/types").PreparedStorageNode;
16
+ index: number;
17
+ footer?: boolean;
18
+ headerData?: boolean;
19
+ }) => React.ReactNode);
20
+ width?: number;
21
+ resizeMaxWidth?: number;
22
+ resizeMinWidth?: number;
23
+ align: "center" | "left" | "right";
24
+ headerTitle?: string;
25
+ accessor?: string | ((row: import("../../../../store/reducers/storage/types").PreparedStorageNode) => any) | undefined;
26
+ title?: string | ((row: import("../../../../store/reducers/storage/types").PreparedStorageNode) => string) | undefined;
27
+ customStyle?: ((props: import("@gravity-ui/react-data-table").CustomStyleParams<import("../../../../store/reducers/storage/types").PreparedStorageNode>) => React.CSSProperties) | undefined;
28
+ onClick?: ((data: {
29
+ row: import("../../../../store/reducers/storage/types").PreparedStorageNode;
30
+ index: number;
31
+ footer?: boolean;
32
+ headerData?: boolean;
33
+ }, column: import("@gravity-ui/react-data-table").Column<import("../../../../store/reducers/storage/types").PreparedStorageNode>, event: React.MouseEvent<HTMLTableCellElement>) => void) | undefined;
34
+ defaultOrder?: import("@gravity-ui/react-data-table").OrderType;
35
+ sortAccessor?: string | ((row: import("../../../../store/reducers/storage/types").PreparedStorageNode) => any) | undefined;
36
+ sortAscending?: import("@gravity-ui/react-data-table").Comparator<import("../../../../store/reducers/storage/types").PreparedStorageNode> | undefined;
37
+ sub?: import("@gravity-ui/react-data-table").Column<import("../../../../store/reducers/storage/types").PreparedStorageNode>[] | undefined;
38
+ group?: boolean;
39
+ autogroup?: boolean;
40
+ }[];
41
+ columnsToSelect: import("@gravity-ui/uikit").TableColumnSetupItem[];
42
+ setColumns: (updated: import("@gravity-ui/uikit").TableColumnSetupItem[]) => void;
43
+ };
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { VISIBLE_ENTITIES } from '../../../../store/reducers/storage/constants';
3
+ import { useSelectedColumns } from '../../../../utils/hooks/useSelectedColumns';
4
+ import { getPreparedStorageNodesColumns } from './columns';
5
+ import { DEFAULT_STORAGE_NODES_COLUMNS, REQUIRED_STORAGE_NODES_COLUMNS, STORAGE_NODES_COLUMNS_IDS, STORAGE_NODES_COLUMNS_TITLES, STORAGE_NODES_SELECTED_COLUMNS_LS_KEY, } from './constants';
6
+ export function useStorageNodesSelectedColumns({ visibleEntities, database, additionalNodesProps, groupId, }) {
7
+ const columns = React.useMemo(() => {
8
+ return getPreparedStorageNodesColumns({ database, additionalNodesProps, groupId });
9
+ }, [database, additionalNodesProps, groupId]);
10
+ const requiredColumns = React.useMemo(() => {
11
+ if (visibleEntities === VISIBLE_ENTITIES.missing) {
12
+ return [...REQUIRED_STORAGE_NODES_COLUMNS, STORAGE_NODES_COLUMNS_IDS.Missing];
13
+ }
14
+ return REQUIRED_STORAGE_NODES_COLUMNS;
15
+ }, [visibleEntities]);
16
+ return useSelectedColumns(columns, STORAGE_NODES_SELECTED_COLUMNS_LS_KEY, STORAGE_NODES_COLUMNS_TITLES, DEFAULT_STORAGE_NODES_COLUMNS, requiredColumns);
17
+ }
18
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../../src/containers/Storage/StorageNodes/columns/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,gBAAgB,EAAC,MAAM,8CAA8C,CAAC;AAC9E,OAAO,EAAC,kBAAkB,EAAC,MAAM,4CAA4C,CAAC;AAE9E,OAAO,EAAC,8BAA8B,EAAC,MAAM,WAAW,CAAC;AACzD,OAAO,EACH,6BAA6B,EAC7B,8BAA8B,EAC9B,yBAAyB,EACzB,4BAA4B,EAC5B,qCAAqC,GACxC,MAAM,aAAa,CAAC;AAGrB,MAAM,UAAU,8BAA8B,CAAC,EAC3C,eAAe,EACf,QAAQ,EACR,oBAAoB,EACpB,OAAO,GACoB;IAC3B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAC/B,OAAO,8BAA8B,CAAC,EAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAC,CAAC,CAAC;IACrF,CAAC,EAAE,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAC,CAAC;IAE9C,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACvC,IAAI,eAAe,KAAK,gBAAgB,CAAC,OAAO,EAAE,CAAC;YAC/C,OAAO,CAAC,GAAG,8BAA8B,EAAE,yBAAyB,CAAC,OAAO,CAAC,CAAC;QAClF,CAAC;QACD,OAAO,8BAA8B,CAAC;IAC1C,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IAEtB,OAAO,kBAAkB,CACrB,OAAO,EACP,qCAAqC,EACrC,4BAA4B,EAC5B,6BAA6B,EAC7B,eAAe,CAClB,CAAC;AACN,CAAC"}
@@ -0,0 +1,9 @@
1
+ {
2
+ "nodes-id": "Node ID",
3
+ "host": "Host",
4
+ "dc": "DC",
5
+ "rack": "Rack",
6
+ "uptime": "Uptime",
7
+ "missing": "Missing",
8
+ "pdisks": "PDisks"
9
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: (key: "missing" | "host" | "uptime" | "dc" | "rack" | "nodes-id" | "pdisks", params?: import("@gravity-ui/i18n").Params) => string;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { registerKeysets } from '../../../../../utils/i18n';
2
+ import en from './en.json';
3
+ const COMPONENT = 'ydb-storage-nodes-columns';
4
+ export default registerKeysets(COMPONENT, { en });
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/containers/Storage/StorageNodes/columns/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,MAAM,WAAW,CAAC;AAE3B,MAAM,SAAS,GAAG,2BAA2B,CAAC;AAE9C,eAAe,eAAe,CAAC,SAAS,EAAE,EAAC,EAAE,EAAC,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { Column as DataTableColumn } from '@gravity-ui/react-data-table';
2
+ import type { Column as PaginatedTableColumn } from '../../../../components/PaginatedTable';
3
+ import type { PreparedStorageNode, VisibleEntities } from '../../../../store/reducers/storage/types';
4
+ import type { AdditionalNodesProps } from '../../../../types/additionalProps';
5
+ export type StorageNodesColumn = PaginatedTableColumn<PreparedStorageNode> & DataTableColumn<PreparedStorageNode>;
6
+ export interface GetStorageNodesColumnsParams {
7
+ additionalNodesProps: AdditionalNodesProps | undefined;
8
+ visibleEntities?: VisibleEntities;
9
+ database?: string;
10
+ groupId?: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/containers/Storage/StorageNodes/columns/types.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
1
  import type { FetchData } from '../../../components/PaginatedTable';
2
- import type { NodesApiRequestParams } from '../../../store/reducers/nodes/types';
3
2
  import type { PreparedStorageNode, PreparedStorageNodeFilters } from '../../../store/reducers/storage/types';
4
- export declare const getStorageNodes: FetchData<PreparedStorageNode, PreparedStorageNodeFilters, Pick<NodesApiRequestParams, 'type' | 'storage'>>;
3
+ import type { NodesRequestParams } from '../../../types/api/nodes';
4
+ export declare const getStorageNodes: FetchData<PreparedStorageNode, PreparedStorageNodeFilters, Pick<NodesRequestParams, 'type' | 'storage'>>;
@@ -1,5 +1,6 @@
1
1
  import { prepareStorageNodesResponse } from '../../../store/reducers/storage/utils';
2
- import { getUptimeParamValue } from '../../../utils/nodes';
2
+ import { prepareSortValue } from '../../../utils/filters';
3
+ import { getUptimeParamValue, isSortableNodesProperty } from '../../../utils/nodes';
3
4
  const getConcurrentId = (limit, offset) => {
4
5
  return `getStorageNodes|offset${offset}|limit${limit}`;
5
6
  };
@@ -7,16 +8,18 @@ export const getStorageNodes = async (params) => {
7
8
  const { type = 'static', storage = true, limit, offset, sortParams, filters } = params;
8
9
  const { searchValue, nodesUptimeFilter, visibleEntities, database } = filters !== null && filters !== void 0 ? filters : {};
9
10
  const { sortOrder, columnId } = sortParams !== null && sortParams !== void 0 ? sortParams : {};
11
+ const sort = isSortableNodesProperty(columnId)
12
+ ? prepareSortValue(columnId, sortOrder)
13
+ : undefined;
10
14
  const response = await window.api.getNodes({
11
15
  type,
12
16
  storage,
13
17
  limit,
14
18
  offset,
15
- sortOrder,
16
- sortValue: columnId,
19
+ sort,
17
20
  filter: searchValue,
18
21
  uptime: getUptimeParamValue(nodesUptimeFilter),
19
- visibleEntities,
22
+ with: visibleEntities,
20
23
  database,
21
24
  }, { concurrentId: getConcurrentId(limit, offset) });
22
25
  const preparedResponse = prepareStorageNodesResponse(response);
@@ -1 +1 @@
1
- {"version":3,"file":"getNodes.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageNodes/getNodes.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,2BA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AM,CAAC,EAAC,CACjD,CAAC;IACF,MAAM,gBAAgB,GAAG,2BAA2B,CAAC,QAAQ,CAAC,CAAC;IAC/D,OAAO;QACH,IAAI,EAAE,gBAAgB,CAAC,KAAK,IAAI,EAAE;QAClC,KAAK,EAAE,gBAAgB,CAAC,KAAK,IAAI,CAAC;QAClC,KAAK,EAAE,gBAAgB,CAAC,KAAK,IAAI,CAAC;KACrC,CAAC;AACN,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { cn } from '../../../utils/cn';
2
2
  import { isUnavailableNode } from '../../../utils/nodes';
3
- export const b = cn('global-storage-nodes');
3
+ export const b = cn('ydb-storage-nodes');
4
4
  export const getRowUnavailableClassName = (row) => b('node', { unavailable: isUnavailableNode(row) });
5
5
  //# sourceMappingURL=shared.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageNodes/shared.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,EAAE,EAAC,MAAM,mBAAmB,CAAC;AACrC,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAEvD,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,CAAC;AAE5C,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnE,CAAC,CAAC,MAAM,EAAE,EAAC,WAAW,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/containers/Storage/StorageNodes/shared.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,EAAE,EAAC,MAAM,mBAAmB,CAAC;AACrC,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAEvD,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,CAAC;AAEzC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnE,CAAC,CAAC,MAAM,EAAE,EAAC,WAAW,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAAC,CAAC,CAAC"}
@@ -1,9 +1,7 @@
1
- import type { AdditionalNodesProps } from '../../types/additionalProps';
2
1
  interface StorageWrapperProps {
3
2
  database?: string;
4
3
  nodeId?: string;
5
4
  parentContainer?: Element | null;
6
- additionalNodesProps?: AdditionalNodesProps;
7
5
  }
8
6
  export declare const StorageWrapper: ({ parentContainer, ...props }: StorageWrapperProps) => import("react/jsx-runtime").JSX.Element;
9
7
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"StorageWrapper.js","sourceRoot":"","sources":["../../../src/containers/Storage/StorageWrapper.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,wBAAwB,EAAC,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AASlC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAC,eAAe,EAAE,GAAG,KAAK,EAAsB,EAAE,EAAE;IAC/E,MAAM,CAAC,kBAAkB,CAAC,GAAG,UAAU,CAAU,wBAAwB,CAAC,CAAC;IAE3E,IAAI,kBAAkB,EAAE,CAAC;QACrB,OAAO,KAAC,gBAAgB,IAAC,eAAe,EAAE,eAAe,KAAM,KAAK,GAAI,CAAC;IAC7E,CAAC;IAED,OAAO,KAAC,OAAO,OAAK,KAAK,GAAI,CAAC;AAClC,CAAC,CAAC"}
1
+ {"version":3,"file":"StorageWrapper.js","sourceRoot":"","sources":["../../../src/containers/Storage/StorageWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,wBAAwB,EAAC,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAQlC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAC,eAAe,EAAE,GAAG,KAAK,EAAsB,EAAE,EAAE;IAC/E,MAAM,CAAC,kBAAkB,CAAC,GAAG,UAAU,CAAU,wBAAwB,CAAC,CAAC;IAE3E,IAAI,kBAAkB,EAAE,CAAC;QACrB,OAAO,KAAC,gBAAgB,IAAC,eAAe,EAAE,eAAe,KAAM,KAAK,GAAI,CAAC;IAC7E,CAAC;IAED,OAAO,KAAC,OAAO,OAAK,KAAK,GAAI,CAAC;AAClC,CAAC,CAAC"}