ydb-embedded-ui 22.2.0 → 22.4.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 (405) hide show
  1. package/dist/components/DiskCapacityInfo/DiskCapacityInfo.d.ts +10 -1
  2. package/dist/components/DiskCapacityInfo/DiskCapacityInfo.js +75 -13
  3. package/dist/components/DiskCapacityInfo/DiskCapacityInfo.js.map +1 -1
  4. package/dist/components/DiskCapacityInfo/i18n/index.d.ts +1 -1
  5. package/dist/components/DiskPopup/DiskPopup.d.ts +25 -0
  6. package/dist/components/DiskPopup/DiskPopup.js +44 -0
  7. package/dist/components/DiskPopup/DiskPopup.js.map +1 -0
  8. package/dist/components/DiskPopup/DiskPopup.scss +203 -0
  9. package/dist/components/DiskPopup/i18n/en.json +3 -0
  10. package/dist/components/DiskPopup/i18n/index.d.ts +2 -0
  11. package/dist/components/DiskPopup/i18n/index.js +4 -0
  12. package/dist/components/DiskPopup/i18n/index.js.map +1 -0
  13. package/dist/components/DiskStatus/DiskStatus.d.ts +31 -0
  14. package/dist/components/DiskStatus/DiskStatus.js +61 -0
  15. package/dist/components/DiskStatus/DiskStatus.js.map +1 -0
  16. package/dist/components/DiskStatus/DiskStatus.scss +59 -0
  17. package/dist/components/DiskStatus/i18n/en.json +6 -0
  18. package/dist/components/DiskStatus/i18n/index.d.ts +2 -0
  19. package/dist/components/DiskStatus/i18n/index.js +4 -0
  20. package/dist/components/DiskStatus/i18n/index.js.map +1 -0
  21. package/dist/components/EntityStatus/EntityStatus.d.ts +1 -0
  22. package/dist/components/EntityStatus/EntityStatus.js +1 -1
  23. package/dist/components/EntityStatus/EntityStatus.js.map +1 -1
  24. package/dist/components/EvictVDiskButton/i18n/en.json +1 -1
  25. package/dist/components/FullNodeViewer/i18n/index.d.ts +1 -1
  26. package/dist/components/Graph/GravityGraph.js +9 -2
  27. package/dist/components/Graph/GravityGraph.js.map +1 -1
  28. package/dist/components/Graph/utils.d.ts +2 -1
  29. package/dist/components/Graph/utils.js +7 -0
  30. package/dist/components/Graph/utils.js.map +1 -1
  31. package/dist/components/HoverPopup/HoverPopup.d.ts +2 -1
  32. package/dist/components/HoverPopup/HoverPopup.js +49 -17
  33. package/dist/components/HoverPopup/HoverPopup.js.map +1 -1
  34. package/dist/components/HoverPopup/usePopupPriority.d.ts +4 -0
  35. package/dist/components/HoverPopup/usePopupPriority.js +30 -0
  36. package/dist/components/HoverPopup/usePopupPriority.js.map +1 -0
  37. package/dist/components/PDiskInfo/PDiskLogSize.d.ts +5 -0
  38. package/dist/components/PDiskInfo/PDiskLogSize.js +20 -0
  39. package/dist/components/PDiskInfo/PDiskLogSize.js.map +1 -0
  40. package/dist/components/PDiskInfo/PDiskLogSize.scss +12 -0
  41. package/dist/components/PDiskInfo/getPDiskDetails.d.ts +4 -0
  42. package/dist/components/PDiskInfo/getPDiskDetails.js +33 -0
  43. package/dist/components/PDiskInfo/getPDiskDetails.js.map +1 -0
  44. package/dist/components/PDiskInfo/i18n/en.json +64 -2
  45. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  46. package/dist/components/PDiskInfo/statuses.d.ts +7 -0
  47. package/dist/components/PDiskInfo/statuses.js +185 -0
  48. package/dist/components/PDiskInfo/statuses.js.map +1 -0
  49. package/dist/components/PDiskPopup/PDiskPopup.d.ts +4 -7
  50. package/dist/components/PDiskPopup/PDiskPopup.js +28 -99
  51. package/dist/components/PDiskPopup/PDiskPopup.js.map +1 -1
  52. package/dist/components/PDiskPopup/i18n/en.json +2 -12
  53. package/dist/components/PDiskPopup/i18n/index.d.ts +1 -1
  54. package/dist/components/PaginatedTable/rowLookup.js +30 -9
  55. package/dist/components/PaginatedTable/rowLookup.js.map +1 -1
  56. package/dist/components/StorageGroupInfo/StorageGroupInfo.d.ts +3 -3
  57. package/dist/components/StorageGroupInfo/StorageGroupInfo.js +78 -218
  58. package/dist/components/StorageGroupInfo/StorageGroupInfo.js.map +1 -1
  59. package/dist/components/StorageGroupInfo/StorageGroupInfo.scss +21 -0
  60. package/dist/components/StorageGroupInfo/i18n/en.json +1 -9
  61. package/dist/components/StorageGroupInfo/i18n/index.d.ts +1 -1
  62. package/dist/components/TableKeyboardNavigation/TableKeyboardNavigation.js +5 -1
  63. package/dist/components/TableKeyboardNavigation/TableKeyboardNavigation.js.map +1 -1
  64. package/dist/components/VDisk/VDisk.d.ts +2 -1
  65. package/dist/components/VDisk/VDisk.js +23 -32
  66. package/dist/components/VDisk/VDisk.js.map +1 -1
  67. package/dist/components/VDisk/VDiskWithDonorsStack.d.ts +1 -1
  68. package/dist/components/VDisk/VDiskWithDonorsStack.js +2 -1
  69. package/dist/components/VDisk/VDiskWithDonorsStack.js.map +1 -1
  70. package/dist/components/VDisk/getFlagStatusText.d.ts +2 -0
  71. package/dist/components/VDisk/getFlagStatusText.js +18 -0
  72. package/dist/components/VDisk/getFlagStatusText.js.map +1 -0
  73. package/dist/components/VDisk/i18n/en.json +1 -1
  74. package/dist/components/VDisk/i18n/index.d.ts +1 -1
  75. package/dist/components/VDiskInfo/getVDiskDetails.d.ts +5 -0
  76. package/dist/components/VDiskInfo/getVDiskDetails.js +29 -0
  77. package/dist/components/VDiskInfo/getVDiskDetails.js.map +1 -0
  78. package/dist/components/VDiskInfo/i18n/en.json +3 -1
  79. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
  80. package/dist/components/VDiskPopup/VDiskPopup.d.ts +6 -8
  81. package/dist/components/VDiskPopup/VDiskPopup.js +106 -240
  82. package/dist/components/VDiskPopup/VDiskPopup.js.map +1 -1
  83. package/dist/components/VDiskPopup/VDiskPopup.scss +3 -10
  84. package/dist/components/VDiskPopup/i18n/en.json +6 -22
  85. package/dist/components/VDiskPopup/i18n/index.d.ts +1 -1
  86. package/dist/components/VDiskStatus/VDiskReplicationStatus.d.ts +8 -0
  87. package/dist/components/VDiskStatus/VDiskReplicationStatus.js +32 -0
  88. package/dist/components/VDiskStatus/VDiskReplicationStatus.js.map +1 -0
  89. package/dist/components/VDiskStatus/VDiskStatus.d.ts +16 -0
  90. package/dist/components/VDiskStatus/VDiskStatus.js +20 -0
  91. package/dist/components/VDiskStatus/VDiskStatus.js.map +1 -0
  92. package/dist/components/VDiskStatus/VDiskStatus.scss +32 -0
  93. package/dist/components/VDiskStatus/i18n/en.json +33 -0
  94. package/dist/components/VDiskStatus/i18n/index.d.ts +1 -0
  95. package/dist/components/VDiskStatus/i18n/index.js +5 -0
  96. package/dist/components/VDiskStatus/i18n/index.js.map +1 -0
  97. package/dist/components/VDiskStatus/index.d.ts +2 -0
  98. package/dist/components/VDiskStatus/index.js +3 -0
  99. package/dist/components/VDiskStatus/index.js.map +1 -0
  100. package/dist/components/VDiskStatus/statuses.d.ts +4 -0
  101. package/dist/components/VDiskStatus/statuses.js +120 -0
  102. package/dist/components/VDiskStatus/statuses.js.map +1 -0
  103. package/dist/components/capacityMetricsColumns/i18n/en.json +4 -4
  104. package/dist/containers/Authentication/Authentication.js +29 -30
  105. package/dist/containers/Authentication/Authentication.js.map +1 -1
  106. package/dist/containers/Authentication/utils.d.ts +2 -2
  107. package/dist/containers/Authentication/utils.js +1 -1
  108. package/dist/containers/Authentication/utils.js.map +1 -1
  109. package/dist/containers/Cluster/ClusterDrawerHealthcheck.js +6 -1
  110. package/dist/containers/Cluster/ClusterDrawerHealthcheck.js.map +1 -1
  111. package/dist/containers/Clusters/ClusterDrawerHealthcheck.js +1 -1
  112. package/dist/containers/Clusters/ClusterDrawerHealthcheck.js.map +1 -1
  113. package/dist/containers/Header/Header.js +8 -2
  114. package/dist/containers/Header/Header.js.map +1 -1
  115. package/dist/containers/Header/StorageGroupLeftControls.d.ts +1 -0
  116. package/dist/containers/Header/StorageGroupLeftControls.js +23 -0
  117. package/dist/containers/Header/StorageGroupLeftControls.js.map +1 -0
  118. package/dist/containers/Header/i18n/en.json +3 -1
  119. package/dist/containers/Header/i18n/index.d.ts +1 -1
  120. package/dist/containers/Operations/constants.d.ts +1 -1
  121. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js +4 -4
  122. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js.map +1 -1
  123. package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
  124. package/dist/containers/Storage/Disks/Disks.js +36 -9
  125. package/dist/containers/Storage/Disks/Disks.js.map +1 -1
  126. package/dist/containers/Storage/PDisk/PDisk.d.ts +2 -1
  127. package/dist/containers/Storage/PDisk/PDisk.js +2 -2
  128. package/dist/containers/Storage/PDisk/PDisk.js.map +1 -1
  129. package/dist/containers/Storage/PDisk/i18n/index.d.ts +1 -1
  130. package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/columns.js +7 -2
  131. package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/columns.js.map +1 -1
  132. package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/i18n/index.d.ts +1 -1
  133. package/dist/containers/Storage/StorageExpertModePanel/components/SpaceLegend.scss +14 -82
  134. package/dist/containers/Storage/StorageExpertModePanel/i18n/index.d.ts +1 -1
  135. package/dist/containers/Storage/StorageGroupStateLabel.d.ts +4 -0
  136. package/dist/containers/Storage/StorageGroupStateLabel.js +9 -0
  137. package/dist/containers/Storage/StorageGroupStateLabel.js.map +1 -0
  138. package/dist/containers/Storage/utils/getStorageGroupStateLabel.d.ts +2 -0
  139. package/dist/containers/Storage/utils/getStorageGroupStateLabel.js +35 -0
  140. package/dist/containers/Storage/utils/getStorageGroupStateLabel.js.map +1 -0
  141. package/dist/containers/StorageGroupPage/StorageGroupPage.js +17 -12
  142. package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
  143. package/dist/containers/StorageGroupPage/StorageGroupPage.scss +9 -13
  144. package/dist/containers/StorageGroupPage/i18n/en.json +3 -1
  145. package/dist/containers/StorageGroupPage/i18n/index.d.ts +1 -1
  146. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +5 -1
  147. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js.map +1 -1
  148. package/dist/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -1
  149. package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +11 -2
  150. package/dist/containers/Tenant/Diagnostics/Overview/Overview.js.map +1 -1
  151. package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolInfo.scss +24 -0
  152. package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolUsage.d.ts +8 -0
  153. package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolUsage.js +34 -0
  154. package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolUsage.js.map +1 -0
  155. package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/i18n/en.json +4 -1
  156. package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/i18n/index.d.ts +1 -1
  157. package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/index.d.ts +1 -0
  158. package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/index.js +1 -0
  159. package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/index.js.map +1 -1
  160. package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/SchemaObjectInfo.d.ts +2 -1
  161. package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/SchemaObjectInfo.js +12 -3
  162. package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/SchemaObjectInfo.js.map +1 -1
  163. package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/prepareSchemaObjectInfo.d.ts +2 -1
  164. package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/prepareSchemaObjectInfo.js +9 -8
  165. package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/prepareSchemaObjectInfo.js.map +1 -1
  166. package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.d.ts +16 -1
  167. package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.js +55 -33
  168. package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.js.map +1 -1
  169. package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/i18n/en.json +5 -1
  170. package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/i18n/index.d.ts +1 -1
  171. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/en.json +4 -0
  172. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.d.ts +1 -1
  173. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareColumnTableInfo.js +4 -1
  174. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareColumnTableInfo.js.map +1 -1
  175. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareRowTableInfo.js +4 -1
  176. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareRowTableInfo.js.map +1 -1
  177. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareTTL.js +41 -3
  178. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareTTL.js.map +1 -1
  179. package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/StreamingQueryGraph.d.ts +7 -0
  180. package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/StreamingQueryGraph.js +38 -0
  181. package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/StreamingQueryGraph.js.map +1 -0
  182. package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/StreamingQueryGraph.scss +18 -0
  183. package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/i18n/en.json +5 -0
  184. package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/i18n/index.d.ts +2 -0
  185. package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/i18n/index.js +5 -0
  186. package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/i18n/index.js.map +1 -0
  187. package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/index.d.ts +1 -0
  188. package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/index.js +2 -0
  189. package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/index.js.map +1 -0
  190. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/i18n/index.d.ts +1 -1
  191. package/dist/containers/Tenant/Diagnostics/i18n/en.json +1 -0
  192. package/dist/containers/Tenant/Diagnostics/i18n/index.d.ts +1 -1
  193. package/dist/containers/Tenant/Diagnostics/tabsContent.js +2 -0
  194. package/dist/containers/Tenant/Diagnostics/tabsContent.js.map +1 -1
  195. package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.d.ts +3 -1
  196. package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.js +3 -3
  197. package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.js.map +1 -1
  198. package/dist/containers/Tenant/Query/QueryEditor/YqlEditor/YqlEditor.js +8 -1
  199. package/dist/containers/Tenant/Query/QueryEditor/YqlEditor/YqlEditor.js.map +1 -1
  200. package/dist/containers/Tenant/TenantDrawerHealthcheck.js +8 -1
  201. package/dist/containers/Tenant/TenantDrawerHealthcheck.js.map +1 -1
  202. package/dist/containers/Tenants/DatabaseDrawerHealthcheck.js +8 -1
  203. package/dist/containers/Tenants/DatabaseDrawerHealthcheck.js.map +1 -1
  204. package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
  205. package/dist/lib.d.ts +1 -1
  206. package/dist/lib.js.map +1 -1
  207. package/dist/store/configureStore.d.ts +2 -2
  208. package/dist/store/defaultStore.d.ts +1 -1
  209. package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +7 -0
  210. package/dist/store/reducers/executeTopQueries/executeTopQueries.js +38 -0
  211. package/dist/store/reducers/executeTopQueries/executeTopQueries.js.map +1 -1
  212. package/dist/store/reducers/header/types.d.ts +1 -1
  213. package/dist/store/reducers/index.d.ts +2 -2
  214. package/dist/store/reducers/pdisk/types.d.ts +1 -0
  215. package/dist/store/reducers/pdisk/utils.js +6 -1
  216. package/dist/store/reducers/pdisk/utils.js.map +1 -1
  217. package/dist/store/reducers/query/parsers/prepareStreamingQueryPlan.d.ts +8 -0
  218. package/dist/store/reducers/query/parsers/prepareStreamingQueryPlan.js +53 -0
  219. package/dist/store/reducers/query/parsers/prepareStreamingQueryPlan.js.map +1 -0
  220. package/dist/store/reducers/storage/prepareGroupsDisks.d.ts +1 -0
  221. package/dist/store/reducers/storage/prepareGroupsDisks.js +7 -18
  222. package/dist/store/reducers/storage/prepareGroupsDisks.js.map +1 -1
  223. package/dist/store/reducers/storage/utils.js +4 -0
  224. package/dist/store/reducers/storage/utils.js.map +1 -1
  225. package/dist/store/reducers/streamingQuery/streamingQuery.d.ts +5 -1
  226. package/dist/store/reducers/streamingQuery/streamingQuery.js +36 -13
  227. package/dist/store/reducers/streamingQuery/streamingQuery.js.map +1 -1
  228. package/dist/store/reducers/tenant/constants.d.ts +1 -0
  229. package/dist/store/reducers/tenant/constants.js +1 -0
  230. package/dist/store/reducers/tenant/constants.js.map +1 -1
  231. package/dist/styles/mixins.scss +22 -0
  232. package/dist/types/api/pdisk.d.ts +4 -0
  233. package/dist/types/api/pdisk.js.map +1 -1
  234. package/dist/types/api/schema/columnEntity.d.ts +2 -1
  235. package/dist/types/api/schema/sysView.d.ts +59 -2
  236. package/dist/types/api/schema/sysView.js +53 -1
  237. package/dist/types/api/schema/sysView.js.map +1 -1
  238. package/dist/types/api/schema/table.d.ts +8 -0
  239. package/dist/types/api/schema/table.js.map +1 -1
  240. package/dist/types/api/vdisk.d.ts +8 -0
  241. package/dist/types/api/vdisk.js +7 -0
  242. package/dist/types/api/vdisk.js.map +1 -1
  243. package/dist/types/store/nodesList.d.ts +4 -2
  244. package/dist/uiFactory/types.d.ts +5 -2
  245. package/dist/utils/bytesParsers/formatBytes.d.ts +3 -1
  246. package/dist/utils/bytesParsers/formatBytes.js +12 -3
  247. package/dist/utils/bytesParsers/formatBytes.js.map +1 -1
  248. package/dist/utils/disks/constants.d.ts +1 -0
  249. package/dist/utils/disks/constants.js +4 -0
  250. package/dist/utils/disks/constants.js.map +1 -1
  251. package/dist/utils/disks/diskInfo/getDiskLocationItems.d.ts +16 -0
  252. package/dist/utils/disks/diskInfo/getDiskLocationItems.js +30 -0
  253. package/dist/utils/disks/diskInfo/getDiskLocationItems.js.map +1 -0
  254. package/dist/utils/disks/diskInfo/i18n/en.json +9 -0
  255. package/dist/utils/disks/diskInfo/i18n/index.d.ts +2 -0
  256. package/dist/utils/disks/diskInfo/i18n/index.js +4 -0
  257. package/dist/utils/disks/diskInfo/i18n/index.js.map +1 -0
  258. package/dist/utils/disks/iconCalculators.d.ts +5 -0
  259. package/dist/utils/disks/iconCalculators.js +1 -1
  260. package/dist/utils/disks/iconCalculators.js.map +1 -1
  261. package/dist/utils/disks/prepareDisks.d.ts +6 -2
  262. package/dist/utils/disks/prepareDisks.js +22 -35
  263. package/dist/utils/disks/prepareDisks.js.map +1 -1
  264. package/dist/utils/disks/types.d.ts +9 -2
  265. package/dist/utils/hooks/useNodeMetadata.d.ts +2 -0
  266. package/dist/utils/hooks/useNodeMetadata.js +15 -0
  267. package/dist/utils/hooks/useNodeMetadata.js.map +1 -0
  268. package/dist/utils/nodes.js +6 -2
  269. package/dist/utils/nodes.js.map +1 -1
  270. package/dist/utils/query.d.ts +1 -0
  271. package/dist/utils/query.js +40 -0
  272. package/dist/utils/query.js.map +1 -1
  273. package/dist/utils/schema.d.ts +6 -2
  274. package/dist/utils/schema.js +14 -4
  275. package/dist/utils/schema.js.map +1 -1
  276. package/dist/utils/storageMetrics.d.ts +2 -2
  277. package/dist/utils/storageMetrics.js +22 -10
  278. package/dist/utils/storageMetrics.js.map +1 -1
  279. package/dist/utils/timeParsers/formatDuration.d.ts +4 -1
  280. package/dist/utils/timeParsers/formatDuration.js +16 -1
  281. package/dist/utils/timeParsers/formatDuration.js.map +1 -1
  282. package/dist/utils/timeParsers/i18n/en.json +5 -1
  283. package/dist/utils/timeParsers/i18n/index.d.ts +1 -1
  284. package/dist/utils/timeParsers/i18n/ru.json +5 -1
  285. package/package.json +2 -2
  286. package/src/components/DiskCapacityInfo/DiskCapacityInfo.tsx +106 -15
  287. package/src/components/DiskPopup/DiskPopup.scss +203 -0
  288. package/src/components/DiskPopup/DiskPopup.tsx +123 -0
  289. package/src/components/DiskPopup/i18n/en.json +3 -0
  290. package/src/components/DiskPopup/i18n/index.ts +5 -0
  291. package/src/components/DiskStatus/DiskStatus.scss +59 -0
  292. package/src/components/DiskStatus/DiskStatus.tsx +149 -0
  293. package/src/components/DiskStatus/i18n/en.json +6 -0
  294. package/src/components/DiskStatus/i18n/index.ts +5 -0
  295. package/src/components/EntityStatus/EntityStatus.tsx +1 -1
  296. package/src/components/EvictVDiskButton/i18n/en.json +1 -1
  297. package/src/components/Graph/GravityGraph.tsx +9 -2
  298. package/src/components/Graph/utils.ts +9 -1
  299. package/src/components/HoverPopup/HoverPopup.tsx +67 -20
  300. package/src/components/HoverPopup/usePopupPriority.ts +39 -0
  301. package/src/components/PDiskInfo/PDiskLogSize.scss +12 -0
  302. package/src/components/PDiskInfo/PDiskLogSize.tsx +37 -0
  303. package/src/components/PDiskInfo/getPDiskDetails.tsx +37 -0
  304. package/src/components/PDiskInfo/i18n/en.json +64 -8
  305. package/src/components/PDiskInfo/statuses.ts +209 -0
  306. package/src/components/PDiskPopup/PDiskPopup.tsx +62 -147
  307. package/src/components/PDiskPopup/i18n/en.json +2 -12
  308. package/src/components/PaginatedTable/rowLookup.ts +35 -10
  309. package/src/components/StorageGroupInfo/StorageGroupInfo.scss +21 -0
  310. package/src/components/StorageGroupInfo/StorageGroupInfo.tsx +121 -260
  311. package/src/components/StorageGroupInfo/i18n/en.json +1 -9
  312. package/src/components/TableKeyboardNavigation/TableKeyboardNavigation.tsx +5 -1
  313. package/src/components/VDisk/VDisk.tsx +31 -34
  314. package/src/components/VDisk/VDiskWithDonorsStack.tsx +2 -0
  315. package/src/components/VDisk/getFlagStatusText.ts +19 -0
  316. package/src/components/VDisk/i18n/en.json +1 -1
  317. package/src/components/VDiskInfo/getVDiskDetails.tsx +41 -0
  318. package/src/components/VDiskInfo/i18n/en.json +3 -10
  319. package/src/components/VDiskPopup/VDiskPopup.scss +3 -10
  320. package/src/components/VDiskPopup/VDiskPopup.tsx +197 -421
  321. package/src/components/VDiskPopup/i18n/en.json +6 -22
  322. package/src/components/VDiskStatus/VDiskReplicationStatus.tsx +77 -0
  323. package/src/components/VDiskStatus/VDiskStatus.scss +32 -0
  324. package/src/components/VDiskStatus/VDiskStatus.tsx +38 -0
  325. package/src/components/VDiskStatus/i18n/en.json +33 -0
  326. package/src/components/VDiskStatus/i18n/index.ts +7 -0
  327. package/src/components/VDiskStatus/index.ts +7 -0
  328. package/src/components/VDiskStatus/statuses.ts +139 -0
  329. package/src/components/capacityMetricsColumns/i18n/en.json +4 -4
  330. package/src/containers/Authentication/Authentication.tsx +29 -34
  331. package/src/containers/Authentication/utils.ts +3 -3
  332. package/src/containers/Cluster/ClusterDrawerHealthcheck.tsx +6 -0
  333. package/src/containers/Clusters/ClusterDrawerHealthcheck.tsx +1 -0
  334. package/src/containers/Header/Header.tsx +11 -3
  335. package/src/containers/Header/StorageGroupLeftControls.tsx +38 -0
  336. package/src/containers/Header/i18n/en.json +3 -1
  337. package/src/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.tsx +13 -2
  338. package/src/containers/Storage/Disks/Disks.tsx +66 -12
  339. package/src/containers/Storage/PDisk/PDisk.tsx +3 -0
  340. package/src/containers/Storage/PaginatedStorageGroupsTable/columns/columns.tsx +24 -3
  341. package/src/containers/Storage/StorageExpertModePanel/components/SpaceLegend.scss +14 -82
  342. package/src/containers/Storage/StorageGroupStateLabel.tsx +22 -0
  343. package/src/containers/Storage/utils/getStorageGroupStateLabel.ts +49 -0
  344. package/src/containers/StorageGroupPage/StorageGroupPage.scss +9 -13
  345. package/src/containers/StorageGroupPage/StorageGroupPage.tsx +53 -25
  346. package/src/containers/StorageGroupPage/i18n/en.json +3 -1
  347. package/src/containers/Tenant/Diagnostics/DiagnosticsPages.ts +6 -1
  348. package/src/containers/Tenant/Diagnostics/Overview/Overview.tsx +22 -2
  349. package/src/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolInfo.scss +24 -0
  350. package/src/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolUsage.tsx +53 -0
  351. package/src/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/i18n/en.json +4 -1
  352. package/src/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/index.ts +1 -0
  353. package/src/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/SchemaObjectInfo.tsx +19 -2
  354. package/src/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/prepareSchemaObjectInfo.tsx +11 -10
  355. package/src/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.tsx +79 -34
  356. package/src/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/i18n/en.json +5 -1
  357. package/src/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/en.json +4 -0
  358. package/src/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareColumnTableInfo.tsx +11 -1
  359. package/src/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareRowTableInfo.tsx +11 -1
  360. package/src/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareTTL.ts +45 -3
  361. package/src/containers/Tenant/Diagnostics/StreamingQueryGraph/StreamingQueryGraph.scss +18 -0
  362. package/src/containers/Tenant/Diagnostics/StreamingQueryGraph/StreamingQueryGraph.tsx +79 -0
  363. package/src/containers/Tenant/Diagnostics/StreamingQueryGraph/i18n/en.json +5 -0
  364. package/src/containers/Tenant/Diagnostics/StreamingQueryGraph/i18n/index.ts +7 -0
  365. package/src/containers/Tenant/Diagnostics/StreamingQueryGraph/index.ts +1 -0
  366. package/src/containers/Tenant/Diagnostics/i18n/en.json +1 -0
  367. package/src/containers/Tenant/Diagnostics/tabsContent.tsx +4 -0
  368. package/src/containers/Tenant/Healthcheck/components/HealthcheckDrawer.tsx +5 -2
  369. package/src/containers/Tenant/Query/QueryEditor/YqlEditor/YqlEditor.tsx +8 -1
  370. package/src/containers/Tenant/TenantDrawerHealthcheck.tsx +10 -0
  371. package/src/containers/Tenants/DatabaseDrawerHealthcheck.tsx +10 -0
  372. package/src/lib.ts +1 -0
  373. package/src/store/reducers/executeTopQueries/executeTopQueries.ts +46 -0
  374. package/src/store/reducers/header/types.ts +3 -1
  375. package/src/store/reducers/pdisk/types.ts +1 -0
  376. package/src/store/reducers/pdisk/utils.ts +6 -3
  377. package/src/store/reducers/query/parsers/prepareStreamingQueryPlan.ts +74 -0
  378. package/src/store/reducers/storage/prepareGroupsDisks.ts +7 -22
  379. package/src/store/reducers/storage/utils.ts +4 -0
  380. package/src/store/reducers/streamingQuery/streamingQuery.ts +44 -19
  381. package/src/store/reducers/tenant/constants.ts +1 -0
  382. package/src/styles/mixins.scss +22 -0
  383. package/src/types/api/pdisk.ts +4 -0
  384. package/src/types/api/schema/columnEntity.ts +2 -1
  385. package/src/types/api/schema/sysView.ts +60 -37
  386. package/src/types/api/schema/table.ts +7 -0
  387. package/src/types/api/vdisk.ts +9 -0
  388. package/src/types/store/nodesList.ts +7 -7
  389. package/src/uiFactory/types.ts +9 -2
  390. package/src/utils/bytesParsers/formatBytes.ts +23 -4
  391. package/src/utils/disks/constants.ts +5 -0
  392. package/src/utils/disks/diskInfo/getDiskLocationItems.ts +50 -0
  393. package/src/utils/disks/diskInfo/i18n/en.json +9 -0
  394. package/src/utils/disks/diskInfo/i18n/index.ts +5 -0
  395. package/src/utils/disks/iconCalculators.ts +1 -1
  396. package/src/utils/disks/prepareDisks.ts +21 -47
  397. package/src/utils/disks/types.ts +10 -2
  398. package/src/utils/hooks/useNodeMetadata.ts +21 -0
  399. package/src/utils/nodes.ts +6 -1
  400. package/src/utils/query.ts +55 -0
  401. package/src/utils/schema.ts +22 -5
  402. package/src/utils/storageMetrics.ts +27 -14
  403. package/src/utils/timeParsers/formatDuration.ts +22 -1
  404. package/src/utils/timeParsers/i18n/en.json +5 -1
  405. package/src/utils/timeParsers/i18n/ru.json +5 -1
