ydb-embedded-ui 6.6.0 → 6.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (332) hide show
  1. package/dist/package.json +4 -3
  2. package/dist/src/containers/App/App.d.ts +1 -1
  3. package/dist/{containers → src/containers}/App/App.scss +5 -0
  4. package/dist/src/containers/App/Content.js +1 -1
  5. package/dist/src/containers/App/appSlots.d.ts +1 -1
  6. package/dist/src/containers/AsideNavigation/Navigation.js +1 -3
  7. package/dist/src/containers/AsideNavigation/i18n/en.json +0 -2
  8. package/dist/src/containers/AsideNavigation/i18n/index.d.ts +1 -1
  9. package/dist/src/containers/AsideNavigation/i18n/index.js +1 -2
  10. package/dist/src/containers/Cluster/i18n/index.d.ts +1 -1
  11. package/dist/src/containers/Clusters/constants.d.ts +1 -1
  12. package/dist/src/containers/Header/Header.js +17 -21
  13. package/dist/{containers → src/containers}/Header/Header.scss +14 -5
  14. package/dist/src/containers/Header/breadcrumbs.js +65 -71
  15. package/dist/src/containers/Heatmap/Heatmap.js +3 -3
  16. package/dist/src/containers/Nodes/Nodes.js +4 -4
  17. package/dist/src/containers/Nodes/VirtualNodes.js +2 -2
  18. package/dist/src/containers/Storage/Storage.js +2 -2
  19. package/dist/src/containers/Tablets/Tablets.js +8 -8
  20. package/dist/src/containers/TabletsFilters/TabletsFilters.d.ts +2 -57
  21. package/dist/src/containers/TabletsFilters/TabletsFilters.js +70 -180
  22. package/dist/src/containers/Tenant/Acl/Acl.d.ts +3 -1
  23. package/dist/src/containers/Tenant/Acl/Acl.js +7 -17
  24. package/dist/src/containers/Tenant/Diagnostics/Autorefresh/AutorefreshControl.js +4 -5
  25. package/dist/src/containers/Tenant/Diagnostics/Consumers/Consumers.js +3 -3
  26. package/dist/src/containers/Tenant/Diagnostics/Describe/Describe.d.ts +2 -2
  27. package/dist/src/containers/Tenant/Diagnostics/Describe/Describe.js +5 -6
  28. package/dist/src/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.d.ts +1 -0
  29. package/dist/src/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.js +3 -5
  30. package/dist/src/containers/Tenant/Diagnostics/Diagnostics.d.ts +2 -0
  31. package/dist/src/containers/Tenant/Diagnostics/Diagnostics.js +26 -50
  32. package/dist/{containers → src/containers}/Tenant/Diagnostics/Diagnostics.scss +1 -1
  33. package/dist/src/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +19 -58
  34. package/dist/src/containers/Tenant/Diagnostics/Network/Network.d.ts +2 -2
  35. package/dist/src/containers/Tenant/Diagnostics/Network/Network.js +5 -5
  36. package/dist/src/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.js +1 -6
  37. package/dist/src/containers/Tenant/Diagnostics/Overview/ChangefeedInfo/ChangefeedInfo.d.ts +2 -1
  38. package/dist/src/containers/Tenant/Diagnostics/Overview/ChangefeedInfo/ChangefeedInfo.js +3 -8
  39. package/dist/src/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -2
  40. package/dist/src/containers/Tenant/Diagnostics/Overview/Overview.js +19 -21
  41. package/dist/{containers → src/containers}/Tenant/Diagnostics/Overview/TableInfo/TableInfo.scss +0 -2
  42. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicInfo/TopicInfo.d.ts +2 -1
  43. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicInfo/TopicInfo.js +3 -8
  44. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.d.ts +3 -1
  45. package/dist/src/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.js +5 -5
  46. package/dist/src/containers/Tenant/Diagnostics/Partitions/Partitions.js +4 -12
  47. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/Healthcheck.scss +100 -0
  48. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.d.ts +2 -5
  49. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckDetails.js +7 -2
  50. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.d.ts +1 -6
  51. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js +22 -16
  52. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.d.ts +2 -8
  53. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.js +2 -2
  54. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.d.ts +2 -2
  55. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TenantCpu.js +2 -2
  56. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.d.ts +2 -2
  57. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +4 -4
  58. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.d.ts +2 -2
  59. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js +4 -4
  60. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.d.ts +2 -2
  61. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +4 -4
  62. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.d.ts +2 -1
  63. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +5 -5
  64. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantDashboard/TenantDashboard.js +3 -3
  65. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.d.ts +2 -2
  66. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.js +2 -2
  67. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.d.ts +2 -2
  68. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +4 -4
  69. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +7 -9
  70. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +3 -3
  71. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +3 -3
  72. package/dist/src/containers/Tenant/Diagnostics/TenantOverview/useHealthcheck.js +1 -1
  73. package/dist/src/containers/Tenant/Diagnostics/TopQueries/TopQueries.d.ts +2 -2
  74. package/dist/src/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +5 -5
  75. package/dist/src/containers/Tenant/Diagnostics/TopShards/TopShards.d.ts +3 -2
  76. package/dist/src/containers/Tenant/Diagnostics/TopShards/TopShards.js +8 -8
  77. package/dist/src/containers/Tenant/Info/ExternalDataSource/ExternalDataSource.js +0 -6
  78. package/dist/src/containers/Tenant/Info/ExternalTable/ExternalTable.js +0 -6
  79. package/dist/src/containers/Tenant/Info/View/View.js +0 -6
  80. package/dist/src/containers/Tenant/ObjectGeneral/ObjectGeneral.d.ts +2 -1
  81. package/dist/src/containers/Tenant/ObjectGeneral/ObjectGeneral.js +7 -13
  82. package/dist/src/containers/Tenant/ObjectSummary/ObjectSummary.d.ts +4 -4
  83. package/dist/src/containers/Tenant/ObjectSummary/ObjectSummary.js +159 -63
  84. package/dist/src/containers/Tenant/Query/Issues/Issues.js +6 -5
  85. package/dist/src/containers/Tenant/Query/Preview/Preview.d.ts +2 -1
  86. package/dist/src/containers/Tenant/Query/Preview/Preview.js +6 -6
  87. package/dist/src/containers/Tenant/Query/Query.d.ts +1 -0
  88. package/dist/{containers → src/containers}/Tenant/Query/Query.scss +1 -1
  89. package/dist/src/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +2 -0
  90. package/dist/src/containers/Tenant/Query/QueryEditor/QueryEditor.js +9 -22
  91. package/dist/src/containers/Tenant/Query/i18n/en.json +1 -1
  92. package/dist/src/containers/Tenant/Schema/SchemaTree/SchemaTree.d.ts +1 -0
  93. package/dist/src/containers/Tenant/Schema/SchemaTree/SchemaTree.js +11 -19
  94. package/dist/src/containers/Tenant/Schema/SchemaViewer/SchemaViewer.d.ts +2 -2
  95. package/dist/src/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +13 -8
  96. package/dist/src/containers/Tenant/Schema/SchemaViewer/columns.d.ts +2 -1
  97. package/dist/src/containers/Tenant/Schema/SchemaViewer/columns.js +21 -2
  98. package/dist/src/containers/Tenant/Schema/SchemaViewer/i18n/en.json +1 -0
  99. package/dist/src/containers/Tenant/Schema/SchemaViewer/i18n/index.d.ts +1 -1
  100. package/dist/src/containers/Tenant/Schema/SchemaViewer/prepareData.js +2 -1
  101. package/dist/src/containers/Tenant/Schema/SchemaViewer/types.d.ts +1 -0
  102. package/dist/src/containers/Tenant/Tenant.js +20 -36
  103. package/dist/{containers → src/containers}/Tenant/Tenant.scss +4 -0
  104. package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.d.ts +2 -0
  105. package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.js +19 -0
  106. package/dist/src/containers/Tenant/TenantNavigation/TenantNavigation.scss +18 -0
  107. package/dist/src/containers/Tenant/TenantNavigation/useTenantNavigation.d.ts +9 -0
  108. package/dist/src/containers/Tenant/TenantNavigation/useTenantNavigation.js +44 -0
  109. package/dist/src/containers/Tenant/i18n/en.json +17 -0
  110. package/dist/src/containers/Tenant/i18n/index.d.ts +1 -1
  111. package/dist/src/containers/Tenant/utils/queryTemplates.d.ts +1 -0
  112. package/dist/src/containers/Tenant/utils/queryTemplates.js +12 -0
  113. package/dist/src/containers/Tenant/utils/schema.d.ts +1 -1
  114. package/dist/src/containers/Tenant/utils/schema.js +5 -6
  115. package/dist/src/containers/Tenant/utils/schemaActions.js +3 -1
  116. package/dist/src/lib.d.ts +3 -2
  117. package/dist/src/lib.js +2 -2
  118. package/dist/src/routes.d.ts +1 -1
  119. package/dist/src/routes.js +3 -1
  120. package/dist/src/services/api.d.ts +6 -1
  121. package/dist/src/services/api.js +23 -3
  122. package/dist/src/services/settings.d.ts +1 -0
  123. package/dist/src/services/settings.js +3 -2
  124. package/dist/src/store/configureStore.d.ts +36 -134
  125. package/dist/src/store/configureStore.js +2 -15
  126. package/dist/src/store/defaultStore.d.ts +17 -81
  127. package/dist/src/store/reducers/api.js +0 -1
  128. package/dist/src/store/reducers/authentication/authentication.d.ts +51 -243
  129. package/dist/src/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +196 -849
  130. package/dist/src/store/reducers/healthcheckInfo/healthcheckInfo.js +3 -3
  131. package/dist/src/store/reducers/hotKeys/hotKeys.d.ts +6 -25
  132. package/dist/src/store/reducers/hotKeys/hotKeys.js +36 -49
  133. package/dist/src/store/reducers/index.d.ts +23 -100
  134. package/dist/src/store/reducers/index.js +0 -8
  135. package/dist/src/store/reducers/node/selectors.d.ts +0 -40
  136. package/dist/src/store/reducers/nodesList.d.ts +0 -40
  137. package/dist/src/store/reducers/schema/schema.d.ts +13 -149
  138. package/dist/src/store/reducers/schema/schema.js +45 -90
  139. package/dist/src/store/reducers/schema/types.d.ts +2 -21
  140. package/dist/src/store/reducers/schemaAcl/schemaAcl.d.ts +8 -135
  141. package/dist/src/store/reducers/schemaAcl/schemaAcl.js +18 -44
  142. package/dist/src/store/reducers/settings/settings.d.ts +17 -23
  143. package/dist/src/store/reducers/settings/settings.js +40 -33
  144. package/dist/src/store/reducers/settings/types.d.ts +1 -12
  145. package/dist/src/store/reducers/tablets.d.ts +288 -41
  146. package/dist/src/store/reducers/tablets.js +8 -4
  147. package/dist/src/store/reducers/tabletsFilters.d.ts +11 -164
  148. package/dist/src/store/reducers/tabletsFilters.js +14 -76
  149. package/dist/src/store/reducers/tenants/selectors.d.ts +8 -362
  150. package/dist/src/store/reducers/topic.d.ts +0 -600
  151. package/dist/src/store/state-url-mapping.js +0 -3
  152. package/dist/src/types/api/tenant.d.ts +1 -7
  153. package/dist/src/types/api/tenant.js +0 -8
  154. package/dist/src/utils/__test__/monitoring.test.js +1 -1
  155. package/dist/src/utils/constants.d.ts +1 -1
  156. package/dist/src/utils/constants.js +1 -1
  157. package/dist/src/utils/dataFormatters/dataFormatters.d.ts +2 -1
  158. package/dist/src/utils/dataFormatters/dataFormatters.js +7 -3
  159. package/dist/src/utils/hooks/index.d.ts +1 -0
  160. package/dist/src/utils/hooks/index.js +1 -0
  161. package/dist/src/utils/hooks/useAutoRefreshInterval.d.ts +1 -0
  162. package/dist/src/utils/hooks/useAutoRefreshInterval.js +5 -0
  163. package/dist/src/utils/monitoring.d.ts +2 -1
  164. package/dist/src/utils/monitoring.js +1 -4
  165. package/dist/src/utils/utils.js +2 -1
  166. package/package.json +4 -3
  167. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/Healthcheck.scss +0 -109
  168. package/dist/src/components/InfoViewer/schemaOverview/CDCStreamOverview.d.ts +0 -6
  169. package/dist/src/components/InfoViewer/schemaOverview/CDCStreamOverview.js +0 -17
  170. package/dist/src/components/InfoViewer/schemaOverview/PersQueueGroupOverview.d.ts +0 -6
  171. package/dist/src/components/InfoViewer/schemaOverview/PersQueueGroupOverview.js +0 -20
  172. package/dist/src/components/InfoViewer/schemaOverview/index.d.ts +0 -2
  173. package/dist/src/components/InfoViewer/schemaOverview/index.js +0 -2
  174. package/dist/src/containers/AsideNavigation/i18n/ru.json +0 -10
  175. package/dist/src/containers/AsideNavigation/useNavigationMenuItems.d.ts +0 -2
  176. package/dist/src/containers/AsideNavigation/useNavigationMenuItems.js +0 -54
  177. package/dist/src/store/reducers/host.d.ts +0 -130
  178. package/dist/src/store/reducers/host.js +0 -26
  179. package/dist/src/store/reducers/hotKeys/types.d.ts +0 -10
  180. package/dist/src/store/reducers/hotKeys/types.js +0 -1
  181. package/dist/src/store/reducers/schemaAcl/types.d.ts +0 -12
  182. package/dist/src/store/reducers/schemaAcl/types.js +0 -1
  183. package/dist/src/types/store/host.d.ts +0 -15
  184. package/dist/src/types/store/host.js +0 -1
  185. package/dist/styles/constants.scss +0 -9
  186. /package/dist/{assets → src/assets}/icons/cluster.svg +0 -0
  187. /package/dist/{assets → src/assets}/icons/databases.svg +0 -0
  188. /package/dist/{assets → src/assets}/icons/disableFullscreen.svg +0 -0
  189. /package/dist/{assets → src/assets}/icons/emptyState.svg +0 -0
  190. /package/dist/{assets → src/assets}/icons/key.svg +0 -0
  191. /package/dist/{assets → src/assets}/icons/monitoring.svg +0 -0
  192. /package/dist/{assets → src/assets}/icons/network.svg +0 -0
  193. /package/dist/{assets → src/assets}/icons/user-check.svg +0 -0
  194. /package/dist/{assets → src/assets}/icons/user-secret.svg +0 -0
  195. /package/dist/{assets → src/assets}/icons/ydb.svg +0 -0
  196. /package/dist/{assets → src/assets}/illustrations/dark/403.svg +0 -0
  197. /package/dist/{assets → src/assets}/illustrations/dark/error.svg +0 -0
  198. /package/dist/{assets → src/assets}/illustrations/dark/thumbsUp.svg +0 -0
  199. /package/dist/{assets → src/assets}/illustrations/light/403.svg +0 -0
  200. /package/dist/{assets → src/assets}/illustrations/light/error.svg +0 -0
  201. /package/dist/{assets → src/assets}/illustrations/light/thumbsUp.svg +0 -0
  202. /package/dist/{components → src/components}/BasicNodeViewer/BasicNodeViewer.scss +0 -0
  203. /package/dist/{components → src/components}/CellWithPopover/CellWithPopover.scss +0 -0
  204. /package/dist/{components → src/components}/CircularProgressBar/CircularProgressBar.scss +0 -0
  205. /package/dist/{components → src/components}/CriticalActionDialog/CriticalActionDialog.scss +0 -0
  206. /package/dist/{components → src/components}/DateRange/DateRange.scss +0 -0
  207. /package/dist/{components → src/components}/DiagnosticCard/DiagnosticCard.scss +0 -0
  208. /package/dist/{components → src/components}/DiskPageTitle/DiskPageTitle.scss +0 -0
  209. /package/dist/{components → src/components}/DiskStateProgressBar/DiskStateProgressBar.scss +0 -0
  210. /package/dist/{components → src/components}/Divider/Divider.scss +0 -0
  211. /package/dist/{components → src/components}/EmptyState/EmptyState.scss +0 -0
  212. /package/dist/{components → src/components}/EntityStatus/EntityStatus.scss +0 -0
  213. /package/dist/{components → src/components}/ErrorBoundary/ErrorBoundary.scss +0 -0
  214. /package/dist/{components → src/components}/FullNodeViewer/FullNodeViewer.scss +0 -0
  215. /package/dist/{components → src/components}/Fullscreen/Fullscreen.scss +0 -0
  216. /package/dist/{components → src/components}/InfoViewer/InfoViewer.scss +0 -0
  217. /package/dist/{components → src/components}/InfoViewerSkeleton/InfoViewerSkeleton.scss +0 -0
  218. /package/dist/{components → src/components}/LagPopoverContent/LagPopoverContent.scss +0 -0
  219. /package/dist/{components → src/components}/LinkWithIcon/LinkWithIcon.scss +0 -0
  220. /package/dist/{components → src/components}/Loader/Loader.scss +0 -0
  221. /package/dist/{components → src/components}/MetricChart/MetricChart.scss +0 -0
  222. /package/dist/{components → src/components}/MonitoringButton/MonitoringButton.scss +0 -0
  223. /package/dist/{components → src/components}/NodeHostWrapper/NodeHostWrapper.scss +0 -0
  224. /package/dist/{components → src/components}/PDiskInfo/PDiskInfo.scss +0 -0
  225. /package/dist/{components → src/components}/PDiskPopup/PDiskPopup.scss +0 -0
  226. /package/dist/{components → src/components}/PageMeta/PageMeta.scss +0 -0
  227. /package/dist/{components → src/components}/PoolBar/PoolBar.scss +0 -0
  228. /package/dist/{components → src/components}/PoolUsage/PoolUsage.scss +0 -0
  229. /package/dist/{components → src/components}/PoolsGraph/PoolsGraph.scss +0 -0
  230. /package/dist/{components → src/components}/ProgressViewer/ProgressViewer.scss +0 -0
  231. /package/dist/{components → src/components}/QueryExecutionStatus/QueryExecutionStatus.scss +0 -0
  232. /package/dist/{components → src/components}/QueryResultTable/QueryResultTable.scss +0 -0
  233. /package/dist/{components → src/components}/ResizeableDataTable/ResizeableDataTable.scss +0 -0
  234. /package/dist/{components → src/components}/Search/Search.scss +0 -0
  235. /package/dist/{components → src/components}/ShortyString/ShortyString.scss +0 -0
  236. /package/dist/{components → src/components}/SpeedMultiMeter/SpeedMultiMeter.scss +0 -0
  237. /package/dist/{components → src/components}/SplitPane/SplitPane.scss +0 -0
  238. /package/dist/{components → src/components}/Stack/Stack.scss +0 -0
  239. /package/dist/{components → src/components}/StatusIcon/StatusIcon.scss +0 -0
  240. /package/dist/{components → src/components}/TableSkeleton/TableSkeleton.scss +0 -0
  241. /package/dist/{components → src/components}/TableWithControlsLayout/TableWithControlsLayout.scss +0 -0
  242. /package/dist/{components → src/components}/Tablet/Tablet.scss +0 -0
  243. /package/dist/{components → src/components}/TabletIcon/TabletIcon.scss +0 -0
  244. /package/dist/{components → src/components}/TabletsOverall/TabletsOverall.scss +0 -0
  245. /package/dist/{components → src/components}/TabletsStatistic/TabletsStatistic.scss +0 -0
  246. /package/dist/{components → src/components}/Tag/Tag.scss +0 -0
  247. /package/dist/{components → src/components}/Tags/Tags.scss +0 -0
  248. /package/dist/{components → src/components}/TimeFrameSelector/TimeFrameSelector.scss +0 -0
  249. /package/dist/{components → src/components}/TooltipsContent/NodeEndpointsTooltipContent/NodeEndpointsTooltipContent.scss +0 -0
  250. /package/dist/{components → src/components}/TruncatedQuery/TruncatedQuery.scss +0 -0
  251. /package/dist/{components → src/components}/UsageLabel/UsageLabel.scss +0 -0
  252. /package/dist/{components → src/components}/User/User.scss +0 -0
  253. /package/dist/{components → src/components}/VDisk/VDisk.scss +0 -0
  254. /package/dist/{components → src/components}/VDiskInfo/VDiskInfo.scss +0 -0
  255. /package/dist/{components → src/components}/VDiskPopup/VDiskPopup.scss +0 -0
  256. /package/dist/{components → src/components}/VirtualTable/VirtualTable.scss +0 -0
  257. /package/dist/{containers → src/containers}/AppWithClusters/ExtendedCluster/ExtendedCluster.scss +0 -0
  258. /package/dist/{containers → src/containers}/AsideNavigation/AsideNavigation.scss +0 -0
  259. /package/dist/{containers → src/containers}/AsideNavigation/YdbInternalUser/YdbInternalUser.scss +0 -0
  260. /package/dist/{containers → src/containers}/Authentication/Authentication.scss +0 -0
  261. /package/dist/{containers → src/containers}/Cluster/Cluster.scss +0 -0
  262. /package/dist/{containers → src/containers}/Cluster/ClusterInfo/ClusterInfo.scss +0 -0
  263. /package/dist/{containers → src/containers}/Cluster/VersionsBar/VersionsBar.scss +0 -0
  264. /package/dist/{containers → src/containers}/Clusters/Clusters.scss +0 -0
  265. /package/dist/{containers → src/containers}/Heatmap/Heatmap.scss +0 -0
  266. /package/dist/{containers → src/containers}/Heatmap/Histogram/Histogram.scss +0 -0
  267. /package/dist/{containers → src/containers}/Node/Node.scss +0 -0
  268. /package/dist/{containers → src/containers}/Node/NodeStructure/NodeStructure.scss +0 -0
  269. /package/dist/{containers → src/containers}/Nodes/Nodes.scss +0 -0
  270. /package/dist/{containers → src/containers}/PDiskPage/PDiskPage.scss +0 -0
  271. /package/dist/{containers → src/containers}/ReduxTooltip/ReduxTooltip.scss +0 -0
  272. /package/dist/{containers → src/containers}/Storage/PDisk/PDisk.scss +0 -0
  273. /package/dist/{containers → src/containers}/Storage/Storage.scss +0 -0
  274. /package/dist/{containers → src/containers}/Storage/StorageGroups/StorageGroups.scss +0 -0
  275. /package/dist/{containers → src/containers}/Storage/StorageNodes/StorageNodes.scss +0 -0
  276. /package/dist/{containers → src/containers}/Storage/UsageFilter/UsageFilter.scss +0 -0
  277. /package/dist/{containers → src/containers}/Tablet/Tablet.scss +0 -0
  278. /package/dist/{containers → src/containers}/TabletsFilters/TabletsFilters.scss +0 -0
  279. /package/dist/{containers → src/containers}/Tenant/Acl/Acl.scss +0 -0
  280. /package/dist/{containers → src/containers}/Tenant/Diagnostics/Autorefresh/AutorefreshControl.scss +0 -0
  281. /package/dist/{containers → src/containers}/Tenant/Diagnostics/Consumers/Consumers.scss +0 -0
  282. /package/dist/{containers → src/containers}/Tenant/Diagnostics/Consumers/Headers/Headers.scss +0 -0
  283. /package/dist/{containers → src/containers}/Tenant/Diagnostics/Consumers/TopicStats/ConsumersTopicStats.scss +0 -0
  284. /package/dist/{containers → src/containers}/Tenant/Diagnostics/Consumers/columns/Columns.scss +0 -0
  285. /package/dist/{containers → src/containers}/Tenant/Diagnostics/Describe/Describe.scss +0 -0
  286. /package/dist/{containers → src/containers}/Tenant/Diagnostics/DetailedOverview/DetailedOverview.scss +0 -0
  287. /package/dist/{containers → src/containers}/Tenant/Diagnostics/HotKeys/HotKeys.scss +0 -0
  288. /package/dist/{containers → src/containers}/Tenant/Diagnostics/Network/Network.scss +0 -0
  289. /package/dist/{containers → src/containers}/Tenant/Diagnostics/Network/NodeNetwork/NodeNetwork.scss +0 -0
  290. /package/dist/{containers → src/containers}/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.scss +0 -0
  291. /package/dist/{containers → src/containers}/Tenant/Diagnostics/Overview/TopicStats/TopicStats.scss +0 -0
  292. /package/dist/{containers → src/containers}/Tenant/Diagnostics/Partitions/Headers/Headers.scss +0 -0
  293. /package/dist/{containers → src/containers}/Tenant/Diagnostics/Partitions/Partitions.scss +0 -0
  294. /package/dist/{containers → src/containers}/Tenant/Diagnostics/Partitions/columns/Columns.scss +0 -0
  295. /package/dist/{containers → src/containers}/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTree.scss +0 -0
  296. /package/dist/{containers → src/containers}/Tenant/Diagnostics/TenantOverview/Healthcheck/IssuesViewer/IssueTreeItem/IssueTreeItem.scss +0 -0
  297. /package/dist/{containers → src/containers}/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricCard/MetricCard.scss +0 -0
  298. /package/dist/{containers → src/containers}/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.scss +0 -0
  299. /package/dist/{containers → src/containers}/Tenant/Diagnostics/TenantOverview/TenantDashboard/TenantDashboard.scss +0 -0
  300. /package/dist/{containers → src/containers}/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +0 -0
  301. /package/dist/{containers → src/containers}/Tenant/Diagnostics/TopQueries/TopQueries.scss +0 -0
  302. /package/dist/{containers → src/containers}/Tenant/Diagnostics/TopShards/TopShards.scss +0 -0
  303. /package/dist/{containers → src/containers}/Tenant/Info/ExternalDataSource/ExternalDataSource.scss +0 -0
  304. /package/dist/{containers → src/containers}/Tenant/Info/ExternalTable/ExternalTable.scss +0 -0
  305. /package/dist/{containers → src/containers}/Tenant/Info/View/View.scss +0 -0
  306. /package/dist/{containers → src/containers}/Tenant/ObjectGeneral/ObjectGeneral.scss +0 -0
  307. /package/dist/{containers → src/containers}/Tenant/ObjectSummary/ObjectSummary.scss +0 -0
  308. /package/dist/{containers → src/containers}/Tenant/Query/ExecuteResult/ExecuteResult.scss +0 -0
  309. /package/dist/{containers → src/containers}/Tenant/Query/ExplainResult/ExplainResult.scss +0 -0
  310. /package/dist/{containers → src/containers}/Tenant/Query/Issues/Issues.scss +0 -0
  311. /package/dist/{containers → src/containers}/Tenant/Query/Preview/Preview.scss +0 -0
  312. /package/dist/{containers → src/containers}/Tenant/Query/QueriesHistory/QueriesHistory.scss +0 -0
  313. /package/dist/{containers → src/containers}/Tenant/Query/QueryDuration/QueryDuration.scss +0 -0
  314. /package/dist/{containers → src/containers}/Tenant/Query/QueryEditor/QueryEditor.scss +0 -0
  315. /package/dist/{containers → src/containers}/Tenant/Query/QueryEditorControls/QueryEditorControls.scss +0 -0
  316. /package/dist/{containers → src/containers}/Tenant/Query/SaveQuery/SaveQuery.scss +0 -0
  317. /package/dist/{containers → src/containers}/Tenant/Query/SavedQueries/SavedQueries.scss +0 -0
  318. /package/dist/{containers → src/containers}/Tenant/Schema/SchemaViewer/SchemaViewer.scss +0 -0
  319. /package/dist/{containers → src/containers}/Tenant/utils/ToggleButton.scss +0 -0
  320. /package/dist/{containers → src/containers}/Tenants/Tenants.scss +0 -0
  321. /package/dist/{containers → src/containers}/UserSettings/UserSettings.scss +0 -0
  322. /package/dist/{containers → src/containers}/VDiskPage/VDiskPage.scss +0 -0
  323. /package/dist/{containers → src/containers}/Versions/GroupedNodesTree/GroupedNodesTree.scss +0 -0
  324. /package/dist/{containers → src/containers}/Versions/NodesTreeTitle/NodesTreeTitle.scss +0 -0
  325. /package/dist/{containers → src/containers}/Versions/Versions.scss +0 -0
  326. /package/dist/{index.css → src/index.css} +0 -0
  327. /package/dist/{styles → src/styles}/mixins.scss +0 -0
  328. /package/dist/{styles → src/styles}/themes/dark-hc.scss +0 -0
  329. /package/dist/{styles → src/styles}/themes/dark.scss +0 -0
  330. /package/dist/{styles → src/styles}/themes/light-hc.scss +0 -0
  331. /package/dist/{styles → src/styles}/themes/light.scss +0 -0
  332. /package/dist/{styles → src/styles}/themes.scss +0 -0
