ydb-embedded-ui 9.3.0 → 9.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 (288) hide show
  1. package/dist/components/AutoRefreshControl/i18n/index.d.ts +1 -1
  2. package/dist/components/Drawer/Drawer.d.ts +2 -1
  3. package/dist/components/Drawer/Drawer.js +10 -6
  4. package/dist/components/Drawer/Drawer.js.map +1 -1
  5. package/dist/components/Drawer/DrawerContext.d.ts +1 -0
  6. package/dist/components/Drawer/DrawerContext.js +5 -2
  7. package/dist/components/Drawer/DrawerContext.js.map +1 -1
  8. package/dist/{containers/Storage → components}/EmptyFilter/EmptyFilter.js +2 -2
  9. package/dist/components/EmptyFilter/EmptyFilter.js.map +1 -0
  10. package/dist/{containers/App → components/EmptyFilter}/i18n/index.js +1 -1
  11. package/dist/components/EmptyFilter/i18n/index.js.map +1 -0
  12. package/dist/components/EmptyState/EmptyState.d.ts +1 -0
  13. package/dist/components/EmptyState/EmptyState.js +1 -0
  14. package/dist/components/EmptyState/EmptyState.js.map +1 -1
  15. package/dist/components/EmptyState/EmptyState.scss +9 -0
  16. package/dist/components/EnableFullscreenButton/EnableFullscreenButton.js +3 -2
  17. package/dist/components/EnableFullscreenButton/EnableFullscreenButton.js.map +1 -1
  18. package/dist/components/EnableFullscreenButton/i18n/en.json +3 -0
  19. package/dist/components/EnableFullscreenButton/i18n/index.d.ts +2 -0
  20. package/dist/components/EnableFullscreenButton/i18n/index.js +5 -0
  21. package/dist/components/EnableFullscreenButton/i18n/index.js.map +1 -0
  22. package/dist/components/FixedHeightQuery/FixedHeightQuery.d.ts +9 -0
  23. package/dist/components/FixedHeightQuery/FixedHeightQuery.js +23 -0
  24. package/dist/components/FixedHeightQuery/FixedHeightQuery.js.map +1 -0
  25. package/dist/components/FixedHeightQuery/FixedHeightQuery.scss +42 -0
  26. package/dist/components/HealthcheckStatus/HealthcheckStatus.d.ts +8 -0
  27. package/dist/components/HealthcheckStatus/HealthcheckStatus.js +41 -0
  28. package/dist/components/HealthcheckStatus/HealthcheckStatus.js.map +1 -0
  29. package/dist/components/HealthcheckStatus/i18n/en.json +7 -0
  30. package/dist/components/HealthcheckStatus/i18n/index.d.ts +2 -0
  31. package/dist/components/HealthcheckStatus/i18n/index.js +5 -0
  32. package/dist/components/HealthcheckStatus/i18n/index.js.map +1 -0
  33. package/dist/components/PaginatedTable/PaginatedTable.js +21 -21
  34. package/dist/components/PaginatedTable/PaginatedTable.js.map +1 -1
  35. package/dist/components/PaginatedTable/PaginatedTableContext.d.ts +3 -1
  36. package/dist/components/PaginatedTable/PaginatedTableContext.js +3 -2
  37. package/dist/components/PaginatedTable/PaginatedTableContext.js.map +1 -1
  38. package/dist/components/PaginatedTable/PaginatedTableWithLayout.d.ts +5 -4
  39. package/dist/components/PaginatedTable/PaginatedTableWithLayout.js +29 -2
  40. package/dist/components/PaginatedTable/PaginatedTableWithLayout.js.map +1 -1
  41. package/dist/components/PaginatedTable/TableChunk.d.ts +3 -2
  42. package/dist/components/PaginatedTable/TableChunk.js +12 -18
  43. package/dist/components/PaginatedTable/TableChunk.js.map +1 -1
  44. package/dist/components/PaginatedTable/TableChunksRenderer.d.ts +21 -0
  45. package/dist/components/PaginatedTable/TableChunksRenderer.js +96 -0
  46. package/dist/components/PaginatedTable/TableChunksRenderer.js.map +1 -0
  47. package/dist/components/PaginatedTable/TableRow.d.ts +2 -1
  48. package/dist/components/PaginatedTable/TableRow.js +4 -4
  49. package/dist/components/PaginatedTable/TableRow.js.map +1 -1
  50. package/dist/components/PaginatedTable/requestBatcher.d.ts +28 -0
  51. package/dist/components/PaginatedTable/requestBatcher.js +128 -0
  52. package/dist/components/PaginatedTable/requestBatcher.js.map +1 -0
  53. package/dist/components/PaginatedTable/useScrollBasedChunks.d.ts +8 -2
  54. package/dist/components/PaginatedTable/useScrollBasedChunks.js +35 -20
  55. package/dist/components/PaginatedTable/useScrollBasedChunks.js.map +1 -1
  56. package/dist/components/ProgressViewer/ProgressViewer.d.ts +2 -1
  57. package/dist/components/ProgressViewer/ProgressViewer.js +3 -2
  58. package/dist/components/ProgressViewer/ProgressViewer.js.map +1 -1
  59. package/dist/components/ResizeableDataTable/ResizeableDataTable.d.ts +3 -2
  60. package/dist/components/ResizeableDataTable/ResizeableDataTable.js +7 -2
  61. package/dist/components/ResizeableDataTable/ResizeableDataTable.js.map +1 -1
  62. package/dist/components/SplitPane/SplitPane.scss +0 -1
  63. package/dist/components/TableWithControlsLayout/TableWithControlsLayout.d.ts +4 -3
  64. package/dist/components/TableWithControlsLayout/TableWithControlsLayout.js.map +1 -1
  65. package/dist/containers/App/Content.js +18 -14
  66. package/dist/containers/App/Content.js.map +1 -1
  67. package/dist/containers/Clusters/Clusters.js +19 -7
  68. package/dist/containers/Clusters/Clusters.js.map +1 -1
  69. package/dist/containers/Clusters/Clusters.scss +7 -53
  70. package/dist/containers/Clusters/columns.d.ts +18 -1
  71. package/dist/containers/Clusters/columns.js +43 -9
  72. package/dist/containers/Clusters/columns.js.map +1 -1
  73. package/dist/containers/Clusters/i18n/en.json +3 -1
  74. package/dist/containers/Clusters/i18n/index.d.ts +1 -1
  75. package/dist/containers/Clusters/i18n/index.js +1 -2
  76. package/dist/containers/Clusters/i18n/index.js.map +1 -1
  77. package/dist/containers/Header/Header.d.ts +1 -5
  78. package/dist/containers/Header/Header.js +14 -10
  79. package/dist/containers/Header/Header.js.map +1 -1
  80. package/dist/containers/Header/Header.scss +1 -1
  81. package/dist/containers/Header/breadcrumbs.d.ts +3 -1
  82. package/dist/containers/Header/breadcrumbs.js +18 -6
  83. package/dist/containers/Header/breadcrumbs.js.map +1 -1
  84. package/dist/containers/Header/i18n/en.json +3 -1
  85. package/dist/containers/Header/i18n/index.d.ts +1 -1
  86. package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js +5 -3
  87. package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js.map +1 -1
  88. package/dist/containers/Nodes/PaginatedNodes/NodesComponent.js +2 -2
  89. package/dist/containers/Nodes/PaginatedNodes/NodesComponent.js.map +1 -1
  90. package/dist/containers/Operations/columns.js +2 -2
  91. package/dist/containers/Operations/columns.js.map +1 -1
  92. package/dist/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.js +4 -2
  93. package/dist/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.js.map +1 -1
  94. package/dist/containers/Storage/PaginatedStorageGroups/StorageGroupsComponent.js +2 -2
  95. package/dist/containers/Storage/PaginatedStorageGroups/StorageGroupsComponent.js.map +1 -1
  96. package/dist/containers/Storage/PaginatedStorageGroupsTable/StorageGroupsEmptyDataMessage.js +1 -1
  97. package/dist/containers/Storage/PaginatedStorageGroupsTable/StorageGroupsEmptyDataMessage.js.map +1 -1
  98. package/dist/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.js +4 -2
  99. package/dist/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.js.map +1 -1
  100. package/dist/containers/Storage/PaginatedStorageNodes/StorageNodesComponent.js +2 -2
  101. package/dist/containers/Storage/PaginatedStorageNodes/StorageNodesComponent.js.map +1 -1
  102. package/dist/containers/Storage/PaginatedStorageNodesTable/StorageNodesEmptyDataMessage.js +1 -1
  103. package/dist/containers/Storage/PaginatedStorageNodesTable/StorageNodesEmptyDataMessage.js.map +1 -1
  104. package/dist/containers/Tablet/components/TabletStorageInfo/i18n/index.d.ts +1 -1
  105. package/dist/containers/Tablets/TabletsTable.js +3 -1
  106. package/dist/containers/Tablets/TabletsTable.js.map +1 -1
  107. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.d.ts +1 -1
  108. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js +30 -29
  109. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js.map +1 -1
  110. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.scss +41 -0
  111. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/i18n/en.json +8 -6
  112. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/i18n/index.d.ts +1 -1
  113. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/i18n/index.js +1 -2
  114. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/i18n/index.js.map +1 -1
  115. package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricCard/MetricCard.d.ts +3 -1
  116. package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricCard/MetricCard.js +9 -2
  117. package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricCard/MetricCard.js.map +1 -1
  118. package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricCard/MetricCard.scss +7 -0
  119. package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.d.ts +2 -2
  120. package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.js +27 -8
  121. package/dist/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.js.map +1 -1
  122. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +5 -10
  123. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js.map +1 -1
  124. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +1 -5
  125. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +2 -0
  126. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  127. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js +11 -1
  128. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js.map +1 -1
  129. package/dist/containers/Tenant/Diagnostics/TopQueries/columns/columns.js +2 -3
  130. package/dist/containers/Tenant/Diagnostics/TopQueries/columns/columns.js.map +1 -1
  131. package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useScrollToSelected.d.ts +19 -0
  132. package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useScrollToSelected.js +31 -0
  133. package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useScrollToSelected.js.map +1 -0
  134. package/dist/containers/Tenant/Diagnostics/TopQueries/utils.js +1 -0
  135. package/dist/containers/Tenant/Diagnostics/TopQueries/utils.js.map +1 -1
  136. package/dist/containers/Tenant/Diagnostics/TopicData/TopicData.js +3 -3
  137. package/dist/containers/Tenant/Diagnostics/TopicData/TopicData.js.map +1 -1
  138. package/dist/containers/Tenant/Diagnostics/TopicData/i18n/index.d.ts +1 -1
  139. package/dist/containers/Tenant/Healthcheck/Healthcheck.d.ts +9 -0
  140. package/dist/containers/Tenant/Healthcheck/Healthcheck.js +49 -0
  141. package/dist/containers/Tenant/Healthcheck/Healthcheck.js.map +1 -0
  142. package/dist/containers/Tenant/Healthcheck/Healthcheck.scss +112 -0
  143. package/dist/containers/Tenant/Healthcheck/components/HealthcheckFilter.d.ts +1 -0
  144. package/dist/containers/Tenant/Healthcheck/components/HealthcheckFilter.js +9 -0
  145. package/dist/containers/Tenant/Healthcheck/components/HealthcheckFilter.js.map +1 -0
  146. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssue.d.ts +7 -0
  147. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssue.js +25 -0
  148. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssue.js.map +1 -0
  149. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/ComputeLocation.d.ts +9 -0
  150. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/ComputeLocation.js +67 -0
  151. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/ComputeLocation.js.map +1 -0
  152. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/HealthcheckIssueDetails.d.ts +6 -0
  153. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/HealthcheckIssueDetails.js +67 -0
  154. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/HealthcheckIssueDetails.js.map +1 -0
  155. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/NodeInfo.d.ts +7 -0
  156. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/NodeInfo.js +19 -0
  157. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/NodeInfo.js.map +1 -0
  158. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/PoolInfo.d.ts +6 -0
  159. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/PoolInfo.js +12 -0
  160. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/PoolInfo.js.map +1 -0
  161. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/StorageLocation.d.ts +9 -0
  162. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/StorageLocation.js +95 -0
  163. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/StorageLocation.js.map +1 -0
  164. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/utils.d.ts +25 -0
  165. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/utils.js +17 -0
  166. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/utils.js.map +1 -0
  167. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueTabs.d.ts +8 -0
  168. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueTabs.js +23 -0
  169. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssueTabs.js.map +1 -0
  170. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssues.d.ts +6 -0
  171. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssues.js +41 -0
  172. package/dist/containers/Tenant/Healthcheck/components/HealthcheckIssues.js.map +1 -0
  173. package/dist/containers/Tenant/Healthcheck/components/HealthcheckRefresh.d.ts +6 -0
  174. package/dist/containers/Tenant/Healthcheck/components/HealthcheckRefresh.js +47 -0
  175. package/dist/containers/Tenant/Healthcheck/components/HealthcheckRefresh.js.map +1 -0
  176. package/dist/containers/Tenant/Healthcheck/components/HealthcheckView.d.ts +8 -0
  177. package/dist/containers/Tenant/Healthcheck/components/HealthcheckView.js +42 -0
  178. package/dist/containers/Tenant/Healthcheck/components/HealthcheckView.js.map +1 -0
  179. package/dist/containers/Tenant/Healthcheck/i18n/en.json +41 -0
  180. package/dist/containers/Tenant/Healthcheck/i18n/index.d.ts +2 -0
  181. package/dist/containers/Tenant/Healthcheck/i18n/index.js +5 -0
  182. package/dist/containers/Tenant/Healthcheck/i18n/index.js.map +1 -0
  183. package/dist/containers/Tenant/Healthcheck/shared.d.ts +11 -0
  184. package/dist/containers/Tenant/Healthcheck/shared.js +36 -0
  185. package/dist/containers/Tenant/Healthcheck/shared.js.map +1 -0
  186. package/dist/containers/Tenant/Healthcheck/useHealthcheck.d.ts +14 -0
  187. package/dist/containers/Tenant/Healthcheck/useHealthcheck.js +19 -0
  188. package/dist/containers/Tenant/Healthcheck/useHealthcheck.js.map +1 -0
  189. package/dist/containers/Tenant/Query/Preview/components/TopicPreview.js +1 -1
  190. package/dist/containers/Tenant/Query/Preview/components/TopicPreview.js.map +1 -1
  191. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +1 -1
  192. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js.map +1 -1
  193. package/dist/containers/Tenant/Query/QueryResult/components/QueryInfoDropdown/useQueryInfoMenuItems.js +1 -1
  194. package/dist/containers/Tenant/Query/QueryResult/components/QueryInfoDropdown/useQueryInfoMenuItems.js.map +1 -1
  195. package/dist/containers/Tenant/Tenant.js +14 -25
  196. package/dist/containers/Tenant/Tenant.js.map +1 -1
  197. package/dist/containers/Tenant/TenantDrawerWrappers.d.ts +7 -0
  198. package/dist/containers/Tenant/TenantDrawerWrappers.js +47 -0
  199. package/dist/containers/Tenant/TenantDrawerWrappers.js.map +1 -0
  200. package/dist/containers/Tenant/TenantPages.d.ts +2 -0
  201. package/dist/containers/Tenant/TenantPages.js.map +1 -1
  202. package/dist/containers/Tenant/constants.d.ts +4 -0
  203. package/dist/containers/Tenant/constants.js +18 -0
  204. package/dist/containers/Tenant/constants.js.map +1 -0
  205. package/dist/containers/Tenant/i18n/en.json +7 -1
  206. package/dist/containers/Tenant/i18n/index.d.ts +1 -1
  207. package/dist/containers/Tenant/useTenantQueryParams.d.ts +12 -0
  208. package/dist/containers/Tenant/useTenantQueryParams.js +39 -0
  209. package/dist/containers/Tenant/useTenantQueryParams.js.map +1 -0
  210. package/dist/containers/Tenant/utils/schemaActions.js +2 -2
  211. package/dist/containers/Tenant/utils/schemaActions.js.map +1 -1
  212. package/dist/containers/Tenants/Tenants.js +8 -2
  213. package/dist/containers/Tenants/Tenants.js.map +1 -1
  214. package/dist/containers/UserSettings/i18n/en.json +1 -1
  215. package/dist/services/api/streaming.js +1 -0
  216. package/dist/services/api/streaming.js.map +1 -1
  217. package/dist/store/reducers/capabilities/hooks.d.ts +3 -0
  218. package/dist/store/reducers/capabilities/hooks.js +9 -0
  219. package/dist/store/reducers/capabilities/hooks.js.map +1 -1
  220. package/dist/store/reducers/clusters/selectors.d.ts +1 -2
  221. package/dist/store/reducers/clusters/selectors.js +0 -28
  222. package/dist/store/reducers/clusters/selectors.js.map +1 -1
  223. package/dist/store/reducers/clusters/types.d.ts +0 -10
  224. package/dist/store/reducers/header/types.d.ts +4 -2
  225. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +631 -331
  226. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.js +8 -35
  227. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.js.map +1 -1
  228. package/dist/store/reducers/healthcheckInfo/types.d.ts +2 -0
  229. package/dist/store/reducers/healthcheckInfo/utils.d.ts +3 -0
  230. package/dist/store/reducers/healthcheckInfo/utils.js +34 -0
  231. package/dist/store/reducers/healthcheckInfo/utils.js.map +1 -1
  232. package/dist/store/reducers/tableData.d.ts +1 -0
  233. package/dist/store/reducers/tableData.js +29 -10
  234. package/dist/store/reducers/tableData.js.map +1 -1
  235. package/dist/store/reducers/tenant/constants.d.ts +0 -1
  236. package/dist/store/reducers/tenant/constants.js +0 -1
  237. package/dist/store/reducers/tenant/constants.js.map +1 -1
  238. package/dist/store/reducers/tenants/utils.d.ts +2 -1
  239. package/dist/store/reducers/tenants/utils.js +15 -2
  240. package/dist/store/reducers/tenants/utils.js.map +1 -1
  241. package/dist/styles/index.scss +3 -0
  242. package/dist/types/api/capabilities.d.ts +1 -1
  243. package/dist/types/api/healthcheck.d.ts +80 -13
  244. package/dist/types/api/healthcheck.js +1 -0
  245. package/dist/types/api/healthcheck.js.map +1 -1
  246. package/dist/types/api/tenant.d.ts +4 -0
  247. package/dist/types/api/tenant.js.map +1 -1
  248. package/dist/uiFactory/types.d.ts +18 -0
  249. package/dist/uiFactory/uiFactory.js +6 -0
  250. package/dist/uiFactory/uiFactory.js.map +1 -1
  251. package/dist/utils/createToast.d.ts +2 -9
  252. package/dist/utils/createToast.js +5 -6
  253. package/dist/utils/createToast.js.map +1 -1
  254. package/package.json +1 -1
  255. package/dist/containers/App/i18n/en.json +0 -3
  256. package/dist/containers/App/i18n/index.d.ts +0 -2
  257. package/dist/containers/App/i18n/index.js.map +0 -1
  258. package/dist/containers/App/i18n/ru.json +0 -3
  259. package/dist/containers/Clusters/ClustersStatistics.d.ts +0 -7
  260. package/dist/containers/Clusters/ClustersStatistics.js +0 -10
  261. package/dist/containers/Clusters/ClustersStatistics.js.map +0 -1
  262. package/dist/containers/Clusters/i18n/ru.json +0 -15
  263. package/dist/containers/Storage/EmptyFilter/EmptyFilter.js.map +0 -1
  264. package/dist/containers/Storage/EmptyFilter/i18n/index.js +0 -6
  265. package/dist/containers/Storage/EmptyFilter/i18n/index.js.map +0 -1
  266. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/Healthcheck.scss +0 -106
  267. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.d.ts +0 -6
  268. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.js +0 -34
  269. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.js.map +0 -1
  270. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTree.d.ts +0 -7
  271. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTree.js +0 -37
  272. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTree.js.map +0 -1
  273. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTree.scss +0 -51
  274. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTreeItem/IssueTreeItem.d.ts +0 -10
  275. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTreeItem/IssueTreeItem.js +0 -9
  276. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTreeItem/IssueTreeItem.js.map +0 -1
  277. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTreeItem/IssueTreeItem.scss +0 -50
  278. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTreeItem/index.d.ts +0 -1
  279. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTreeItem/index.js +0 -2
  280. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTreeItem/index.js.map +0 -1
  281. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/i18n/ru.json +0 -8
  282. package/dist/containers/Tenant/Diagnostics/TenantOverview/useHealthcheck.d.ts +0 -15
  283. package/dist/containers/Tenant/Diagnostics/TenantOverview/useHealthcheck.js +0 -20
  284. package/dist/containers/Tenant/Diagnostics/TenantOverview/useHealthcheck.js.map +0 -1
  285. /package/dist/{containers/Storage → components}/EmptyFilter/EmptyFilter.d.ts +0 -0
  286. /package/dist/{containers/Storage → components}/EmptyFilter/i18n/en.json +0 -0
  287. /package/dist/{containers/Storage → components}/EmptyFilter/i18n/index.d.ts +0 -0
  288. /package/dist/{containers/Storage → components}/EmptyFilter/i18n/ru.json +0 -0