@@ -2,43 +2,66 @@ import type {TPathID} from './shared';
2
2
 
3
3
  export interface TSysViewDescription {
4
4
  Name?: string;
5
- Type?: ESysViewType;
5
+ /**
6
+ * ESysViewType: enum name ("EVSlots") on YDB <= 26.3.1.x,
7
+ * numeric value (13) since ydb-platform/ydb#54332
8
+ */
9
+ Type?: ESysViewType | number;
6
10
  SourceObject?: TPathID;
7
11
  }
8
12
 
9
- export type ESysViewType =
10
- | 'EPartitionStats'
11
- | 'ENodes'
12
- | 'ETopQueriesByDurationOneMinute'
13
- | 'ETopQueriesByDurationOneHour'
14
- | 'ETopQueriesByReadBytesOneMinute'
15
- | 'ETopQueriesByReadBytesOneHour'
16
- | 'ETopQueriesByCpuTimeOneMinute'
17
- | 'ETopQueriesByCpuTimeOneHour'
18
- | 'ETopQueriesByRequestUnitsOneMinute'
19
- | 'ETopQueriesByRequestUnitsOneHour'
20
- | 'EQuerySessions'
21
- | 'EPDisks'
22
- | 'EVSlots'
23
- | 'EGroups'
24
- | 'EStoragePools'
25
- | 'EStorageStats'
26
- | 'ETablets'
27
- | 'EQueryMetricsOneMinute'
28
- | 'ETopPartitionsByCpuOneMinute'
29
- | 'ETopPartitionsByCpuOneHour'
30
- | 'ETopPartitionsByTliOneMinute'
31
- | 'ETopPartitionsByTliOneHour'
32
- | 'EResourcePoolClassifiers'
33
- | 'EResourcePools'
34
- | 'EAuthUsers'
35
- | 'EAuthGroups'
36
- | 'EAuthGroupMembers'
37
- | 'EAuthOwners'
38
- | 'EAuthPermissions'
39
- | 'EAuthEffectivePermissions'
40
- | 'EPgTables'
41
- | 'EInformationSchemaTables'
42
- | 'EPgClass'
43
- | 'EShowCreate'
44
- | 'ECompileCacheQueries';
13
+ /**
14
+ * Numeric ESysViewType values
15
+ * source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/protos/sys_view_types.proto
16
+ */
17
+ export const SYS_VIEW_TYPE_IDS = {
18
+ EPartitionStats: 1,
19
+ ENodes: 2,
20
+ ETopQueriesByDurationOneMinute: 3,
21
+ ETopQueriesByDurationOneHour: 4,
22
+ ETopQueriesByReadBytesOneMinute: 5,
23
+ ETopQueriesByReadBytesOneHour: 6,
24
+ ETopQueriesByCpuTimeOneMinute: 7,
25
+ ETopQueriesByCpuTimeOneHour: 8,
26
+ ETopQueriesByRequestUnitsOneMinute: 9,
27
+ ETopQueriesByRequestUnitsOneHour: 10,
28
+ EQuerySessions: 11,
29
+ EPDisks: 12,
30
+ EVSlots: 13,
31
+ EGroups: 14,
32
+ EStoragePools: 15,
33
+ EStorageStats: 16,
34
+ ETablets: 17,
35
+ EQueryMetricsOneMinute: 18,
36
+ ETopPartitionsByCpuOneMinute: 19,
37
+ ETopPartitionsByCpuOneHour: 20,
38
+ ETopPartitionsByTliOneMinute: 21,
39
+ ETopPartitionsByTliOneHour: 22,
40
+ EResourcePoolClassifiers: 23,
41
+ EResourcePools: 24,
42
+ EAuthUsers: 25,
43
+ EAuthGroups: 26,
44
+ EAuthGroupMembers: 27,
45
+ EAuthOwners: 28,
46
+ EAuthPermissions: 29,
47
+ EAuthEffectivePermissions: 30,
48
+ EPgTables: 31,
49
+ EInformationSchemaTables: 32,
50
+ EPgClass: 33,
51
+ EShowCreate: 34,
52
+ ECompileCacheQueries: 35,
53
+ EStorePrimaryIndexStats: 36,
54
+ EStorePrimaryIndexSchemaStats: 37,
55
+ EStorePrimaryIndexPortionStats: 38,
56
+ EStorePrimaryIndexGranuleStats: 39,
57
+ EStorePrimaryIndexOptimizerStats: 40,
58
+ ETablePrimaryIndexStats: 41,
59
+ ETablePrimaryIndexSchemaStats: 42,
60
+ ETablePrimaryIndexPortionStats: 43,
61
+ ETablePrimaryIndexGranuleStats: 44,
62
+ ETablePrimaryIndexOptimizerStats: 45,
63
+ EStreamingQueries: 46,
64
+ EUdfModules: 47,
65
+ } as const;
66
+
67
+ export type ESysViewType = keyof typeof SYS_VIEW_TYPE_IDS;
@@ -66,6 +66,13 @@ interface TEnabled {
66
66
  ExpireAfterSeconds?: number;
67
67
  ColumnUnit?: EUnit;
68
68
  SysSettings?: TSysSettings;
69
+ Tiers?: TTTLTier[];
70
+ }
71
+
72
+ export interface TTTLTier {
73
+ ApplyAfterSeconds?: number;
74
+ Delete?: {};
75
+ EvictToExternalStorage?: {Storage?: string};
69
76
  }
