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,29 +1,25 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { NavigationTree } from 'ydb-ui-components';
4
- import { preloadSchemas, setCurrentSchemaPath } from '../../../../store/reducers/schema/schema';
4
+ import { schemaApi } from '../../../../store/reducers/schema/schema';
5
5
  import { useQueryModes, useTypedDispatch } from '../../../../utils/hooks';
6
6
  import { isChildlessPathType, mapPathTypeToNavigationTreeType } from '../../utils/schema';
7
7
  import { getActions } from '../../utils/schemaActions';
8
8
  import { getControls } from '../../utils/schemaControls';
9
9
  export function SchemaTree(props) {
10
- const { rootPath, rootName, rootType, currentPath } = props;
10
+ const { rootPath, rootName, rootType, currentPath, onActivePathUpdate } = props;
11
11
  const dispatch = useTypedDispatch();
12
12
  const [_, setQueryMode] = useQueryModes();
13
- const fetchPath = (path) => window.api
14
- .getSchema({ path }, { concurrentId: `NavigationTree.getSchema|${path}` })
15
- .then((data) => {
13
+ const fetchPath = async (path) => {
14
+ const promise = dispatch(schemaApi.endpoints.getSchema.initiate({ path }, { forceRefetch: true }));
15
+ const { data } = await promise;
16
+ promise.unsubscribe();
16
17
  if (!data) {
17
18
  throw new Error(`no describe data about path ${path}`);
18
19
  }
19
20
  const { PathDescription: { Children = [] } = {} } = data;
20
- const preloadedData = {
21
- [path]: data,
22
- };
23
21
  const childItems = Children.map((childData) => {
24
22
  const { Name = '', PathType, PathSubType } = childData;
25
- // not full data, but it contains PathType, which ensures seamless switch between nodes
26
- preloadedData[`${path}/${Name}`] = { PathDescription: { Self: childData } };
27
23
  return {
28
24
  name: Name,
29
25
  type: mapPathTypeToNavigationTreeType(PathType, PathSubType),
@@ -32,27 +28,23 @@ export function SchemaTree(props) {
32
28
  expandable: !isChildlessPathType(PathType, PathSubType),
33
29
  };
34
30
  });
35
- dispatch(preloadSchemas(preloadedData));
36
31
  return childItems;
37
- });
38
- const handleActivePathUpdate = (activePath) => {
39
- dispatch(setCurrentSchemaPath(activePath));
40
32
  };
41
33
  React.useEffect(() => {
42
34
  // if the cached path is not in the current tree, show root
43
35
  if (!(currentPath === null || currentPath === void 0 ? void 0 : currentPath.startsWith(rootPath))) {
44
- handleActivePathUpdate(rootPath);
36
+ onActivePathUpdate(rootPath);
45
37
  }
46
- }, []);
38
+ }, [currentPath, onActivePathUpdate, rootPath]);
47
39
  return (_jsx(NavigationTree, { rootState: {
48
40
  path: rootPath,
49
41
  name: rootName,
50
42
  type: mapPathTypeToNavigationTreeType(rootType),
51
43
  collapsed: false,
52
44
  }, fetchPath: fetchPath, getActions: getActions(dispatch, {
53
- setActivePath: handleActivePathUpdate,
45
+ setActivePath: onActivePathUpdate,
54
46
  setQueryMode,
55
47
  }), renderAdditionalNodeElements: getControls(dispatch, {
56
- setActivePath: handleActivePathUpdate,
57
- }), activePath: currentPath, onActivePathUpdate: handleActivePathUpdate, cache: false, virtualize: true }));
48
+ setActivePath: onActivePathUpdate,
49
+ }), activePath: currentPath, onActivePathUpdate: onActivePathUpdate, cache: false, virtualize: true }));
58
50
  }
@@ -2,8 +2,8 @@ import type { EPathType } from '../../../../types/api/schema';
2
2
  import './SchemaViewer.scss';
3
3
  interface SchemaViewerProps {
4
4
  type?: EPathType;
5
- path?: string;
6
- tenantName?: string | null;
5
+ path: string;
6
+ tenantName: string;
7
7
  extended?: boolean;
8
8
  }
