ydb-embedded-ui 22.4.0 → 22.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/dist/components/AutoRefreshControl/StickyAutoRefreshControl.d.ts +2 -0
  2. package/dist/components/AutoRefreshControl/StickyAutoRefreshControl.js +9 -0
  3. package/dist/components/AutoRefreshControl/StickyAutoRefreshControl.js.map +1 -0
  4. package/dist/components/AutoRefreshControl/StickyAutoRefreshControl.scss +18 -0
  5. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +3 -2
  6. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +19 -4
  7. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js.map +1 -1
  8. package/dist/components/CopyableValue/CopyableValue.d.ts +10 -0
  9. package/dist/components/CopyableValue/CopyableValue.js +10 -0
  10. package/dist/components/CopyableValue/CopyableValue.js.map +1 -0
  11. package/dist/components/CopyableValue/CopyableValue.scss +16 -0
  12. package/dist/components/CopyableValue/i18n/en.json +3 -0
  13. package/dist/components/CopyableValue/i18n/index.d.ts +2 -0
  14. package/dist/components/CopyableValue/i18n/index.js +6 -0
  15. package/dist/components/CopyableValue/i18n/index.js.map +1 -0
  16. package/dist/components/CriticalActionDialog/CriticalActionDialog.d.ts +2 -1
  17. package/dist/components/CriticalActionDialog/CriticalActionDialog.js +2 -1
  18. package/dist/components/CriticalActionDialog/CriticalActionDialog.js.map +1 -1
  19. package/dist/components/DiskCapacityInfo/DiskCapacityInfo.d.ts +1 -21
  20. package/dist/components/DiskCapacityInfo/DiskCapacityInfo.js +40 -126
  21. package/dist/components/DiskCapacityInfo/DiskCapacityInfo.js.map +1 -1
  22. package/dist/components/DiskCapacityInfo/i18n/en.json +0 -1
  23. package/dist/components/DiskCapacityInfo/i18n/index.d.ts +1 -1
  24. package/dist/components/EntityStatus/EntityStatus.d.ts +18 -6
  25. package/dist/components/EntityStatus/EntityStatus.js +5 -1
  26. package/dist/components/EntityStatus/EntityStatus.js.map +1 -1
  27. package/dist/components/EntityStatus/EntityStatus.scss +5 -0
  28. package/dist/components/EvictVDiskButton/EvictVDiskButton.d.ts +5 -2
  29. package/dist/components/EvictVDiskButton/EvictVDiskButton.js +3 -2
  30. package/dist/components/EvictVDiskButton/EvictVDiskButton.js.map +1 -1
  31. package/dist/components/EvictVDiskButton/i18n/en.json +2 -2
  32. package/dist/components/FullNodeViewer/FullNodeViewer.js +4 -7
  33. package/dist/components/FullNodeViewer/FullNodeViewer.js.map +1 -1
  34. package/dist/components/FullNodeViewer/i18n/index.d.ts +1 -1
  35. package/dist/components/HideUnavailableNodesSwitch/HideUnavailableNodesSwitch.d.ts +3 -0
  36. package/dist/components/HideUnavailableNodesSwitch/HideUnavailableNodesSwitch.js +12 -0
  37. package/dist/components/HideUnavailableNodesSwitch/HideUnavailableNodesSwitch.js.map +1 -0
  38. package/dist/components/HideUnavailableNodesSwitch/i18n/en.json +3 -0
  39. package/dist/components/HideUnavailableNodesSwitch/i18n/index.d.ts +2 -0
  40. package/dist/components/HideUnavailableNodesSwitch/i18n/index.js +6 -0
  41. package/dist/components/HideUnavailableNodesSwitch/i18n/index.js.map +1 -0
  42. package/dist/components/HideUnavailableNodesSwitch/i18n/ru.json +3 -0
  43. package/dist/components/HoverPopup/HoverPopup.d.ts +1 -0
  44. package/dist/components/HoverPopup/HoverPopup.js +87 -16
  45. package/dist/components/HoverPopup/HoverPopup.js.map +1 -1
  46. package/dist/components/MemoryViewer/MemoryViewer.d.ts +3 -1
  47. package/dist/components/MemoryViewer/MemoryViewer.js +25 -16
  48. package/dist/components/MemoryViewer/MemoryViewer.js.map +1 -1
  49. package/dist/components/MemoryViewer/i18n/en.json +4 -3
  50. package/dist/components/MemoryViewer/i18n/index.d.ts +1 -1
  51. package/dist/components/MemoryViewer/utils.d.ts +4 -2
  52. package/dist/components/MemoryViewer/utils.js +11 -11
  53. package/dist/components/MemoryViewer/utils.js.map +1 -1
  54. package/dist/components/PDiskInfo/PDiskInfo.d.ts +4 -9
  55. package/dist/components/PDiskInfo/PDiskInfo.js +32 -144
  56. package/dist/components/PDiskInfo/PDiskInfo.js.map +1 -1
  57. package/dist/components/PDiskInfo/PDiskInfo.scss +15 -0
  58. package/dist/components/PDiskInfo/PDiskLogSize.js +1 -1
  59. package/dist/components/PDiskInfo/PDiskLogSize.js.map +1 -1
  60. package/dist/components/PDiskInfo/i18n/en.json +6 -3
  61. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  62. package/dist/components/PDiskInfo/statuses.js +12 -3
  63. package/dist/components/PDiskInfo/statuses.js.map +1 -1
  64. package/dist/components/PageMeta/PageMeta.d.ts +0 -2
  65. package/dist/components/PageMeta/PageMeta.js +1 -6
  66. package/dist/components/PageMeta/PageMeta.js.map +1 -1
  67. package/dist/components/Search/Search.js +3 -1
  68. package/dist/components/Search/Search.js.map +1 -1
  69. package/dist/components/StorageGroupInfo/StorageGroupInfo.js +4 -9
  70. package/dist/components/StorageGroupInfo/StorageGroupInfo.js.map +1 -1
  71. package/dist/components/StorageGroupInfo/i18n/index.d.ts +1 -1
  72. package/dist/components/TenantNameWrapper/i18n/index.d.ts +1 -1
  73. package/dist/components/VDisk/VDisk.js +2 -2
  74. package/dist/components/VDisk/VDisk.js.map +1 -1
  75. package/dist/components/VDiskInfo/VDiskInfo.d.ts +3 -7
  76. package/dist/components/VDiskInfo/VDiskInfo.js +57 -235
  77. package/dist/components/VDiskInfo/VDiskInfo.js.map +1 -1
  78. package/dist/components/VDiskInfo/VDiskInfo.scss +19 -3
  79. package/dist/components/VDiskInfo/getVDiskDetails.d.ts +7 -1
  80. package/dist/components/VDiskInfo/getVDiskDetails.js +14 -1
  81. package/dist/components/VDiskInfo/getVDiskDetails.js.map +1 -1
  82. package/dist/components/VDiskInfo/i18n/en.json +4 -13
  83. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
  84. package/dist/components/VDiskPopup/VDiskPopup.d.ts +2 -1
  85. package/dist/components/VDiskPopup/VDiskPopup.js +10 -26
  86. package/dist/components/VDiskPopup/VDiskPopup.js.map +1 -1
  87. package/dist/components/VDiskPopup/i18n/en.json +0 -2
  88. package/dist/components/VDiskPopup/i18n/index.d.ts +1 -1
  89. package/dist/components/VDiskStatus/VDiskReplicationStatus.js +1 -1
  90. package/dist/components/VDiskStatus/VDiskReplicationStatus.js.map +1 -1
  91. package/dist/components/VDiskStatus/VDiskStatus.js +2 -2
  92. package/dist/components/VDiskStatus/VDiskStatus.js.map +1 -1
  93. package/dist/components/VDiskStatus/VDiskStatus.scss +4 -0
  94. package/dist/components/VDiskStatus/statuses.js +2 -2
  95. package/dist/components/VDiskStatus/statuses.js.map +1 -1
  96. package/dist/components/nodesColumns/columns.d.ts +1 -0
  97. package/dist/components/nodesColumns/columns.js +13 -6
  98. package/dist/components/nodesColumns/columns.js.map +1 -1
  99. package/dist/containers/Clusters/Clusters.js +35 -6
  100. package/dist/containers/Clusters/Clusters.js.map +1 -1
  101. package/dist/containers/Clusters/Clusters.scss +24 -6
  102. package/dist/containers/Clusters/columns.js +9 -4
  103. package/dist/containers/Clusters/columns.js.map +1 -1
  104. package/dist/containers/Clusters/i18n/en.json +6 -0
  105. package/dist/containers/Clusters/i18n/index.d.ts +1 -1
  106. package/dist/containers/Header/Header.js +8 -0
  107. package/dist/containers/Header/Header.js.map +1 -1
  108. package/dist/containers/Header/HeaderLeftControls.js +3 -1
  109. package/dist/containers/Header/HeaderLeftControls.js.map +1 -1
  110. package/dist/containers/Header/PDiskLeftControls.d.ts +1 -0
  111. package/dist/containers/Header/PDiskLeftControls.js +24 -0
  112. package/dist/containers/Header/PDiskLeftControls.js.map +1 -0
  113. package/dist/containers/Header/VDiskLeftControls.d.ts +1 -0
  114. package/dist/containers/Header/VDiskLeftControls.js +23 -0
  115. package/dist/containers/Header/VDiskLeftControls.js.map +1 -0
  116. package/dist/containers/Header/breadcrumbs.js +5 -2
  117. package/dist/containers/Header/breadcrumbs.js.map +1 -1
  118. package/dist/containers/Header/i18n/en.json +4 -1
  119. package/dist/containers/Header/i18n/index.d.ts +1 -1
  120. package/dist/containers/Node/Node.js +4 -3
  121. package/dist/containers/Node/Node.js.map +1 -1
  122. package/dist/containers/Node/Node.scss +14 -2
  123. package/dist/containers/Nodes/NodesControls/NodesControls.js +2 -1
  124. package/dist/containers/Nodes/NodesControls/NodesControls.js.map +1 -1
  125. package/dist/containers/Nodes/NodesTable.js +4 -0
  126. package/dist/containers/Nodes/NodesTable.js.map +1 -1
  127. package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js +8 -3
  128. package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js.map +1 -1
  129. package/dist/containers/Nodes/PaginatedNodes/NodesComponent.js +12 -2
  130. package/dist/containers/Nodes/PaginatedNodes/NodesComponent.js.map +1 -1
  131. package/dist/containers/Nodes/getNodes.js +2 -1
  132. package/dist/containers/Nodes/getNodes.js.map +1 -1
  133. package/dist/containers/Nodes/useDebouncedSearch.d.ts +2 -0
  134. package/dist/containers/Nodes/useDebouncedSearch.js +11 -0
  135. package/dist/containers/Nodes/useDebouncedSearch.js.map +1 -0
  136. package/dist/containers/PDiskPage/PDiskPage.js +24 -34
  137. package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
  138. package/dist/containers/PDiskPage/PDiskPage.scss +29 -11
  139. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js +3 -3
  140. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js.map +1 -1
  141. package/dist/containers/PDiskPage/PDiskStorageDetails.d.ts +6 -0
  142. package/dist/containers/PDiskPage/PDiskStorageDetails.js +28 -0
  143. package/dist/containers/PDiskPage/PDiskStorageDetails.js.map +1 -0
  144. package/dist/containers/PDiskPage/PDiskStorageDetails.scss +51 -0
  145. package/dist/containers/PDiskPage/i18n/en.json +1 -0
  146. package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
  147. package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/i18n/index.d.ts +1 -1
  148. package/dist/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.js +3 -0
  149. package/dist/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.js.map +1 -1
  150. package/dist/containers/Storage/PaginatedStorageNodes/StorageNodesComponent.js +8 -1
  151. package/dist/containers/Storage/PaginatedStorageNodes/StorageNodesComponent.js.map +1 -1
  152. package/dist/containers/Storage/PaginatedStorageNodes/StorageNodesControls.js +2 -1
  153. package/dist/containers/Storage/PaginatedStorageNodes/StorageNodesControls.js.map +1 -1
  154. package/dist/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.js +4 -0
  155. package/dist/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.js.map +1 -1
  156. package/dist/containers/Storage/PaginatedStorageNodesTable/getNodes.js +2 -1
  157. package/dist/containers/Storage/PaginatedStorageNodesTable/getNodes.js.map +1 -1
  158. package/dist/containers/Storage/Storage.scss +4 -0
  159. package/dist/containers/Storage/StorageExpertModePanel/constants.d.ts +1 -1
  160. package/dist/containers/Storage/StorageExpertModePanel/i18n/index.d.ts +1 -1
  161. package/dist/containers/Storage/useStorageQueryParams.d.ts +4 -4
  162. package/dist/containers/StorageGroupPage/StorageGroupPage.js +5 -14
  163. package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
  164. package/dist/containers/StorageGroupPage/StorageGroupPage.scss +19 -4
  165. package/dist/containers/StorageGroupPage/i18n/en.json +0 -2
  166. package/dist/containers/StorageGroupPage/i18n/index.d.ts +1 -1
  167. package/dist/containers/Tablet/Tablet.js +3 -2
  168. package/dist/containers/Tablet/Tablet.js.map +1 -1
  169. package/dist/containers/Tablet/Tablet.scss +15 -1
  170. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/ManagePartitioningDialog/i18n/index.d.ts +1 -1
  171. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +5 -12
  172. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js.map +1 -1
  173. package/dist/containers/Tenant/Diagnostics/TopQueries/columns/i18n/index.d.ts +1 -1
  174. package/dist/containers/Tenant/Healthcheck/Healthcheck.scss +6 -1
  175. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssue.js +2 -2
  176. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssue.js.map +1 -1
  177. package/dist/containers/Tenant/TenantDrawerHealthcheck.js +10 -2
  178. package/dist/containers/Tenant/TenantDrawerHealthcheck.js.map +1 -1
  179. package/dist/containers/VDiskPage/VDiskPage.js +27 -36
  180. package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
  181. package/dist/containers/VDiskPage/VDiskPage.scss +39 -7
  182. package/dist/containers/VDiskPage/VDiskStorageDetails.js +27 -29
  183. package/dist/containers/VDiskPage/VDiskStorageDetails.js.map +1 -1
  184. package/dist/containers/VDiskPage/VDiskStorageDetails.scss +24 -93
  185. package/dist/containers/VDiskPage/i18n/en.json +2 -12
  186. package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
  187. package/dist/store/reducers/capabilities/hooks.d.ts +1 -0
  188. package/dist/store/reducers/capabilities/hooks.js +3 -0
  189. package/dist/store/reducers/capabilities/hooks.js.map +1 -1
  190. package/dist/store/reducers/cluster/parseFields.js +1 -0
  191. package/dist/store/reducers/cluster/parseFields.js.map +1 -1
  192. package/dist/store/reducers/clusters/clusters.js +1 -0
  193. package/dist/store/reducers/clusters/clusters.js.map +1 -1
  194. package/dist/store/reducers/clusters/selectors.d.ts +1 -0
  195. package/dist/store/reducers/clusters/selectors.js +4 -1
  196. package/dist/store/reducers/clusters/selectors.js.map +1 -1
  197. package/dist/store/reducers/clusters/types.d.ts +2 -0
  198. package/dist/store/reducers/nodes/types.d.ts +1 -0
  199. package/dist/store/reducers/storage/prepareGroupsDisks.d.ts +1 -1
  200. package/dist/store/reducers/storage/prepareGroupsDisks.js +2 -1
  201. package/dist/store/reducers/storage/prepareGroupsDisks.js.map +1 -1
  202. package/dist/store/reducers/storage/types.d.ts +1 -0
  203. package/dist/store/reducers/storage/utils.js +10 -3
  204. package/dist/store/reducers/storage/utils.js.map +1 -1
  205. package/dist/store/reducers/vdisk/types.d.ts +1 -1
  206. package/dist/store/reducers/vdisk/utils.js +5 -5
  207. package/dist/store/reducers/vdisk/utils.js.map +1 -1
  208. package/dist/types/api/capabilities.d.ts +1 -1
  209. package/dist/types/api/meta.d.ts +1 -0
  210. package/dist/types/api/nodes.d.ts +2 -0
  211. package/dist/types/api/nodesList.d.ts +2 -0
  212. package/dist/utils/hooks/useDatabaseHealthcheckAvailable.d.ts +2 -0
  213. package/dist/utils/hooks/useDatabaseHealthcheckAvailable.js +6 -0
  214. package/dist/utils/hooks/useDatabaseHealthcheckAvailable.js.map +1 -0
  215. package/dist/utils/hooks/useHideUnavailableNodes.d.ts +5 -0
  216. package/dist/utils/hooks/useHideUnavailableNodes.js +21 -0
  217. package/dist/utils/hooks/useHideUnavailableNodes.js.map +1 -0
  218. package/dist/utils/memory.d.ts +5 -0
  219. package/dist/utils/memory.js +9 -0
  220. package/dist/utils/memory.js.map +1 -0
  221. package/dist/utils/nodes.js +3 -3
  222. package/dist/utils/nodes.js.map +1 -1
  223. package/dist/utils/storageMetrics.d.ts +1 -0
  224. package/dist/utils/storageMetrics.js +8 -0
  225. package/dist/utils/storageMetrics.js.map +1 -1
  226. package/package.json +1 -1
  227. package/src/components/AutoRefreshControl/StickyAutoRefreshControl.scss +18 -0
  228. package/src/components/AutoRefreshControl/StickyAutoRefreshControl.tsx +15 -0
  229. package/src/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.tsx +22 -3
  230. package/src/components/CopyableValue/CopyableValue.scss +16 -0
  231. package/src/components/CopyableValue/CopyableValue.tsx +40 -0
  232. package/src/components/CopyableValue/i18n/en.json +3 -0
  233. package/src/components/CopyableValue/i18n/index.ts +8 -0
  234. package/src/components/CriticalActionDialog/CriticalActionDialog.tsx +3 -0
  235. package/src/components/DiskCapacityInfo/DiskCapacityInfo.tsx +40 -185
  236. package/src/components/DiskCapacityInfo/i18n/en.json +0 -1
  237. package/src/components/EntityStatus/EntityStatus.scss +5 -0
  238. package/src/components/EntityStatus/EntityStatus.tsx +38 -5
  239. package/src/components/EvictVDiskButton/EvictVDiskButton.tsx +10 -2
  240. package/src/components/EvictVDiskButton/i18n/en.json +2 -2
  241. package/src/components/FullNodeViewer/FullNodeViewer.tsx +4 -9
  242. package/src/components/HideUnavailableNodesSwitch/HideUnavailableNodesSwitch.tsx +24 -0
  243. package/src/components/HideUnavailableNodesSwitch/i18n/en.json +3 -0
  244. package/src/components/HideUnavailableNodesSwitch/i18n/index.ts +7 -0
  245. package/src/components/HideUnavailableNodesSwitch/i18n/ru.json +3 -0
  246. package/src/components/HoverPopup/HoverPopup.tsx +95 -19
  247. package/src/components/MemoryViewer/MemoryViewer.tsx +30 -17
  248. package/src/components/MemoryViewer/i18n/en.json +4 -3
  249. package/src/components/MemoryViewer/utils.ts +19 -12
  250. package/src/components/PDiskInfo/PDiskInfo.scss +15 -0
  251. package/src/components/PDiskInfo/PDiskInfo.tsx +51 -243
  252. package/src/components/PDiskInfo/PDiskLogSize.tsx +12 -8
  253. package/src/components/PDiskInfo/i18n/en.json +6 -3
  254. package/src/components/PDiskInfo/statuses.ts +16 -3
  255. package/src/components/PageMeta/PageMeta.tsx +0 -18
  256. package/src/components/Search/Search.tsx +5 -2
  257. package/src/components/StorageGroupInfo/StorageGroupInfo.tsx +8 -13
  258. package/src/components/VDisk/VDisk.tsx +3 -2
  259. package/src/components/VDiskInfo/VDiskInfo.scss +19 -3
  260. package/src/components/VDiskInfo/VDiskInfo.tsx +119 -341
  261. package/src/components/VDiskInfo/getVDiskDetails.tsx +24 -2
  262. package/src/components/VDiskInfo/i18n/en.json +4 -13
  263. package/src/components/VDiskPopup/VDiskPopup.tsx +16 -24
  264. package/src/components/VDiskPopup/i18n/en.json +0 -2
  265. package/src/components/VDiskStatus/VDiskReplicationStatus.tsx +1 -1
  266. package/src/components/VDiskStatus/VDiskStatus.scss +4 -0
  267. package/src/components/VDiskStatus/VDiskStatus.tsx +13 -2
  268. package/src/components/VDiskStatus/statuses.ts +2 -2
  269. package/src/components/nodesColumns/columns.tsx +26 -12
  270. package/src/containers/Clusters/Clusters.scss +24 -6
  271. package/src/containers/Clusters/Clusters.tsx +74 -5
  272. package/src/containers/Clusters/columns.tsx +36 -6
  273. package/src/containers/Clusters/i18n/en.json +6 -0
  274. package/src/containers/Header/Header.tsx +8 -0
  275. package/src/containers/Header/HeaderLeftControls.tsx +3 -1
  276. package/src/containers/Header/PDiskLeftControls.tsx +41 -0
  277. package/src/containers/Header/VDiskLeftControls.tsx +40 -0
  278. package/src/containers/Header/breadcrumbs.tsx +4 -2
  279. package/src/containers/Header/i18n/en.json +4 -1
  280. package/src/containers/Node/Node.scss +14 -2
  281. package/src/containers/Node/Node.tsx +6 -6
  282. package/src/containers/Nodes/NodesControls/NodesControls.tsx +3 -0
  283. package/src/containers/Nodes/NodesTable.tsx +4 -0
  284. package/src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx +8 -3
  285. package/src/containers/Nodes/PaginatedNodes/NodesComponent.tsx +12 -2
  286. package/src/containers/Nodes/getNodes.ts +2 -0
  287. package/src/containers/Nodes/useDebouncedSearch.ts +13 -0
  288. package/src/containers/PDiskPage/PDiskPage.scss +29 -11
  289. package/src/containers/PDiskPage/PDiskPage.tsx +69 -63
  290. package/src/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.tsx +3 -9
  291. package/src/containers/PDiskPage/PDiskStorageDetails.scss +51 -0
  292. package/src/containers/PDiskPage/PDiskStorageDetails.tsx +64 -0
  293. package/src/containers/PDiskPage/i18n/en.json +1 -0
  294. package/src/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.tsx +3 -0
  295. package/src/containers/Storage/PaginatedStorageNodes/StorageNodesComponent.tsx +8 -1
  296. package/src/containers/Storage/PaginatedStorageNodes/StorageNodesControls.tsx +2 -0
  297. package/src/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.tsx +4 -0
  298. package/src/containers/Storage/PaginatedStorageNodesTable/getNodes.ts +2 -0
  299. package/src/containers/Storage/Storage.scss +4 -0
  300. package/src/containers/StorageGroupPage/StorageGroupPage.scss +19 -4
  301. package/src/containers/StorageGroupPage/StorageGroupPage.tsx +25 -45
  302. package/src/containers/StorageGroupPage/i18n/en.json +0 -2
  303. package/src/containers/Tablet/Tablet.scss +15 -1
  304. package/src/containers/Tablet/Tablet.tsx +21 -15
  305. package/src/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.tsx +5 -32
  306. package/src/containers/Tenant/Healthcheck/Healthcheck.scss +6 -1
  307. package/src/containers/Tenant/Healthcheck/components/HealthcheckIssue.tsx +18 -8
  308. package/src/containers/Tenant/TenantDrawerHealthcheck.tsx +14 -1
  309. package/src/containers/VDiskPage/VDiskPage.scss +39 -7
  310. package/src/containers/VDiskPage/VDiskPage.tsx +84 -72
  311. package/src/containers/VDiskPage/VDiskStorageDetails.scss +24 -93
  312. package/src/containers/VDiskPage/VDiskStorageDetails.tsx +50 -158
  313. package/src/containers/VDiskPage/i18n/en.json +2 -14
  314. package/src/store/reducers/capabilities/hooks.ts +4 -0
  315. package/src/store/reducers/cluster/parseFields.ts +1 -0
  316. package/src/store/reducers/clusters/clusters.ts +1 -0
  317. package/src/store/reducers/clusters/selectors.ts +4 -0
  318. package/src/store/reducers/clusters/types.ts +3 -0
  319. package/src/store/reducers/nodes/types.ts +1 -0
  320. package/src/store/reducers/storage/prepareGroupsDisks.ts +2 -0
  321. package/src/store/reducers/storage/types.ts +1 -0
  322. package/src/store/reducers/storage/utils.ts +13 -3
  323. package/src/store/reducers/vdisk/types.ts +2 -1
  324. package/src/store/reducers/vdisk/utils.ts +4 -5
  325. package/src/types/api/capabilities.ts +1 -0
  326. package/src/types/api/meta.ts +1 -0
  327. package/src/types/api/nodes.ts +2 -0
  328. package/src/types/api/nodesList.ts +3 -0
  329. package/src/utils/hooks/useDatabaseHealthcheckAvailable.ts +9 -0
  330. package/src/utils/hooks/useHideUnavailableNodes.ts +33 -0
  331. package/src/utils/memory.ts +16 -0
  332. package/src/utils/nodes.ts +3 -2
  333. package/src/utils/storageMetrics.ts +11 -0
  334. package/dist/components/VDiskInfo/getVDiskCapacityColumns.d.ts +0 -11
  335. package/dist/components/VDiskInfo/getVDiskCapacityColumns.js +0 -52
  336. package/dist/components/VDiskInfo/getVDiskCapacityColumns.js.map +0 -1
  337. package/src/components/VDiskInfo/getVDiskCapacityColumns.tsx +0 -83