@@ -0,0 +1,67 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { Flex } from '@gravity-ui/uikit';
4
+ import { isEmpty } from 'lodash';
5
+ import { InternalLink } from '../../../../../components/InternalLink';
6
+ import { getTabletPagePath } from '../../../../../routes';
7
+ import { useTenantQueryParams } from '../../../useTenantQueryParams';
8
+ import i18n from '../../i18n';
9
+ import { NodeInfo } from './NodeInfo';
10
+ import { PoolInfo } from './PoolInfo';
11
+ import { IdList, LocationDetails, SectionWithTitle } from './utils';
12
+ const LocationFieldRenderer = {
13
+ node: (location) => _jsx(NodeInfo, { node: location === null || location === void 0 ? void 0 : location.node }, "node"),
14
+ pool: (location) => _jsx(PoolInfo, { location: location }, "pool"),
15
+ tablet: (location) => _jsx(TabletInfo, { location: location }, "tablet"),
16
+ schema: (location) => _jsx(SchemaInfo, { location: location }, "schema"),
17
+ };
18
+ export function ComputeLocation({ location, hiddenFields = [] }) {
19
+ const { node, tablet, schema, pool } = location !== null && location !== void 0 ? location : {};
20
+ const fields = React.useMemo(() => {
21
+ const fields = [];
22
+ if (node) {
23
+ fields.push('node');
24
+ }
25
+ if (pool) {
26
+ fields.push('pool');
27
+ }
28
+ if (tablet) {
29
+ fields.push('tablet');
30
+ }
31
+ if (schema) {
32
+ fields.push('schema');
33
+ }
34
+ return fields.filter((field) => !hiddenFields.includes(field));
35
+ }, [node, pool, tablet, schema, hiddenFields]);
36
+ if (!location || isEmpty(location) || fields.length === 0) {
37
+ return null;
38
+ }
39
+ return (_jsx(SectionWithTitle, { title: i18n('label_compute_location'), titleVariant: "subheader-2", children: _jsx(Flex, { direction: "column", gap: 2, children: fields.map((field) => LocationFieldRenderer[field](location)) }) }));
40
+ }
41
+ function TabletInfo({ location }) {
42
+ var _a;
43
+ const { tablet } = location !== null && location !== void 0 ? location : {};
44
+ const { database } = useTenantQueryParams();
45
+ if (!tablet) {
46
+ return null;
47
+ }
48
+ return (_jsx(LocationDetails, { fields: [
49
+ {
50
+ value: ((_a = tablet.id) === null || _a === void 0 ? void 0 : _a.length) ? (_jsx(IdList, { ids: tablet.id, renderItem: (id) => (_jsx(InternalLink, { to: getTabletPagePath(id, { database }), children: id })) })) : undefined,
51
+ title: i18n('label_tablet-id'),
52
+ },
53
+ { value: tablet.type, title: i18n('label_tablet-type') },
54
+ { value: tablet.count, title: i18n('label_tablet-count') },
55
+ ] }));
56
+ }
57
+ function SchemaInfo({ location }) {
58
+ const { schema } = location !== null && location !== void 0 ? location : {};
59
+ if (!schema) {
60
+ return null;
61
+ }
62
+ return (_jsx(LocationDetails, { fields: [
63
+ { value: schema.type, title: i18n('label_schema-type') },
64
+ { value: schema.path, title: i18n('label_schema-path') },
65
+ ] }));
66
+ }
67
+ //# sourceMappingURL=ComputeLocation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComputeLocation.js","sourceRoot":"","sources":["../../../../../../src/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/ComputeLocation.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAC,YAAY,EAAC,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAC,oBAAoB,EAAC,MAAM,+BAA+B,CAAC;AACnE,OAAO,IAAI,MAAM,YAAY,CAAC;AAE9B,OAAO,EAAC,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AAC,EAAE,EAAE,EAAE,CAAC,CAChB,KAAC,YAAY,IAAC,EAAE,EAAE,iBAAiB,CAAC,EAAE,EAAE,EAAC,QAAQ,EAAC,CAAC,YAC9C,EAAE,GACQ,CAClB,GACH,CACL,CAAC,CAAC,CAAC,SAAS;gBACb,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC;aACjC;YACD,EAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,mBAAmB,CAAC,EAAC;YACtD,EAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,oBAAoB,CAAC,EAAC;SAC3D,GACH,CACL,CAAC;AACN,CAAC;AAED,SAAS,UAAU,CAAC,EAAC,QAAQ,EAAsB;IAC/C,MAAM,EAAC,MAAM,EAAC,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAC;IAEhC,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,KAAC,eAAe,IACZ,MAAM,EAAE;YACJ,EAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,mBAAmB,CAAC,EAAC;YACtD,EAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,mBAAmB,CAAC,EAAC;SACzD,GACH,CACL,CAAC;AACN,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { IssuesTree } from '../../../../../store/reducers/healthcheckInfo/types';
2
+ interface HealthcheckIssueDetailsProps {
3
+ issue: IssuesTree;
4
+ }
5
+ export declare function IssueDetails({ issue }: HealthcheckIssueDetailsProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,67 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { Flex } from '@gravity-ui/uikit';
4
+ import { isEmpty } from 'lodash';
5
+ import { InternalLink } from '../../../../../components/InternalLink';
6
+ import { getTabletPagePath } from '../../../../../routes';
7
+ import { useTenantQueryParams } from '../../../useTenantQueryParams';
8
+ import i18n from '../../i18n';
9
+ import { ComputeLocation } from './ComputeLocation';
10
+ import { NodeInfo } from './NodeInfo';
11
+ import { StorageLocation } from './StorageLocation';
12
+ import { IdList, LocationDetails, SectionWithTitle } from './utils';
13
+ export function IssueDetails({ issue }) {
14
+ const { database } = useTenantQueryParams();
15
+ const { location } = issue;
16
+ const { detailsFields, hiddenStorageFields, hiddenComputeFields } = React.useMemo(() => {
17
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
18
+ const hiddenStorageFields = [];
19
+ const hiddenComputeFields = [];
20
+ const fields = [
21
+ { value: issue.message, title: i18n('label_description') },
22
+ ];
23
+ if (issue.type === 'STORAGE_POOL') {
24
+ fields.push({
25
+ value: (_c = (_b = (_a = issue.location) === null || _a === void 0 ? void 0 : _a.storage) === null || _b === void 0 ? void 0 : _b.pool) === null || _c === void 0 ? void 0 : _c.name,
26
+ title: i18n('label_pool-name'),
27
+ });
28
+ hiddenStorageFields.push('pool');
29
+ }
30
+ if (issue.type === 'COMPUTE_POOL') {
31
+ fields.push({
32
+ value: (_f = (_e = (_d = issue.location) === null || _d === void 0 ? void 0 : _d.compute) === null || _e === void 0 ? void 0 : _e.pool) === null || _f === void 0 ? void 0 : _f.name,
33
+ title: i18n('label_pool-name'),
34
+ });
35
+ hiddenComputeFields.push('pool');
36
+ }
37
+ if (issue.type === 'TABLET') {
38
+ const tablet = (_h = (_g = issue.location) === null || _g === void 0 ? void 0 : _g.compute) === null || _h === void 0 ? void 0 : _h.tablet;
39
+ fields.push({
40
+ value: ((_j = tablet === null || tablet === void 0 ? void 0 : tablet.id) === null || _j === void 0 ? void 0 : _j.length) ? (_jsx(IdList, { ids: tablet.id, renderItem: (id) => (_jsx(InternalLink, { to: getTabletPagePath(id, { database }), children: id })) })) : undefined,
41
+ title: i18n('label_tablet-id'),
42
+ }, {
43
+ value: tablet === null || tablet === void 0 ? void 0 : tablet.type,
44
+ title: i18n('label_tablet-type'),
45
+ }, {
46
+ value: tablet === null || tablet === void 0 ? void 0 : tablet.count,
47
+ title: i18n('label_tablet-count'),
48
+ });
49
+ hiddenComputeFields.push('tablet');
50
+ }
51
+ return { detailsFields: fields, hiddenComputeFields, hiddenStorageFields };
52
+ }, [issue, database]);
53
+ return (_jsxs(Flex, { direction: "column", gap: 4, children: [_jsx(LocationDetails, { title: i18n('label_details'), fields: detailsFields, titleVariant: "subheader-2" }), _jsx(StorageLocation, { location: location.storage, hiddenFields: hiddenStorageFields }), _jsx(ComputeLocation, { location: location.compute, hiddenFields: hiddenComputeFields }), _jsx(NodeLocation, { location: location.node }), _jsx(PeerLocation, { location: location.peer })] }));
54
+ }
55
+ function NodeLocation({ location }) {
56
+ if (!location || isEmpty(location)) {
57
+ return null;
58
+ }
59
+ return (_jsx(SectionWithTitle, { title: i18n('label_node_location'), children: _jsx(NodeInfo, { node: location }) }));
60
+ }
61
+ function PeerLocation({ location }) {
62
+ if (!location || isEmpty(location)) {
63
+ return null;
64
+ }
65
+ return (_jsx(SectionWithTitle, { title: i18n('label_peer_location'), children: _jsx(NodeInfo, { node: location }) }));
66
+ }
67
+ //# sourceMappingURL=HealthcheckIssueDetails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HealthcheckIssueDetails.js","sourceRoot":"","sources":["../../../../../../src/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/HealthcheckIssueDetails.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAC,YAAY,EAAC,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AAGxD,OAAO,E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,EAAC,GAAG,EAAE,CAAC,aAC3B,KAAC,eAAe,IACZ,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,EAC5B,MAAM,EAAE,aAAa,EACrB,YAAY,EAAC,aAAa,GAC5B,EACF,KAAC,eAAe,IAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,mBAAmB,GAAI,EAClF,KAAC,eAAe,IAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,mBAAmB,GAAI,EAClF,KAAC,YAAY,IAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,GAAI,EACzC,KAAC,YAAY,IAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,GAAI,IACtC,CACV,CAAC;AACN,CAAC;AAMD,SAAS,YAAY,CAAC,EAAC,QAAQ,EAAoB;IAC/C,IAAI,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,KAAC,gBAAgB,IAAC,KAAK,EAAE,IAAI,CAAC,qBAAqB,CAAC,YAChD,KAAC,QAAQ,IAAC,IAAI,EAAE,QAAQ,GAAI,GACb,CACtB,CAAC;AACN,CAAC;AAMD,SAAS,YAAY,CAAC,EAAC,QAAQ,EAAoB;IAC/C,IAAI,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,KAAC,gBAAgB,IAAC,KAAK,EAAE,IAAI,CAAC,qBAAqB,CAAC,YAChD,KAAC,QAAQ,IAAC,IAAI,EAAE,QAAQ,GAAI,GACb,CACtB,CAAC;AACN,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { Location } from '../../../../../types/api/healthcheck';
2
+ interface NodeInfoProps {
3
+ node?: Location['node'];
4
+ title?: string;
5
+ }
6
+ export declare function NodeInfo({ node, title }: NodeInfoProps): import("react/jsx-runtime").JSX.Element | null;
7
+ export {};
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { InternalLink } from '../../../../../components/InternalLink';
3
+ import { getDefaultNodePath } from '../../../../Node/NodePages';
4
+ import { useTenantQueryParams } from '../../../useTenantQueryParams';
5
+ import i18n from '../../i18n';
6
+ import { LocationDetails } from './utils';
7
+ export function NodeInfo({ node, title }) {
8
+ const { database } = useTenantQueryParams();
9
+ if (!node) {
10
+ return null;
11
+ }
12
+ const nodeLink = node.id ? (_jsx(InternalLink, { to: getDefaultNodePath(node.id, { database }), children: node.id })) : undefined;
13
+ return (_jsx(LocationDetails, { title: title, fields: [
14
+ { value: nodeLink, title: i18n('label_node-id') },
15
+ { value: node.host, title: i18n('label_node-host'), copy: node.host },
16
+ { value: node.port, title: i18n('label_node-port') },
17
+ ] }));
18
+ }
19
+ //# sourceMappingURL=NodeInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeInfo.js","sourceRoot":"","sources":["../../../../../../src/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/NodeInfo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,wCAAwC,CAAC;AAEpE,OAAO,EAAC,kBAAkB,EAAC,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAC,oBAAoB,EAAC,MAAM,+BAA+B,CAAC;AACnE,OAAO,IAAI,MAAM,YAAY,CAAC;AAE9B,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAOxC,MAAM,UAAU,QAAQ,CAAC,EAAC,IAAI,EAAE,KAAK,EAAgB;IACjD,MAAM,EAAC,QAAQ,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAC1C,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CACvB,KAAC,YAAY,IAAC,EAAE,EAAE,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,EAAC,QAAQ,EAAC,CAAC,YAAG,IAAI,CAAC,EAAE,GAAgB,CACtF,CAAC,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO,CACH,KAAC,eAAe,IACZ,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE;YACJ,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,EAAC;YAC/C,EAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAC;YACnE,EAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,EAAC;SACrD,GACH,CACL,CAAC;AACN,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { Location } from '../../../../../types/api/healthcheck';
2
+ interface PoolInfoProps {
3
+ location?: Location['storage'] | Location['compute'];
4
+ }
5
+ export declare function PoolInfo({ location }: PoolInfoProps): import("react/jsx-runtime").JSX.Element | null;
6
+ export {};
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import i18n from '../../i18n';
3
+ import { LocationDetails } from './utils';
4
+ export function PoolInfo({ location }) {
5
+ const { pool } = location !== null && location !== void 0 ? location : {};
6
+ const { name } = pool !== null && pool !== void 0 ? pool : {};
7
+ if (!name) {
8
+ return null;
9
+ }
10
+ return _jsx(LocationDetails, { fields: [{ value: name, title: i18n('label_pool-name') }] });
11
+ }
12
+ //# sourceMappingURL=PoolInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PoolInfo.js","sourceRoot":"","sources":["../../../../../../src/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/PoolInfo.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,YAAY,CAAC;AAE9B,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAMxC,MAAM,UAAU,QAAQ,CAAC,EAAC,QAAQ,EAAgB;IAC9C,MAAM,EAAC,IAAI,EAAC,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAC;IAC9B,MAAM,EAAC,IAAI,EAAC,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC;IAE1B,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,KAAC,eAAe,IAAC,MAAM,EAAE,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,EAAC,CAAC,GAAI,CAAC;AACxF,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Location } from '../../../../../types/api/healthcheck';
2
+ export type LocationFieldStorage = 'pool' | 'node' | 'pdisk' | 'vdisk' | 'group';
3
+ type StorageLocationType = Location['storage'];
4
+ interface StorageLocationProps {
5
+ location: StorageLocationType;
6
+ hiddenFields?: LocationFieldStorage[];
7
+ }
8
+ export declare function StorageLocation({ location, hiddenFields }: StorageLocationProps): import("react/jsx-runtime").JSX.Element | null;
9
+ export {};
@@ -0,0 +1,95 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { Flex } from '@gravity-ui/uikit';
4
+ import { isEmpty } from 'lodash';
5
+ import { InternalLink } from '../../../../../components/InternalLink';
6
+ import { getPDiskPagePath, getVDiskPagePath } from '../../../../../routes';
7
+ import i18n from '../../i18n';
8
+ import { NodeInfo } from './NodeInfo';
9
+ import { PoolInfo } from './PoolInfo';
10
+ import { IdList, LocationDetails, SectionWithTitle } from './utils';
11
+ const LocationFieldRenderer = {
12
+ node: (location) => _jsx(NodeInfo, { node: location === null || location === void 0 ? void 0 : location.node }, "node"),
13
+ pool: (location) => _jsx(PoolInfo, { location: location }, "pool"),
14
+ group: (location) => _jsx(GroupInfo, { location: location }, "group"),
15
+ vdisk: (location) => _jsx(VDiskInfo, { location: location }, "vdisk"),
16
+ pdisk: (location) => _jsx(PDiskInfo, { location: location }, "pdisk"),
17
+ };
18
+ export function StorageLocation({ location, hiddenFields = [] }) {
19
+ const { node, pool } = location !== null && location !== void 0 ? location : {};
20
+ const { group } = pool !== null && pool !== void 0 ? pool : {};
21
+ const { vdisk } = group !== null && group !== void 0 ? group : {};
22
+ const { pdisk } = vdisk !== null && vdisk !== void 0 ? vdisk : {};
23
+ const fields = React.useMemo(() => {
24
+ const fields = [];
25
+ if (node) {
26
+ fields.push('node');
27
+ }
28
+ if (pool) {
29
+ fields.push('pool');
30
+ }
31
+ if (group) {
32
+ fields.push('group');
33
+ }
34
+ if (vdisk) {
35
+ fields.push('vdisk');
36
+ }
37
+ if (pdisk) {
38
+ fields.push('pdisk');
39
+ }
40
+ return fields.filter((field) => !hiddenFields.includes(field));
41
+ }, [node, pool, group, vdisk, pdisk, hiddenFields]);
42
+ if (!location || isEmpty(location) || fields.length === 0) {
43
+ return null;
44
+ }
45
+ return (_jsx(SectionWithTitle, { title: i18n('label_storage_location'), titleVariant: "subheader-2", children: _jsx(Flex, { direction: "column", gap: 2, children: fields.map((field) => LocationFieldRenderer[field](location)) }) }));
46
+ }
47
+ function GroupInfo({ location }) {
48
+ const { pool } = location !== null && location !== void 0 ? location : {};
49
+ const { group } = pool !== null && pool !== void 0 ? pool : {};
50
+ const ids = group === null || group === void 0 ? void 0 : group.id;
51
+ if (!(ids === null || ids === void 0 ? void 0 : ids.length)) {
52
+ return null;
53
+ }
54
+ return (_jsx(LocationDetails, { fields: [
55
+ {
56
+ value: (ids === null || ids === void 0 ? void 0 : ids.length) ? _jsx(IdList, { ids: ids }) : undefined,
57
+ title: i18n('label_group-id'),
58
+ },
59
+ ] }));
60
+ }
61
+ function VDiskInfo({ location }) {
62
+ const { node, pool } = location !== null && location !== void 0 ? location : {};
63
+ const { group } = pool !== null && pool !== void 0 ? pool : {};
64
+ const { vdisk } = group !== null && group !== void 0 ? group : {};
65
+ const ids = vdisk === null || vdisk === void 0 ? void 0 : vdisk.id;
66
+ if (!(ids === null || ids === void 0 ? void 0 : ids.length)) {
67
+ return null;
68
+ }
69
+ return (_jsx(LocationDetails, { fields: [
70
+ {
71
+ value: (ids === null || ids === void 0 ? void 0 : ids.length) ? (_jsx(IdList, { ids: ids, renderItem: (id) => (_jsx(InternalLink, { to: getVDiskPagePath({
72
+ vDiskId: id,
73
+ nodeId: node === null || node === void 0 ? void 0 : node.id,
74
+ }), children: id })) })) : undefined,
75
+ title: i18n('label_vdisk-id'),
76
+ },
77
+ ] }));
78
+ }
79
+ function PDiskInfo({ location }) {
80
+ const { node, pool } = location !== null && location !== void 0 ? location : {};
81
+ const { group } = pool !== null && pool !== void 0 ? pool : {};
82
+ const { vdisk } = group !== null && group !== void 0 ? group : {};
83
+ const { pdisk } = vdisk !== null && vdisk !== void 0 ? vdisk : {};
84
+ if (!(pdisk === null || pdisk === void 0 ? void 0 : pdisk.length)) {
85
+ return null;
86
+ }
87
+ return pdisk.map((disk) => (_jsx(LocationDetails, { fields: [
88
+ {
89
+ value: disk.id && (node === null || node === void 0 ? void 0 : node.id) ? (_jsx(InternalLink, { to: getPDiskPagePath(disk.id, node.id), children: disk.id })) : (disk.id),
90
+ title: i18n('label_pdisk-id'),
91
+ },
92
+ { value: disk.path, title: i18n('label_pdisk-path') },
93
+ ] }, disk.id)));
94
+ }
95
+ //# sourceMappingURL=StorageLocation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorageLocation.js","sourceRoot":"","sources":["../../../../../../src/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/StorageLocation.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAC,YAAY,EAAC,M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AAE;YACJ;gBACI,KAAK,EACD,IAAI,CAAC,EAAE,KAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,CAAA,CAAC,CAAC,CAAC,CAClB,KAAC,YAAY,IAAC,EAAE,EAAE,gBAAgB,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,YAC/C,IAAI,CAAC,EAAE,GACG,CAClB,CAAC,CAAC,CAAC,CACA,IAAI,CAAC,EAAE,CACV;gBACL,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC;aAChC;YACD,EAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,kBAAkB,CAAC,EAAC;SACtD,IAdI,IAAI,CAAC,EAAE,CAed,CACL,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import type { FlexProps, TextProps } from '@gravity-ui/uikit';
3
+ interface SectionWithTitleProps {
4
+ title?: string;
5
+ children: React.ReactNode;
6
+ titleVariant?: TextProps['variant'];
7
+ gap?: FlexProps['gap'];
8
+ }
9
+ export declare function SectionWithTitle({ title, children, titleVariant, gap, }: SectionWithTitleProps): import("react/jsx-runtime").JSX.Element;
10
+ interface LocationDetailsProps {
11
+ title?: string;
12
+ fields: {
13
+ value?: React.ReactNode;
14
+ title: string;
15
+ copy?: string;
16
+ }[];
17
+ titleVariant?: TextProps['variant'];
18
+ }
19
+ export declare function LocationDetails({ title, fields, titleVariant }: LocationDetailsProps): import("react/jsx-runtime").JSX.Element | null;
20
+ interface IdListProps {
21
+ ids: string[];
22
+ renderItem?: (id: string) => React.ReactNode;
23
+ }
24
+ export declare function IdList({ ids, renderItem }: IdListProps): import("react/jsx-runtime").JSX.Element;
25
+ export {};
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { DefinitionList, Flex, Text } from '@gravity-ui/uikit';
4
+ export function SectionWithTitle({ title, children, titleVariant = 'body-2', gap = 2, }) {
5
+ return (_jsxs(Flex, { direction: "column", gap: gap, children: [title && _jsx(Text, { variant: titleVariant, children: title }), children] }));
6
+ }
7
+ export function LocationDetails({ title, fields, titleVariant }) {
8
+ const filteredFields = fields.filter((f) => f.value);
9
+ if (filteredFields.length === 0) {
10
+ return null;
11
+ }
12
+ return (_jsx(SectionWithTitle, { title: title, titleVariant: titleVariant, children: _jsx(DefinitionList, { nameMaxWidth: 200, children: filteredFields.map((field) => (_jsx(DefinitionList.Item, { name: field.title, copyText: field.copy, children: field.value }, field.title))) }) }));
13
+ }
14
+ export function IdList({ ids, renderItem }) {
15
+ return (_jsx(Flex, { direction: "column", gap: 1, children: ids.map((id) => (_jsx(React.Fragment, { children: renderItem ? renderItem(id) : id }, id))) }));
16
+ }
17
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../src/containers/Tenant/Healthcheck/components/HealthcheckIssueDetails/utils.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,cAAc,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAS7D,MAAM,UAAU,gBAAgB,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,YAAY,GAAG,QAAQ,EACvB,GAAG,GAAG,CAAC,GACa;IACpB,OAAO,CACH,MAAC,IAAI,IAAC,SAAS,EAAC,QAAQ,EAAC,GAAG,EAAE,GAAG,aAC5B,KAAK,IAAI,KAAC,IAAI,IAAC,OAAO,EAAE,YAAY,YAAG,KAAK,GAAQ,EACpD,QAAQ,IACN,CACV,CAAC;AACN,CAAC;AAQD,MAAM,UAAU,eAAe,CAAC,EAAC,KAAK,EAAE,MAAM,EAAE,YAAY,EAAuB;IAC/E,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAErD,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,KAAC,gBAAgB,IAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,YACtD,KAAC,cAAc,IAAC,YAAY,EAAE,GAAG,YAC5B,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC3B,KAAC,cAAc,CAAC,IAAI,IAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAoB,QAAQ,EAAE,KAAK,CAAC,IAAI,YACzE,KAAK,CAAC,KAAK,IAD6B,KAAK,CAAC,KAAK,CAElC,CACzB,CAAC,GACW,GACF,CACtB,CAAC;AACN,CAAC;AAOD,MAAM,UAAU,MAAM,CAAC,EAAC,GAAG,EAAE,UAAU,EAAc;IACjD,OAAO,CACH,KAAC,IAAI,IAAC,SAAS,EAAC,QAAQ,EAAC,GAAG,EAAE,CAAC,YAC1B,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CACb,KAAC,KAAK,CAAC,QAAQ,cAAW,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAArC,EAAE,CAAqD,CAC/E,CAAC,GACC,CACV,CAAC;AACN,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { IssuesTree } from '../../../../store/reducers/healthcheckInfo/types';
2
+ interface HealthcheckIssueTabsProps {
3
+ parents: IssuesTree[];
4
+ selectedTab: string;
5
+ setSelectedTab: (tab: string) => void;
6
+ }
7
+ export declare function HealthcheckIssueTabs({ parents, selectedTab, setSelectedTab, }: HealthcheckIssueTabsProps): import("react/jsx-runtime").JSX.Element | null;
8
+ export {};
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Flex, Text } from '@gravity-ui/uikit';
3
+ import { b } from '../shared';
4
+ function getTypeText(type) {
5
+ const normalizedType = type.split('_').join(' ');
6
+ let result = normalizedType.charAt(0).toUpperCase() + normalizedType.slice(1).toLowerCase();
7
+ result = result.replace(/\bvdisk\b/gi, 'VDisk').replace(/\bpdisk\b/gi, 'PDisk');
8
+ return result;
9
+ }
10
+ export function HealthcheckIssueTabs({ parents, selectedTab, setSelectedTab, }) {
11
+ //parent.length === 1 means that it's only issue itself, no need to render tabs
12
+ if (parents.length <= 1) {
13
+ return null;
14
+ }
15
+ return (_jsx(Flex, { gap: 2, wrap: "nowrap", children: parents.map((parent, index) => (_jsxs(Flex, { gap: 2, wrap: "nowrap", children: [_jsx(HealthcjeckIssueTab, { active: parent.id === selectedTab, onClick: () => setSelectedTab(parent.id), children: _jsxs(Flex, { gap: 2, wrap: "nowrap", alignItems: "center", children: [_jsx(TabStatus, { status: parent.status }), getTypeText(parent.type)] }) }), index !== parents.length - 1 && _jsx(Text, { color: "secondary", children: "/" })] }, parent.id))) }));
16
+ }
17
+ function HealthcjeckIssueTab({ children, active, onClick }) {
18
+ return (_jsx(Text, { variant: "body-2", color: active ? 'primary' : 'secondary', className: b('issue-tab', { active }), onClick: onClick, children: children }));
19
+ }
20
+ function TabStatus({ status }) {
21
+ return _jsx("div", { className: b('tab-status', { [status.toLowerCase()]: true }) });
22
+ }
23
+ //# sourceMappingURL=HealthcheckIssueTabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HealthcheckIssueTabs.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Healthcheck/components/HealthcheckIssueTabs.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAI7C,OAAO,EAAC,CAAC,EAAC,MAAM,WAAW,CAAC;AAE5B,SAAS,WAAW,CAAC,IAAY;IAC7B,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CA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D,SAAS,mBAAmB,CAAC,EAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAA2B;IAC9E,OAAO,CACH,KAAC,IAAI,IACD,OAAO,EAAC,QAAQ,EAChB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,EACvC,SAAS,EAAE,CAAC,CAAC,WAAW,EAAE,EAAC,MAAM,EAAC,CAAC,EACnC,OAAO,EAAE,OAAO,YAEf,QAAQ,GACN,CACV,CAAC;AACN,CAAC;AAMD,SAAS,SAAS,CAAC,EAAC,MAAM,EAAiB;IACvC,OAAO,cAAK,SAAS,EAAE,CAAC,CAAC,YAAY,EAAE,EAAC,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,EAAC,CAAC,GAAI,CAAC;AAC/E,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { IssuesTree } from '../../../../store/reducers/healthcheckInfo/types';
2
+ interface IssuesProps {
3
+ issues: IssuesTree[];
4
+ }
5
+ export declare function Issues({ issues }: IssuesProps): import("react/jsx-runtime").JSX.Element | import("react/jsx-runtime").JSX.Element[];
6
+ export {};
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { NoSearchResults } from '@gravity-ui/illustrations';
4
+ import { Flex } from '@gravity-ui/uikit';
5
+ import { EmptyState } from '../../../../components/EmptyState';
6
+ import { useTenantQueryParams } from '../../useTenantQueryParams';
7
+ import i18n from '../i18n';
8
+ import { HealthcheckIssue } from './HealthcheckIssue';
9
+ export function Issues({ issues }) {
10
+ const { view, issuesFilter } = useTenantQueryParams();
11
+ const filteredIssues = React.useMemo(() => {
12
+ const normalizedFilter = issuesFilter === null || issuesFilter === void 0 ? void 0 : issuesFilter.toLowerCase().trim();
13
+ if (!normalizedFilter) {
14
+ return issues;
15
+ }
16
+ return issues.filter((issue) => {
17
+ const stack = Object.values(issue);
18
+ while (stack.length) {
19
+ const value = stack.pop();
20
+ if (typeof value === 'object') {
21
+ stack.push(...Object.values(value));
22
+ }
23
+ else if (String(value).toLowerCase().includes(normalizedFilter)) {
24
+ return true;
25
+ }
26
+ }
27
+ return false;
28
+ });
29
+ }, [issues, issuesFilter]);
30
+ const filteredIssuesCurrentView = React.useMemo(() => view
31
+ ? filteredIssues.filter((issue) => {
32
+ const type = issue.firstParentType || issue.type;
33
+ return type.toLowerCase().startsWith(view);
34
+ })
35
+ : [], [filteredIssues, view]);
36
+ if (filteredIssuesCurrentView.length === 0) {
37
+ return (_jsx(Flex, { grow: 1, justifyContent: "center", alignItems: "center", children: _jsx(EmptyState, { image: _jsx(NoSearchResults, { width: 100, height: 100 }), position: "center", size: "xs", title: i18n('label_no-issues'), description: i18n('description_no-issues') }) }));
38
+ }
39
+ return filteredIssuesCurrentView.map((issue) => (_jsx(HealthcheckIssue, { issue: issue, expanded: Boolean(issuesFilter) }, issue.id + Boolean(issuesFilter))));
40
+ }
41
+ //# sourceMappingURL=HealthcheckIssues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HealthcheckIssues.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Healthcheck/components/HealthcheckIssues.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,UAAU,EAAC,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAC,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AAChE,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAMpD,MAAM,UAAU,MAAM,CAAC,EAAC,MAAM,EAAc;IACxC,MAAM,EAAC,IAAI,EAAE,YAAY,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEpD,MAAM,cAAc,GAAG,KAAK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,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzC,OAAO,CACH,KAAC,IAAI,IAAC,IAAI,EAAE,CAAC,EAAE,cAAc,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,YACtD,KAAC,UAAU,IACP,KAAK,EAAE,KAAC,eAAe,IAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAI,EACnD,QAAQ,EAAC,QAAQ,EACjB,IAAI,EAAC,IAAI,EACT,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,EAC9B,WAAW,EAAE,IAAI,CAAC,uBAAuB,CAAC,GAC5C,GACC,CACV,CAAC;IACN,CAAC;IAED,OAAO,yBAAyB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC5C,KAAC,gBAAgB,IACb,KAAK,EAAE,KAAK,EAEZ,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,IAD1B,KAAK,CAAC,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC,CAEvC,CACL,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,6 @@
1
+ interface HealthcheckRefreshProps {
2
+ lastFullfiled?: number;
3
+ refresh: () => void;
4
+ }
5
+ export declare function HealthcheckRefresh({ lastFullfiled, refresh }: HealthcheckRefreshProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { duration } from '@gravity-ui/date-utils';
4
+ import { ArrowsRotateLeft } from '@gravity-ui/icons';
5
+ import { ActionTooltip, Button, Flex, Text } from '@gravity-ui/uikit';
6
+ import { isNil } from 'lodash';
7
+ import { DAY_IN_SECONDS, HOUR_IN_SECONDS, SECOND_IN_MS } from '../../../../utils/constants';
8
+ import i18n from '../i18n';
9
+ function getPassedMilliseconds(lastFullfiled = 0) {
10
+ return Date.now() - lastFullfiled;
11
+ }
12
+ export function HealthcheckRefresh({ lastFullfiled, refresh }) {
13
+ const [passedFromLastFullfiled, setPassedFromLastFullfiled] = React.useState(getPassedMilliseconds(lastFullfiled));
14
+ React.useEffect(() => {
15
+ setPassedFromLastFullfiled(getPassedMilliseconds(lastFullfiled));
16
+ const interval = setInterval(() => {
17
+ setPassedFromLastFullfiled(getPassedMilliseconds(lastFullfiled));
18
+ }, 60 * SECOND_IN_MS);
19
+ return () => clearInterval(interval);
20
+ }, [lastFullfiled]);
21
+ const renderPassedFromLastFullfiled = () => {
22
+ if (isNil(lastFullfiled)) {
23
+ return null;
24
+ }
25
+ const showHours = passedFromLastFullfiled > HOUR_IN_SECONDS * SECOND_IN_MS;
26
+ const showDays = passedFromLastFullfiled > DAY_IN_SECONDS * SECOND_IN_MS;
27
+ const preparedDuration = duration(passedFromLastFullfiled);
28
+ let durationText = '';
29
+ if (showDays) {
30
+ const days = preparedDuration.asDays();
31
+ durationText = i18n('description_days', { count: Math.round(days) });
32
+ }
33
+ else if (showHours) {
34
+ const hours = preparedDuration.asHours();
35
+ durationText = i18n('description_hours', { count: Math.round(hours) });
36
+ }
37
+ else {
38
+ const minutes = preparedDuration.asMinutes();
39
+ durationText = i18n('description_minutes', { count: Math.round(minutes) });
40
+ }
41
+ return _jsx(Text, { color: "secondary", children: durationText });
42
+ };
43
+ return (_jsxs(Flex, { gap: 2, alignItems: "center", children: [renderPassedFromLastFullfiled(), _jsx(ActionTooltip, { title: i18n('action_refresh'), children: _jsx(Button, { view: "outlined", onClick: () => {
44
+ refresh();
45
+ }, children: _jsx(Button.Icon, { children: _jsx(ArrowsRotateLeft, {}) }) }) })] }));
46
+ }
47
+ //# sourceMappingURL=HealthcheckRefresh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HealthcheckRefresh.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Healthcheck/components/HealthcheckRefresh.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,QAAQ,EA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../shared';
2
+ interface HealthcheckViewProps<T extends string = CommonIssueType> {
3
+ issuesCount: Record<T, number>;
4
+ viewTitles?: Record<T, string>;
5
+ sortOrder?: T[];
6
+ }
7
+ export declare function HealthcheckView({ issuesCount, viewTitles, sortOrder, }: HealthcheckViewProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { RadioButton, Text } from '@gravity-ui/uikit';
4
+ import { uiFactory } from '../../../../uiFactory/uiFactory';
5
+ import { useTenantQueryParams } from '../../useTenantQueryParams';
6
+ import { b } from '../shared';
7
+ const HealthcheckViewValues = {
8
+ storage: 'storage',
9
+ compute: 'compute',
10
+ };
11
+ export function HealthcheckView({ issuesCount, viewTitles = uiFactory.healthcheck.getHealthckechViewTitles(), sortOrder = uiFactory.healthcheck.getHealthcheckViewsOrder(), }) {
12
+ const { view, handleHealthcheckViewChange, handleIssuesFilterChange } = useTenantQueryParams();
13
+ const issuesTypes = React.useMemo(() => Object.keys(issuesCount), [issuesCount]);
14
+ React.useEffect(() => {
15
+ if (view) {
16
+ return;
17
+ }
18
+ if (issuesCount[HealthcheckViewValues.storage]) {
19
+ handleHealthcheckViewChange(HealthcheckViewValues.storage);
20
+ }
21
+ else if (issuesCount[HealthcheckViewValues.compute]) {
22
+ handleHealthcheckViewChange(HealthcheckViewValues.compute);
23
+ }
24
+ else {
25
+ const firstIssueTypeWithIssues = sortOrder.find((issueType) => issuesCount[issueType] > 0);
26
+ handleHealthcheckViewChange(firstIssueTypeWithIssues);
27
+ }
28
+ }, [view, handleHealthcheckViewChange, issuesCount, issuesTypes, sortOrder]);
29
+ const renderCount = (view) => {
30
+ var _a;
31
+ return _jsx(Text, { color: "secondary", children: (_a = issuesCount[view]) !== null && _a !== void 0 ? _a : 0 });
32
+ };
33
+ const renderHealthcheckViewOption = (view) => {
34
+ var _a;
35
+ return (_jsxs(RadioButton.Option, { value: view, children: [(_a = viewTitles[view]) !== null && _a !== void 0 ? _a : view, "\u00A0", renderCount(view)] }, view));
36
+ };
37
+ return (_jsx(RadioButton, { value: view, onUpdate: (newView) => {
38
+ handleHealthcheckViewChange(newView);
39
+ handleIssuesFilterChange('');
40
+ }, className: b('control-wrapper'), children: sortOrder.map((type) => renderHealthcheckViewOption(type)) }));
41
+ }
42
+ //# sourceMappingURL=HealthcheckView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HealthcheckView.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Healthcheck/components/HealthcheckView.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,WAAW,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAC,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EAAC,CAAC,EAAC,MAAM,WAAW,CAAC;AAE5B,MAAM,qBAAqB,GAAoC;IAC3D,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACrB,CAAC;AAQF,MAAM,UAAU,eAAe,CAAC,EAC5B,WAAW,EACX,UAAU,GAAG,SAAS,CAAC,WAAW,CAAC,wBAAwB,EAAE,EAC7D,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,wBAAwB,EAAE,GACzC;IACnB,MAAM,EAAC,IAAI,EAAE,2BAA2B,EAAE,wBAAwB,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAE7F,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAEjF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,IAAI,EAAE,CAAC;YACP,OAAO;QACX,CAAC;QACD,IAAI,WAAW,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