@@ -1,200 +1,90 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { Loader, Select } from '@gravity-ui/uikit';
4
- import isEqual from 'lodash/isEqual';
5
4
  import map from 'lodash/map';
6
- import PropTypes from 'prop-types';
7
5
  import { Helmet } from 'react-helmet-async';
8
6
  import ReactList from 'react-list';
9
- import { connect } from 'react-redux';
7
+ import { ArrayParam, StringParam, useQueryParams } from 'use-query-params';
8
+ import { z } from 'zod';
10
9
  import { AccessDenied } from '../../components/Errors/403';
10
+ import { ResponseError } from '../../components/Errors/ResponseError';
11
11
  import { Tablet } from '../../components/Tablet';
12
- import { parseQuery } from '../../routes';
13
12
  import { setHeaderBreadcrumbs } from '../../store/reducers/header/header';
14
- import { clearWasLoadingFlag, getFilteredTablets, getTablets, getTabletsInfo, setStateFilter, setTypeFilter, } from '../../store/reducers/tabletsFilters';
13
+ import { nodesListApi } from '../../store/reducers/nodesList';
14
+ import { tabletsApi } from '../../store/reducers/tablets';
15
+ import { getFilteredTablets } from '../../store/reducers/tabletsFilters';
15
16
  import { cn } from '../../utils/cn';