@@ -1,195 +1,87 @@
1
- import {Button, Divider, Flex, Text} from '@gravity-ui/uikit';
1
+ import {Text} from '@gravity-ui/uikit';
2
+ import {isNil} from 'lodash';
2
3
 
3
4
  import {CellWithPopover} from '../../components/CellWithPopover/CellWithPopover';
4
- import {ClipboardButton} from '../../components/ClipboardButton/ClipboardButton';
5
+ import {CopyableValue} from '../../components/CopyableValue/CopyableValue';
6
+ import {InternalLinkButton} from '../../components/InternalLinkButton';
7
+ import {getVDiskLocationItems} from '../../components/VDiskInfo/getVDiskDetails';
5
8
  import {getPDiskPagePath} from '../../routes';
9
+ import {useNewStorageViewEnabled} from '../../store/reducers/capabilities/hooks';
6
10
  import type {VDiskData} from '../../store/reducers/vdisk/types';
7
11
  import {cn} from '../../utils/cn';
8
- import {BRAND_BUTTON_CLASS, EMPTY_DATA_PLACEHOLDER} from '../../utils/constants';
12
+ import type {DiskDetailItem} from '../../utils/disks/diskInfo/getDiskLocationItems';
9
13
  import {useIsViewerUser} from '../../utils/hooks/useIsUserAllowedToMakeChanges';
