ydb-embedded-ui 6.11.0 → 6.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (405) hide show
  1. package/dist/components/AutoRefreshControl/i18n/index.d.ts +1 -1
  2. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +3 -2
  3. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +9 -5
  4. package/dist/components/CriticalActionDialog/CriticalActionDialog.d.ts +5 -3
  5. package/dist/components/CriticalActionDialog/CriticalActionDialog.js +8 -7
  6. package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +1 -1
  7. package/dist/components/CriticalActionDialog/i18n/en.json +1 -0
  8. package/dist/components/CriticalActionDialog/i18n/index.d.ts +1 -1
  9. package/dist/components/DateRange/DateRange.d.ts +4 -4
  10. package/dist/components/DateRange/DateRange.js +23 -26
  11. package/dist/components/DateRange/DateRange.scss +14 -13
  12. package/dist/components/DateRange/__test__/fromDateRangeValues.test.js +80 -0
  13. package/dist/components/DateRange/__test__/getdatePickerSize.test.d.ts +1 -0
  14. package/dist/components/DateRange/__test__/getdatePickerSize.test.js +56 -0
  15. package/dist/components/DateRange/__test__/toDateRangeValues.test.d.ts +1 -0
  16. package/dist/components/DateRange/__test__/toDateRangeValues.test.js +80 -0
  17. package/dist/components/DateRange/i18n/en.json +4 -0
  18. package/dist/components/DateRange/i18n/index.d.ts +2 -0
  19. package/dist/components/DateRange/i18n/index.js +5 -0
  20. package/dist/components/DateRange/i18n/ru.json +4 -0
  21. package/dist/components/DateRange/utils.d.ts +5 -0
  22. package/dist/components/DateRange/utils.js +41 -0
  23. package/dist/components/DeveloperUILinkButton/DeveloperUILinkButton.d.ts +8 -0
  24. package/dist/components/{DeveloperUiLink/DeveloperUiLink.js → DeveloperUILinkButton/DeveloperUILinkButton.js} +3 -3
  25. package/dist/components/{DeveloperUiLink/DeveloperUiLink.scss → DeveloperUILinkButton/DeveloperUILinkButton.scss} +3 -2
  26. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.d.ts +6 -1
  27. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js +22 -12
  28. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +45 -45
  29. package/dist/components/EntityStatus/EntityStatus.js +1 -1
  30. package/dist/components/EntityStatus/EntityStatus.scss +6 -2
  31. package/dist/components/Errors/PageError/PageError.d.ts +11 -0
  32. package/dist/components/Errors/PageError/PageError.js +19 -0
  33. package/dist/components/Errors/i18n/en.json +2 -1
  34. package/dist/components/Errors/i18n/index.d.ts +1 -1
  35. package/dist/components/Errors/i18n/ru.json +2 -1
  36. package/dist/components/Fullscreen/Fullscreen.d.ts +1 -1
  37. package/dist/components/Fullscreen/Fullscreen.js +34 -27
  38. package/dist/components/Fullscreen/Fullscreen.scss +16 -8
  39. package/dist/components/Graph/Graph.d.ts +13 -0
  40. package/dist/components/Graph/Graph.js +41 -0
  41. package/dist/components/LabelWithPopover/LabelWithPopover.d.ts +4 -1
  42. package/dist/components/LabelWithPopover/LabelWithPopover.js +1 -1
  43. package/dist/components/Loader/Loader.d.ts +2 -1
  44. package/dist/components/Loader/Loader.js +6 -1
  45. package/dist/components/LoaderWrapper/LoaderWrapper.d.ts +10 -0
  46. package/dist/components/LoaderWrapper/LoaderWrapper.js +8 -0
  47. package/dist/components/MetricChart/reducer.d.ts +2 -2
  48. package/dist/components/MonacoEditor/MonacoEditor.js +0 -2
  49. package/dist/components/NodeHostWrapper/NodeHostWrapper.d.ts +0 -1
  50. package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -6
  51. package/dist/components/PDiskInfo/PDiskInfo.d.ts +8 -5
  52. package/dist/components/PDiskInfo/PDiskInfo.js +76 -26
  53. package/dist/components/PDiskInfo/PDiskInfo.scss +15 -1
  54. package/dist/components/PDiskInfo/i18n/en.json +11 -5
  55. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  56. package/dist/components/PDiskPopup/PDiskPopup.js +8 -2
  57. package/dist/components/ProgressViewer/ProgressViewer.js +3 -0
  58. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.js +13 -3
  59. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.scss +4 -0
  60. package/dist/components/QuerySettingsDescription/QuerySettingsDescription.d.ts +7 -0
  61. package/dist/components/QuerySettingsDescription/QuerySettingsDescription.js +8 -0
  62. package/dist/components/QuerySettingsDescription/QuerySettingsDescription.scss +8 -0
  63. package/dist/components/QuerySettingsDescription/index.d.ts +1 -0
  64. package/dist/components/QuerySettingsDescription/index.js +1 -0
  65. package/dist/components/VDisk/VDisk.js +3 -4
  66. package/dist/components/VDiskInfo/VDiskInfo.d.ts +4 -3
  67. package/dist/components/VDiskInfo/VDiskInfo.js +12 -5
  68. package/dist/components/VDiskInfo/VDiskInfo.scss +7 -1
  69. package/dist/components/VDiskInfo/i18n/en.json +2 -1
  70. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
  71. package/dist/containers/App/Content.js +15 -19
  72. package/dist/containers/AsideNavigation/AsideNavigation.js +2 -1
  73. package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js +4 -4
  74. package/dist/containers/Authentication/Authentication.js +8 -10
  75. package/dist/containers/Authentication/utils.d.ts +8 -0
  76. package/dist/containers/Authentication/utils.js +15 -0
  77. package/dist/containers/Cluster/Cluster.scss +1 -4
  78. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +6 -6
  79. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +1 -1
  80. package/dist/containers/Clusters/constants.d.ts +1 -1
  81. package/dist/containers/Heatmap/Heatmap.d.ts +2 -1
  82. package/dist/containers/Heatmap/Heatmap.js +7 -6
  83. package/dist/containers/Node/Node.js +5 -7
  84. package/dist/containers/Node/Node.scss +5 -4
  85. package/dist/containers/Node/NodeStructure/NodeStructure.js +4 -4
  86. package/dist/containers/Node/NodeStructure/NodeStructure.scss +4 -20
  87. package/dist/containers/Node/NodeStructure/Pdisk.js +3 -3
  88. package/dist/containers/Nodes/Nodes.js +6 -8
  89. package/dist/containers/Nodes/getNodesColumns.js +6 -21
  90. package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.d.ts +6 -0
  91. package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js +24 -0
  92. package/dist/containers/PDiskPage/PDiskPage.js +79 -30
  93. package/dist/containers/PDiskPage/PDiskPage.scss +8 -5
  94. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.d.ts +7 -0
  95. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js +93 -0
  96. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.scss +52 -0
  97. package/dist/containers/PDiskPage/PDiskSpaceDistribution/utils.d.ts +4 -0
  98. package/dist/containers/PDiskPage/PDiskSpaceDistribution/utils.js +9 -0
  99. package/dist/containers/PDiskPage/i18n/en.json +9 -1
  100. package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
  101. package/dist/containers/Storage/PDisk/PDisk.js +3 -4
  102. package/dist/containers/Storage/Storage.js +4 -6
  103. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +16 -6
  104. package/dist/containers/Tablet/Tablet.js +2 -2
  105. package/dist/containers/Tablet/TabletControls/TabletControls.js +2 -1
  106. package/dist/containers/Tablets/Tablets.js +14 -13
  107. package/dist/containers/Tenant/Acl/Acl.d.ts +2 -1
  108. package/dist/containers/Tenant/Acl/Acl.js +10 -8
  109. package/dist/containers/Tenant/Acl/Acl.scss +8 -8
  110. package/dist/containers/Tenant/Acl/i18n/en.json +6 -0
  111. package/dist/containers/Tenant/Acl/i18n/index.d.ts +2 -0
  112. package/dist/containers/Tenant/Acl/i18n/index.js +4 -0
  113. package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.js +2 -5
  114. package/dist/containers/Tenant/Diagnostics/Describe/Describe.d.ts +2 -1
  115. package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +14 -17
  116. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.js +1 -1
  117. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.scss +1 -0
  118. package/dist/containers/Tenant/Diagnostics/Diagnostics.js +3 -3
  119. package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +3 -1
  120. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.d.ts +2 -1
  121. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +3 -3
  122. package/dist/containers/Tenant/Diagnostics/Network/Network.js +8 -11
  123. package/dist/containers/Tenant/Diagnostics/Network/Network.scss +1 -0
  124. package/dist/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -2
  125. package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +8 -10
  126. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/en.json +14 -1
  127. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.d.ts +1 -1
  128. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.js +1 -2
  129. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo.js +36 -17
  130. package/dist/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.js +3 -4
  131. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +1 -4
  132. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +8 -5
  133. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +1 -1
  134. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.js +3 -3
  135. package/dist/containers/Tenant/Diagnostics/TenantOverview/getSectionTitle.d.ts +2 -1
  136. package/dist/containers/Tenant/Diagnostics/TenantOverview/getSectionTitle.js +2 -2
  137. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +3 -2
  138. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  139. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +6 -5
  140. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.d.ts +2 -2
  141. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js +14 -14
  142. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +7 -6
  143. package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.js +4 -4
  144. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +31 -18
  145. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.d.ts +2 -2
  146. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +56 -20
  147. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +10 -6
  148. package/dist/containers/Tenant/Query/ExecuteResult/i18n/en.json +7 -0
  149. package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +2 -0
  150. package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.js +4 -0
  151. package/dist/containers/Tenant/Query/ExecuteResult/utils.d.ts +18 -0
  152. package/dist/containers/Tenant/Query/ExecuteResult/utils.js +36 -0
  153. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.d.ts +23 -1
  154. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +56 -111
  155. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.scss +1 -30
  156. package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.d.ts +7 -0
  157. package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.js +18 -0
  158. package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.scss +8 -0
  159. package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.d.ts +8 -0
  160. package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.js +14 -0
  161. package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.scss +14 -0
  162. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/MetricsCell.d.ts +6 -0
  163. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/MetricsCell.js +11 -0
  164. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationCell.d.ts +13 -0
  165. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationCell.js +48 -0
  166. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationParams.d.ts +6 -0
  167. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationParams.js +66 -0
  168. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.d.ts +7 -0
  169. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.js +100 -0
  170. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.scss +128 -0
  171. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/types.d.ts +5 -0
  172. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/types.js +1 -0
  173. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/utils.d.ts +5 -0
  174. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/utils.js +59 -0
  175. package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.d.ts +8 -0
  176. package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.js +11 -0
  177. package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.scss +14 -0
  178. package/dist/containers/Tenant/Query/ExplainResult/i18n/en.json +8 -0
  179. package/dist/containers/Tenant/Query/ExplainResult/i18n/index.d.ts +2 -0
  180. package/dist/containers/Tenant/Query/ExplainResult/i18n/index.js +4 -0
  181. package/dist/containers/Tenant/Query/Preview/Preview.js +2 -3
  182. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +1 -19
  183. package/dist/containers/Tenant/Query/QueryDuration/QueryDuration.js +1 -1
  184. package/dist/containers/Tenant/Query/QueryDuration/QueryDuration.scss +11 -0
  185. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +1 -1
  186. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +96 -95
  187. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.d.ts +5 -6
  188. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +18 -47
  189. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.d.ts +2 -0
  190. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.js +5 -0
  191. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.d.ts +1 -0
  192. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.js +42 -0
  193. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.d.ts +5 -0
  194. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.js +19 -0
  195. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.d.ts +1 -0
  196. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.js +56 -0
  197. package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.d.ts +2 -0
  198. package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.js +12 -0
  199. package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.scss +3 -0
  200. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.d.ts +2 -0
  201. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js +35 -0
  202. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.scss +63 -0
  203. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.d.ts +15 -0
  204. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.js +14 -0
  205. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.scss +19 -0
  206. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +215 -0
  207. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +131 -0
  208. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/en.json +13 -0
  209. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.d.ts +2 -0
  210. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.js +5 -0
  211. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/ru.json +13 -0
  212. package/dist/containers/Tenant/Query/i18n/en.json +17 -1
  213. package/dist/containers/Tenant/Query/i18n/index.d.ts +1 -1
  214. package/dist/containers/Tenant/Schema/CreateDirectoryDialog/CreateDirectoryDialog.d.ts +3 -2
  215. package/dist/containers/Tenant/Schema/CreateDirectoryDialog/CreateDirectoryDialog.js +2 -2
  216. package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js +8 -8
  217. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +6 -3
  218. package/dist/containers/Tenant/Schema/SchemaViewer/columns.d.ts +2 -1
  219. package/dist/containers/Tenant/Schema/SchemaViewer/columns.js +13 -1
  220. package/dist/containers/Tenant/Schema/SchemaViewer/i18n/en.json +1 -0
  221. package/dist/containers/Tenant/Schema/SchemaViewer/i18n/index.d.ts +1 -1
  222. package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.js +3 -2
  223. package/dist/containers/Tenant/Schema/SchemaViewer/types.d.ts +1 -0
  224. package/dist/containers/Tenant/Tenant.js +4 -8
  225. package/dist/containers/Tenant/TenantPages.d.ts +12 -1
  226. package/dist/containers/Tenant/TenantPages.js +1 -1
  227. package/dist/containers/Tenant/i18n/en.json +2 -2
  228. package/dist/containers/Tenant/i18n/index.d.ts +1 -1
  229. package/dist/containers/Tenant/utils/schema.js +1 -1
  230. package/dist/containers/Tenant/utils/schemaActions.d.ts +2 -2
  231. package/dist/containers/Tenant/utils/schemaActions.js +2 -2
  232. package/dist/containers/Tenants/Tenants.js +5 -8
  233. package/dist/containers/Tenants/Tenants.scss +0 -4
  234. package/dist/containers/UserSettings/i18n/en.json +3 -3
  235. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  236. package/dist/containers/UserSettings/settings.d.ts +2 -2
  237. package/dist/containers/UserSettings/settings.js +18 -19
  238. package/dist/containers/VDiskPage/VDiskPage.js +27 -13
  239. package/dist/containers/VDiskPage/i18n/en.json +1 -0
  240. package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
  241. package/dist/routes.js +2 -2
  242. package/dist/services/api.d.ts +59 -28
  243. package/dist/services/api.js +74 -98
  244. package/dist/services/settings.d.ts +11 -3
  245. package/dist/services/settings.js +7 -5
  246. package/dist/store/configureStore.d.ts +7 -7
  247. package/dist/store/defaultStore.d.ts +3 -3
  248. package/dist/store/reducers/api.d.ts +1 -1
  249. package/dist/store/reducers/api.js +1 -1
  250. package/dist/store/reducers/authentication/authentication.d.ts +37 -24
  251. package/dist/store/reducers/authentication/authentication.js +77 -57
  252. package/dist/store/reducers/authentication/types.d.ts +0 -8
  253. package/dist/store/reducers/capabilities/capabilities.d.ts +106 -0
  254. package/dist/store/reducers/capabilities/capabilities.js +22 -0
  255. package/dist/store/reducers/capabilities/hooks.d.ts +2 -0
  256. package/dist/store/reducers/capabilities/hooks.js +13 -0
  257. package/dist/store/reducers/cluster/cluster.d.ts +2 -2
  258. package/dist/store/reducers/clusterNodes/clusterNodes.d.ts +2 -2
  259. package/dist/store/reducers/clusters/clusters.d.ts +2 -2
  260. package/dist/store/reducers/describe.d.ts +5 -2
  261. package/dist/store/reducers/describe.js +2 -2
  262. package/dist/store/reducers/executeQuery.d.ts +7 -14
  263. package/dist/store/reducers/executeQuery.js +19 -14
  264. package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +2 -2
  265. package/dist/store/reducers/executeTopQueries/executeTopQueries.js +19 -14
  266. package/dist/store/reducers/executeTopQueries/types.d.ts +2 -2
  267. package/dist/store/reducers/executeTopQueries/utils.js +11 -7
  268. package/dist/store/reducers/explainQuery/explainQuery.d.ts +5 -4
  269. package/dist/store/reducers/explainQuery/explainQuery.js +20 -5
  270. package/dist/store/reducers/explainQuery/types.d.ts +13 -1
  271. package/dist/store/reducers/explainQuery/utils.js +7 -2
  272. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +58 -58
  273. package/dist/store/reducers/heatmap.d.ts +2 -2
  274. package/dist/store/reducers/heatmap.js +3 -3
  275. package/dist/store/reducers/hotKeys/hotKeys.d.ts +3 -2
  276. package/dist/store/reducers/hotKeys/hotKeys.js +3 -3
  277. package/dist/store/reducers/index.d.ts +6 -6
  278. package/dist/store/reducers/network/network.d.ts +2 -2
  279. package/dist/store/reducers/network/network.js +1 -1
  280. package/dist/store/reducers/node/node.d.ts +3 -3
  281. package/dist/store/reducers/node/selectors.d.ts +1 -1
  282. package/dist/store/reducers/node/selectors.js +2 -2
  283. package/dist/store/reducers/nodes/nodes.d.ts +3 -3
  284. package/dist/store/reducers/nodesList.d.ts +3 -3
  285. package/dist/store/reducers/overview/overview.d.ts +5 -2
  286. package/dist/store/reducers/overview/overview.js +2 -2
  287. package/dist/store/reducers/partitions/partitions.d.ts +2 -2
  288. package/dist/store/reducers/pdisk/pdisk.d.ts +3 -3
  289. package/dist/store/reducers/pdisk/pdisk.js +15 -2
  290. package/dist/store/reducers/pdisk/types.d.ts +17 -1
  291. package/dist/store/reducers/pdisk/utils.d.ts +2 -2
  292. package/dist/store/reducers/pdisk/utils.js +68 -8
  293. package/dist/store/reducers/preview.d.ts +2 -2
  294. package/dist/store/reducers/preview.js +1 -1
  295. package/dist/store/reducers/queryActions/types.d.ts +1 -1
  296. package/dist/store/reducers/schema/schema.d.ts +28 -10
  297. package/dist/store/reducers/schema/schema.js +20 -14
  298. package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +4 -2
  299. package/dist/store/reducers/schemaAcl/schemaAcl.js +9 -3
  300. package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +2 -2
  301. package/dist/store/reducers/shardsWorkload/shardsWorkload.js +22 -6
  302. package/dist/store/reducers/shardsWorkload/types.d.ts +2 -2
  303. package/dist/store/reducers/storage/storage.d.ts +3 -3
  304. package/dist/store/reducers/tablet.d.ts +3 -3
  305. package/dist/store/reducers/tablets.d.ts +13 -13
  306. package/dist/store/reducers/tabletsFilters.d.ts +1 -1
  307. package/dist/store/reducers/tenant/tenant.d.ts +2 -2
  308. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +2 -2
  309. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js +1 -1
  310. package/dist/store/reducers/tenantOverview/topNodes/topNodes.d.ts +2 -2
  311. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +2 -2
  312. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +1 -1
  313. package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.d.ts +2 -2
  314. package/dist/store/reducers/tenants/selectors.d.ts +31 -30
  315. package/dist/store/reducers/tenants/selectors.js +8 -2
  316. package/dist/store/reducers/tenants/tenants.d.ts +2 -2
  317. package/dist/store/reducers/topic.d.ts +44 -44
  318. package/dist/store/reducers/vdisk/vdisk.d.ts +2 -2
  319. package/dist/store/reducers/vdisk/vdisk.js +1 -1
  320. package/dist/store/reducers/viewSchema/viewSchema.d.ts +2 -2
  321. package/dist/store/reducers/viewSchema/viewSchema.js +1 -1
  322. package/dist/store/state-url-mapping.d.ts +70 -0
  323. package/dist/store/state-url-mapping.js +1 -5
  324. package/dist/styles/mixins.scss +13 -0
  325. package/dist/types/api/acl.d.ts +1 -0
  326. package/dist/types/api/capabilities.d.ts +7 -0
  327. package/dist/types/api/capabilities.js +1 -0
  328. package/dist/types/api/modifyDisk.d.ts +8 -0
  329. package/dist/types/api/modifyDisk.js +1 -0
  330. package/dist/types/api/pdisk.d.ts +65 -2
  331. package/dist/types/api/query.d.ts +39 -3
  332. package/dist/types/api/query.js +9 -1
  333. package/dist/types/api/schema/shared.d.ts +8 -0
  334. package/dist/types/api/vdisk.d.ts +33 -2
  335. package/dist/types/common.d.ts +3 -0
  336. package/dist/types/store/heatmap.d.ts +1 -0
  337. package/dist/types/store/query.d.ts +11 -1
  338. package/dist/utils/__test__/prepareQueryExplain.test.d.ts +1 -0
  339. package/dist/utils/__test__/prepareQueryExplain.test.js +115 -0
  340. package/dist/utils/constants.d.ts +13 -3
  341. package/dist/utils/constants.js +15 -3
  342. package/dist/utils/dataFormatters/dataFormatters.d.ts +0 -5
  343. package/dist/utils/dataFormatters/dataFormatters.js +3 -12
  344. package/dist/utils/developerUI/developerUI.d.ts +1 -0
  345. package/dist/utils/developerUI/developerUI.js +3 -0
  346. package/dist/utils/disks/getPDiskType.d.ts +3 -3
  347. package/dist/utils/disks/helpers.d.ts +1 -0
  348. package/dist/utils/disks/helpers.js +3 -0
  349. package/dist/utils/disks/prepareDisks.d.ts +2 -2
  350. package/dist/utils/disks/prepareDisks.js +17 -22
  351. package/dist/utils/disks/types.d.ts +7 -5
  352. package/dist/utils/hooks/index.d.ts +2 -1
  353. package/dist/utils/hooks/index.js +2 -1
  354. package/dist/utils/hooks/useChangedQuerySettings.d.ts +10 -0
  355. package/dist/utils/hooks/useChangedQuerySettings.js +46 -0
  356. package/dist/utils/hooks/useDelayed.d.ts +1 -0
  357. package/dist/utils/hooks/useDelayed.js +13 -0
  358. package/dist/utils/hooks/useEventHandler.d.ts +6 -0
  359. package/dist/utils/hooks/useEventHandler.js +17 -0
  360. package/dist/utils/hooks/useLastQueryExecutionSettings.d.ts +2 -0
  361. package/dist/utils/hooks/useLastQueryExecutionSettings.js +5 -0
  362. package/dist/utils/hooks/useQueryExecutionSettings.d.ts +8 -0
  363. package/dist/utils/hooks/useQueryExecutionSettings.js +15 -0
  364. package/dist/utils/monaco/constats.d.ts +2 -0
  365. package/dist/utils/monaco/constats.js +2 -0
  366. package/dist/utils/monaco/yql/constants.d.ts +0 -1
  367. package/dist/utils/monaco/yql/constants.js +0 -1
  368. package/dist/utils/monaco/yql/yql.completionItemProvider.js +2 -2
  369. package/dist/utils/prepareQueryExplain.d.ts +3 -1
  370. package/dist/utils/prepareQueryExplain.js +54 -2
  371. package/dist/utils/query.d.ts +24 -1
  372. package/dist/utils/query.js +41 -0
  373. package/dist/utils/query.test.js +3 -0
  374. package/dist/utils/utils.d.ts +8 -7
  375. package/dist/utils/utils.js +23 -11
  376. package/package.json +8 -2
  377. package/dist/components/DeveloperUiLink/DeveloperUiLink.d.ts +0 -8
  378. package/dist/components/NodeHostWrapper/NodeHostWrapper.scss +0 -15
  379. package/dist/containers/Node/NodeStructure/Vdisk.d.ts +0 -6
  380. package/dist/containers/Node/NodeStructure/Vdisk.js +0 -13
  381. package/dist/containers/PDiskPage/PDiskGroups.d.ts +0 -9
  382. package/dist/containers/PDiskPage/PDiskGroups.js +0 -20
  383. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/ru.json +0 -5
  384. package/dist/containers/Tenant/Query/ExplainResult/utils.d.ts +0 -2
  385. package/dist/containers/Tenant/Query/ExplainResult/utils.js +0 -4
  386. package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.d.ts +0 -5
  387. package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.js +0 -38
  388. package/dist/store/utils.d.ts +0 -23
  389. package/dist/store/utils.js +0 -49
  390. package/dist/types/api/restartPDisk.d.ts +0 -4
  391. package/dist/utils/hooks/useQueryModes.d.ts +0 -2
  392. package/dist/utils/hooks/useQueryModes.js +0 -5
  393. package/dist/utils/monaco/index.d.ts +0 -1
  394. package/dist/utils/monaco/index.js +0 -6
  395. package/dist/utils/monaco/s-expression/constants.d.ts +0 -1
  396. package/dist/utils/monaco/s-expression/constants.js +0 -1
  397. package/dist/utils/monaco/s-expression/registerLanguage.d.ts +0 -1
  398. package/dist/utils/monaco/s-expression/registerLanguage.js +0 -59
  399. package/dist/utils/monaco/yql/registerLanguage.d.ts +0 -1
  400. package/dist/utils/monaco/yql/registerLanguage.js +0 -8
  401. package/dist/utils/monaco/yql/yql.d.ts +0 -7
  402. package/dist/utils/monaco/yql/yql.js +0 -180
  403. package/dist/utils/monaco/yql/yql.keywords.d.ts +0 -3
  404. package/dist/utils/monaco/yql/yql.keywords.js +0 -3
  405. /package/dist/{types/api/restartPDisk.js → components/DateRange/__test__/fromDateRangeValues.test.d.ts} +0 -0