70
77
 
71
78
  interface TSysSettings {
@@ -41,6 +41,8 @@ export interface TVDiskStateInfo {
41
41
  SatisfactionRank?: TVDiskSatisfactionRank;
42
42
  /** Is VDisk replicated? (i.e. contains all blobs it must have) */
43
43
  Replicated?: boolean;
44
+ /** Detailed Whiteboard replication status. May be absent on older nodes. */
45
+ DetailedReplicationStatus?: EVDiskDetailedReplicationStatus;
44
46
  /** Does this VDisk has any yet unreplicated phantom-like blobs? */
45
47
  UnreplicatedPhantoms?: boolean;
46
48
  /** The same for the non-phantom-like blobs. */
@@ -138,6 +140,13 @@ export enum EVDiskState {
138
140
  PDiskError = 'PDiskError',
139
141
  }
140
142
 
143
+ export enum EVDiskDetailedReplicationStatus {
144
+ Replicated = 'Replicated',
145
+ WaitingForToken = 'WaitingForToken',
146
+ InProgress = 'InProgress',
147
+ PhantomsOnly = 'PhantomsOnly',
148
+ }
149
+
141
150
  /**
142
151
  * BSC VDisk data
143
152
  *
@@ -1,7 +1,7 @@
1
- export type NodesMap = Map<
2
- number,
3
- {
4
- Host?: string;
5
- DC?: string;
6
- }
7
- >;
1
+ export interface NodeMetadata {
2
+ Host?: string;
3
+ DC?: string;
4
+ Rack?: string;
5
+ }
6
+
7
+ export type NodesMap = Map<number, NodeMetadata>;
@@ -7,7 +7,10 @@ import type {
7
7
  GetHealthcheckViewTitles,
8
8
  GetHealthcheckViewsOrder,
9
9
  } from '../containers/Tenant/Healthcheck/shared';
10
- import type {HealthcheckAssistantActionProps} from '../containers/Tenant/Healthcheck/types';
10
+ import type {
11
+ HealthcheckAssistantActionProps,
12
+ HealthcheckAssistantTarget,
13
+ } from '../containers/Tenant/Healthcheck/types';
11
14
  import type {ClusterInfo} from '../store/reducers/cluster/cluster';
12
15
  import type {PreparedStorageNode} from '../store/reducers/storage/types';
13
16
  import type {PreparedTenant} from '../store/reducers/tenants/types';
@@ -70,7 +73,7 @@ export interface UIFactory<H extends string = CommonIssueCategory, T extends str
70
73
  * Renders after the drawer header and before Healthcheck content.
71
74
  * Stays mounted while the drawer is open, independent of loading, error or issue state.
72
75
  */
73
- renderDrawerExtension?: () => React.ReactNode;
76
+ renderDrawerExtension?: (props: HealthcheckDrawerExtensionProps) => React.ReactNode;
74
77
  };
75
78
  hasAccess: HasAccess;
76
79
  hideGrantAccess?: boolean;
@@ -211,6 +214,10 @@ export type RenderNodeTooltipActions = (props: {data?: PreparedStorageNode}) =>
211
214
 
212
215
  export type RenderChatPanel = () => React.ReactNode;
213
216
 
217
+ export interface HealthcheckDrawerExtensionProps {
218
+ target?: HealthcheckAssistantTarget;
219
+ }
220
+
214
221
  export type RenderHealthcheckAssistantAction = (
215
222
  props: HealthcheckAssistantActionProps,
216
223
  ) => React.ReactNode;
@@ -1,6 +1,11 @@
1
1
  import {GIGABYTE, KILOBYTE, MEGABYTE, PETABYTE, TERABYTE, UNBREAKABLE_GAP} from '../constants';
2
2
  import type {FormatToSizeArgs, FormatValuesArgs} from '../dataFormatters/common';
3
- import {formatNumber, roundToPrecision} from '../dataFormatters/dataFormatters';
3
+ import {
4
+ formatNumber,
5
+ roundToDecimalPlaces,
6
+ roundToPrecision,
7
+ } from '../dataFormatters/dataFormatters';
8
+ import {configuredNumeral} from '../numeral';
4
9
  import {isNumeric} from '../utils';
5
10
 
6
11
  import i18n from './i18n';
@@ -57,8 +62,22 @@ export const getBytesSizeUnit = (value: number) => {
57
62
  return size;
58
63
  };
59
64
 
60
- const formatToSize = ({value, size = 'mb', precision = 0}: FormatToSizeArgs<BytesSizes>) => {
61
- const result = roundToPrecision(Number(value) / sizes[size].value, precision);
65
+ const formatToSize = ({
66
+ value,
67
+ size = 'mb',
68
+ precision = 0,
69
+ fixedDecimalPlaces,
70
+ }: FormatToSizeArgs<BytesSizes> & {fixedDecimalPlaces?: number}) => {
71
+ const convertedValue = Number(value) / sizes[size].value;
72
+ if (fixedDecimalPlaces !== undefined) {
73
+ const roundedValue = roundToDecimalPlaces(convertedValue, fixedDecimalPlaces);
74
+ const pattern =
75
+ roundedValue !== 0 && fixedDecimalPlaces > 0
76
+ ? `0,0.${'0'.repeat(fixedDecimalPlaces)}`
77
+ : '0,0';
78
+ return configuredNumeral(roundedValue).format(pattern);
79
+ }
80
+ const result = roundToPrecision(convertedValue, precision);
62
81
 
63
82
  return formatNumber(result);
64
83
  };
@@ -78,7 +97,7 @@ export const formatBytes = ({
78
97
  withSizeLabel = true,
79
98
  delimiter,
80
99
  ...params
81
- }: FormatValuesArgs<BytesSizes>) => {
100
+ }: FormatValuesArgs<BytesSizes> & {fixedDecimalPlaces?: number}) => {
82
101
  if (!isNumeric(value)) {
83
102
  return '';
84
103
  }
@@ -142,6 +142,7 @@ export const PDISK_STATE_SEVERITY = {
142
142
  export interface LabelVisualConfig {
143
143
  theme: LabelProps['theme'];
144
144
  icon?: IconData;
145
+ dangerHeavy?: boolean;
145
146
  }
146
147
 
147
148
  export const NUMERIC_SEVERITY_TO_LABEL_VIEW: Record<number, LabelVisualConfig> = {
@@ -157,6 +158,10 @@ export const NUMERIC_SEVERITY_TO_LABEL_VIEW: Record<number, LabelVisualConfig> =
157
158
  theme: 'danger',
158
159
  icon: CircleExclamation,
159
160
  },
161
+ [SOLID_RED_SEVERITY]: {
162
+ theme: 'danger',
163
+ dangerHeavy: true,
164
+ },
160
165
  [DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Blue]: {
161
166
  theme: 'info',
162
167
  icon: ArrowsRotateLeft,
@@ -0,0 +1,50 @@
1
+ import {isNil} from 'lodash';
2
+
3
+ import type {YDBDefinitionListItem} from '../../../components/YDBDefinitionList/YDBDefinitionList';
4
+ import type {NodeMetadata} from '../../../types/store/nodesList';
5
+ import {EMPTY_DATA_PLACEHOLDER} from '../../constants';
6
+
7
+ import i18n from './i18n';
8
+
9
+ export interface DiskDetailItem extends YDBDefinitionListItem {
10
+ /** Stable field identifier for ordering and grouping independently of translated names. */
11
+ id: string;
12
+ }
13
+
14
+ interface DiskLocationData {
15
+ NodeId?: number;
16
+ PDiskId?: number;
17
+ Path?: string;
18
+ VDiskSlotId?: number;
19
+ }
20
+
21
+ export function getDiskLocationItems(
22
+ data: DiskLocationData,
23
+ nodeData: NodeMetadata,
24
+ {withVDiskSlotId = false}: {withVDiskSlotId?: boolean} = {},
25
+ ): DiskDetailItem[] {
26
+ const entries = [
27
+ {id: 'fqdn', name: i18n('field_fqdn'), value: nodeData.Host},
28
+ {id: 'rack', name: i18n('field_rack'), value: nodeData.Rack},
29
+ {id: 'datacenter', name: i18n('field_datacenter'), value: nodeData.DC},
30
+ {id: 'pdisk-path', name: i18n('field_pdisk-path'), value: data.Path},
31
+ {id: 'node-id', name: i18n('field_node-id'), value: data.NodeId || undefined},
32
+ {id: 'pdisk-id', name: i18n('field_pdisk-id'), value: data.PDiskId},
33
+ ];
34
+ if (withVDiskSlotId) {
35
+ entries.push({
36
+ id: 'vdisk-slot-id',
37
+ name: i18n('field_vdisk-slot-id'),
38
+ value: data.VDiskSlotId,
39
+ });
40
+ }
41
+ return entries.map(({id, name, value}) => {
42
+ const missing = isNil(value) || value === '';
43
+ return {
44
+ id,
45
+ name,
46
+ content: missing ? EMPTY_DATA_PLACEHOLDER : value,
47
+ copyText: missing ? undefined : value,
48
+ };
49
+ });
50
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "field_fqdn": "FQDN",
3
+ "field_rack": "Rack",
4
+ "field_datacenter": "Datacenter",
5
+ "field_pdisk-path": "PDisk Path",
6
+ "field_node-id": "Node ID",
7
+ "field_pdisk-id": "PDisk ID",
8
+ "field_vdisk-slot-id": "VDisk Slot ID"
9
+ }
@@ -0,0 +1,5 @@
1
+ import {registerKeysets} from '../../../i18n';
2
+
3
+ import en from './en.json';
4
+
5
+ export default registerKeysets('ydb-disk-info', {en});
@@ -161,7 +161,7 @@ export function calculateFrontQueuesIcon(
161
161
  * Get icon and color for a single status flag.
162
162
  * Maps EFlag to the corresponding pair-legend icon and color.
163
163
  */
164
- function getFlagIconWithColor(flag: EFlag | undefined): IconWithColor | undefined {
164
+ export function getFlagIconWithColor(flag: EFlag | undefined): IconWithColor | undefined {
165
165
  if (!flag || flag === EFlag.Grey) {
166
166
  return {
167
167
  icon: CircleQuestionFill,
@@ -1,6 +1,6 @@
1
1
  import {isNil} from 'lodash';
2
2
 
3
- import type {TPDiskStateInfo} from '../../types/api/pdisk';
3
+ import type {TPDiskInfo, TPDiskStateInfo} from '../../types/api/pdisk';
4
4
  import type {TVDiskStateInfo, TVSlotId} from '../../types/api/vdisk';
5
5
  import {stringifyVdiskId} from '../dataFormatters/dataFormatters';
6
6
  import {isNumeric, parseOptionalNonNegativeNumber} from '../utils';
@@ -8,7 +8,7 @@ import {isNumeric, parseOptionalNonNegativeNumber} from '../utils';
8
8
  import {calculatePDiskSeverity} from './calculatePDiskSeverity';
9
9
  import {calculateVDiskSeverity} from './calculateVDiskSeverity';
10
10
  import {getPDiskType} from './getPDiskType';
11
- import {getPDiskId, isFullVDiskData} from './helpers';
11
+ import {getPDiskId, isFullVDiskData, makeVDiskLocationKey} from './helpers';
12
12
  import type {PreparedPDisk, PreparedVDisk} from './types';
13
13
 
14
14
  export function prepareWhiteboardVDiskData(
@@ -21,16 +21,7 @@ export function prepareWhiteboardVDiskData(
21
21
  if (!isFullVDiskData(vDiskState)) {
22
22
  const {NodeId, PDiskId, VSlotId, ...restVDiskFields} = vDiskState;
23
23
 
24
- const vDiskId =
25
- !isNil(VSlotId) && !isNil(PDiskId) && !isNil(NodeId)
26
- ? {
27
- NodeId,
28
- PDiskId,
29
- VSlotId,
30
- }
31
- : undefined;
32
-
33
- const StringifiedId = stringifyVdiskId(vDiskId);
24
+ const StringifiedId = makeVDiskLocationKey(NodeId, PDiskId, VSlotId) ?? '';
34
25
 
35
26
  return {
36
27
  ...restVDiskFields,
@@ -66,13 +57,7 @@ export function prepareWhiteboardVDiskData(
66
57
  AllocatedSize: AllocatedSize,
67
58
  SlotSize: PDisk?.EnforcedDynamicSlotSize,
68
59
  });
69
- const WhiteboardSize = hasWhiteboardData
70
- ? prepareWhiteboardVDiskSizeFields({
71
- AvailableSize,
72
- AllocatedSize,
73
- SlotSize: PDisk?.EnforcedDynamicSlotSize,
74
- })
75
- : undefined;
60
+ const WhiteboardSize = hasWhiteboardData ? vDiskSizeFields.DisplaySize : undefined;
76
61
 
77
62
  const Severity = calculateVDiskSeverity(vDiskState);
78
63
 
@@ -124,7 +109,7 @@ export function prepareWhiteboardVDiskData(
124
109
  }
125
110
 
126
111
  export function prepareWhiteboardPDiskData(
127
- pdiskState: TPDiskStateInfo = {},
112
+ pdiskState: TPDiskStateInfo & Pick<TPDiskInfo, 'StatusV2'> = {},
128
113
  whiteboardSizeSource: Pick<TPDiskStateInfo, 'AvailableSize' | 'TotalSize'> | null = pdiskState,
129
114
  ): PreparedPDisk {
130
115
  const hasWhiteboardData = pdiskState.HasWhiteboardData ?? Boolean(whiteboardSizeSource);
@@ -170,33 +155,7 @@ export function prepareWhiteboardPDiskData(
170
155
  State,
171
156
  Severity,
172
157
  SlotSize: EnforcedDynamicSlotSize,
173
- };
174
- }
175
-
176
- function prepareWhiteboardVDiskSizeFields({
177
- AvailableSize,
178
- AllocatedSize,
179
- SlotSize,
180
- }: {
181
- AvailableSize: unknown;
182
- AllocatedSize: unknown;
183
- SlotSize: unknown;
184
- }) {
185
- const allocatedSize = parseOptionalNonNegativeNumber(AllocatedSize);
186
- const availableSize = parseOptionalNonNegativeNumber(AvailableSize);
187
- const slotSize = parseOptionalNonNegativeNumber(SlotSize);
188
- const preparedSizeFields = prepareVDiskSizeFields({
189
- AvailableSize: availableSize,
190
- AllocatedSize: allocatedSize,
191
- SlotSize: slotSize,
192
- });
193
-
194
- return {
195
- AllocatedSize: allocatedSize === undefined ? undefined : preparedSizeFields.AllocatedSize,
196
- SizeLimit:
197
- availableSize === undefined && slotSize === undefined
198
- ? undefined
199
- : preparedSizeFields.SizeLimit,
158
+ DriveStatus: pdiskState.Status ?? pdiskState.StatusV2,
200
159
  };
201
160
  }
202
161
 
@@ -253,12 +212,27 @@ export function prepareVDiskSizeFields({
253
212
  });
254
213
  const allocatedPercent = sizeLimit > 0 ? Math.floor((allocated * 100) / sizeLimit) : NaN;
255
214
 
215
+ // Preserve missing values for display without changing the legacy calculations above.
216
+ const displayAllocatedSize = parseOptionalNonNegativeNumber(AllocatedSize);
217
+ const displayAvailableSize = parseOptionalNonNegativeNumber(AvailableSize);
218
+ const displaySlotSize = parseOptionalNonNegativeNumber(SlotSize);
219
+ let displaySizeLimit: number | undefined;
220
+ if (!displayAvailableSize && displaySlotSize) {
221
+ displaySizeLimit = displaySlotSize;
222
+ } else if (displayAllocatedSize !== undefined && displayAvailableSize !== undefined) {
223
+ displaySizeLimit = displayAllocatedSize + displayAvailableSize;
224
+ }
225
+
256
226
  return {
257
227
  AvailableSize: available,
258
228
  AllocatedSize: allocated,
259
229
  SizeLimit: sizeLimit,
260
230
  FreeSize: freeSize,
261
231
  AllocatedPercent: allocatedPercent,
232
+ DisplaySize: {
233
+ AllocatedSize: displayAllocatedSize,
234
+ SizeLimit: displaySizeLimit,
235
+ },
262
236
  };
263
237
  }
264
238
 
@@ -1,6 +1,6 @@
1
1
  import type {EFlag} from '../../types/api/enums';
2
2
  import type {EDriveStatus, TPDiskInfo, TPDiskStateInfo} from '../../types/api/pdisk';
3
- import type {EVDiskStatus, TVDiskStateInfo, TVSlotId} from '../../types/api/vdisk';
3
+ import type {EVDiskStatus, TVDiskStateInfo} from '../../types/api/vdisk';
4
4
  import type {ValueOf} from '../../types/common';
5
5
 
6
6
  import type {PDISK_TYPES} from './getPDiskType';
@@ -98,6 +98,8 @@ export interface PreparedVDisk
98
98
  extends Omit<TVDiskStateInfo, 'PDisk' | 'AvailableSize' | 'AllocatedSize' | 'Donors'> {
99
99
  Status?: EVDiskStatus;
100
100
  PDisk?: PreparedPDisk;
101
+ PDiskType?: string;
102
+ PDiskPath?: string;
101
103
  Severity?: number;
102
104
  StringifiedId?: string;
103
105
 
@@ -106,6 +108,11 @@ export interface PreparedVDisk
106
108
  AllocatedPercent?: number;
107
109
  SizeLimit?: number;
108
110
  FreeSize?: number;
111
+ /** Size values for display, preserving missing source values independently. */
112
+ DisplaySize?: {
113
+ AllocatedSize?: number;
114
+ SizeLimit?: number;
115
+ };
109
116
  WhiteboardSize?: {
110
117
  AllocatedSize?: number;
111
118
  SizeLimit?: number;
@@ -118,7 +125,8 @@ export interface PreparedVDisk
118
125
 
119
126
  export type PDiskType = ValueOf<typeof PDISK_TYPES>;
120
127
 
121
- export interface UnavailableDonor extends TVSlotId {
128
+ export interface UnavailableDonor
129
+ extends Pick<PreparedVDisk, 'NodeId' | 'PDiskId' | 'VDiskSlotId'> {
122
130
  DonorMode?: boolean;
123
131
  StoragePoolName?: string;
124
132
  }
@@ -0,0 +1,21 @@
1
+ import {isNil} from 'lodash';
2
+
3
+ import {selectNodesMap} from '../../store/reducers/nodesList';
4
+ import type {NodeMetadata} from '../../types/store/nodesList';
5
+ import {useTypedSelector} from '../hooks';
6
+
7
+ import {useDatabaseFromQuery} from './useDatabaseFromQuery';
8
+
9
+ export function useNodeMetadata(
10
+ nodeId: number | undefined,
11
+ parentNodeData?: NodeMetadata,
12
+ ): NodeMetadata {
13
+ const database = useDatabaseFromQuery();
14
+ const nodesMap = useTypedSelector((state) => selectNodesMap(state, database));
15
+ const storedNodeData = isNil(nodeId) ? undefined : nodesMap?.get(nodeId);
16
+ return {
17
+ Host: parentNodeData?.Host || storedNodeData?.Host,
18
+ DC: parentNodeData?.DC || storedNodeData?.DC,
19
+ Rack: parentNodeData?.Rack || storedNodeData?.Rack,
20
+ };
21
+ }
@@ -32,9 +32,14 @@ export const isUnavailableNode = <
32
32
  export const prepareNodesMap = (nodesList?: TNodeInfo[]) => {
33
33
  return nodesList?.reduce<NodesMap>((nodeHosts, node) => {
34
34
  if (valueIsDefined(node.Id)) {
35
+ const physicalLocation = node.PhysicalLocation;
36
+ // The legacy numeric Rack can be a hash of the actual rack name.
37
+ const Rack = physicalLocation?.Location?.match(/(?:^|\/)R=([^/]+)/)?.[1];
38
+
35
39
  nodeHosts.set(node.Id, {
36
40
  Host: node.Host,
37
- DC: node.PhysicalLocation?.DataCenterId,
41
+ DC: physicalLocation?.DataCenterId,
42
+ Rack,
38
43
  });
39
44
  }
40
45
  return nodeHosts;
@@ -253,6 +253,61 @@ export function isErrorResponse(data: unknown): data is ErrorResponse {
253
253
  return Boolean(data && typeof data === 'object' && 'issues' in data);
254
254
  }
255
255
 
256
+ function hasIssueContent(data: ErrorResponse) {
257
+ return Boolean(data.error || data.issues?.length);
258
+ }
259
+
260
+ // The issues view walks this tree and renders these fields, so anything else would throw while drawing.
261
+ function isIssueTree(value: unknown): boolean {
262
+ return (
263
+ Array.isArray(value) &&
264
+ value.every((issue) => {
265
+ if (!issue || typeof issue !== 'object' || Array.isArray(issue)) {
266
+ return false;
267
+ }
268
+ const {
269
+ message,
270
+ issue_code: issueCode,
271
+ issues,
272
+ } = issue as {
273
+ message?: unknown;
274
+ issue_code?: unknown;
275
+ issues?: unknown;
276
+ };
277
+ return (
278
+ (message === undefined || typeof message === 'string') &&
279
+ (issueCode === undefined || typeof issueCode === 'number') &&
280
+ (issues === undefined || issues === null || isIssueTree(issues))
281
+ );
282
+ })
283
+ );
284
+ }
285
+
286
+ function hasRenderableIssues(data: ErrorResponse) {
287
+ const message: unknown = data.error?.message;
288
+ return (
289
+ (message === undefined || typeof message === 'string') &&
290
+ (data.issues === undefined || data.issues === null || isIssueTree(data.issues))
291
+ );
292
+ }
293
+
294
+ export function parseIssuesData(raw: unknown): ErrorResponse | string | undefined {
295
+ if (typeof raw === 'string' && raw) {
296
+ try {
297
+ const parsed: unknown = JSON.parse(raw);
298
+ return isErrorResponse(parsed) && hasIssueContent(parsed) && hasRenderableIssues(parsed)
299
+ ? parsed
300
+ : undefined;
301
+ } catch {
302
+ return raw;
303
+ }
304
+ }
305
+ if (isErrorResponse(raw) && hasIssueContent(raw) && hasRenderableIssues(raw)) {
306
+ return raw;
307
+ }
308
+ return undefined;
309
+ }
310
+
256
311
  // Although schema is set in request, if schema is not supported default schema for the version will be used
257
312
  // So we should additionally parse response
258
313
  export function parseQueryAPIResponse(
@@ -1,14 +1,31 @@
1
1
  import type {ESysViewType} from '../types/api/schema/sysView';
2
+ import {SYS_VIEW_TYPE_IDS} from '../types/api/schema/sysView';
2
3
 
3
- export function prepareSystemViewType(type?: ESysViewType) {
4
- if (!type) {
4
+ const SYS_VIEW_TYPE_NAMES_BY_ID = new Map<number, ESysViewType>(
5
+ (Object.keys(SYS_VIEW_TYPE_IDS) as ESysViewType[]).map(
6
+ (name) => [SYS_VIEW_TYPE_IDS[name], name] as const,
7
+ ),
8
+ );
9
+
10
+ /**
11
+ * Normalizes SysViewDescription.Type for display.
12
+ * YDB <= 26.3.1.x returns the enum name ("EVSlots"),
13
+ * YDB with ydb-platform/ydb#54332 returns the numeric value (13).
14
+ */
15
+ export function prepareSystemViewType(type?: string | number | null): string | undefined {
16
+ if (type === undefined || type === null || type === '') {
5
17
  return undefined;
6
18
  }
19
+
20
+ // Ids unknown to this UI version are shown as-is instead of hiding the row
21
+ const name =
22
+ typeof type === 'number' ? (SYS_VIEW_TYPE_NAMES_BY_ID.get(type) ?? String(type)) : type;
23
+
7
24
  // System view type is enum, its format from backend is EType
8
25
  // We need to display only Type, remove redundant E
9
26
  // EStoragePools -> StoragePools, EStorageStats -> StorageStats
10
- if (type.startsWith('E')) {
11
- return type.slice(1);
27
+ if (name.startsWith('E')) {
28
+ return name.slice(1);
12
29
  }
13
- return type;
30
+ return name;
14
31
  }