10
- import {
11
- formatMetricBytes,
12
- formatMetricPercent,
13
- getMetricBytesCommonSize,
14
- } from '../../utils/storageMetrics';
15
14
 
16
15
  import {vDiskPageKeyset} from './i18n';
17
16
 
18
17
  import './VDiskStorageDetails.scss';
19
18
 
20
19
  const b = cn('ydb-vdisk-storage-details');
20
+ const LOCATION_IDS = ['datacenter', 'rack', 'fqdn', 'pdisk-path'];
21
21
 
22
22
  interface VDiskStorageDetailsProps {
23
23
  className?: string;
24
24
  data?: VDiskData;
25
25
  }
26
26
 
27
- interface MetricItemProps {
28
- title: string;
29
- value: string;
30
- }
31
-
32
- interface CopyableDetailItemProps {
33
- title: string;
34
- value?: string | number;
35
- }
36
-
37
- interface DetailItemProps {
38
- title: string;
39
- value?: string | number;
40
- }
41
-
42
- interface TruncatedDetailValueProps {
43
- value?: string | number;
44
- }
45
-
46
- function MetricItem({title, value}: MetricItemProps) {
47
- return (
48
- <div className={b('metric')}>
49
- <Text variant="subheader-2" className={b('value')}>
50
- {value}
51
- </Text>
52
- <Text color="secondary" className={b('label')}>
53
- {title}
54
- </Text>
55
- </div>
56
- );
57
- }
58
-
59
- function DetailItem({title, value}: DetailItemProps) {
60
- return (
61
- <div className={b('detail')}>
62
- <TruncatedDetailValue value={value} />
63
- <Text color="secondary" className={b('label')}>
64
- {title}
65
- </Text>
66
- </div>
67
- );
68
- }
69
-
70
- function TruncatedDetailValue({value}: TruncatedDetailValueProps) {
71
- const normalizedValue =
72
- value === undefined || value === null || value === '' ? undefined : String(value);
73
- const displayValue = normalizedValue ?? EMPTY_DATA_PLACEHOLDER;
74
-
27
+ function DetailItem({item}: {item: DiskDetailItem}) {
28
+ const copyText = item.copyText === undefined ? undefined : String(item.copyText);
75
29
  return (
76
- <CellWithPopover
77
- content={normalizedValue}
78
- disabled={!normalizedValue}
79
- placement={['top', 'bottom']}
80
- fullWidth
81
- wrapperClassName={b('value-popover')}
82
- className={b('value-popover-content')}
30
+ <div
31
+ className={b('detail', {location: LOCATION_IDS.includes(item.id)})}
32
+ data-qa={`vdisk-location-${item.id}`}
83
33
  >
84
- <Text variant="subheader-2" className={b('value')}>
85
- {displayValue}
86
- </Text>
87
- </CellWithPopover>
88
- );
89
- }
90
-
91
- function CopyableDetailItem({title, value}: CopyableDetailItemProps) {
92
- const normalizedValue =
93
- value === undefined || value === null || value === '' ? undefined : String(value);
94
- const displayValue = normalizedValue ?? EMPTY_DATA_PLACEHOLDER;
95
-
96
- return (
97
- <div className={b('detail')}>
98
- <Flex alignItems="center" gap="1" className={b('value-row', {copyable: true})}>
34
+ <Text color="secondary">{item.name}</Text>
35
+ <CopyableValue copyText={copyText} fieldName={item.name}>
99
36
  <CellWithPopover
100
- content={normalizedValue}
101
- disabled={!normalizedValue}
37
+ content={copyText}
38
+ disabled={!copyText}
102
39
  placement={['top', 'bottom']}
103
40
  fullWidth
104
- wrapperClassName={b('value-popover', {copyable: true})}
105
- className={b('value-popover-content', {copyable: true})}
41
+ wrapperClassName={b('value-popover')}
42
+ className={b('value-popover-content', {
43
+ 'with-left-trim': item.id === 'pdisk-path',
44
+ })}
106
45
  >
107
- <Text variant="subheader-2" className={b('value')}>
108
- {displayValue}
109
- </Text>
46
+ <span tabIndex={copyText ? 0 : undefined}>{item.content}</span>
110
47
  </CellWithPopover>
111
- <ClipboardButton
112
- copyText={normalizedValue}
113
- withLabel={false}
114
- view="flat-secondary"
115
- size="s"
116
- />
117
- </Flex>
118
- <Text color="secondary" className={b('label')}>
119
- {title}
120
- </Text>
48
+ </CopyableValue>
121
49
  </div>
122
50
  );
123
51
  }
124
52
 
125
- export function VDiskStorageDetails({className, data}: VDiskStorageDetailsProps) {
53
+ export function VDiskStorageDetails({className, data = {}}: VDiskStorageDetailsProps) {
126
54
  const isViewerUser = useIsViewerUser();
127
-
128
- const used = Number(data?.AllocatedSize);
129
- const total = Number(data?.SizeLimit);
130
- const usage = Number(data?.AllocatedPercent);
131
- const free = Number(data?.FreeSize);
132
- const metricsSize = getMetricBytesCommonSize([used, total, free]);
133
-
134
- const {NodeDC, NodeRack, NodeHost, NodeId, PDiskId} = data || {};
135
-
55
+ const newStorageViewEnabled = useNewStorageViewEnabled();
136
56
  const pDiskPath =
137
- isViewerUser && NodeId !== undefined && PDiskId !== undefined
138
- ? getPDiskPagePath(PDiskId, NodeId, undefined, {withBasename: true})
57
+ isViewerUser && !isNil(data.NodeId) && !isNil(data.PDiskId)
58
+ ? getPDiskPagePath(data.PDiskId, data.NodeId)
139
59
  : undefined;
60
+ const items = getVDiskLocationItems(data, {
61
+ Host: data.NodeHost,
62
+ Rack: data.NodeRack,
63
+ DC: data.NodeDC,
64
+ }).filter(({id}) => newStorageViewEnabled || (id !== 'rack' && id !== 'pdisk-path'));
140
65
 
141
66
  return (
142
- <div className={b(null, className)}>
143
- <Flex alignItems="center" gap="1" className={b('title')}>
144
- <Text variant="subheader-2">{vDiskPageKeyset('title_storage-details')}</Text>
145
- </Flex>
146
- <div className={b('cards')}>
147
- <div className={b('card', {metrics: true})}>
148
- <MetricItem
149
- title={vDiskPageKeyset('field_storage-details-used')}
150
- value={formatMetricBytes(used, metricsSize)}
151
- />
152
- <MetricItem
153
- title={vDiskPageKeyset('field_storage-details-total')}
154
- value={formatMetricBytes(total, metricsSize)}
155
- />
156
- <MetricItem
157
- title={vDiskPageKeyset('field_storage-details-free')}
158
- value={formatMetricBytes(free, metricsSize)}
159
- />
160
- <Divider orientation="vertical" />
161
- <MetricItem
162
- title={vDiskPageKeyset('field_storage-details-usage')}
163
- value={formatMetricPercent(usage)}
164
- />
165
- </div>
166
- <div className={b('card', {details: true})}>
167
- <div className={b('details')}>
168
- <DetailItem title={vDiskPageKeyset('field_datacenter')} value={NodeDC} />
169
- <CopyableDetailItem
170
- title={vDiskPageKeyset('field_rack')}
171
- value={NodeRack}
172
- />
173
- <CopyableDetailItem
174
- title={vDiskPageKeyset('field_node')}
175
- value={NodeHost}
176
- />
177
- <CopyableDetailItem
178
- title={vDiskPageKeyset('field_pdisk-id')}
179
- value={PDiskId}
180
- />
181
- </div>
182
- {pDiskPath ? (
183
- <Button
184
- href={pDiskPath}
185
- view="action"
186
- size="m"
187
- className={BRAND_BUTTON_CLASS}
188
- >
189
- {vDiskPageKeyset('action_go-to-pdisk')}
190
- </Button>
191
- ) : null}
192
- </div>
67
+ <div className={b(null, className)} data-qa="vdisk-location">
68
+ <div className={b('card')}>
69
+ {LOCATION_IDS.map((id) => {
70
+ const item = items.find((entry) => entry.id === id);
71
+ return item ? <DetailItem key={id} item={item} /> : null;
72
+ })}
73
+ </div>
74
+ <div className={b('card', {ids: true})}>
75
+ {items
76
+ .filter(({id}) => !LOCATION_IDS.includes(id))
77
+ .map((item) => (
78
+ <DetailItem key={item.id} item={item} />
79
+ ))}
80
+ {pDiskPath && (
81
+ <InternalLinkButton href={pDiskPath} size="s" view="normal">
82
+ {vDiskPageKeyset('action_go-to-pdisk')}
83
+ </InternalLinkButton>
84
+ )}
193
85
  </div>
194
86
  </div>
195
87
  );
@@ -1,25 +1,13 @@
1
1
  {
2
- "fqdn": "FQDN",
3
2
  "node": "Node",
4
3
  "pdisk": "PDisk",
5
4
  "vdisk": "VDisk",
6
5
  "storage": "Storage",
7
6
  "tablets": "Tablets",
8
- "title_storage-details": "Storage details",
9
- "field_storage-details-used": "Used",
10
- "field_storage-details-total": "Total",
11
- "field_storage-details-free": "Free",
12
- "field_storage-details-usage": "Usage",
13
- "field_datacenter": "Datacenter",
14
- "field_rack": "Rack",
15
- "field_node": "Node",
16
- "field_pdisk-id": "PDisk ID",
17
7
  "action_go-to-pdisk": "Go to PDisk",
18
-
8
+ "action_open-in-developer-ui": "Open in Developer UI",
19
9
  "tablet-id": "Tablet ID",
20
10
  "channel-id": "Channel ID",
21
11
  "count": "Count",
22
- "size": "Size",
23
-
24
- "label_donor": "Donor"
12
+ "size": "Size"
25
13
  }
@@ -106,6 +106,10 @@ export const useStorageGroupsHandlerHasGrouping = () => {
106
106
  return useGetFeatureVersion('/storage/groups') > 4;
107
107
  };
108
108
 
109
+ export const useViewerNodesAliveFilterAvailable = () => {
110
+ return useGetFeatureVersion('/viewer/nodes/alive') >= 1;
111
+ };
112
+
109
113
  export const useViewerNodesHandlerHasGrouping = () => {
110
114
  return useGetFeatureVersion('/viewer/nodes') > 6;
111
115
  };
@@ -118,6 +118,7 @@ export function parseLoggingUrls(
118
118
  }
119
119
 
120
120
  const settingsSchema = z.object({
121
+ unavailable: z.boolean().optional().catch(undefined),
121
122
  use_meta_proxy: z.boolean().optional(),
122
123
  cluster_domain: z.string().optional(),
123
124
  cluster_external_name: z.string().optional(),
@@ -8,6 +8,7 @@ import type {ClustersFilters} from './types';
8
8
  import {prepareClustersData} from './utils';
9
9
 
10
10
  const initialState: ClustersFilters = {
11
+ availability: ['available'],
11
12
  clusterName: '',
12
13
  status: [],
13
14
  service: [],
@@ -9,6 +9,7 @@ export const selectStatusFilter = (state: ClustersStateSlice) => state.clusters.
9
9
  export const selectServiceFilter = (state: ClustersStateSlice) => state.clusters.service;
10
10
  export const selectVersionFilter = (state: ClustersStateSlice) => state.clusters.version;
11
11
  export const selectGalaxyFilter = (state: ClustersStateSlice) => state.clusters.galaxy;
12
+ export const selectAvailabilityFilter = (state: ClustersStateSlice) => state.clusters.availability;
12
13
 
13
14
  // ==== Filters ====
14
15
 
@@ -85,6 +86,9 @@ const isMatchesByTextQuery = (clusterData: PreparedCluster, searchQuery = '') =>
85
86
  export function filterClusters(clusters: PreparedCluster[], filters: ClustersFilters) {
86
87
  return clusters.filter((cluster) => {
87
88
  return (
89
+ filters.availability.includes(
90
+ cluster.settings?.unavailable === true ? 'unavailable' : 'available',
91
+ ) &&
88
92
  isMatchesByGalaxy(cluster, filters.galaxy) &&
89
93
  isMatchesByStatus(cluster, filters.status) &&
90
94
  isMatchesByService(cluster, filters.service) &&
@@ -26,7 +26,10 @@ export interface PreparedCluster extends Omit<MetaExtendedClusterInfo, 'name' |
26
26
  clusterExternalName?: string;
27
27
  }
28
28
 
29
+ export type ClusterAvailability = 'available' | 'unavailable';
30
+
29
31
  export interface ClustersFilters {
32
+ availability: ClusterAvailability[];
30
33
  status: string[];
31
34
  service: string[];
32
35
  version: string[];
@@ -3,6 +3,7 @@ import type {NodesUptimeFilterValues} from '../../../utils/nodes';
3
3
 
4
4
  export interface NodesFilters {
5
5
  searchValue: string;
6
+ hideUnavailable?: boolean;
6
7
  withProblems: boolean;
7
8
  uptimeFilter: NodesUptimeFilterValues;
8
9
  peerRoleFilter?: NodesPeerRole;
@@ -137,6 +137,8 @@ export function prepareGroupsPDisk(data: TStoragePDisk & {NodeId?: number} = {})
137
137
  Type,
138
138
  Severity,
139
139
  SlotSize,
140
+ ExpectedSlotCount:
141
+ mergedPDiskData.ExpectedSlotCount ?? parseOptionalNonNegativeNumber(bscPDisk.SlotCount),
140
142
  DriveStatus,
141
143
  };
142
144
  }
@@ -16,6 +16,7 @@ export type StorageType = z.infer<typeof storageTypeSchema>;
16
16
 
17
17
  export interface PreparedStorageNodeFilters {
18
18
  searchValue: string;
19
+ hideUnavailable?: boolean;
19
20
  nodesUptimeFilter: NodesUptimeFilterValues;
20
21
  visibleEntities: VisibleEntities;
21
22
 
@@ -37,6 +37,16 @@ const normalizeMaxPercent = (value: number | string | null | undefined): number
37
37
 
38
38
  // ==== Prepare groups ====
39
39
 
40
+ function parseLatencyUsToMs(value: unknown): number | undefined {
41
+ if (typeof value !== 'string' && typeof value !== 'number') {
42
+ return undefined;
43
+ }
44
+
45
+ const latency = parseOptionalNonNegativeNumber(value);
46
+
47
+ return latency === undefined ? undefined : parseUsToMs(latency);
48
+ }
49
+
40
50
  function getGroupDiskSpaceStatus(group: TGroupsStorageGroupInfo): EFlag {
41
51
  const {DiskSpace, VDisks = []} = group;
42
52
 
@@ -247,9 +257,9 @@ export function prepareGroupsResponse(data: StorageGroupsResponse): PreparedStor
247
257
  Used: Number(Used),
248
258
  Limit: Number(Limit),
249
259
 
250
- LatencyPutTabletLogMs: parseUsToMs(LatencyPutTabletLog),
251
- LatencyPutUserDataMs: parseUsToMs(LatencyPutUserData),
252
- LatencyGetFastMs: parseUsToMs(LatencyGetFast),
260
+ LatencyPutTabletLogMs: parseLatencyUsToMs(LatencyPutTabletLog),
261
+ LatencyPutUserDataMs: parseLatencyUsToMs(LatencyPutUserData),
262
+ LatencyGetFastMs: parseLatencyUsToMs(LatencyGetFast),
253
263
 
254
264
  Degraded: Number(MissingDisks),
255
265
  Overall,
@@ -1,9 +1,10 @@
1
1
  import type {PreparedVDisk} from '../../../utils/disks/types';
2
2
 
3
3
  export interface VDiskData extends PreparedVDisk {
4
+ Recipient?: PreparedVDisk;
5
+
4
6
  NodeId?: number;
5
7
  NodeHost?: string;
6
- NodeType?: string;
7
8
  NodeDC?: string;
8
9
  NodeRack?: string;
9
10
 
@@ -1,6 +1,5 @@
1
1
  import type {StorageGroupsResponse} from '../../../types/api/storage';
2
2
  import type {TEvSystemStateResponse} from '../../../types/api/systemState';
3
- import type {PreparedVDisk} from '../../../utils/disks/types';
4
3
  import {prepareNodeSystemState} from '../../../utils/nodes';
5
4
  import {prepareGroupsVDisk} from '../storage/prepareGroupsDisks';
6
5
 
@@ -20,14 +19,16 @@ export function prepareVDiskDataResponse(
20
19
 
21
20
  const preparedVDisk = prepareGroupsVDisk(rawVDisk);
22
21
 
23
- let currentVDisk: PreparedVDisk = {};
22
+ let currentVDisk: VDiskData = {};
24
23
 
25
24
  if (preparedVDisk.StringifiedId === vDiskId) {
26
25
  currentVDisk = preparedVDisk;
27
26
  } else {
28
27
  for (const donor of preparedVDisk.Donors ?? []) {
29
28
  if (donor.StringifiedId === vDiskId) {
30
- currentVDisk = donor;
29
+ // Keep the recipient's metrics without a back-reference to this donor.
30
+ const {Donors: _donors, ...recipient} = preparedVDisk;
31
+ currentVDisk = {...donor, Recipient: recipient};
31
32
  break;
32
33
  }
33
34
  }
@@ -40,7 +41,6 @@ export function prepareVDiskDataResponse(
40
41
 
41
42
  const NodeId = currentVDisk.NodeId ?? preparedPDisk?.NodeId ?? preparedNode.NodeId;
42
43
  const NodeHost = preparedNode.Host;
43
- const NodeType = preparedNode.Roles?.[0];
44
44
  const NodeDC = preparedNode.DC;
45
45
  const NodeRack = preparedNode.Rack;
46
46
 
@@ -52,7 +52,6 @@ export function prepareVDiskDataResponse(
52
52
 
53
53
  NodeId,
54
54
  NodeHost,
55
- NodeType,
56
55
  NodeDC,
57
56
  NodeRack,
58
57
 
@@ -27,6 +27,7 @@ export type Capability =
27
27
  | '/viewer/cluster'
28
28
  | '/vdisk/blobindexstat'
29
29
  | '/viewer/nodes'
30
+ | '/viewer/nodes/alive'
30
31
  | '/viewer/peers'
31
32
  | '/viewer/acl'
32
33
  | '/viewer/topic_data'
@@ -105,6 +105,7 @@ export interface MetaClusterTraceCheck {
105
105
  }
106
106
 
107
107
  export interface MetaClusterSettings {
108
+ unavailable?: boolean;
108
109
  use_meta_proxy?: boolean;
109
110
  auth_service?: string;
110
111
  cluster_domain?: string;
@@ -363,6 +363,8 @@ export interface NodesRequestParams {
363
363
  uptime?: number;
364
364
  /** return nodes with SystemState !== EFlag.Green */
365
365
  problems_only?: boolean;
366
+ /** exclude disconnected nodes; requires /viewer/nodes/alive capability */
367
+ alive?: boolean;
366
368
  /** filter nodes by id or host */
367
369
  filter?: string;
368
370
  filter_peer_role?: NodesPeerRole; // v14
@@ -1,3 +1,5 @@
1
+ import type {TSystemStateInfo} from './nodes';
2
+
1
3
  /**
2
4
  * endpoint: /viewer/json/nodesList
3
5
  *
@@ -11,6 +13,7 @@ export interface TNodeInfo {
11
13
  ResolveHost?: string;
12
14
  Address?: string;
13
15
  Port?: number;
16
+ Location?: TSystemStateInfo['Location'];
14
17
  PhysicalLocation?: TNodeLocation;
15
18
  }
16
19
 
@@ -0,0 +1,9 @@
1
+ import type {ETenantType} from '../../types/api/tenant';
2
+
3
+ import {useIsUserAllowedToMakeChanges} from './useIsUserAllowedToMakeChanges';
4
+
5
+ export function useDatabaseHealthcheckAvailable(databaseType?: ETenantType) {
6
+ const isUserAllowedToMakeChanges = useIsUserAllowedToMakeChanges();
7
+
8
+ return isUserAllowedToMakeChanges && databaseType !== 'Serverless';
9
+ }
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+
3
+ import {BooleanParam, useQueryParam} from 'use-query-params';
4
+ import {z} from 'zod';
5
+
6
+ import {
7
+ useCapabilitiesLoaded,
8
+ useViewerNodesAliveFilterAvailable,
9
+ } from '../../store/reducers/capabilities/hooks';
10
+
11
+ const hideUnavailableSchema = z.boolean().catch(false);
12
+
13
+ export function useHideUnavailableNodes() {
14
+ const [value, setValue] = useQueryParam('hideUnavailable', BooleanParam);
15
+ const available = useViewerNodesAliveFilterAvailable();
16
+ const capabilitiesLoaded = useCapabilitiesLoaded();
17
+ const hideUnavailable = available && hideUnavailableSchema.parse(value);
18
+
19
+ React.useEffect(() => {
20
+ if (capabilitiesLoaded && !available && value !== undefined) {
21
+ setValue(undefined, 'replaceIn');
22
+ }
23
+ }, [available, capabilitiesLoaded, setValue, value]);
24
+
25
+ const handleHideUnavailableChange = React.useCallback(
26
+ (checked: boolean) => {
27
+ setValue(checked || undefined, 'replaceIn');
28
+ },
29
+ [setValue],
30
+ );
31
+
32
+ return {available, hideUnavailable, handleHideUnavailableChange};
33
+ }
@@ -0,0 +1,16 @@
1
+ import type {TSystemStateInfo} from '../types/api/nodes';
2
+
3
+ import {parseOptionalNonNegativeNumber} from './utils';
4
+
5
+ export function getNodeMemory(
6
+ node: Pick<TSystemStateInfo, 'MemoryStats' | 'MemoryUsed' | 'MemoryLimit'>,
7
+ ) {
8
+ // Match the backend's process usage and sorting, including its allocator fallback.
9
+ const memoryUsed =
10
+ parseOptionalNonNegativeNumber(node.MemoryUsed) ??
11
+ parseOptionalNonNegativeNumber(node.MemoryStats?.AnonRss) ??
12
+ parseOptionalNonNegativeNumber(node.MemoryStats?.AllocatedMemory);
13
+ const memoryLimit = parseOptionalNonNegativeNumber(node.MemoryLimit) || undefined;
14
+
15
+ return {memoryUsed, memoryLimit};
16
+ }
@@ -34,11 +34,12 @@ export const prepareNodesMap = (nodesList?: TNodeInfo[]) => {
34
34
  if (valueIsDefined(node.Id)) {
35
35
  const physicalLocation = node.PhysicalLocation;
36
36
  // The legacy numeric Rack can be a hash of the actual rack name.
37
- const Rack = physicalLocation?.Location?.match(/(?:^|\/)R=([^/]+)/)?.[1];
37
+ const Rack =
38
+ node.Location?.Rack || physicalLocation?.Location?.match(/(?:^|\/)R=([^/]+)/)?.[1];
38
39
 
39
40
  nodeHosts.set(node.Id, {
40
41
  Host: node.Host,
41
- DC: physicalLocation?.DataCenterId,
42
+ DC: node.Location?.DataCenter || physicalLocation?.DataCenterId,
42
43
  Rack,
43
44
  });
44
45
  }
@@ -201,6 +201,17 @@ export function formatStorageMetricPair(
201
201
  .join(' / ');
202
202
  }
203
203
 
204
+ export function formatStorageThroughput(value?: string | number) {
205
+ return (
206
+ formatBytes({
207
+ value: parseOptionalNonNegativeNumber(value),
208
+ size: 'mb',
209
+ fixedDecimalPlaces: 2,
210
+ withSpeedLabel: true,
211
+ }) || EMPTY_DATA_PLACEHOLDER
212
+ );
213
+ }
214
+
204
215
  export function formatNormalizedMetricPercent(value?: number) {
205
216
  const parsedValue = parseOptionalNonNegativeNumber(value);
206
217
 
@@ -1,11 +0,0 @@
1
- import type { PreparedVDisk } from '../../utils/disks/types';
2
- import type { YDBDefinitionListItem } from '../YDBDefinitionList/YDBDefinitionList';
3
- interface GetVDiskCapacityColumnsParams {
4
- data?: PreparedVDisk;
5
- isViewerUser?: boolean;
6
- }
7
- export declare function getVDiskCapacityColumns({ data, isViewerUser }: GetVDiskCapacityColumnsParams): {
8
- leftColumn: YDBDefinitionListItem[];
9
- rightColumn: YDBDefinitionListItem[];
10
- };
11
- export {};
@@ -1,52 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { isNil } from 'lodash';
3
- import { getPDiskPagePath } from '../../routes';
4
- import { getVDiskCapacityInfoItems, toDefinitionListItems, } from '../DiskCapacityInfo/DiskCapacityInfo';
5
- import { InternalLink } from '../InternalLink';
6
- import { vDiskInfoKeyset } from './i18n';
7
- export function getVDiskCapacityColumns({ data, isViewerUser }) {
8
- const { Guid, VDiskState, VDiskSlotId, Kind, IncarnationGuid, InstanceGuid, StoragePoolName, PDiskId, NodeId, } = data || {};
9
- const leftColumn = [];
10
- const rightColumn = [];
11
- if (!isNil(StoragePoolName)) {
12
- leftColumn.push({ name: vDiskInfoKeyset('pool-name'), content: StoragePoolName });
13
- }
14
- if (!isNil(VDiskSlotId)) {
15
- leftColumn.push({ name: vDiskInfoKeyset('slot-id'), content: VDiskSlotId });
16
- }
17
- if (!isNil(Kind)) {
18
- leftColumn.push({ name: vDiskInfoKeyset('kind'), content: Kind });
19
- }
20
- const capacityItems = getVDiskCapacityInfoItems(data, { withRawUsage: true });
21
- const groupSizeItem = capacityItems.find(({ id }) => id === 'group-size-in-units');
22
- const runtimeCapacityItems = capacityItems.filter(({ id }) => id !== 'group-size-in-units');
23
- if (groupSizeItem) {
24
- leftColumn.push(...toDefinitionListItems([groupSizeItem]));
25
- }
26
- if (!isNil(Guid)) {
27
- leftColumn.push({ name: vDiskInfoKeyset('guid'), content: Guid });
28
- }
29
- if (!isNil(IncarnationGuid)) {
30
- leftColumn.push({ name: vDiskInfoKeyset('incarnation-guid'), content: IncarnationGuid });
31
- }
32
- if (!isNil(InstanceGuid)) {
33
- leftColumn.push({ name: vDiskInfoKeyset('instance-guid'), content: InstanceGuid });
34
- }
35
- if (!isNil(PDiskId)) {
36
- const pDiskPath = isViewerUser && !isNil(NodeId) ? getPDiskPagePath(PDiskId, NodeId) : undefined;
37
- const content = pDiskPath ? _jsx(InternalLink, { to: pDiskPath, children: PDiskId }) : PDiskId;
38
- leftColumn.push({
39
- name: vDiskInfoKeyset('label_pdisk-id'),
40
- content,
41
- });
42
- }
43
- if (!isNil(VDiskState)) {
44
- rightColumn.push({
45
- name: vDiskInfoKeyset('state-status'),
46
- content: VDiskState,
47
- });
48
- }
49
- rightColumn.push(...toDefinitionListItems(runtimeCapacityItems));
50
- return { leftColumn, rightColumn };
51
- }
52
- //# sourceMappingURL=getVDiskCapacityColumns.js.map