9
9
  export declare const SchemaViewer: ({ type, path, tenantName, extended }: SchemaViewerProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,25 +4,30 @@ import DataTable from '@gravity-ui/react-data-table';
4
4
  import { skipToken } from '@reduxjs/toolkit/query';
5
5
  import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
6
6
  import { TableSkeleton } from '../../../../components/TableSkeleton/TableSkeleton';
7
+ import { schemaApi } from '../../../../store/reducers/schema/schema';
7
8
  import { viewSchemaApi } from '../../../../store/reducers/viewSchema/viewSchema';
8
9
  import { DEFAULT_TABLE_SETTINGS } from '../../../../utils/constants';
9
- import { useTypedSelector } from '../../../../utils/hooks';
10
10
  import { isColumnEntityType, isExternalTableType, isRowTableType, isViewType, } from '../../utils/schema';
11
11
  import { SCHEMA_COLUMNS_WIDTH_LS_KEY, SCHEMA_TABLE_COLUMS_IDS, getColumnTableColumns, getExternalTableColumns, getRowTableColumns, getViewColumns, } from './columns';
12
12
  import { prepareSchemaData, prepareViewSchema } from './prepareData';
13
13
  import { b } from './shared';
14
14
  import './SchemaViewer.scss';
15
15
  export const SchemaViewer = ({ type, path, tenantName, extended = false }) => {
16
- const { data: schemaData, loading } = useTypedSelector((state) => state.schema);
17
- const currentObjectData = path ? schemaData[path] : undefined;
18
- const viewSchemaRequestParams = isViewType(type) && path && tenantName ? { path, database: tenantName } : skipToken;
16
+ const { currentData: schemaData, isFetching } = schemaApi.endpoints.getSchema.useQueryState({
17
+ path,
18
+ });
19
+ const loading = isFetching && schemaData === undefined;
20
+ const viewSchemaRequestParams = isViewType(type) ? { path, database: tenantName } : skipToken;
19
21
  const { data: viewColumnsData, isLoading: isViewSchemaLoading } = viewSchemaApi.useGetViewSchemaQuery(viewSchemaRequestParams);
20
22
  const tableData = React.useMemo(() => {
21
23
  if (isViewType(type)) {
22
24
  return prepareViewSchema(viewColumnsData);
23
25
  }
24
- return prepareSchemaData(type, currentObjectData);
25
- }, [currentObjectData, type, viewColumnsData]);
26
+ return prepareSchemaData(type, schemaData);
27
+ }, [schemaData, type, viewColumnsData]);
28
+ const hasAutoIncrement = React.useMemo(() => {
29
+ return tableData.some((i) => i.autoIncrement);
30
+ }, [tableData]);
26
31
  const columns = React.useMemo(() => {
27
32
  if (isViewType(type)) {
28
33
  return getViewColumns();
@@ -34,10 +39,10 @@ export const SchemaViewer = ({ type, path, tenantName, extended = false }) => {
34
39
  return getColumnTableColumns();
35
40
  }
36
41
  if (isRowTableType(type)) {
37
- return getRowTableColumns(extended);
42
+ return getRowTableColumns(extended, hasAutoIncrement);
38
43
  }
39
44
  return [];
40
- }, [type, extended]);
45
+ }, [type, extended, hasAutoIncrement]);
41
46
  const renderContent = () => {
42
47
  if (loading || isViewSchemaLoading) {
43
48
  return _jsx(TableSkeleton, {});
@@ -6,6 +6,7 @@ export declare const SCHEMA_TABLE_COLUMS_IDS: {
6
6
  isKeyColumn: "isKeyColumn";
7
7
  type: "type";
8
8
  notNull: "notNull";
9
+ autoIncrement: "autoIncrement";
9
10
  familyName: "familyName";
10
11
  prefferedPoolKind: "prefferedPoolKind";
11
12
  columnCodec: "columnCodec";
@@ -13,4 +14,4 @@ export declare const SCHEMA_TABLE_COLUMS_IDS: {
13
14
  export declare function getViewColumns(): SchemaColumn[];
14
15
  export declare function getExternalTableColumns(): SchemaColumn[];
15
16
  export declare function getColumnTableColumns(): SchemaColumn[];
16
- export declare function getRowTableColumns(extended: boolean): SchemaColumn[];
17
+ export declare function getRowTableColumns(extended: boolean, hasAutoIncrement: boolean): SchemaColumn[];
@@ -11,6 +11,7 @@ export const SCHEMA_TABLE_COLUMS_IDS = {
11
11
  isKeyColumn: 'isKeyColumn',
12
12
  type: 'type',
13
13
  notNull: 'notNull',
14
+ autoIncrement: 'autoIncrement',
14
15
  familyName: 'familyName',
15
16
  prefferedPoolKind: 'prefferedPoolKind',
16
17
  columnCodec: 'columnCodec',
@@ -68,6 +69,21 @@ const notNullColumn = {
68
69
  return undefined;
69
70
  },
70
71
  };
72
+ const autoIncrementColumn = {
73
+ name: SCHEMA_TABLE_COLUMS_IDS.autoIncrement,
74
+ get header() {
75
+ return i18n('column-title.autoIncrement');
76
+ },
77
+ width: 100,
78
+ // Table should start with notNull columns on sort click
79
+ defaultOrder: DataTable.DESCENDING,
80
+ render: ({ row }) => {
81
+ if (row.autoIncrement) {
82
+ return '\u2713';
83
+ }
84
+ return undefined;
85
+ },
86
+ };
71
87
  const familyColumn = {
72
88
  name: SCHEMA_TABLE_COLUMS_IDS.familyName,
73
89
  get header() {
@@ -101,10 +117,13 @@ export function getExternalTableColumns() {
101
117
  export function getColumnTableColumns() {
102
118
  return [idColumn, keyColumn, nameColumn, typeColumn, notNullColumn];
103
119
  }
104
- export function getRowTableColumns(extended) {
120
+ export function getRowTableColumns(extended, hasAutoIncrement) {
105
121
  const rowTableColumns = [idColumn, keyColumn, nameColumn, typeColumn, notNullColumn];
106
122
  if (extended) {
107
- return rowTableColumns.concat(familyColumn, mediaColumn, compressionColumn);
123
+ rowTableColumns.push(familyColumn, mediaColumn, compressionColumn);
124
+ }
125
+ if (hasAutoIncrement) {
126
+ rowTableColumns.push(autoIncrementColumn);
108
127
  }
109
128
  return rowTableColumns;
110
129
  }
@@ -4,6 +4,7 @@
4
4
  "column-title.key": "Key",
5
5
  "column-title.type": "Type",
6
6
  "column-title.notNull": "NotNull",
7
+ "column-title.autoIncrement": "AutoIncrement",
7
8
  "column-title.family": "Family",
8
9
  "column-title.media": "Media",
9
10
  "column-title.compression": "Compression"
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "column-title.id" | "column-title.name" | "column-title.key" | "column-title.type" | "column-title.notNull" | "column-title.family" | "column-title.media" | "column-title.compression", params?: import("@gravity-ui/i18n").Params | undefined) => string;
1
+ declare const _default: (key: "column-title.id" | "column-title.name" | "column-title.key" | "column-title.type" | "column-title.notNull" | "column-title.autoIncrement" | "column-title.family" | "column-title.media" | "column-title.compression", params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
2
  export default _default;
@@ -31,7 +31,7 @@ function prepareRowTableSchema(data = {}) {
31
31
  const keyAccessorsMap = getKeyColumnsSortAccessorMap(KeyColumnIds);
32
32
  const preparedColumns = Columns === null || Columns === void 0 ? void 0 : Columns.map((column) => {
33
33
  var _a, _b;
34
- const { Id, Name, NotNull, Type, Family } = column;
34
+ const { Id, Name, NotNull, Type, Family, DefaultFromSequence } = column;
35
35
  const isKeyColumn = Boolean(KeyColumnIds === null || KeyColumnIds === void 0 ? void 0 : KeyColumnIds.find((keyColumnId) => keyColumnId === Id));
36
36
  // Values in keyAccessorsMap are always negative, so it will be 1 for not key columns
37
37
  const keyAccessor = Id && keyAccessorsMap[Id] ? keyAccessorsMap[Id] : 1;
@@ -47,6 +47,7 @@ function prepareRowTableSchema(data = {}) {
47
47
  keyAccessor,
48
48
  type: Type,
49
49
  notNull: NotNull,
50
+ autoIncrement: Boolean(DefaultFromSequence),
50
51
  familyName,
51
52
  prefferedPoolKind,
52
53
  columnCodec,
@@ -7,6 +7,7 @@ export interface SchemaData {
7
7
  keyAccessor?: number;
8
8
  type?: string;
9
9
  notNull?: boolean;
10
+ autoIncrement?: boolean;
10
11
  familyName?: string;
11
12
  prefferedPoolKind?: string;
12
13
  columnCodec?: string;
@@ -1,15 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import qs from 'qs';
4
3
  import { Helmet } from 'react-helmet-async';
5
- import { useLocation } from 'react-router';
4
+ import { StringParam, useQueryParams } from 'use-query-params';
6
5
  import { AccessDenied } from '../../components/Errors/403';
6
+ import { Loader } from '../../components/Loader';
7
7
  import SplitPane from '../../components/SplitPane';
8
8
  import { setHeaderBreadcrumbs } from '../../store/reducers/header/header';
9
- import { getSchema } from '../../store/reducers/schema/schema';
9
+ import { schemaApi } from '../../store/reducers/schema/schema';
10
10
  import { cn } from '../../utils/cn';
11
11
  import { DEFAULT_IS_TENANT_SUMMARY_COLLAPSED, DEFAULT_SIZE_TENANT_KEY } from '../../utils/constants';
12
- import { useTypedDispatch, useTypedSelector } from '../../utils/hooks';
12
+ import { useTypedDispatch } from '../../utils/hooks';
13
13
  import ObjectGeneral from './ObjectGeneral/ObjectGeneral';
14
14
  import { ObjectSummary } from './ObjectSummary/ObjectSummary';
15
15
  import i18n from './i18n';
@@ -27,25 +27,13 @@ const getTenantSummaryState = () => {
27
27
  function Tenant(props) {
28
28
  var _a;
29
29
  const [summaryVisibilityState, dispatchSummaryVisibilityAction] = React.useReducer(paneVisibilityToggleReducerCreator(DEFAULT_IS_TENANT_SUMMARY_COLLAPSED), undefined, getTenantSummaryState);
30
+ const [{ name: tenantName, schema }] = useQueryParams({ name: StringParam, schema: StringParam });
31
+ if (!tenantName) {
32
+ throw new Error('Tenant name is not defined');
33
+ }
30
34
  const previousTenant = React.useRef();
31
- const { currentSchemaPath, currentSchema: currentItem = {} } = useTypedSelector((state) => state.schema);
32
- const { PathType: preloadedPathType, PathSubType: preloadedPathSubType } = useTypedSelector((state) => {
33
- var _a, _b;
34
- return currentSchemaPath
35
- ? (_b = (_a = state.schema.data[currentSchemaPath]) === null || _a === void 0 ? void 0 : _a.PathDescription) === null || _b === void 0 ? void 0 : _b.Self
36
- : undefined;
37
- }) || {};
38
- const { PathType: currentPathType, PathSubType: currentPathSubType } = ((_a = currentItem.PathDescription) === null || _a === void 0 ? void 0 : _a.Self) || {};
39
- const { error: { status: schemaStatus = 200 } = {} } = useTypedSelector((state) => state.schema);
40
- const dispatch = useTypedDispatch();
41
- const location = useLocation();
42
- const queryParams = qs.parse(location.search, {
43
- ignoreQueryPrefix: true,
44
- });
45
- const { name } = queryParams;
46
- const tenantName = name;
47
35
  React.useEffect(() => {
48
- if (tenantName && typeof tenantName === 'string' && previousTenant.current !== tenantName) {
36
+ if (previousTenant.current !== tenantName) {
49
37
  const register = async () => {
50
38
  const { registerYQLCompletionItemProvider } = await import('../../utils/monaco/yql/yql.completionItemProvider');
51
39
  registerYQLCompletionItemProvider(tenantName);
@@ -54,20 +42,17 @@ function Tenant(props) {
54
42
  previousTenant.current = tenantName;
55
43
  }
56
44
  }, [tenantName]);
45
+ const dispatch = useTypedDispatch();
57
46
  React.useEffect(() => {
58
- dispatch(getSchema({ path: tenantName }));
59
- }, [tenantName, dispatch]);
60
- React.useEffect(() => {
61
- //TODO: should be refactored when move to @reduxjs/toolkit/query
62
- if (currentSchemaPath && currentSchemaPath !== tenantName) {
63
- dispatch(getSchema({ path: currentSchemaPath }));
64
- }
65
- }, [currentSchemaPath, dispatch, tenantName]);
66
- React.useEffect(() => {
67
- if (tenantName) {
68
- dispatch(setHeaderBreadcrumbs('tenant', { tenantName }));
69
- }
47
+ dispatch(setHeaderBreadcrumbs('tenant', { tenantName }));
70
48
  }, [tenantName, dispatch]);
49
+ const path = schema !== null && schema !== void 0 ? schema : tenantName;
50
+ const { currentData: currentItem, error, isLoading, } = schemaApi.useGetSchemaQuery({ path }, { refetchOnMountOrArgChange: true });
51
+ const { PathType: currentPathType, PathSubType: currentPathSubType } = ((_a = currentItem === null || currentItem === void 0 ? void 0 : currentItem.PathDescription) === null || _a === void 0 ? void 0 : _a.Self) || {};
52
+ let showBlockingError = false;
53
+ if (error && typeof error === 'object' && 'status' in error) {
54
+ showBlockingError = error.status === 403;
55
+ }
71
56
  const onCollapseSummaryHandler = () => {
72
57
  dispatchSummaryVisibilityAction(PaneVisibilityActionTypes.triggerCollapse);
73
58
  };
@@ -77,8 +62,7 @@ function Tenant(props) {
77
62
  const onSplitStartDragAdditional = () => {
78
63
  dispatchSummaryVisibilityAction(PaneVisibilityActionTypes.clear);
79
64
  };
80
- const showBlockingError = schemaStatus === 403;
81
- const title = currentSchemaPath || tenantName || i18n('page.title');
82
- return (_jsxs("div", { className: b(), children: [_jsx(Helmet, { defaultTitle: `${title} — YDB Monitoring`, titleTemplate: `%s — ${title} — YDB Monitoring` }), showBlockingError ? (_jsx(AccessDenied, {})) : (_jsxs(SplitPane, { defaultSizePaneKey: DEFAULT_SIZE_TENANT_KEY, defaultSizes: [25, 75], triggerCollapse: summaryVisibilityState.triggerCollapse, triggerExpand: summaryVisibilityState.triggerExpand, minSize: [36, 200], onSplitStartDragAdditional: onSplitStartDragAdditional, children: [_jsx(ObjectSummary, { type: preloadedPathType || currentPathType, subType: preloadedPathSubType || currentPathSubType, tenantName: tenantName, onCollapseSummary: onCollapseSummaryHandler, onExpandSummary: onExpandSummaryHandler, isCollapsed: summaryVisibilityState.collapsed }), _jsx(ObjectGeneral, { type: preloadedPathType || currentPathType, additionalTenantProps: props.additionalTenantProps, additionalNodesProps: props.additionalNodesProps, tenantName: tenantName })] }))] }));
65
+ const title = path || i18n('page.title');
66
+ return (_jsxs("div", { className: b(), children: [_jsx(Helmet, { defaultTitle: `${title} YDB Monitoring`, titleTemplate: `%s — ${title} — YDB Monitoring` }), showBlockingError ? (_jsx(AccessDenied, {})) : (_jsxs(SplitPane, { defaultSizePaneKey: DEFAULT_SIZE_TENANT_KEY, defaultSizes: [25, 75], triggerCollapse: summaryVisibilityState.triggerCollapse, triggerExpand: summaryVisibilityState.triggerExpand, minSize: [36, 200], onSplitStartDragAdditional: onSplitStartDragAdditional, children: [_jsx(ObjectSummary, { type: currentPathType, subType: currentPathSubType, tenantName: tenantName, path: path, onCollapseSummary: onCollapseSummaryHandler, onExpandSummary: onExpandSummaryHandler, isCollapsed: summaryVisibilityState.collapsed }), _jsx("div", { className: b('main'), children: isLoading ? (_jsx(Loader, { size: "l" })) : (_jsx(ObjectGeneral, { type: currentPathType, additionalTenantProps: props.additionalTenantProps, additionalNodesProps: props.additionalNodesProps, tenantName: tenantName, path: path })) })] }))] }));
83
67
  }
84
68
  export default Tenant;
@@ -5,4 +5,8 @@
5
5
 
6
6
  @include body-2-typography();
7
7
  @include flex-container();
8
+
9
+ &__main {
10
+ flex-grow: 1;
11
+ }
8
12
  }
@@ -0,0 +1,2 @@
1
+ import './TenantNavigation.scss';
2
+ export declare const TenantNavigation: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Icon, RadioButton } from '@gravity-ui/uikit';
3
+ import { cn } from '../../../utils/cn';
4
+ import { useTenantNavigation } from './useTenantNavigation';
5
+ import './TenantNavigation.scss';
6
+ const b = cn('ydb-tenant-navigation');
7
+ const transformItemToOption = ({ id, title, icon }) => {
8
+ const content = (_jsxs("span", { className: b('item'), children: [_jsx(Icon, { data: icon, size: 16, className: b('icon') }), _jsx("span", { className: b('text'), children: title })] }));
9
+ return { value: id, content };
10
+ };
11
+ export const TenantNavigation = () => {
12
+ const navigationItems = useTenantNavigation();
13
+ const handleUpdate = (value) => {
14
+ const nextItem = navigationItems.find((item) => item.id === value);
15
+ nextItem === null || nextItem === void 0 ? void 0 : nextItem.onForward();
16
+ };
17
+ const getCurrentItem = () => navigationItems.find((item) => item.current) || navigationItems[0];
18
+ return (_jsx("div", { className: b(), children: _jsx(RadioButton, { width: "auto", onUpdate: handleUpdate, size: "l", className: b('body'), defaultValue: getCurrentItem().id, options: navigationItems.map(transformItemToOption) }) }));
19
+ };
@@ -0,0 +1,18 @@
1
+ .ydb-tenant-navigation {
2
+ padding: 12px 16px 8px;
3
+
4
+ &__item {
5
+ display: flex;
6
+ align-items: center;
7
+ gap: 5px;
8
+ }
9
+
10
+ &__icon {
11
+ flex-shrink: 0;
12
+ }
13
+ &__text {
14
+ overflow: hidden;
15
+
16
+ text-overflow: ellipsis;
17
+ }
18
+ }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export declare function useTenantNavigation(): {
3
+ id: "query" | "diagnostics";
4
+ title: string;
5
+ icon: ((props: React.SVGProps<SVGSVGElement>) => React.JSX.Element) | ((props: React.SVGProps<SVGSVGElement>) => React.JSX.Element);
6
+ path: string;
7
+ current: boolean;
8
+ onForward: () => void;
9
+ }[];
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import { Pulse, Terminal } from '@gravity-ui/icons';
3
+ import { useHistory, useLocation } from 'react-router';
4
+ import routes, { parseQuery } from '../../../routes';
5
+ import { TENANT_PAGE, TENANT_PAGES_IDS } from '../../../store/reducers/tenant/constants';
6
+ import { TENANT_INITIAL_PAGE_KEY } from '../../../utils/constants';
7
+ import { useSetting, useTypedSelector } from '../../../utils/hooks';
8
+ import { getTenantPath } from '../TenantPages';
9
+ import i18n from '../i18n';
10
+ const pagesList = ['query', 'diagnostics'];
11
+ const mapPageToIcon = {
12
+ query: Terminal,
13
+ diagnostics: Pulse,
14
+ };
15
+ export function useTenantNavigation() {
16
+ const history = useHistory();
17
+ const location = useLocation();
18
+ const queryParams = parseQuery(location);
19
+ const [, setInitialTenantPage] = useSetting(TENANT_INITIAL_PAGE_KEY);
20
+ const { tenantPage } = useTypedSelector((state) => state.tenant);
21
+ const menuItems = React.useMemo(() => {
22
+ if (location.pathname !== routes.tenant) {
23
+ return [];
24
+ }
25
+ const items = pagesList.map((key) => {
26
+ const pageId = TENANT_PAGES_IDS[key];
27
+ const pagePath = getTenantPath(Object.assign(Object.assign({}, queryParams), { [TENANT_PAGE]: pageId }));
28
+ const nextItem = {
29
+ id: pageId,
30
+ title: i18n(`pages.${key}`),
31
+ icon: mapPageToIcon[key],
32
+ path: pagePath,
33
+ current: tenantPage === pageId,
34
+ onForward: () => {
35
+ setInitialTenantPage(pageId);
36
+ history.push(pagePath);
37
+ },
38
+ };
39
+ return nextItem;
40
+ });
41
+ return items;
42
+ }, [tenantPage, setInitialTenantPage, location.pathname, history, queryParams]);
43
+ return menuItems;
44
+ }
@@ -1,10 +1,26 @@
1
1
  {
2
2
  "page.title": "Database",
3
+ "pages.query": "Query",
4
+ "pages.diagnostics": "Diagnostics",
3
5
  "acl.owner": "Owner",
4
6
  "acl.empty": "No Acl data",
5
7
  "summary.navigation": "Navigation",
6
8
  "summary.showPreview": "Show preview",
9
+ "summary.source-type": "Source Type",
10
+ "summary.data-source": "Data Source",
7
11
  "summary.copySchemaPath": "Copy schema path",
12
+ "summary.type": "Type",
13
+ "summary.subtype": "SubType",
14
+ "summary.id": "Id",
15
+ "summary.version": "Version",
16
+ "summary.created": "Created",
17
+ "summary.partitions": "Partitions count",
18
+ "summary.paths": "Paths",
19
+ "summary.shards": "Shards",
20
+ "summary.state": "State",
21
+ "summary.mode": "Mode",
22
+ "summary.format": "Format",
23
+ "summary.retention": "Retention",
8
24
  "actions.copied": "The path is copied to the clipboard",
9
25
  "actions.notCopied": "Couldn’t copy the path",
10
26
  "actions.copyPath": "Copy path",
@@ -12,6 +28,7 @@
12
28
  "actions.createTable": "Create table...",
13
29
  "actions.createExternalTable": "Create external table...",
14
30
  "actions.createTopic": "Create topic...",
31
+ "actions.createColumnTable": "Create column table...",
15
32
  "actions.createView": "Create view...",
16
33
  "actions.dropTable": "Drop table...",
17
34
  "actions.dropTopic": "Drop topic...",
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "page.title" | "acl.owner" | "acl.empty" | "summary.navigation" | "summary.showPreview" | "summary.copySchemaPath" | "actions.copied" | "actions.notCopied" | "actions.copyPath" | "actions.openPreview" | "actions.createTable" | "actions.createExternalTable" | "actions.createTopic" | "actions.createView" | "actions.dropTable" | "actions.dropTopic" | "actions.dropView" | "actions.alterTable" | "actions.alterTopic" | "actions.selectQuery" | "actions.upsertQuery", params?: import("@gravity-ui/i18n").Params | undefined) => string;
1
+ declare const _default: (key: "page.title" | "pages.query" | "pages.diagnostics" | "acl.owner" | "acl.empty" | "summary.navigation" | "summary.showPreview" | "summary.source-type" | "summary.data-source" | "summary.copySchemaPath" | "summary.type" | "summary.subtype" | "summary.id" | "summary.version" | "summary.created" | "summary.partitions" | "summary.paths" | "summary.shards" | "summary.state" | "summary.mode" | "summary.format" | "summary.retention" | "actions.copied" | "actions.notCopied" | "actions.copyPath" | "actions.openPreview" | "actions.createTable" | "actions.createExternalTable" | "actions.createTopic" | "actions.createColumnTable" | "actions.createView" | "actions.dropTable" | "actions.dropTopic" | "actions.dropView" | "actions.alterTable" | "actions.alterTopic" | "actions.selectQuery" | "actions.upsertQuery", params?: import("@gravity-ui/i18n").Params | undefined) => string;
2
2
  export default _default;
@@ -1,4 +1,5 @@
1
1
  export declare const createTableTemplate: (path: string) => string;
2
+ export declare const createColumnTableTemplate: (path: string) => string;
2
3
  export declare const alterTableTemplate: (path: string) => string;
3
4
  export declare const selectQueryTemplate: (path: string) => string;
4
5
  export declare const upsertQueryTemplate: (path: string) => string;
@@ -30,6 +30,18 @@ WITH (
30
30
  -- if some keys are missing in a table when making multiple single queries by the primary key.
31
31
  )`;
32
32
  };
33
+ export const createColumnTableTemplate = (path) => {
34
+ return `-- docs: https://ydb.tech/en/docs/yql/reference/syntax/create_table#olap-tables
35
+ CREATE TABLE \`${path}/ydb_column_table\` (
36
+ id Int64 NOT NULL,
37
+ author Text,
38
+ title Text,
39
+ body Text,
40
+ PRIMARY KEY (id)
41
+ )
42
+ PARTITION BY HASH(id)
43
+ WITH (STORE = COLUMN)`;
44
+ };
33
45
  export const alterTableTemplate = (path) => {
34
46
  return `ALTER TABLE \`${path}\`
35
47
  ADD COLUMN is_deleted Bool;`;
@@ -1,6 +1,6 @@
1
1
  import type { NavigationTreeNodeType } from 'ydb-ui-components';
2
2
  import { EPathSubType, EPathType } from '../../../types/api/schema';
3
- import { ETenantType } from '../../../types/api/tenant';
3
+ import type { ETenantType } from '../../../types/api/tenant';
4
4
  export declare const mapPathTypeToNavigationTreeType: (type?: EPathType, subType?: EPathSubType, defaultType?: NavigationTreeNodeType) => NavigationTreeNodeType;
5
5
  export declare const mapPathTypeToEntityName: (type?: EPathType, subType?: EPathSubType) => string | undefined;
6
6
  export declare const mapDatabaseTypeToDBName: (type?: ETenantType) => string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { EPathSubType, EPathType } from '../../../types/api/schema';
2
- import { ETenantType } from '../../../types/api/tenant';
3
2
  // this file contains verbose mappings that are typed in a way that ensures
4
3
  // correctness when a new node type or a new path type is added
5
4
  // TS will error if a new entity is added but not mapped here
@@ -52,11 +51,11 @@ const pathTypeToEntityName = {
52
51
  export const mapPathTypeToEntityName = (type, subType) => (subType && pathSubTypeToEntityName[subType]) || (type && pathTypeToEntityName[type]);
53
52
  // ====================
54
53
  const databaseTypeToDBName = {
55
- [ETenantType.UnknownTenantType]: 'Database',
56
- [ETenantType.Domain]: 'Cluster Root',
57
- [ETenantType.Dedicated]: 'Dedicated Database',
58
- [ETenantType.Shared]: 'Shared Database',
59
- [ETenantType.Serverless]: 'Serverless Database',
54
+ UnknownTenantType: 'Database',
55
+ Domain: 'Cluster Root',
56
+ Dedicated: 'Dedicated Database',
57
+ Shared: 'Shared Database',
58
+ Serverless: 'Serverless Database',
60
59
  };
61
60
  export const mapDatabaseTypeToDBName = (type) => type && databaseTypeToDBName[type];
62
61
  // ====================
@@ -4,7 +4,7 @@ import { TENANT_PAGES_IDS, TENANT_QUERY_TABS_ID } from '../../../store/reducers/
4
4
  import { setQueryTab, setTenantPage } from '../../../store/reducers/tenant/tenant';
5
5
  import createToast from '../../../utils/createToast';
6
6
  import i18n from '../i18n';
7
- import { alterTableTemplate, alterTopicTemplate, createExternalTableTemplate, createTableTemplate, createTopicTemplate, createViewTemplate, dropExternalTableTemplate, dropTopicTemplate, dropViewTemplate, selectQueryTemplate, upsertQueryTemplate, } from './queryTemplates';
7
+ import { alterTableTemplate, alterTopicTemplate, createColumnTableTemplate, createExternalTableTemplate, createTableTemplate, createTopicTemplate, createViewTemplate, dropExternalTableTemplate, dropTopicTemplate, dropViewTemplate, selectQueryTemplate, upsertQueryTemplate, } from './queryTemplates';
8
8
  const bindActions = (path, dispatch, additionalEffects) => {
9
9
  const { setActivePath, setQueryMode } = additionalEffects;
10
10
  const inputQuery = (tmpl, mode) => () => {
@@ -18,6 +18,7 @@ const bindActions = (path, dispatch, additionalEffects) => {
18
18
  };
19
19
  return {
20
20
  createTable: inputQuery(createTableTemplate, 'script'),
21
+ createColumnTable: inputQuery(createColumnTableTemplate, 'script'),
21
22
  alterTable: inputQuery(alterTableTemplate, 'script'),
22
23
  selectQuery: inputQuery(selectQueryTemplate),
23
24
  upsertQuery: inputQuery(upsertQueryTemplate),
@@ -55,6 +56,7 @@ export const getActions = (dispatch, additionalEffects) => (path, type) => {
55
56
  [copyItem],
56
57
  [
57
58
  { text: i18n('actions.createTable'), action: actions.createTable },
59
+ { text: i18n('actions.createColumnTable'), action: actions.createColumnTable },
58
60
  { text: i18n('actions.createTopic'), action: actions.createTopic },
59
61
  { text: i18n('actions.createView'), action: actions.createView },
60
62
  ],
package/dist/src/lib.d.ts CHANGED
@@ -6,11 +6,11 @@ export { default as appRoutes } from './routes';
6
6
  export { createApi, YdbEmbeddedAPI, YdbWebVersionAPI } from './services/api';
7
7
  export { settingsManager } from './services/settings';
8
8
  export { settings as userSettings } from './containers/UserSettings/settings';
9
- export { setUserSettings } from './store/reducers/settings/settings';
9
+ export { setSettingValue, getSettingValue } from './store/reducers/settings/settings';
10
10
  export { componentsRegistry } from './components/ComponentsProvider/componentsRegistry';
11
11
  export { useSetting, useTypedSelector } from './utils/hooks';
12
12
  export { getMonitoringLink, getMonitoringClusterLink } from './utils/monitoring';
13
- export { i18n, Lang } from './utils/i18n';
13
+ export { i18n, Lang, registerKeysets } from './utils/i18n';
14
14
  export { toaster } from './utils/createToast';
15
15
  export { cn } from './utils/cn';
16
16
  export * from './utils/constants';
@@ -19,3 +19,4 @@ export type { SettingsObject } from './services/settings';
19
19
  export type { YDBEmbeddedUISettings, SettingsPage, SettingsSection, } from './containers/UserSettings/settings';
20
20
  export type { SettingProps } from './containers/UserSettings/Setting';
21
21
  export type { AsideNavigationProps } from './containers/AsideNavigation/AsideNavigation';
22
+ export type { GetMonitoringLink, GetMonitoringClusterLink } from './utils/monitoring';
package/dist/src/lib.js CHANGED
@@ -6,11 +6,11 @@ export { default as appRoutes } from './routes';
6
6
  export { createApi, YdbEmbeddedAPI, YdbWebVersionAPI } from './services/api';
7
7
  export { settingsManager } from './services/settings';
8
8
  export { settings as userSettings } from './containers/UserSettings/settings';
9
- export { setUserSettings } from './store/reducers/settings/settings';
9
+ export { setSettingValue, getSettingValue } from './store/reducers/settings/settings';
10
10
  export { componentsRegistry } from './components/ComponentsProvider/componentsRegistry';
11
11
  export { useSetting, useTypedSelector } from './utils/hooks';
12
12
  export { getMonitoringLink, getMonitoringClusterLink } from './utils/monitoring';
13
- export { i18n, Lang } from './utils/i18n';
13
+ export { i18n, Lang, registerKeysets } from './utils/i18n';
14
14
  export { toaster } from './utils/createToast';
15
15
  export { cn } from './utils/cn';
16
16
  export * from './utils/constants';
@@ -20,7 +20,7 @@ declare const routes: {
20
20
  };
21
21
  export default routes;
22
22
  export declare const parseQuery: (location: Location) => qs.ParsedQs;
23
- export type Query = Record<string | number, string | number | string[] | number[] | undefined | null>;
23
+ export type Query = AnyRecord;
24
24
  export declare function createHref(route: string, params?: Record<string, string | number>, query?: Query): string;
25
25
  export declare const createExternalUILink: (query?: {}) => string;
26
26
  export declare function getLocationObjectFromHref(href: string): {
@@ -50,7 +50,9 @@ export function createHref(route, params, query = {}) {
50
50
  if (clusterName && !isClusterNameInQuery && webVersion) {
51
51
  extendedQuery = Object.assign(Object.assign({}, extendedQuery), { clusterName });
52
52
  }
53
- const search = isEmpty(extendedQuery) ? '' : `?${qs.stringify(extendedQuery, { encode: false })}`;
53
+ const search = isEmpty(extendedQuery)
54
+ ? ''
55
+ : `?${qs.stringify(extendedQuery, { encode: false, arrayFormat: 'repeat' })}`;
54
56
  const preparedRoute = prepareRoute(route);
55
57
  return `${compile(preparedRoute)(params)}${search}`;
56
58
  }