@@ -1,9 +1,10 @@
1
1
  import './CreateDirectoryDialog.scss';
2
- interface SchemaTreeProps {
2
+ interface CreateDirectoryDialogProps {
3
3
  open: boolean;
4
4
  onClose: VoidFunction;
5
+ database: string;
5
6
  parentPath: string;
6
7
  onSuccess: (value: string) => void;
7
8
  }
8
- export declare function CreateDirectoryDialog({ open, onClose, parentPath, onSuccess }: SchemaTreeProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function CreateDirectoryDialog({ open, onClose, database, parentPath, onSuccess, }: CreateDirectoryDialogProps): import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -17,7 +17,7 @@ function validateRelativePath(value) {
17
17
  }
18
18
  return '';
19
19
  }
20
- export function CreateDirectoryDialog({ open, onClose, parentPath, onSuccess }) {
20
+ export function CreateDirectoryDialog({ open, onClose, database, parentPath, onSuccess, }) {
21
21
  const [validationError, setValidationError] = React.useState('');
22
22
  const [relativePath, setRelativePath] = React.useState('');
23
23
  const [create, response] = schemaApi.useCreateDirectoryMutation();
@@ -37,7 +37,7 @@ export function CreateDirectoryDialog({ open, onClose, parentPath, onSuccess })
37
37
  const handleSubmit = () => {
38
38
  const path = `${parentPath}/${relativePath}`;
39
39
  create({
40
- database: parentPath,
40
+ database,
41
41
  path,
42
42
  })
43
43
  .unwrap()
@@ -4,25 +4,25 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  // In this case we can store state of tree - uploaded entities, opened nodes, selected entity and so on
5
5
  import React from 'react';
6
6
  import { NavigationTree } from 'ydb-ui-components';
7
- import { USE_DIRECTORY_OPERATIONS } from '../../../../lib';
7
+ import { useCreateDirectoryFeatureAvailable } from '../../../../store/reducers/capabilities/hooks';
8
8
  import { schemaApi } from '../../../../store/reducers/schema/schema';
9
- import { useQueryModes, useSetting, useTypedDispatch } from '../../../../utils/hooks';
9
+ import { useQueryExecutionSettings, useTypedDispatch } from '../../../../utils/hooks';
10
10
  import { isChildlessPathType, mapPathTypeToNavigationTreeType } from '../../utils/schema';
11
11
  import { getActions } from '../../utils/schemaActions';
12
12
  import { getControls } from '../../utils/schemaControls';
13
13
  import { CreateDirectoryDialog } from '../CreateDirectoryDialog/CreateDirectoryDialog';
14
14
  export function SchemaTree(props) {
15
- const [useDirectoryActions] = useSetting(USE_DIRECTORY_OPERATIONS);
15
+ const createDirectoryFeatureAvailable = useCreateDirectoryFeatureAvailable();
16
16
  const { rootPath, rootName, rootType, currentPath, onActivePathUpdate } = props;
17
17
  const dispatch = useTypedDispatch();
18
- const [_, setQueryMode] = useQueryModes();
18
+ const [querySettings, setQueryExecutionSettings] = useQueryExecutionSettings();
19
19
  const [createDirectoryOpen, setCreateDirectoryOpen] = React.useState(false);
20
20
  const [parentPath, setParentPath] = React.useState('');
21
21
  const [schemaTreeKey, setSchemaTreeKey] = React.useState('');
22
22
  const fetchPath = async (path) => {
23
23
  let schemaData;
24
24
  do {
25
- const promise = dispatch(schemaApi.endpoints.getSchema.initiate({ path }, { forceRefetch: true }));
25
+ const promise = dispatch(schemaApi.endpoints.getSchema.initiate({ path, database: rootPath }, { forceRefetch: true }));
26
26
  const { data, originalArgs } = await promise;
27
27
  promise.unsubscribe();
28
28
  // Check if the result from the current request is received. rtk-query may skip the current request and
@@ -67,15 +67,15 @@ export function SchemaTree(props) {
67
67
  setParentPath(value);
68
68
  setCreateDirectoryOpen(true);
69
69
  };
70
- return (_jsxs(React.Fragment, { children: [_jsx(CreateDirectoryDialog, { onClose: handleCloseDialog, open: createDirectoryOpen, parentPath: parentPath, onSuccess: handleSuccessSubmit }), _jsx(NavigationTree, { rootState: {
70
+ return (_jsxs(React.Fragment, { children: [_jsx(CreateDirectoryDialog, { onClose: handleCloseDialog, open: createDirectoryOpen, database: rootPath, parentPath: parentPath, onSuccess: handleSuccessSubmit }), _jsx(NavigationTree, { rootState: {
71
71
  path: rootPath,
72
72
  name: rootName,
73
73
  type: mapPathTypeToNavigationTreeType(rootType),
74
74
  collapsed: false,
75
75
  }, fetchPath: fetchPath, getActions: getActions(dispatch, {
76
76
  setActivePath: onActivePathUpdate,
77
- setQueryMode,
78
- showCreateDirectoryDialog: useDirectoryActions
77
+ updateQueryExecutionSettings: (settings) => setQueryExecutionSettings({ ...querySettings, ...settings }),
78
+ showCreateDirectoryDialog: createDirectoryFeatureAvailable
79
79
  ? handleOpenCreateDirectoryDialog
80
80
  : undefined,
81
81
  }), renderAdditionalNodeElements: getControls(dispatch, {
@@ -13,7 +13,7 @@ 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, isLoading: loading } = useGetSchemaQuery({ path });
16
+ const { data: schemaData, isLoading: loading } = useGetSchemaQuery({ path, database: tenantName });
17
17
  const viewSchemaRequestParams = isViewType(type) ? { path, database: tenantName } : skipToken;
18
18
  const { data: viewColumnsData, isLoading: isViewSchemaLoading } = viewSchemaApi.useGetViewSchemaQuery(viewSchemaRequestParams);
19
19
  const tableData = React.useMemo(() => {
@@ -25,6 +25,9 @@ export const SchemaViewer = ({ type, path, tenantName, extended = false }) => {
25
25
  const hasAutoIncrement = React.useMemo(() => {
26
26
  return tableData.some((i) => i.autoIncrement);
27
27
  }, [tableData]);
28
+ const hasDefaultValue = React.useMemo(() => {
29
+ return tableData.some((i) => i.defaultValue);
30
+ }, [tableData]);
28
31
  const columns = React.useMemo(() => {
29
32
  if (isViewType(type)) {
30
33
  return getViewColumns();
@@ -36,10 +39,10 @@ export const SchemaViewer = ({ type, path, tenantName, extended = false }) => {
36
39
  return getColumnTableColumns();
37
40
  }
38
41
  if (isRowTableType(type)) {
39
- return getRowTableColumns(extended, hasAutoIncrement);
42
+ return getRowTableColumns(extended, hasAutoIncrement, hasDefaultValue);
40
43
  }
41
44
  return [];
42
- }, [type, extended, hasAutoIncrement]);
45
+ }, [type, extended, hasAutoIncrement, hasDefaultValue]);
43
46
  const renderContent = () => {
44
47
  if (loading || isViewSchemaLoading) {
45
48
  return _jsx(TableSkeleton, {});
@@ -7,6 +7,7 @@ export declare const SCHEMA_TABLE_COLUMS_IDS: {
7
7
  type: "type";
8
8
  notNull: "notNull";
9
9
  autoIncrement: "autoIncrement";
10
+ defaultValue: "defaultValue";
10
11
  familyName: "familyName";
11
12
  prefferedPoolKind: "prefferedPoolKind";
12
13
  columnCodec: "columnCodec";
@@ -14,4 +15,4 @@ export declare const SCHEMA_TABLE_COLUMS_IDS: {
14
15
  export declare function getViewColumns(): SchemaColumn[];
15
16
  export declare function getExternalTableColumns(): SchemaColumn[];
16
17
  export declare function getColumnTableColumns(): SchemaColumn[];
17
- export declare function getRowTableColumns(extended: boolean, hasAutoIncrement: boolean): SchemaColumn[];
18
+ export declare function getRowTableColumns(extended: boolean, hasAutoIncrement: boolean, hasDefaultValue: boolean): SchemaColumn[];
@@ -12,6 +12,7 @@ export const SCHEMA_TABLE_COLUMS_IDS = {
12
12
  type: 'type',
13
13
  notNull: 'notNull',
14
14
  autoIncrement: 'autoIncrement',
15
+ defaultValue: 'defaultValue',
15
16
  familyName: 'familyName',
16
17
  prefferedPoolKind: 'prefferedPoolKind',
17
18
  columnCodec: 'columnCodec',
@@ -84,6 +85,14 @@ const autoIncrementColumn = {
84
85
  return undefined;
85
86
  },
86
87
  };
88
+ const defaultValueColumn = {
89
+ name: SCHEMA_TABLE_COLUMS_IDS.defaultValue,
90
+ get header() {
91
+ return i18n('column-title.defaultValue');
92
+ },
93
+ width: 100,
94
+ render: ({ row }) => row.defaultValue,
95
+ };
87
96
  const familyColumn = {
88
97
  name: SCHEMA_TABLE_COLUMS_IDS.familyName,
89
98
  get header() {
@@ -117,8 +126,11 @@ export function getExternalTableColumns() {
117
126
  export function getColumnTableColumns() {
118
127
  return [idColumn, keyColumn, nameColumn, typeColumn, notNullColumn];
119
128
  }
120
- export function getRowTableColumns(extended, hasAutoIncrement) {
129
+ export function getRowTableColumns(extended, hasAutoIncrement, hasDefaultValue) {
121
130
  const rowTableColumns = [idColumn, keyColumn, nameColumn, typeColumn, notNullColumn];
131
+ if (hasDefaultValue) {
132
+ rowTableColumns.push(defaultValueColumn);
133
+ }
122
134
  if (extended) {
123
135
  rowTableColumns.push(familyColumn, mediaColumn, compressionColumn);
124
136
  }
@@ -5,6 +5,7 @@
5
5
  "column-title.type": "Type",
6
6
  "column-title.notNull": "NotNull",
7
7
  "column-title.autoIncrement": "AutoIncrement",
8
+ "column-title.defaultValue": "Default",
8
9
  "column-title.family": "Family",
9
10
  "column-title.media": "Media",
10
11
  "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.autoIncrement" | "column-title.family" | "column-title.media" | "column-title.compression", params?: import("@gravity-ui/i18n").Params) => 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.defaultValue" | "column-title.family" | "column-title.media" | "column-title.compression", params?: import("@gravity-ui/i18n").Params) => string;
2
2
  export default _default;
@@ -36,8 +36,8 @@ function prepareRowTableSchema(data = {}) {
36
36
  const { Columns, KeyColumnIds } = data;
37
37
  const keyAccessorsMap = getKeyColumnsSortAccessorMap(KeyColumnIds);
38
38
  const preparedColumns = Columns === null || Columns === void 0 ? void 0 : Columns.map((column) => {
39
- var _a, _b;
40
- const { Id, Name, NotNull, Type, Family, DefaultFromSequence } = column;
39
+ var _a, _b, _c;
40
+ const { Id, Name, NotNull, Type, Family, DefaultFromSequence, DefaultFromLiteral } = column;
41
41
  const isKeyColumn = Boolean(KeyColumnIds === null || KeyColumnIds === void 0 ? void 0 : KeyColumnIds.find((keyColumnId) => keyColumnId === Id));
42
42
  // Values in keyAccessorsMap are always negative, so it will be 1 for not key columns
43
43
  const keyAccessor = Id && keyAccessorsMap[Id] ? keyAccessorsMap[Id] : 1;
@@ -54,6 +54,7 @@ function prepareRowTableSchema(data = {}) {
54
54
  type: Type,
55
55
  notNull: NotNull,
56
56
  autoIncrement: Boolean(DefaultFromSequence),
57
+ defaultValue: (_c = DefaultFromLiteral === null || DefaultFromLiteral === void 0 ? void 0 : DefaultFromLiteral.value) === null || _c === void 0 ? void 0 : _c.text_value,
57
58
  familyName,
58
59
  prefferedPoolKind,
59
60
  columnCodec,
@@ -11,6 +11,7 @@ export interface SchemaData {
11
11
  familyName?: string;
12
12
  prefferedPoolKind?: string;
13
13
  columnCodec?: string;
14
+ defaultValue?: string;
14
15
  }
15
16
  export interface SchemaColumn extends Column<SchemaData> {
16
17
  name: keyof SchemaData;
@@ -2,8 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { Helmet } from 'react-helmet-async';
4
4
  import { StringParam, useQueryParams } from 'use-query-params';
5
- import { AccessDenied } from '../../components/Errors/403';
6
- import { Loader } from '../../components/Loader';
5
+ import { PageError, isAccessError } from '../../components/Errors/PageError/PageError';
7
6
  import SplitPane from '../../components/SplitPane';
8
7
  import { setHeaderBreadcrumbs } from '../../store/reducers/header/header';
9
8
  import { useGetSchemaQuery } from '../../store/reducers/schema/schema';
@@ -47,12 +46,9 @@ export function Tenant(props) {
47
46
  dispatch(setHeaderBreadcrumbs('tenant', { tenantName }));
48
47
  }, [tenantName, dispatch]);
49
48
  const path = schema !== null && schema !== void 0 ? schema : tenantName;
50
- const { data: currentItem, error, isLoading } = useGetSchemaQuery({ path });
49
+ const { data: currentItem, error } = useGetSchemaQuery({ path, database: tenantName });
51
50
  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
- }
51
+ const showBlockingError = isAccessError(error);
56
52
  const onCollapseSummaryHandler = () => {
57
53
  dispatchSummaryVisibilityAction(PaneVisibilityActionTypes.triggerCollapse);
58
54
  };
@@ -63,5 +59,5 @@ export function Tenant(props) {
63
59
  dispatchSummaryVisibilityAction(PaneVisibilityActionTypes.clear);
64
60
  };
65
61
  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 })) })] }))] }));
62
+ return (_jsxs("div", { className: b(), children: [_jsx(Helmet, { defaultTitle: `${title} — YDB Monitoring`, titleTemplate: `%s — ${title} — YDB Monitoring` }), _jsx(PageError, { error: showBlockingError ? error : undefined, children: _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: _jsx(ObjectGeneral, { type: currentPathType, additionalTenantProps: props.additionalTenantProps, additionalNodesProps: props.additionalNodesProps, tenantName: tenantName, path: path }) })] }) })] }));
67
63
  }
@@ -1,3 +1,13 @@
1
+ import type { paramSetup } from '../../store/state-url-mapping';
2
+ import type { ExtractType } from '../../types/common';
3
+ type TenantQueryParams = {
4
+ [K in keyof (typeof paramSetup)['/tenant']]?: ExtractType<(typeof paramSetup)['/tenant'][K]>;
5
+ };
6
+ type AdditionalQueryParams = {
7
+ name?: string;
8
+ backend?: string;
9
+ };
10
+ type TenantQuery = TenantQueryParams | AdditionalQueryParams;
1
11
  export declare const TenantTabsGroups: {
2
12
  readonly summaryTab: "summaryTab";
3
13
  readonly queryTab: "queryTab";
@@ -15,4 +25,5 @@ export declare const TENANT_SCHEMA_TAB: {
15
25
  id: "schema";
16
26
  title: string;
17
27
  }[];
18
- export declare const getTenantPath: (query?: {}) => string;
28
+ export declare const getTenantPath: (query: TenantQuery) => string;
29
+ export {};
@@ -22,6 +22,6 @@ export const TENANT_SCHEMA_TAB = [
22
22
  title: 'Schema',
23
23
  },
24
24
  ];
25
- export const getTenantPath = (query = {}) => {
25
+ export const getTenantPath = (query) => {
26
26
  return createHref(routes.tenant, undefined, query);
27
27
  };
@@ -2,8 +2,6 @@
2
2
  "page.title": "Database",
3
3
  "pages.query": "Query",
4
4
  "pages.diagnostics": "Diagnostics",
5
- "acl.owner": "Owner",
6
- "acl.empty": "No Acl data",
7
5
  "summary.navigation": "Navigation",
8
6
  "summary.showPreview": "Show preview",
9
7
  "summary.source-type": "Source Type",
@@ -14,6 +12,8 @@
14
12
  "summary.id": "Id",
15
13
  "summary.version": "Version",
16
14
  "summary.created": "Created",
15
+ "summary.data-size": "Data size",
16
+ "summary.row-count": "Row count",
17
17
  "summary.partitions": "Partitions count",
18
18
  "summary.paths": "Paths",
19
19
  "summary.shards": "Shards",
@@ -1,2 +1,2 @@
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" | "label.read-only" | "actions.copied" | "actions.notCopied" | "actions.copyPath" | "actions.openPreview" | "actions.createTable" | "actions.createExternalTable" | "actions.createTopic" | "actions.createColumnTable" | "actions.createAsyncReplication" | "actions.createView" | "actions.dropTable" | "actions.dropTopic" | "actions.dropView" | "actions.alterTable" | "actions.alterTopic" | "actions.selectQuery" | "actions.upsertQuery" | "actions.alterReplication" | "actions.dropReplication" | "actions.createDirectory" | "schema.tree.dialog.placeholder" | "schema.tree.dialog.invalid" | "schema.tree.dialog.whitespace" | "schema.tree.dialog.empty" | "schema.tree.dialog.header" | "schema.tree.dialog.description" | "schema.tree.dialog.buttonCancel" | "schema.tree.dialog.buttonApply", params?: import("@gravity-ui/i18n").Params) => string;
1
+ declare const _default: (key: "page.title" | "pages.query" | "pages.diagnostics" | "summary.navigation" | "summary.showPreview" | "summary.source-type" | "summary.data-source" | "summary.copySchemaPath" | "summary.type" | "summary.subtype" | "summary.id" | "summary.version" | "summary.created" | "summary.data-size" | "summary.row-count" | "summary.partitions" | "summary.paths" | "summary.shards" | "summary.state" | "summary.mode" | "summary.format" | "summary.retention" | "label.read-only" | "actions.copied" | "actions.notCopied" | "actions.copyPath" | "actions.openPreview" | "actions.createTable" | "actions.createExternalTable" | "actions.createTopic" | "actions.createColumnTable" | "actions.createAsyncReplication" | "actions.createView" | "actions.dropTable" | "actions.dropTopic" | "actions.dropView" | "actions.alterTable" | "actions.alterTopic" | "actions.selectQuery" | "actions.upsertQuery" | "actions.alterReplication" | "actions.dropReplication" | "actions.createDirectory" | "schema.tree.dialog.placeholder" | "schema.tree.dialog.invalid" | "schema.tree.dialog.whitespace" | "schema.tree.dialog.empty" | "schema.tree.dialog.header" | "schema.tree.dialog.description" | "schema.tree.dialog.buttonCancel" | "schema.tree.dialog.buttonApply", params?: import("@gravity-ui/i18n").Params) => string;
2
2
  export default _default;
@@ -40,7 +40,7 @@ const pathTypeToEntityName = {
40
40
  [EPathType.EPathTypeTable]: 'Table',
41
41
  [EPathType.EPathTypeTableIndex]: 'Secondary Index',
42
42
  [EPathType.EPathTypeColumnStore]: 'Tablestore',
43
- [EPathType.EPathTypeColumnTable]: 'Columntable',
43
+ [EPathType.EPathTypeColumnTable]: 'Column-oriented table',
44
44
  [EPathType.EPathTypeCdcStream]: 'Changefeed',
45
45
  [EPathType.EPathTypePersQueueGroup]: 'Topic',
46
46
  [EPathType.EPathTypeExternalDataSource]: 'External Data Source',
@@ -1,7 +1,7 @@
1
1
  import type { NavigationTreeNodeType } from 'ydb-ui-components';
2
- import type { QueryMode } from '../../../types/store/query';
2
+ import type { QuerySettings } from '../../../types/store/query';
3
3
  interface ActionsAdditionalEffects {
4
- setQueryMode: (mode: QueryMode) => void;
4
+ updateQueryExecutionSettings: (settings?: Partial<QuerySettings>) => void;
5
5
  setActivePath: (path: string) => void;
6
6
  showCreateDirectoryDialog?: (path: string) => void;
7
7
  }
@@ -6,10 +6,10 @@ import createToast from '../../../utils/createToast';
6
6
  import i18n from '../i18n';
7
7
  import { alterAsyncReplicationTemplate, alterTableTemplate, alterTopicTemplate, createAsyncReplicationTemplate, createColumnTableTemplate, createExternalTableTemplate, createTableTemplate, createTopicTemplate, createViewTemplate, dropAsyncReplicationTemplate, dropExternalTableTemplate, dropTopicTemplate, dropViewTemplate, selectQueryTemplate, upsertQueryTemplate, } from './queryTemplates';
8
8
  const bindActions = (path, dispatch, additionalEffects) => {
9
- const { setActivePath, setQueryMode, showCreateDirectoryDialog } = additionalEffects;
9
+ const { setActivePath, updateQueryExecutionSettings, showCreateDirectoryDialog } = additionalEffects;
10
10
  const inputQuery = (tmpl, mode) => () => {
11
11
  if (mode) {
12
- setQueryMode(mode);
12
+ updateQueryExecutionSettings({ queryMode: mode });
13
13
  }
14
14
  dispatch(changeUserInput({ input: tmpl(path) }));
15
15
  dispatch(setTenantPage(TENANT_PAGES_IDS.query));
@@ -18,7 +18,7 @@ import { selectFilteredTenants, selectTenantsSearchValue, } from '../../store/re
18
18
  import { setSearchValue, tenantsApi } from '../../store/reducers/tenants/tenants';
19
19
  import { cn } from '../../utils/cn';
20
20
  import { DEFAULT_TABLE_SETTINGS } from '../../utils/constants';
21
- import { formatBytesToGigabyte, formatCPU, formatNumber, } from '../../utils/dataFormatters/dataFormatters';
21
+ import { formatCPU, formatNumber, formatStorageValuesToGb, } from '../../utils/dataFormatters/dataFormatters';
22
22
  import { useAutoRefreshInterval, useTypedDispatch, useTypedSelector } from '../../utils/hooks';
23
23
  import { getTenantPath } from '../Tenant/TenantPages';
24
24
  import './Tenants.scss';
@@ -59,7 +59,7 @@ export const Tenants = ({ additionalTenantsProps }) => {
59
59
  return (_jsx(EntityStatus, { externalLink: isExternalLink, className: b('name'), name: row.Name || 'unknown database', withLeftTrim: true, status: row.Overall, hasClipboardButton: true, path: getTenantPath({
60
60
  name: row.Name,
61
61
  backend,
62
- }), additionalControls: _jsx("span", { className: b('monitoring-button'), children: (_a = additionalTenantsProps === null || additionalTenantsProps === void 0 ? void 0 : additionalTenantsProps.getMonitoringLink) === null || _a === void 0 ? void 0 : _a.call(additionalTenantsProps, row.Name, row.Type) }) }));
62
+ }), additionalControls: (_a = additionalTenantsProps === null || additionalTenantsProps === void 0 ? void 0 : additionalTenantsProps.getMonitoringLink) === null || _a === void 0 ? void 0 : _a.call(additionalTenantsProps, row.Name, row.Type) }));
63
63
  },
64
64
  width: 440,
65
65
  sortable: true,
@@ -110,7 +110,7 @@ export const Tenants = ({ additionalTenantsProps }) => {
110
110
  name: 'memory',
111
111
  header: 'Memory',
112
112
  width: 120,
113
- render: ({ row }) => (row.memory ? formatBytesToGigabyte(row.memory) : '—'),
113
+ render: ({ row }) => (row.memory ? formatStorageValuesToGb(row.memory) : '—'),
114
114
  align: DataTable.RIGHT,
115
115
  defaultOrder: DataTable.DESCENDING,
116
116
  },
@@ -118,7 +118,7 @@ export const Tenants = ({ additionalTenantsProps }) => {
118
118
  name: 'storage',
119
119
  header: 'Storage',
120
120
  width: 120,
121
- render: ({ row }) => (row.storage ? formatBytesToGigabyte(row.storage) : '—'),
121
+ render: ({ row }) => (row.storage ? formatStorageValuesToGb(row.storage) : '—'),
122
122
  align: DataTable.RIGHT,
123
123
  defaultOrder: DataTable.DESCENDING,
124
124
  },
@@ -165,8 +165,5 @@ export const Tenants = ({ additionalTenantsProps }) => {
165
165
  }
166
166
  return (_jsx(ResizeableDataTable, { columnsWidthLSKey: DATABASES_COLUMNS_WIDTH_LS_KEY, data: filteredTenants, columns: columns, settings: DEFAULT_TABLE_SETTINGS, emptyDataMessage: "No such tenants" }));
167
167
  };
168
- if (error) {
169
- return _jsx(ResponseError, { error: error });
170
- }
171
- return (_jsxs(TableWithControlsLayout, { children: [_jsx(TableWithControlsLayout.Controls, { children: renderControls() }), _jsx(TableWithControlsLayout.Table, { loading: loading, children: renderTable() })] }));
168
+ return (_jsxs(TableWithControlsLayout, { children: [_jsx(TableWithControlsLayout.Controls, { children: renderControls() }), error ? _jsx(ResponseError, { error: error }) : null, _jsx(TableWithControlsLayout.Table, { loading: loading, children: currentData ? renderTable() : null })] }));
172
169
  };
@@ -49,10 +49,6 @@
49
49
  display: block;
50
50
  }
51
51
 
52
- &__monitoring-button {
53
- margin-left: 4px;
54
- }
55
-
56
52
  &__name {
57
53
  overflow: hidden;
58
54
  }
@@ -25,11 +25,11 @@
25
25
  "settings.useNodesEndpoint.description": "Use /viewer/json/nodes endpoint for Nodes tab in diagnostics. It could return incorrect data on versions before 24-1",
26
26
  "settings.usePaginatedTables.title": "Use paginated tables",
27
27
  "settings.usePaginatedTables.description": " Use table with data load on scroll for Nodes and Storage tabs. It will increase performance, but could work unstable",
28
+ "settings.showDomainDatabase.title": "Show domain database",
29
+ "settings.enableTracingLevel.title": "Enable tracing level select",
30
+ "settings.enableTracingLevel.description": "Caution: Enabling this setting may break running of queries",
28
31
  "settings.queryUseMultiSchema.title": "Allow queries with multiple result sets",
29
32
  "settings.queryUseMultiSchema.description": "Use 'multi' schema for queries. It enables queries with multiple result sets. It returns nothing on versions 23-3 and older",
30
- "settings.useSeparateDisksPages.title": "Use separate PDisk and VDisk pages",
31
- "settings.useSeparateDisksPages.description": "Use separate pages instead of node structure tab",
32
- "settings.useDirectoryOperations.title": "Enable operations with directories",
33
33
  "settings.useClusterBalancerAsBackend.title": "Use cluster balancer as backend",
34
34
  "settings.useClusterBalancerAsBackend.description": "By default random cluster node is used as backend. It causes saved links to become invalid after some time, when node is restarted. Using balancer as backend fixes it",
35
35
  "settings.about.interfaceVersionInfoField.title": "Interface version"
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "page.general" | "section.appearance" | "page.experiments" | "section.experiments" | "page.editor" | "section.dev-setting" | "page.about" | "section.about" | "settings.editor.autocomplete.title" | "settings.editor.autocomplete.description" | "settings.editor.autocomplete-on-enter.title" | "settings.editor.autocomplete-on-enter.description" | "settings.theme.title" | "settings.theme.option-dark" | "settings.theme.option-light" | "settings.theme.option-system" | "settings.language.title" | "settings.language.option-russian" | "settings.language.option-english" | "settings.binaryDataInPlainTextDisplay.title" | "settings.binaryDataInPlainTextDisplay.description" | "settings.invertedDisks.title" | "settings.useNodesEndpoint.title" | "settings.useNodesEndpoint.description" | "settings.usePaginatedTables.title" | "settings.usePaginatedTables.description" | "settings.queryUseMultiSchema.title" | "settings.queryUseMultiSchema.description" | "settings.useSeparateDisksPages.title" | "settings.useSeparateDisksPages.description" | "settings.useDirectoryOperations.title" | "settings.useClusterBalancerAsBackend.title" | "settings.useClusterBalancerAsBackend.description" | "settings.about.interfaceVersionInfoField.title", params?: import("@gravity-ui/i18n").Params) => string;
1
+ declare const _default: (key: "page.general" | "section.appearance" | "page.experiments" | "section.experiments" | "page.editor" | "section.dev-setting" | "page.about" | "section.about" | "settings.editor.autocomplete.title" | "settings.editor.autocomplete.description" | "settings.editor.autocomplete-on-enter.title" | "settings.editor.autocomplete-on-enter.description" | "settings.theme.title" | "settings.theme.option-dark" | "settings.theme.option-light" | "settings.theme.option-system" | "settings.language.title" | "settings.language.option-russian" | "settings.language.option-english" | "settings.binaryDataInPlainTextDisplay.title" | "settings.binaryDataInPlainTextDisplay.description" | "settings.invertedDisks.title" | "settings.useNodesEndpoint.title" | "settings.useNodesEndpoint.description" | "settings.usePaginatedTables.title" | "settings.usePaginatedTables.description" | "settings.showDomainDatabase.title" | "settings.enableTracingLevel.title" | "settings.enableTracingLevel.description" | "settings.queryUseMultiSchema.title" | "settings.queryUseMultiSchema.description" | "settings.useClusterBalancerAsBackend.title" | "settings.useClusterBalancerAsBackend.description" | "settings.about.interfaceVersionInfoField.title", params?: import("@gravity-ui/i18n").Params) => string;
2
2
  export default _default;
@@ -18,9 +18,9 @@ export declare const binaryDataInPlainTextDisplay: SettingProps;
18
18
  export declare const invertedDisksSetting: SettingProps;
19
19
  export declare const useNodesEndpointSetting: SettingProps;
20
20
  export declare const usePaginatedTables: SettingProps;
21
+ export declare const showDomainDatabase: SettingProps;
22
+ export declare const enableTracingLevel: SettingProps;
21
23
  export declare const queryUseMultiSchemaSetting: SettingProps;
22
- export declare const useSeparateDisksPagesSetting: SettingProps;
23
- export declare const useDirectoryActionsSetting: SettingProps;
24
24
  export declare const useClusterBalancerAsBackendSetting: SettingProps;
25
25
  export declare const enableAutocompleteSetting: SettingProps;
26
26
  export declare const autocompleteOnEnterSetting: SettingProps;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { CircleInfo, Flask, PencilToSquare, StarFill } from '@gravity-ui/icons';
3
3
  import { createNextState } from '@reduxjs/toolkit';
4
- import { AUTOCOMPLETE_ON_ENTER, BINARY_DATA_IN_PLAIN_TEXT_DISPLAY, ENABLE_AUTOCOMPLETE, INVERTED_DISKS_KEY, LANGUAGE_KEY, QUERY_USE_MULTI_SCHEMA_KEY, THEME_KEY, USE_CLUSTER_BALANCER_AS_BACKEND_KEY, USE_DIRECTORY_OPERATIONS, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY, USE_PAGINATED_TABLES_KEY, USE_SEPARATE_DISKS_PAGES_KEY, } from '../../utils/constants';
4
+ import { AUTOCOMPLETE_ON_ENTER, BINARY_DATA_IN_PLAIN_TEXT_DISPLAY, ENABLE_AUTOCOMPLETE, ENABLE_TRACING_LEVEL_KEY, INVERTED_DISKS_KEY, LANGUAGE_KEY, QUERY_USE_MULTI_SCHEMA_KEY, SHOW_DOMAIN_DATABASE_KEY, THEME_KEY, USE_CLUSTER_BALANCER_AS_BACKEND_KEY, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY, USE_PAGINATED_TABLES_KEY, } from '../../utils/constants';
5
5
  import { Lang, defaultLang } from '../../utils/i18n';
6
6
  import { ClusterModeGuard } from '../ClusterModeGuard';
7
7
  import i18n from './i18n';
@@ -65,20 +65,20 @@ export const usePaginatedTables = {
65
65
  title: i18n('settings.usePaginatedTables.title'),
66
66
  description: i18n('settings.usePaginatedTables.description'),
67
67
  };
68
+ export const showDomainDatabase = {
69
+ settingKey: SHOW_DOMAIN_DATABASE_KEY,
70
+ title: i18n('settings.showDomainDatabase.title'),
71
+ };
72
+ export const enableTracingLevel = {
73
+ settingKey: ENABLE_TRACING_LEVEL_KEY,
74
+ title: i18n('settings.enableTracingLevel.title'),
75
+ description: i18n('settings.enableTracingLevel.description'),
76
+ };
68
77
  export const queryUseMultiSchemaSetting = {
69
78
  settingKey: QUERY_USE_MULTI_SCHEMA_KEY,
70
79
  title: i18n('settings.queryUseMultiSchema.title'),
71
80
  description: i18n('settings.queryUseMultiSchema.description'),
72
81
  };
73
- export const useSeparateDisksPagesSetting = {
74
- settingKey: USE_SEPARATE_DISKS_PAGES_KEY,
75
- title: i18n('settings.useSeparateDisksPages.title'),
76
- description: i18n('settings.useSeparateDisksPages.description'),
77
- };
78
- export const useDirectoryActionsSetting = {
79
- settingKey: USE_DIRECTORY_OPERATIONS,
80
- title: i18n('settings.useDirectoryOperations.title'),
81
- };
82
82
  export const useClusterBalancerAsBackendSetting = {
83
83
  settingKey: USE_CLUSTER_BALANCER_AS_BACKEND_KEY,
84
84
  title: i18n('settings.useClusterBalancerAsBackend.title'),
@@ -102,23 +102,22 @@ export const interfaceVersionInfoField = {
102
102
  export const appearanceSection = {
103
103
  id: 'appearanceSection',
104
104
  title: i18n('section.appearance'),
105
- settings: [themeSetting, invertedDisksSetting, binaryDataInPlainTextDisplay],
105
+ settings: [
106
+ themeSetting,
107
+ invertedDisksSetting,
108
+ binaryDataInPlainTextDisplay,
109
+ showDomainDatabase,
110
+ ],
106
111
  };
107
112
  export const experimentsSection = {
108
113
  id: 'experimentsSection',
109
114
  title: i18n('section.experiments'),
110
- settings: [
111
- useNodesEndpointSetting,
112
- usePaginatedTables,
113
- queryUseMultiSchemaSetting,
114
- useSeparateDisksPagesSetting,
115
- useDirectoryActionsSetting,
116
- ],
115
+ settings: [useNodesEndpointSetting, usePaginatedTables, queryUseMultiSchemaSetting],
117
116
  };
118
117
  export const devSettingsSection = {
119
118
  id: 'devSettingsSection',
120
119
  title: i18n('section.dev-setting'),
121
- settings: [enableAutocompleteSetting, autocompleteOnEnterSetting],
120
+ settings: [enableAutocompleteSetting, autocompleteOnEnterSetting, enableTracingLevel],
122
121
  };
123
122
  export const aboutSettingsSection = {
124
123
  id: 'aboutSettingsSection',
@@ -8,11 +8,13 @@ import { StringParam, useQueryParams } from 'use-query-params';
8
8
  import { AutoRefreshControl } from '../../components/AutoRefreshControl/AutoRefreshControl';
9
9
  import { ButtonWithConfirmDialog } from '../../components/ButtonWithConfirmDialog/ButtonWithConfirmDialog';
10
10
  import { DiskPageTitle } from '../../components/DiskPageTitle/DiskPageTitle';
11
+ import { ResponseError } from '../../components/Errors/ResponseError';
11
12
  import { GroupInfo } from '../../components/GroupInfo/GroupInfo';
12
13
  import { InfoViewerSkeleton } from '../../components/InfoViewerSkeleton/InfoViewerSkeleton';
13
14
  import { PageMeta } from '../../components/PageMeta/PageMeta';
14
15
  import { VDiskWithDonorsStack } from '../../components/VDisk/VDiskWithDonorsStack';
15
16
  import { VDiskInfo } from '../../components/VDiskInfo/VDiskInfo';
17
+ import { selectIsUserAllowedToMakeChanges } from '../../store/reducers/authentication/authentication';
16
18
  import { setHeaderBreadcrumbs } from '../../store/reducers/header/header';
17
19
  import { selectNodesMap } from '../../store/reducers/nodesList';
18
20
  import { vDiskApi } from '../../store/reducers/vdisk/vdisk';
@@ -27,7 +29,7 @@ const vDiskPageCn = cn('ydb-vdisk-page');
27
29
  export function VDiskPage() {
28
30
  const dispatch = useTypedDispatch();
29
31
  const nodesMap = useTypedSelector(selectNodesMap);
30
- const { isUserAllowedToMakeChanges } = useTypedSelector((state) => state.authentication);
32
+ const isUserAllowedToMakeChanges = useTypedSelector(selectIsUserAllowedToMakeChanges);
31
33
  const [{ nodeId, pDiskId, vDiskSlotId }] = useQueryParams({
32
34
  nodeId: StringParam,
33
35
  pDiskId: StringParam,
@@ -40,25 +42,37 @@ export function VDiskPage() {
40
42
  const params = valueIsDefined(nodeId) && valueIsDefined(pDiskId) && valueIsDefined(vDiskSlotId)
41
43
  ? { nodeId, pDiskId, vDiskSlotId }
42
44
  : skipToken;
43
- const { currentData, isFetching, refetch } = vDiskApi.useGetVDiskDataQuery(params, {
45
+ const { currentData, isFetching, refetch, error } = vDiskApi.useGetVDiskDataQuery(params, {
44
46
  pollingInterval: autoRefreshInterval,
45
47
  });
46
48
  const loading = isFetching && currentData === undefined;
47
49
  const { vDiskData = {}, groupData } = currentData || {};
48
50
  const { NodeHost, NodeId, NodeType, NodeDC, PDiskId, PDiskType, Severity, VDiskId } = vDiskData;
49
- const handleEvictVDisk = async () => {
50
- const { GroupID, GroupGeneration, Ring, Domain, VDisk } = VDiskId || {};
51
- if (valueIsDefined(GroupID) &&
52
- valueIsDefined(GroupGeneration) &&
53
- valueIsDefined(Ring) &&
54
- valueIsDefined(Domain) &&
55
- valueIsDefined(VDisk)) {
56
- return window.api.evictVDisk({
51
+ const { GroupID, GroupGeneration, Ring, Domain, VDisk } = VDiskId || {};
52
+ const vDiskIdParamsDefined = valueIsDefined(GroupID) &&
53
+ valueIsDefined(GroupGeneration) &&
54
+ valueIsDefined(Ring) &&
55
+ valueIsDefined(Domain) &&
56
+ valueIsDefined(VDisk);
57
+ const handleEvictVDisk = async (isRetry) => {
58
+ if (vDiskIdParamsDefined) {
59
+ return window.api
60
+ .evictVDisk({
57
61
  groupId: GroupID,
58
62
  groupGeneration: GroupGeneration,
59
63
  failRealmIdx: Ring,
60
64
  failDomainIdx: Domain,
61
65
  vDiskIdx: VDisk,
66
+ force: isRetry,
67
+ })
68
+ .then((response) => {
69
+ if ((response === null || response === void 0 ? void 0 : response.result) === false) {
70
+ const err = {
71
+ statusText: response.error,
72
+ retryPossible: response.forceRetryPossible,
73
+ };
74
+ throw err;
75
+ }
62
76
  });
63
77
  }
64
78
  return undefined;
@@ -86,10 +100,10 @@ export function VDiskPage() {
86
100
  return (_jsx(DiskPageTitle, { entityName: vDiskPageKeyset('vdisk'), status: getSeverityColor(Severity), id: stringifyVdiskId(vDiskData === null || vDiskData === void 0 ? void 0 : vDiskData.VDiskId) }));
87
101
  };
88
102
  const renderControls = () => {
89
- return (_jsxs("div", { className: vDiskPageCn('controls'), children: [_jsxs(ButtonWithConfirmDialog, { onConfirmAction: handleEvictVDisk, onConfirmActionSuccess: handleAfterEvictVDisk, buttonDisabled: !VDiskId || !isUserAllowedToMakeChanges, buttonView: "normal", dialogContent: vDiskPageKeyset('evict-vdisk-dialog'), withPopover: true, popoverContent: vDiskPageKeyset('evict-vdisk-not-allowed'), popoverDisabled: isUserAllowedToMakeChanges, children: [_jsx(Icon, { data: ArrowsOppositeToDots }), vDiskPageKeyset('evict-vdisk-button')] }), _jsx(AutoRefreshControl, { className: vDiskPageCn('auto-refresh-control') })] }));
103
+ return (_jsxs("div", { className: vDiskPageCn('controls'), children: [_jsxs(ButtonWithConfirmDialog, { onConfirmAction: handleEvictVDisk, onConfirmActionSuccess: handleAfterEvictVDisk, buttonDisabled: !vDiskIdParamsDefined || !isUserAllowedToMakeChanges, buttonView: "normal", dialogContent: vDiskPageKeyset('evict-vdisk-dialog'), retryButtonText: vDiskPageKeyset('force-evict-vdisk-button'), withPopover: true, popoverContent: vDiskPageKeyset('evict-vdisk-not-allowed'), popoverDisabled: isUserAllowedToMakeChanges, children: [_jsx(Icon, { data: ArrowsOppositeToDots }), vDiskPageKeyset('evict-vdisk-button')] }), _jsx(AutoRefreshControl, { className: vDiskPageCn('auto-refresh-control') })] }));
90
104
  };
91
105
  const renderInfo = () => {
92
- return _jsx(VDiskInfo, { data: vDiskData, isVDiskPage: true });
106
+ return _jsx(VDiskInfo, { data: vDiskData });
93
107
  };
94
108
  const renderGroupInfo = () => {
95
109
  var _a;
@@ -104,7 +118,7 @@ export function VDiskPage() {
104
118
  if (loading) {
105
119
  return _jsx(InfoViewerSkeleton, { rows: 20 });
106
120
  }
107
- return (_jsxs(React.Fragment, { children: [renderInfo(), renderGroupInfo()] }));
121
+ return (_jsxs(React.Fragment, { children: [error ? _jsx(ResponseError, { error: error }) : null, renderInfo(), renderGroupInfo()] }));
108
122
  };
109
123
  return (_jsxs("div", { className: vDiskPageCn(null), children: [renderHelmet(), renderPageMeta(), renderPageTitle(), renderControls(), renderContent()] }));
110
124
  }
@@ -5,6 +5,7 @@
5
5
  "vdisk": "VDisk",
6
6
  "group": "Group",
7
7
  "evict-vdisk-button": "Evict VDisk",
8
+ "force-evict-vdisk-button": "Evict anyway",
8
9
  "evict-vdisk-dialog": "VDisk will be evicted. Do you want to proceed?",
9
10
  "evict-vdisk-not-allowed": "You don't have enough rights to evict VDisk"
10
11
  }
@@ -1 +1 @@
1
- export declare const vDiskPageKeyset: (key: "node" | "fqdn" | "group" | "pdisk" | "vdisk" | "evict-vdisk-button" | "evict-vdisk-dialog" | "evict-vdisk-not-allowed", params?: import("@gravity-ui/i18n").Params) => string;
1
+ export declare const vDiskPageKeyset: (key: "node" | "fqdn" | "group" | "pdisk" | "vdisk" | "evict-vdisk-button" | "force-evict-vdisk-button" | "evict-vdisk-dialog" | "evict-vdisk-not-allowed", params?: import("@gravity-ui/i18n").Params) => string;