16
- import { CLUSTER_DEFAULT_TITLE } from '../../utils/constants';
17
+ import { AUTO_RELOAD_INTERVAL, CLUSTER_DEFAULT_TITLE } from '../../utils/constants';
18
+ import { useTypedDispatch, useTypedSelector } from '../../utils/hooks';
17
19
  import { tabletColorToTabletState, tabletStates } from '../../utils/tablet';
18
20
  import i18n from './i18n';
19
21
  import './TabletsFilters.scss';
20
22
  const b = cn('tablets-filters');
21
- export class TabletsFilters extends React.Component {
22
- constructor() {
23
- super(...arguments);
24
- this.state = {
25
- nodeFilter: [],
26
- tenantPath: '',
27
- clusterName: '',
28
- };
29
- this.reloadDescriptor = -1;
30
- this.makeRequest = () => {
31
- const { nodeFilter, tenantPath } = this.state;
32
- this.props.getTabletsInfo({ nodes: nodeFilter, path: [tenantPath] });
33
- };
34
- this.getTablets = () => {
35
- const { timeoutForRequest } = this.props;
36
- clearInterval(this.reloadDescriptor);
37
- this.reloadDescriptor = setTimeout(() => {
38
- this.makeRequest();
39
- this.reloadDescriptor = -1;
40
- }, timeoutForRequest);
41
- };
42
- this.handleNodeFilterChange = (nodeFilter) => {
43
- this.setState({ nodeFilter }, () => {
44
- this.props.clearWasLoadingFlag();
45
- this.makeRequest();
46
- });
47
- };
48
- this.handleStateFilterChange = (stateFilter) => {
49
- const { setStateFilter } = this.props;
50
- setStateFilter(stateFilter);
51
- };
52
- this.handleTypeFilterChange = (typeFilter) => {
53
- const { setTypeFilter } = this.props;
54
- setTypeFilter(typeFilter);
55
- };
56
- this.renderTablet = (index, key) => {
57
- const { filteredTablets, size } = this.props;
58
- return (_jsx(Tablet, { tablet: filteredTablets[index], tenantName: this.state.tenantPath, size: size, className: b('tablet') }, key));
59
- };
60
- this.renderContent = () => {
61
- const { nodeFilter, tenantPath } = this.state;
62
- const { tablets, filteredTablets, nodes, stateFilter, typeFilter, error } = this.props;
63
- const states = tabletStates.map((item) => ({ value: item, content: item }));
64
- const types = Array.from(new Set(...[map(tablets, (tblt) => tblt.Type)])).map((item) => ({
65
- value: item,
66
- content: item,
67
- }));
68
- const nodesForSelect = map(nodes, (node) => ({
69
- content: node.Id,
70
- value: node.Id,
71
- meta: node.Host,
72
- }));
73
- return (_jsxs("div", { className: b(), children: [tenantPath ? (_jsx("div", { className: b('tenant'), children: _jsxs(React.Fragment, { children: [_jsx("span", { className: b('label'), children: "Database: " }), " ", tenantPath] }) })) : null, _jsx(MemoizedFilters, { nodesForSelect: nodesForSelect, nodeFilter: nodeFilter, onChangeNodes: this.handleNodeFilterChange, states: states, stateFilter: stateFilter, onChangeStates: this.handleStateFilterChange, types: types, typeFilter: typeFilter, onChangeTypes: this.handleTypeFilterChange }), error && _jsx("div", { className: "error", children: error }), filteredTablets.length > 0 ? (_jsx("div", { className: b('items'), children: _jsx(ReactList, { itemRenderer: this.renderTablet, length: filteredTablets.length, type: "uniform" }) })) : (!error && _jsx("div", { className: b('empty-message'), children: "no tablets" }))] }));
74
- };
75
- this.renderView = () => {
76
- const { loading, wasLoaded, error } = this.props;
77
- if (loading && !wasLoaded) {
78
- return TabletsFilters.renderLoader();
79
- }
80
- else if (error && typeof error === 'object') {
81
- if (error.status === 403) {
82
- return _jsx(AccessDenied, {});
83
- }
84
- return _jsx("div", { children: error.statusText });
85
- }
86
- else {
87
- return this.renderContent();
88
- }
89
- };
23
+ const stringArrayParam = z.preprocess((arg) => {
24
+ if (Array.isArray(arg)) {
25
+ return arg.filter(Boolean).sort();
90
26
  }
91
- static renderLoader() {
92
- return (_jsx("div", { className: 'loader', children: _jsx(Loader, { size: "l" }) }));
27
+ return [];
28
+ }, z.string().array());
29
+ const stateArrayParam = z.preprocess((arg) => {
30
+ if (Array.isArray(arg)) {
31
+ return arg
32
+ .flatMap((item) => tabletColorToTabletState[item] || item)
33
+ .filter(Boolean);
93
34
  }
94
- componentDidMount() {
95
- const { setStateFilter, setTypeFilter, setHeaderBreadcrumbs } = this.props;
96
- const queryParams = parseQuery(this.props.location);
97
- const { nodeIds, type, path, state, clusterName } = queryParams;
98
- const nodes = TabletsFilters.parseNodes(nodeIds);
99
- if (state) {
100
- const stateFilter = TabletsFilters.getStateFiltersFromColor(state);
101
- setStateFilter(stateFilter);
102
- }
103
- if (type) {
104
- setTypeFilter([type]);
105
- }
106
- this.setState({ nodeFilter: nodes, tenantPath: path, clusterName }, () => {
107
- this.makeRequest();
108
- });
109
- setHeaderBreadcrumbs('tablets', {
35
+ return [];
36
+ }, z.string().array());
37
+ const CONTROL_WIDTH = 220;
38
+ const POPUP_WIDTH = 300;
39
+ export function TabletsFilters() {
40
+ var _a;
41
+ const [params, setParams] = useQueryParams({
42
+ nodeIds: ArrayParam,
43
+ type: ArrayParam,
44
+ state: ArrayParam,
45
+ path: StringParam,
46
+ clusterName: StringParam,
47
+ });
48
+ const path = (_a = params.path) !== null && _a !== void 0 ? _a : undefined;
49
+ const dispatch = useTypedDispatch();
50
+ React.useEffect(() => {
51
+ dispatch(setHeaderBreadcrumbs('tablets', {
110
52
  tenantName: path,
111
- });
112
- }
113
- componentDidUpdate(prevProps) {
114
- const { loading, error } = this.props;
115
- if (!error && prevProps.path && this.props.path && prevProps.path !== this.props.path) {
116
- this.props.clearWasLoadingFlag();
117
- this.getTablets();
53
+ }));
54
+ }, [dispatch, path]);
55
+ const nodeIds = stringArrayParam.parse(params.nodeIds);
56
+ const { currentData, isFetching, error } = tabletsApi.useGetTabletsInfoQuery({ nodes: nodeIds, path }, {
57
+ pollingInterval: AUTO_RELOAD_INTERVAL,
58
+ });
59
+ const { data: nodes } = nodesListApi.useGetNodesListQuery({}, { pollingInterval: AUTO_RELOAD_INTERVAL });
60
+ const loading = isFetching && currentData === undefined;
61
+ const stateFilter = stateArrayParam.parse(params.state);
62
+ const states = tabletStates.map((item) => ({ value: item, content: item }));
63
+ const typeFilter = stringArrayParam.parse(params.type);
64
+ const types = Array.from(new Set(...[map(currentData === null || currentData === void 0 ? void 0 : currentData.TabletStateInfo, (tblt) => tblt.Type)])).map((item) => ({
65
+ value: String(item),
66
+ content: item,
67
+ }));
68
+ const filteredTablets = useTypedSelector((state) => getFilteredTablets(state, { nodes: nodeIds, path }, stateFilter, typeFilter));
69
+ const renderTablet = (index, key) => (_jsx(Tablet, { tablet: filteredTablets[index], tenantName: path }, key));
70
+ const nodesForSelect = map(nodes, (node) => ({
71
+ content: node.Id,
72
+ value: String(node.Id),
73
+ data: node.Host,
74
+ }));
75
+ const renderView = () => {
76
+ if (loading) {
77
+ return (_jsx("div", { className: 'loader', children: _jsx(Loader, { size: "l" }) }));
118
78
  }
119
- if (!error && !loading && this.reloadDescriptor === -1) {
120
- this.getTablets();
79
+ if (error && typeof error === 'object' && 'status' in error && error.status === 403) {
80
+ return _jsx(AccessDenied, {});
121
81
  }
122
- }
123
- componentWillUnmount() {
124
- clearInterval(this.reloadDescriptor);
125
- }
126
- render() {
127
- const { tenantPath, clusterName } = this.state;
128
- return (_jsxs(React.Fragment, { children: [_jsx(Helmet, { children: _jsx("title", { children: `${i18n('page.title')} — ${tenantPath || clusterName || CLUSTER_DEFAULT_TITLE}` }) }), this.renderView()] }));
129
- }
130
- }
131
- TabletsFilters.propTypes = {
132
- wasLoaded: PropTypes.bool,
133
- loading: PropTypes.bool,
134
- getTabletsInfo: PropTypes.func,
135
- timeoutForRequest: PropTypes.number,
136
- path: PropTypes.string,
137
- clearWasLoadingFlag: PropTypes.func,
138
- nodes: PropTypes.array,
139
- tablets: PropTypes.array,
140
- filteredTablets: PropTypes.array,
141
- setStateFilter: PropTypes.func,
142
- setTypeFilter: PropTypes.func,
143
- stateFilter: PropTypes.array,
144
- typeFilter: PropTypes.array,
145
- error: PropTypes.oneOf([PropTypes.string, PropTypes.object]),
146
- setHeader: PropTypes.func,
147
- };
148
- TabletsFilters.parseNodes = (nodes) => {
149
- if (Array.isArray(nodes)) {
150
- return nodes.map(Number).filter(Number.isInteger);
151
- }
152
- };
153
- TabletsFilters.getStateFiltersFromColor = (color) => {
154
- return tabletColorToTabletState[color] || [color];
155
- };
156
- TabletsFilters.CONTROL_WIDTH = 220;
157
- TabletsFilters.POPUP_WIDTH = 300;
158
- const Filters = ({ nodesForSelect, nodeFilter, onChangeNodes, states, stateFilter, onChangeStates, types, typeFilter, onChangeTypes, }) => {
159
- return (_jsxs("div", { className: b('filters'), children: [_jsx("div", { className: b('filter-wrapper'), children: _jsx(Select, { multiple: true, label: "Node ID", width: TabletsFilters.CONTROL_WIDTH, popupWidth: TabletsFilters.POPUP_WIDTH, placeholder: "All", options: nodesForSelect, value: nodeFilter, onUpdate: onChangeNodes, renderOption: (option) => {
160
- return (_jsxs("div", { className: b('node'), children: [_jsx("div", { children: option.content }), _jsx("div", { className: b('node-meta'), title: option.meta, children: option.meta })] }));
161
- }, getOptionHeight: () => 40 }) }), _jsx("div", { className: b('filter-wrapper'), children: _jsx(Select, { multiple: true, label: "multiple", width: TabletsFilters.CONTROL_WIDTH, placeholder: "All", options: states, value: stateFilter, onUpdate: onChangeStates }) }), _jsx("div", { className: b('filter-wrapper'), children: _jsx(Select, { multiple: true, label: "Types", width: TabletsFilters.CONTROL_WIDTH, placeholder: "All", options: types, value: typeFilter, onUpdate: onChangeTypes }) })] }));
162
- };
163
- Filters.propTypes = {
164
- nodesForSelect: PropTypes.array,
165
- nodeFilter: PropTypes.array,
166
- onChangeNodes: PropTypes.func,
167
- states: PropTypes.array,
168
- stateFilter: PropTypes.array,
169
- onChangeStates: PropTypes.func,
170
- types: PropTypes.array,
171
- typeFilter: PropTypes.array,
172
- onChangeTypes: PropTypes.func,
173
- };
174
- const MemoizedFilters = React.memo(Filters, (prevProps, nextProps) => {
175
- return (isEqual(prevProps.nodeFilter, nextProps.nodeFilter) &&
176
- isEqual(prevProps.stateFilter, nextProps.stateFilter) &&
177
- isEqual(prevProps.typeFilter, nextProps.typeFilter));
178
- });
179
- const mapStateToProps = (state) => {
180
- const { nodes, wasLoaded, loading, timeoutForRequest, stateFilter, typeFilter, error } = state.tabletsFilters;
181
- return {
182
- tablets: getTablets(state),
183
- filteredTablets: getFilteredTablets(state),
184
- nodes,
185
- timeoutForRequest,
186
- wasLoaded,
187
- loading,
188
- stateFilter,
189
- typeFilter,
190
- error,
82
+ return (_jsxs("div", { className: b(), children: [path ? (_jsxs("div", { className: b('tenant'), children: [_jsx("span", { className: b('label'), children: "Database: " }), " ", path] })) : null, _jsx(Filters, { nodesForSelect: nodesForSelect, nodeFilter: nodeIds, onChangeNodes: (n) => setParams({ nodeIds: n }), states: states, stateFilter: stateFilter, onChangeStates: (s) => setParams({ state: s }), types: types, typeFilter: typeFilter, onChangeTypes: (t) => setParams({ type: t }) }), error ? _jsx(ResponseError, { error: error }) : null, filteredTablets.length > 0 ? (_jsx("div", { className: b('items'), children: _jsx(ReactList, { itemRenderer: renderTablet, length: filteredTablets.length, type: "uniform" }) })) : (!error && _jsx("div", { className: b('empty-message'), children: "no tablets" }))] }));
191
83
  };
192
- };
193
- const mapDispatchToProps = {
194
- getTabletsInfo,
195
- clearWasLoadingFlag,
196
- setStateFilter,
197
- setTypeFilter,
198
- setHeaderBreadcrumbs,
199
- };
200
- export default connect(mapStateToProps, mapDispatchToProps)(TabletsFilters);
84
+ return (_jsxs(React.Fragment, { children: [_jsx(Helmet, { children: _jsx("title", { children: `${i18n('page.title')} — ${path || params.clusterName || CLUSTER_DEFAULT_TITLE}` }) }), renderView()] }));
85
+ }
86
+ function Filters({ nodesForSelect, nodeFilter, onChangeNodes, states, stateFilter, onChangeStates, types, typeFilter, onChangeTypes, }) {
87
+ return (_jsxs("div", { className: b('filters'), children: [_jsx("div", { className: b('filter-wrapper'), children: _jsx(Select, { multiple: true, label: "Node ID", width: CONTROL_WIDTH, popupWidth: POPUP_WIDTH, placeholder: "All", options: nodesForSelect, value: nodeFilter, onUpdate: onChangeNodes, renderOption: (option) => {
88
+ return (_jsxs("div", { className: b('node'), children: [_jsx("div", { children: option.content }), _jsx("div", { className: b('node-meta'), title: option.data, children: option.data })] }));
89
+ }, getOptionHeight: () => 40 }) }), _jsx("div", { className: b('filter-wrapper'), children: _jsx(Select, { multiple: true, label: "multiple", width: CONTROL_WIDTH, placeholder: "All", options: states, value: stateFilter, onUpdate: onChangeStates }) }), _jsx("div", { className: b('filter-wrapper'), children: _jsx(Select, { multiple: true, label: "Types", width: CONTROL_WIDTH, placeholder: "All", options: types, value: typeFilter, onUpdate: onChangeTypes }) })] }));
90
+ }
@@ -1,2 +1,4 @@
1
1
  import './Acl.scss';
2
- export declare const Acl: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare const Acl: ({ path }: {
3
+ path: string;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -3,10 +3,9 @@ import React from 'react';
3
3
  import { ResponseError } from '../../../components/Errors/ResponseError';
4
4
  import { Loader } from '../../../components/Loader';
5
5
  import { ResizeableDataTable } from '../../../components/ResizeableDataTable/ResizeableDataTable';
6
- import { getSchemaAcl, setAclWasNotLoaded } from '../../../store/reducers/schemaAcl/schemaAcl';
6
+ import { schemaAclApi } from '../../../store/reducers/schemaAcl/schemaAcl';
7
7
  import { cn } from '../../../utils/cn';
8
8
  import { DEFAULT_TABLE_SETTINGS } from '../../../utils/constants';
9
- import { useTypedDispatch, useTypedSelector } from '../../../utils/hooks';
10
9
  import i18n from '../i18n';
11
10
  import './Acl.scss';
12
11
  const b = cn('ydb-acl');
@@ -57,19 +56,10 @@ const columns = [
57
56
  sortable: false,
58
57
  },
59
58
  ];
60
- export const Acl = () => {
61
- const dispatch = useTypedDispatch();
62
- const { currentSchemaPath } = useTypedSelector((state) => state.schema);
63
- const { loading, error, acl, owner, wasLoaded } = useTypedSelector((state) => state.schemaAcl);
64
- React.useEffect(() => {
65
- if (currentSchemaPath) {
66
- dispatch(getSchemaAcl({ path: currentSchemaPath }));
67
- }
68
- return () => {
69
- // Ensures correct acl on path change
70
- dispatch(setAclWasNotLoaded());
71
- };
72
- }, [currentSchemaPath, dispatch]);
59
+ export const Acl = ({ path }) => {
60
+ const { currentData, isFetching, error } = schemaAclApi.useGetSchemaAclQuery({ path });
61
+ const loading = isFetching && !currentData;
62
+ const { acl, owner } = currentData || {};
73
63
  const renderTable = () => {
74
64
  if (!acl || !acl.length) {
75
65
  return null;
@@ -82,13 +72,13 @@ export const Acl = () => {
82
72
  }
83
73
  return (_jsxs("div", { className: b('owner-container'), children: [_jsx("span", { className: b('owner-label'), children: `${i18n('acl.owner')}: ` }), prepareLogin(owner)] }));
84
74
  };
85
- if (loading && !wasLoaded) {
75
+ if (loading) {
86
76
  return _jsx(Loader, {});
87
77
  }
88
78
  if (error) {
89
79
  return _jsx(ResponseError, { error: error });
90
80
  }
91
- if (!loading && !acl && !owner) {
81
+ if (!acl && !owner) {
92
82
  return _jsx(React.Fragment, { children: i18n('acl.empty') });
93
83
  }
94
84
  return (_jsx("div", { className: b(), children: _jsxs("div", { className: b('result'), children: [renderOwner(), renderTable()] }) }));
@@ -2,18 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ArrowsRotateLeft } from '@gravity-ui/icons';
3
3
  import { Button, Select } from '@gravity-ui/uikit';
4
4
  import { api } from '../../../../store/reducers/api';
5
- import { setAutorefreshInterval } from '../../../../store/reducers/schema/schema';
6
5
  import { cn } from '../../../../utils/cn';
7
- import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
6
+ import { useAutoRefreshInterval, useTypedDispatch } from '../../../../utils/hooks';
8
7
  import i18n from './i18n';
9
8
  import './AutorefreshControl.scss';
10
9
  const b = cn('autorefresh-control');
11
10
  export function AutorefreshControl({ className }) {
12
11
  const dispatch = useTypedDispatch();
13
- const autorefresh = useTypedSelector((state) => state.schema.autorefresh);
12
+ const [autoRefreshInterval, setAutoRefreshInterval] = useAutoRefreshInterval();
14
13
  return (_jsxs("div", { className: b(null, className), children: [_jsx(Button, { view: "flat", onClick: () => {
15
14
  dispatch(api.util.invalidateTags(['All']));
16
- }, extraProps: { 'aria-label': i18n('Refresh') }, children: _jsx(Button.Icon, { children: _jsx(ArrowsRotateLeft, {}) }) }), _jsxs(Select, { value: [String(autorefresh)], onUpdate: (v) => {
17
- dispatch(setAutorefreshInterval(Number(v)));
15
+ }, extraProps: { 'aria-label': i18n('Refresh') }, children: _jsx(Button.Icon, { children: _jsx(ArrowsRotateLeft, {}) }) }), _jsxs(Select, { value: [String(autoRefreshInterval)], onUpdate: (v) => {
16
+ setAutoRefreshInterval(Number(v));
18
17
  }, width: 85, children: [_jsx(Select.Option, { value: "0", children: i18n('None') }), _jsx(Select.Option, { value: "15000", children: i18n('15 sec') }), _jsx(Select.Option, { value: "60000", children: i18n('1 min') }), _jsx(Select.Option, { value: "120000", children: i18n('2 min') }), _jsx(Select.Option, { value: "300000", children: i18n('5 min') })] })] }));
19
18
  }
@@ -8,7 +8,7 @@ import { Search } from '../../../../components/Search';
8
8
  import { selectPreparedConsumersData, selectPreparedTopicStats, topicApi, } from '../../../../store/reducers/topic';
9
9
  import { cn } from '../../../../utils/cn';
10
10
  import { DEFAULT_TABLE_SETTINGS } from '../../../../utils/constants';
11
- import { useTypedSelector } from '../../../../utils/hooks';
11
+ import { useAutoRefreshInterval, useTypedSelector } from '../../../../utils/hooks';
12
12
  import { isCdcStreamEntityType } from '../../utils/schema';
13
13
  import { ConsumersTopicStats } from './TopicStats';
14
14
  import { CONSUMERS_COLUMNS_WIDTH_LS_KEY, columns } from './columns';
@@ -18,8 +18,8 @@ const b = cn('ydb-diagnostics-consumers');
18
18
  export const Consumers = ({ path, type }) => {
19
19
  const isCdcStream = isCdcStreamEntityType(type);
20
20
  const [searchValue, setSearchValue] = React.useState('');
21
- const { autorefresh } = useTypedSelector((state) => state.schema);
22
- const { currentData, isFetching, error } = topicApi.useGetTopicQuery({ path }, { pollingInterval: autorefresh });
21
+ const [autoRefreshInterval] = useAutoRefreshInterval();
22
+ const { currentData, isFetching, error } = topicApi.useGetTopicQuery({ path }, { pollingInterval: autoRefreshInterval });
23
23
  const loading = isFetching && currentData === undefined;
24
24
  const consumers = useTypedSelector((state) => selectPreparedConsumersData(state, path));
25
25
  const topic = useTypedSelector((state) => selectPreparedTopicStats(state, path));
@@ -2,8 +2,8 @@ import type { EPathType } from '../../../../types/api/schema';
2
2
  import './Describe.scss';
3
3
  import 'react-json-inspector/json-inspector.css';
4
4
  interface IDescribeProps {
5
- tenant: string;
5
+ path: string;
6
6
  type?: EPathType;
7
7
  }
8
- declare const Describe: ({ tenant, type }: IDescribeProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const Describe: ({ path, type }: IDescribeProps) => import("react/jsx-runtime").JSX.Element;
9
9
  export default Describe;
@@ -7,17 +7,16 @@ import { Loader } from '../../../../components/Loader';
7
7
  import { describeApi } from '../../../../store/reducers/describe';
8
8
  import { selectSchemaMergedChildrenPaths } from '../../../../store/reducers/schema/schema';
9
9
  import { cn } from '../../../../utils/cn';
10
- import { useTypedSelector } from '../../../../utils/hooks';
10
+ import { useAutoRefreshInterval, useTypedSelector } from '../../../../utils/hooks';
11
11
  import { isEntityWithMergedImplementation } from '../../utils/schema';
12
12
  import './Describe.scss';
13
13
  import 'react-json-inspector/json-inspector.css';
14
14
  const b = cn('kv-describe');
15
15
  const expandMap = new Map();
16
- const Describe = ({ tenant, type }) => {
17
- const { autorefresh, currentSchemaPath } = useTypedSelector((state) => state.schema);
16
+ const Describe = ({ path, type }) => {
17
+ const [autoRefreshInterval] = useAutoRefreshInterval();
18
18
  const isEntityWithMergedImpl = isEntityWithMergedImplementation(type);
19
- const mergedChildrenPaths = useTypedSelector((state) => selectSchemaMergedChildrenPaths(state, currentSchemaPath, type), shallowEqual);
20
- const path = currentSchemaPath || tenant;
19
+ const mergedChildrenPaths = useTypedSelector((state) => selectSchemaMergedChildrenPaths(state, path, type), shallowEqual);
21
20
  let paths = skipToken;
22
21
  if (!isEntityWithMergedImpl) {
23
22
  paths = [path];
@@ -26,7 +25,7 @@ const Describe = ({ tenant, type }) => {
26
25
  paths = [path, ...mergedChildrenPaths];
27
26
  }
28
27
  const { currentData, isFetching, error } = describeApi.useGetDescribeQuery(paths, {
29
- pollingInterval: autorefresh,
28
+ pollingInterval: autoRefreshInterval,
30
29
  });
31
30
  const loading = isFetching && currentData === undefined;
32
31
  const currentDescribe = currentData;
@@ -5,6 +5,7 @@ interface DetailedOverviewProps {
5
5
  type?: EPathType;
6
6
  className?: string;
7
7
  tenantName: string;
8
+ path: string;
8
9
  additionalTenantProps?: AdditionalTenantsProps;
9
10
  additionalNodesProps?: AdditionalNodesProps;
10
11
  }
@@ -1,17 +1,15 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useSelector } from 'react-redux';
3
2
  import { cn } from '../../../../utils/cn';
4
3
  import Overview from '../Overview/Overview';
5
4
  import { TenantOverview } from '../TenantOverview/TenantOverview';
6
5
  import './DetailedOverview.scss';
7
6
  const b = cn('kv-detailed-overview');
8
7
  function DetailedOverview(props) {
9
- const { type, tenantName, additionalTenantProps, additionalNodesProps } = props;
10
- const { currentSchemaPath } = useSelector((state) => state.schema);
8
+ const { type, tenantName, path, additionalTenantProps, additionalNodesProps } = props;
11
9
  const renderTenantOverview = () => {
12
10
  return (_jsx("div", { className: b('section'), children: _jsx(TenantOverview, { tenantName: tenantName, additionalTenantProps: additionalTenantProps, additionalNodesProps: additionalNodesProps }) }));
13
11
  };
14
- const isTenant = tenantName === currentSchemaPath;
15
- return (_jsx("div", { className: b(), children: isTenant ? renderTenantOverview() : _jsx(Overview, { type: type, tenantName: tenantName }) }));
12
+ const isTenant = tenantName === path;
13
+ return (_jsx("div", { className: b(), children: isTenant ? renderTenantOverview() : _jsx(Overview, { type: type, path: path }) }));
16
14
  }
17
15
  export default DetailedOverview;
@@ -3,6 +3,8 @@ import type { EPathType } from '../../../types/api/schema';
3
3
  import './Diagnostics.scss';
4
4
  interface DiagnosticsProps {
5
5
  type?: EPathType;
6
+ tenantName: string;
7
+ path: string;
6
8
  additionalTenantProps?: AdditionalTenantsProps;
7
9
  additionalNodesProps?: AdditionalNodesProps;
8
10
  }
@@ -4,7 +4,6 @@ import { Tabs } from '@gravity-ui/uikit';
4
4
  import { Helmet } from 'react-helmet-async';
5
5
  import { Link } from 'react-router-dom';
6
6
  import { StringParam, useQueryParams } from 'use-query-params';
7
- import { Loader } from '../../../components/Loader';
8
7
  import routes, { createHref } from '../../../routes';
9
8
  import { TENANT_DIAGNOSTICS_TABS_IDS } from '../../../store/reducers/tenant/constants';
10
9
  import { setDiagnosticsTab } from '../../../store/reducers/tenant/tenant';
@@ -32,83 +31,66 @@ const b = cn('kv-tenant-diagnostics');
32
31
  function Diagnostics(props) {
33
32
  const container = React.useRef(null);
34
33
  const dispatch = useTypedDispatch();
35
- const { currentSchemaPath, wasLoaded } = useTypedSelector((state) => state.schema);
36
34
  const { diagnosticsTab = TENANT_DIAGNOSTICS_TABS_IDS.overview } = useTypedSelector((state) => state.tenant);
37
35
  const [queryParams] = useQueryParams({
38
36
  name: StringParam,
37
+ schema: StringParam,
39
38
  backend: StringParam,
40
39
  clusterName: StringParam,
41
40
  });
42
- const { name: rootTenantName } = queryParams;
43
- const tenantName = isDatabaseEntityType(props.type) ? currentSchemaPath : rootTenantName;
44
- const isDatabase = isDatabaseEntityType(props.type) || currentSchemaPath === rootTenantName;
45
- const pages = React.useMemo(() => {
46
- if (isDatabase) {
47
- return DATABASE_PAGES;
48
- }
49
- return getPagesByType(props.type);
50
- }, [props.type, isDatabase]);
51
- const forwardToDiagnosticTab = (tab) => {
52
- dispatch(setDiagnosticsTab(tab));
53
- };
54
- const activeTab = React.useMemo(() => {
55
- if (wasLoaded) {
56
- let page = pages.find((el) => el.id === diagnosticsTab);
57
- if (!page) {
58
- page = pages[0];
59
- }
60
- if (page && page.id !== diagnosticsTab) {
61
- forwardToDiagnosticTab(page.id);
62
- }
63
- return page;
41
+ const tenantName = isDatabaseEntityType(props.type) ? props.path : props.tenantName;
42
+ const isDatabase = isDatabaseEntityType(props.type) || props.path === props.tenantName;
43
+ const pages = isDatabase ? DATABASE_PAGES : getPagesByType(props.type);
44
+ let activeTab = pages.find((el) => el.id === diagnosticsTab);
45
+ if (!activeTab) {
46
+ activeTab = pages[0];
47
+ }
48
+ React.useEffect(() => {
49
+ if (activeTab && activeTab.id !== diagnosticsTab) {
50
+ dispatch(setDiagnosticsTab(activeTab.id));
64
51
  }
65
- return undefined;
66
- }, [pages, diagnosticsTab, wasLoaded]);
52
+ }, [activeTab, diagnosticsTab, dispatch]);
67
53
  const renderTabContent = () => {
68
- const { type } = props;
69
- const tenantNameString = tenantName;
54
+ const { type, path } = props;
70
55
  switch (activeTab === null || activeTab === void 0 ? void 0 : activeTab.id) {
71
56
  case TENANT_DIAGNOSTICS_TABS_IDS.overview: {
72
- return (_jsx(DetailedOverview, { type: type, tenantName: tenantNameString, additionalTenantProps: props.additionalTenantProps, additionalNodesProps: props.additionalNodesProps }));
57
+ return (_jsx(DetailedOverview, { type: type, tenantName: tenantName, path: path, additionalTenantProps: props.additionalTenantProps, additionalNodesProps: props.additionalNodesProps }));
73
58
  }
74
59
  case TENANT_DIAGNOSTICS_TABS_IDS.schema: {
75
- return (_jsx(SchemaViewer, { path: currentSchemaPath, tenantName: tenantName, type: type, extended: true }));
60
+ return _jsx(SchemaViewer, { path: path, tenantName: tenantName, type: type, extended: true });
76
61
  }
77
62
  case TENANT_DIAGNOSTICS_TABS_IDS.topQueries: {
78
- return _jsx(TopQueries, { path: tenantNameString, type: type });
63
+ return _jsx(TopQueries, { tenantName: tenantName, type: type });
79
64
  }
80
65
  case TENANT_DIAGNOSTICS_TABS_IDS.topShards: {
81
- return _jsx(TopShards, { tenantPath: tenantNameString, type: type });
66
+ return _jsx(TopShards, { tenantName: tenantName, path: path, type: type });
82
67
  }
83
68
  case TENANT_DIAGNOSTICS_TABS_IDS.nodes: {
84
- return (_jsx(NodesWrapper, { path: currentSchemaPath, additionalNodesProps: props.additionalNodesProps, parentContainer: container.current }));
69
+ return (_jsx(NodesWrapper, { path: path, additionalNodesProps: props.additionalNodesProps, parentContainer: container.current }));
85
70
  }
86
71
  case TENANT_DIAGNOSTICS_TABS_IDS.tablets: {
87
- return _jsx(Tablets, { path: currentSchemaPath });
72
+ return _jsx(Tablets, { path: path });
88
73
  }
89
74
  case TENANT_DIAGNOSTICS_TABS_IDS.storage: {
90
- return (_jsx(StorageWrapper, { tenant: tenantNameString, parentContainer: container.current }));
75
+ return _jsx(StorageWrapper, { tenant: tenantName, parentContainer: container.current });
91
76
  }
92
77
  case TENANT_DIAGNOSTICS_TABS_IDS.network: {
93
- return _jsx(Network, { path: tenantNameString });
78
+ return _jsx(Network, { tenantName: tenantName });
94
79
  }
95
80
  case TENANT_DIAGNOSTICS_TABS_IDS.describe: {
96
- return _jsx(Describe, { tenant: tenantNameString, type: type });
81
+ return _jsx(Describe, { path: path, type: type });
97
82
  }
98
83
  case TENANT_DIAGNOSTICS_TABS_IDS.hotKeys: {
99
- // @ts-expect-error
100
- return _jsx(HotKeys, { path: currentSchemaPath });
84
+ return _jsx(HotKeys, { path: path });
101
85
  }
102
86
  case TENANT_DIAGNOSTICS_TABS_IDS.graph: {
103
- // @ts-expect-error
104
- return _jsx(Heatmap, { path: currentSchemaPath });
87
+ return _jsx(Heatmap, { path: path });
105
88
  }
106
89
  case TENANT_DIAGNOSTICS_TABS_IDS.consumers: {
107
- // @ts-expect-error
108
- return _jsx(Consumers, { path: currentSchemaPath, type: type });
90
+ return _jsx(Consumers, { path: path, type: type });
109
91
  }
110
92
  case TENANT_DIAGNOSTICS_TABS_IDS.partitions: {
111
- return _jsx(Partitions, { path: currentSchemaPath });
93
+ return _jsx(Partitions, { path: path });
112
94
  }
113
95
  default: {
114
96
  return _jsx("div", { children: "No data..." });
@@ -121,12 +103,6 @@ function Diagnostics(props) {
121
103
  return (_jsx(Link, { to: path, className: b('tab'), children: node }, id));
122
104
  }, allowNotSelected: true }), _jsx(AutorefreshControl, {})] }) }));
123
105
  };
124
- // Loader prevents incorrect loading of tabs
125
- // After tabs are initially loaded it is no longer needed
126
- // Thus there is no also "loading" check as in other parts of the project
127
- if (!wasLoaded) {
128
- return _jsx(Loader, { size: "l" });
129
- }
130
106
  return (_jsxs("div", { className: b(), ref: container, children: [activeTab ? (_jsx(Helmet, { children: _jsx("title", { children: activeTab.title }) })) : null, renderTabs(), _jsx("div", { className: b('page-wrapper'), children: renderTabContent() })] }));
131
107
  }
132
108
  export default Diagnostics;
@@ -6,7 +6,7 @@
6
6
  height: 100%;
7
7
 
8
8
  &__header-wrapper {
9
- padding: 13px 20px 16px;
9
+ padding: 0 20px 16px;
10
10
 
11
11
  background-color: var(--g-color-base-background);
12
12
  }