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
@@ -28,7 +28,7 @@ export function bytesToSize(bytes) {
28
28
  if (bytes < base) {
29
29
  return String(bytes);
30
30
  }
31
- let i = parseInt(Math.floor(Math.log(bytes) / Math.log(base)), 10);
31
+ let i = parseInt(String(Math.floor(Math.log(bytes) / Math.log(base))), 10);
32
32
  if (i >= sizes.length) {
33
33
  i = sizes.length - 1;
34
34
  }
@@ -40,10 +40,11 @@ export function bytesToSize(bytes) {
40
40
  return val.toPrecision(3) + sizes[i];
41
41
  }
42
42
  function bytesToMB(bytes) {
43
- if (isNaN(bytes)) {
43
+ const bytesNumber = Number(bytes);
44
+ if (isNaN(bytesNumber)) {
44
45
  return '';
45
46
  }
46
- const val = bytes / base ** 2;
47
+ const val = bytesNumber / base ** 2;
47
48
  if (val < 10) {
48
49
  return val.toFixed(2) + sizes[2];
49
50
  }
@@ -58,10 +59,11 @@ export function bytesToSpeed(bytes) {
58
59
  return `${bytesToMB(bytes)}${bytes ? 'ps' : ''}`;
59
60
  }
60
61
  export function bytesToGB(bytes, shouldRound) {
61
- if (isNaN(bytes)) {
62
+ const bytesNumber = Number(bytes);
63
+ if (isNaN(bytesNumber)) {
62
64
  return 'N/A';
63
65
  }
64
- const val = bytes / 1000000000;
66
+ const val = bytesNumber / 1000000000;
65
67
  if (shouldRound) {
66
68
  return val.toFixed() + sizes[3];
67
69
  }
@@ -76,16 +78,26 @@ export function bytesToGB(bytes, shouldRound) {
76
78
  }
77
79
  }
78
80
  export function pad9(val) {
79
- const len = String(val).length;
80
- let result = val;
81
+ const stringifiedVal = String(val);
82
+ const len = stringifiedVal.length;
83
+ let result = stringifiedVal;
81
84
  for (let i = len; i < 9; i++) {
82
85
  result = '0' + result;
83
86
  }
84
87
  return result;
85
88
  }
86
89
  export function isNumeric(value) {
87
- // need both isNaN and isNaN(parseFloat):
88
- // - isNaN treats true/false/''/etc. as numbers, parseFloat fixes this
89
- // - parseFloat treats '123qwe' as number, isNaN fixes this
90
- return !isNaN(value) && !isNaN(parseFloat(value));
90
+ if (typeof value === 'number') {
91
+ return !isNaN(value);
92
+ }
93
+ if (typeof value === 'string') {
94
+ // need both isNaN and isNaN(parseFloat):
95
+ // - isNaN treats true/false/''/etc. as numbers, parseFloat fixes this
96
+ // - parseFloat treats '123qwe' as number, isNaN fixes this
97
+ return !isNaN(Number(value)) && !isNaN(parseFloat(value));
98
+ }
99
+ return false;
100
+ }
101
+ export function toExponential(value, precision) {
102
+ return Number(value).toExponential(precision);
91
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-embedded-ui",
3
- "version": "6.11.0",
3
+ "version": "6.13.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -14,6 +14,7 @@
14
14
  "@gravity-ui/axios-wrapper": "^1.4.1",
15
15
  "@gravity-ui/chartkit": "^5.9.0",
16
16
  "@gravity-ui/components": "^3.7.0",
17
+ "@gravity-ui/date-components": "^2.8.0",
17
18
  "@gravity-ui/date-utils": "^2.5.3",
18
19
  "@gravity-ui/i18n": "^1.5.1",
19
20
  "@gravity-ui/icons": "^2.10.0",
@@ -36,6 +37,7 @@
36
37
  "qs": "^6.12.0",
37
38
  "react-error-boundary": "^4.0.13",
38
39
  "react-helmet-async": "^2.0.5",
40
+ "react-hook-form": "^7.52.1",
39
41
  "react-json-inspector": "^7.1.1",
40
42
  "react-list": "^0.8.17",
41
43
  "react-monaco-editor": "^0.55.0",
@@ -50,7 +52,9 @@
50
52
  "use-query-params": "^2.2.1",
51
53
  "web-vitals": "^1.1.2",
52
54
  "ydb-ui-components": "^4.2.0",
53
- "zod": "^3.23.8"
55
+ "zod": "^3.23.8",
56
+ "@gravity-ui/table": "^0.5.0",
57
+ "@tanstack/react-table": "^8.19.3"
54
58
  },
55
59
  "scripts": {
56
60
  "analyze": "source-map-explorer 'build/static/js/*.js'",
@@ -145,6 +149,8 @@
145
149
  "husky": "^9.0.11",
146
150
  "jest-transform-css": "^6.0.1",
147
151
  "lint-staged": "^15.2.7",
152
+ "monaco-editor-webpack-plugin": "^7.1.0",
153
+ "monaco-yql-languages": "^1.0.6",
148
154
  "npm-run-all": "^4.1.5",
149
155
  "postcss": "^8.4.38",
150
156
  "prettier": "^3.2.5",
@@ -1,8 +0,0 @@
1
- import './DeveloperUiLink.scss';
2
- interface DeveloperUiLinkProps {
3
- className?: string;
4
- visible?: boolean;
5
- href: string;
6
- }
7
- export declare function DeveloperUiLink({ href, visible, className }: DeveloperUiLinkProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,15 +0,0 @@
1
- .ydb-node-host-wrapper {
2
- &__external-button {
3
- display: none;
4
- flex-shrink: 0;
5
-
6
- margin-left: 4px;
7
- }
8
- }
9
-
10
- .data-table__row:hover,
11
- .ydb-paginated-table__row:hover {
12
- .ydb-node-host-wrapper__external-button {
13
- display: inline-flex;
14
- }
15
- }
@@ -1,6 +0,0 @@
1
- import type { PreparedStructureVDisk } from '../../../store/reducers/node/types';
2
- interface VDiskProps {
3
- data: PreparedStructureVDisk;
4
- }
5
- export declare function Vdisk({ data }: VDiskProps): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { EntityStatus } from '../../../components/EntityStatus/EntityStatus';
4
- import { VDiskInfo } from '../../../components/VDiskInfo/VDiskInfo';
5
- import { EFlag } from '../../../types/api/enums';
6
- import { EVDiskState } from '../../../types/api/vdisk';
7
- import { cn } from '../../../utils/cn';
8
- import { stringifyVdiskId } from '../../../utils/dataFormatters/dataFormatters';
9
- const b = cn('kv-node-structure');
10
- export function Vdisk({ data }) {
11
- const { VDiskState, VDiskId } = data;
12
- return (_jsxs(React.Fragment, { children: [_jsxs("div", { className: b('row'), children: [_jsx("span", { className: b('title'), children: "VDisk " }), _jsx(EntityStatus, { status: VDiskState === EVDiskState.OK ? EFlag.Green : EFlag.Red, name: stringifyVdiskId(VDiskId) })] }), _jsx("div", { className: b('column'), children: _jsx(VDiskInfo, { className: b('section'), data: data }) })] }));
13
- }
@@ -1,9 +0,0 @@
1
- import type { PreparedStorageGroup } from '../../store/reducers/storage/types';
2
- import type { NodesMap } from '../../types/store/nodesList';
3
- interface PDiskGroupsProps {
4
- data: PreparedStorageGroup[];
5
- nodesMap?: NodesMap;
6
- loading?: boolean;
7
- }
8
- export declare function PDiskGroups({ data, nodesMap, loading }: PDiskGroupsProps): import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,20 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { ResizeableDataTable } from '../../components/ResizeableDataTable/ResizeableDataTable';
4
- import { TableSkeleton } from '../../components/TableSkeleton/TableSkeleton';
5
- import { DEFAULT_TABLE_SETTINGS } from '../../utils/constants';
6
- import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, getPDiskStorageColumns, } from '../Storage/StorageGroups/getStorageGroupsColumns';
7
- import { pDiskPageKeyset } from './i18n';
8
- import { pdiskPageCn } from './shared';
9
- export function PDiskGroups({ data, nodesMap, loading }) {
10
- const pDiskStorageColumns = React.useMemo(() => {
11
- return getPDiskStorageColumns(nodesMap);
12
- }, [nodesMap]);
13
- const renderContent = () => {
14
- if (loading) {
15
- return _jsx(TableSkeleton, {});
16
- }
17
- return (_jsx(ResizeableDataTable, { columnsWidthLSKey: STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, data: data, columns: pDiskStorageColumns, settings: DEFAULT_TABLE_SETTINGS }));
18
- };
19
- return (_jsxs(React.Fragment, { children: [_jsx("div", { className: pdiskPageCn('groups-title'), children: pDiskPageKeyset('groups') }), _jsx("div", { children: renderContent() })] }));
20
- }
@@ -1,5 +0,0 @@
1
- {
2
- "tableStats": "Статистика таблицы",
3
- "tabletMetrics": "Метрики таблетки",
4
- "partitionConfig": "Конфигурация партиции"
5
- }
@@ -1,2 +0,0 @@
1
- import type { GraphNode } from '@gravity-ui/paranoid';
2
- export declare const renderExplainNode: (node: GraphNode) => string;
@@ -1,4 +0,0 @@
1
- export const renderExplainNode = (node) => {
2
- const parts = node.name.split('|');
3
- return parts.length > 1 ? parts[1] : node.name;
4
- };
@@ -1,5 +0,0 @@
1
- export declare const topQueriesApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../api")._NEVER, unknown, {}>, {
2
- getOverviewTopQueries: import("@reduxjs/toolkit/query").QueryDefinition<{
3
- database: string;
4
- }, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../api")._NEVER, unknown, {}>, "All", import("../../../../types/store/query").IQueryResult | undefined, "api">;
5
- }, "api", "All", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
@@ -1,38 +0,0 @@
1
- import { TENANT_OVERVIEW_TABLES_LIMIT } from '../../../../utils/constants';
2
- import { isQueryErrorResponse, parseQueryAPIExecuteResponse } from '../../../../utils/query';
3
- import { api } from '../../api';
4
- const getQueryText = (path) => {
5
- return `
6
- SELECT
7
- CPUTime as CPUTimeUs,
8
- QueryText,
9
- FROM \`${path}/.sys/top_queries_by_cpu_time_one_hour\`
10
- ORDER BY CPUTimeUs DESC
11
- LIMIT ${TENANT_OVERVIEW_TABLES_LIMIT}
12
- `;
13
- };
14
- export const topQueriesApi = api.injectEndpoints({
15
- endpoints: (builder) => ({
16
- getOverviewTopQueries: builder.query({
17
- queryFn: async ({ database }, { signal }) => {
18
- try {
19
- const response = await window.api.sendQuery({
20
- schema: 'modern',
21
- query: getQueryText(database),
22
- database,
23
- action: 'execute-scan',
24
- }, { signal });
25
- if (isQueryErrorResponse(response)) {
26
- return { error: response };
27
- }
28
- return { data: parseQueryAPIExecuteResponse(response) };
29
- }
30
- catch (error) {
31
- return { error: error || new Error('Unauthorized') };
32
- }
33
- },
34
- providesTags: ['All'],
35
- }),
36
- }),
37
- overrideExisting: 'throw',
38
- });
@@ -1,23 +0,0 @@
1
- import type { AppDispatch, GetState } from '.';
2
- export declare const nop: (result: any) => any;
3
- export declare function createRequestActionTypes<Prefix extends string, Type extends string>(prefix: Prefix, type: Type): {
4
- readonly REQUEST: `${Prefix}/${Type}_REQUEST`;
5
- readonly SUCCESS: `${Prefix}/${Type}_SUCCESS`;
6
- readonly FAILURE: `${Prefix}/${Type}_FAILURE`;
7
- };
8
- type CreateApiRequestParams<Actions, Response, HandledResponse> = {
9
- actions: Actions;
10
- request: Promise<Response>;
11
- dataHandler?: (data: Response, getState: GetState) => HandledResponse;
12
- };
13
- export declare function createApiRequest<Actions extends ReturnType<typeof createRequestActionTypes>, Response, HandledResponse>({ actions, request, dataHandler, }: CreateApiRequestParams<Actions, Response, HandledResponse>): (dispatch: AppDispatch, getState: GetState) => Promise<HandledResponse | undefined>;
14
- export type ApiRequestAction<Actions extends ReturnType<typeof createRequestActionTypes>, SuccessResponse = unknown, ErrorResponse = unknown> = {
15
- type: Actions['REQUEST'];
16
- } | {
17
- type: Actions['SUCCESS'];
18
- data: SuccessResponse;
19
- } | {
20
- type: Actions['FAILURE'];
21
- error: ErrorResponse;
22
- };
23
- export {};
@@ -1,49 +0,0 @@
1
- import createToast from '../utils/createToast';
2
- import { isAxiosResponse } from '../utils/response';
3
- import { SET_UNAUTHENTICATED } from './reducers/authentication/authentication';
4
- export const nop = (result) => result;
5
- export function createRequestActionTypes(prefix, type) {
6
- return {
7
- REQUEST: `${prefix}/${type}_REQUEST`,
8
- SUCCESS: `${prefix}/${type}_SUCCESS`,
9
- FAILURE: `${prefix}/${type}_FAILURE`,
10
- };
11
- }
12
- export function createApiRequest({ actions, request, dataHandler = nop, }) {
13
- const doRequest = async function (dispatch, getState) {
14
- dispatch({
15
- type: actions.REQUEST,
16
- });
17
- try {
18
- const result = await request;
19
- const data = dataHandler(result, getState);
20
- dispatch({
21
- type: actions.SUCCESS,
22
- data,
23
- });
24
- return data;
25
- }
26
- catch (error) {
27
- if (isAxiosResponse(error) && error.status === 401) {
28
- dispatch({
29
- type: SET_UNAUTHENTICATED.SUCCESS,
30
- });
31
- }
32
- else if (isAxiosResponse(error) && error.status >= 500 && error.statusText) {
33
- createToast({
34
- name: 'Request failure',
35
- title: 'Request failure',
36
- type: 'error',
37
- content: `${error.status} ${error.statusText}`,
38
- });
39
- }
40
- dispatch({
41
- type: actions.FAILURE,
42
- error,
43
- });
44
- // TODO should probably throw the received error here, but this change requires a thorough revision of all api calls
45
- return undefined;
46
- }
47
- };
48
- return doRequest;
49
- }
@@ -1,4 +0,0 @@
1
- export interface RestartPDiskResponse {
2
- result?: boolean;
3
- error?: string;
4
- }
@@ -1,2 +0,0 @@
1
- import type { QueryMode } from '../../types/store/query';
2
- export declare const useQueryModes: () => [QueryMode, (value: QueryMode) => void];
@@ -1,5 +0,0 @@
1
- import { QUERY_INITIAL_MODE_KEY } from '../constants';
2
- import { useSetting } from './useSetting';
3
- export const useQueryModes = () => {
4
- return useSetting(QUERY_INITIAL_MODE_KEY);
5
- };
@@ -1 +0,0 @@
1
- export declare function registerLanguages(): void;
@@ -1,6 +0,0 @@
1
- import { registerSExpressionLanguage } from './s-expression/registerLanguage';
2
- import { registerYqlLanguage } from './yql/registerLanguage';
3
- export function registerLanguages() {
4
- registerSExpressionLanguage();
5
- registerYqlLanguage();
6
- }
@@ -1 +0,0 @@
1
- export declare const LANGUAGE_S_EXPRESSION_ID = "s-expression";
@@ -1 +0,0 @@
1
- export const LANGUAGE_S_EXPRESSION_ID = 's-expression';
@@ -1 +0,0 @@
1
- export declare function registerSExpressionLanguage(): void;
@@ -1,59 +0,0 @@
1
- import * as monaco from 'monaco-editor';
2
- import { LANGUAGE_S_EXPRESSION_ID } from './constants';
3
- export function registerSExpressionLanguage() {
4
- monaco.languages.register({ id: LANGUAGE_S_EXPRESSION_ID });
5
- monaco.languages.setMonarchTokensProvider(LANGUAGE_S_EXPRESSION_ID, {
6
- defaultToken: 'text',
7
- ignoreCase: true,
8
- tokenPostfix: '.yql',
9
- brackets: [
10
- { open: '[', close: ']', token: 'delimiter.square' },
11
- { open: '(', close: ')', token: 'delimiter.parenthesis' },
12
- { open: '{', close: '}', token: 'delimiter.curly' },
13
- ],
14
- keywordControl: 'bind|block|declare|export|import|lambda|let|quote|return'.split('|'),
15
- escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
16
- tokenizer: {
17
- root: [
18
- { include: '@whitespace' },
19
- { include: '@comment' },
20
- [/(#)((?:\w|[\\+-=<>'"&#])+)/, ['delimiter', 'constant']],
21
- [
22
- /(?:\b(?:(defun|defmethod|defmacro))\b)(\s+)((?:\w|-|\?)*)/,
23
- ['type.function', 'text', 'entity.name'],
24
- ],
25
- [/(\*)(\S*)(\*)/, ['delimiter', 'variable', 'delimiter']],
26
- { include: '@strings' },
27
- [/'[^#\s)(]+/, 'variable.parameter'],
28
- [/[(){}[\]]/, '@brackets'],
29
- // identifiers and keywords
30
- [
31
- /(?:(?:<=?|>=?|==|!=|[-+*/%])|[a-zA-Z][a-zA-Z0-9!]*)/,
32
- {
33
- cases: {
34
- '@keywordControl': { token: 'keyword.operator' },
35
- '@default': 'identifier',
36
- },
37
- },
38
- ],
39
- ],
40
- whitespace: [[/\s+/, 'white']],
41
- comment: [[/#.*/, 'comment']],
42
- strings: [
43
- [/'?"(?=.)/, { token: 'string', next: '@qqstring' }],
44
- [/'?[@]{2}/, { token: 'string', next: '@multiline' }],
45
- [/'?x"(?:[0-9A-Fa-f]{2})*"/, 'string'],
46
- ],
47
- qqstring: [
48
- [/\\(?:[0-3][0-7][0-7]|x[0-9A-Fa-f]{2}|["tnrbfav\\])/, 'string.escape'],
49
- [/[^"\\]+/, 'string'],
50
- [/"|$/, { token: 'string', next: '@pop' }],
51
- ],
52
- multiline: [
53
- [/[^@]+/, 'string'],
54
- [/[@]{2}/, { token: 'string', next: '@pop' }],
55
- [/./, { token: 'string' }],
56
- ],
57
- },
58
- });
59
- }
@@ -1 +0,0 @@
1
- export declare function registerYqlLanguage(): void;
@@ -1,8 +0,0 @@
1
- import * as monaco from 'monaco-editor';
2
- import { LANGUAGE_YQL_ID } from './constants';
3
- import { conf, getLanguage } from './yql';
4
- export function registerYqlLanguage() {
5
- monaco.languages.register({ id: LANGUAGE_YQL_ID });
6
- monaco.languages.setMonarchTokensProvider(LANGUAGE_YQL_ID, getLanguage());
7
- monaco.languages.setLanguageConfiguration(LANGUAGE_YQL_ID, conf);
8
- }
@@ -1,7 +0,0 @@
1
- import type * as monaco from 'monaco-editor';
2
- export declare const conf: monaco.languages.LanguageConfiguration;
3
- interface LanguageOptions {
4
- ansi?: boolean;
5
- }
6
- export declare function getLanguage({ ansi, }?: LanguageOptions): monaco.languages.IMonarchLanguage & Record<string, unknown>;
7
- export {};
@@ -1,180 +0,0 @@
1
- import { builtinFunctions, keywords, typeKeywords } from './yql.keywords';
2
- export const conf = {
3
- comments: {
4
- lineComment: '--',
5
- blockComment: ['/*', '*/'],
6
- },
7
- brackets: [
8
- ['{', '}'],
9
- ['[', ']'],
10
- ['(', ')'],
11
- ],
12
- autoClosingPairs: [
13
- { open: '{', close: '}' },
14
- { open: '[', close: ']' },
15
- { open: '(', close: ')' },
16
- { open: '"', close: '"' },
17
- { open: "'", close: "'" },
18
- { open: '`', close: '`' },
19
- ],
20
- surroundingPairs: [
21
- { open: '{', close: '}' },
22
- { open: '[', close: ']' },
23
- { open: '(', close: ')' },
24
- { open: '"', close: '"' },
25
- { open: "'", close: "'" },
26
- { open: '`', close: '`' },
27
- ],
28
- wordPattern: /(-?\d*\.\d\w*)|([^`~!@#%^&*()\-=+[{\]}\\|;:'",./?\s]+)/g,
29
- };
30
- export function getLanguage({ ansi = false, } = {}) {
31
- return {
32
- defaultToken: 'text',
33
- ignoreCase: true,
34
- brackets: [
35
- { open: '[', close: ']', token: 'delimiter.square' },
36
- { open: '(', close: ')', token: 'delimiter.parenthesis' },
37
- { open: '{', close: '}', token: 'delimiter.curly' },
38
- ],
39
- keywords,
40
- typeKeywords,
41
- constants: ['true', 'false'],
42
- builtinFunctions,
43
- operators: [
44
- '+',
45
- '-',
46
- '/',
47
- '//',
48
- '%',
49
- '<@>',
50
- '@>',
51
- '<@',
52
- '&',
53
- '^',
54
- '~',
55
- '<',
56
- '>',
57
- '<=',
58
- '>=',
59
- '=>',
60
- '==',
61
- '!=',
62
- '<>',
63
- '=',
64
- ],
65
- symbols: /[=><!~?:&|+\-*/^%]+/,
66
- escapes: /\\(?:[abfnrtv\\"'`]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
67
- variables: /[a-zA-Z_]\w*/,
68
- tokenizer: {
69
- root: [
70
- { include: '@whitespace' },
71
- { include: '@comments' },
72
- { include: '@numbers' },
73
- { include: '@tablePath' },
74
- { include: '@strings' },
75
- // support function
76
- [/(@variables)::(@variables)/, 'support.function'],
77
- [/[;,.]/, 'delimiter'],
78
- [/[(){}[\]]/, '@brackets'],
79
- // identifiers and keywords
80
- [
81
- /@?[a-zA-Z_$]\w*/,
82
- {
83
- cases: {
84
- '@keywords': 'keyword',
85
- '@typeKeywords': 'keyword.type',
86
- '@constants': 'constant.yql',
87
- '@builtinFunctions': 'constant.other.color',
88
- '[$@][a-zA-Z_]\\w*': 'variable',
89
- '@default': 'identifier',
90
- },
91
- },
92
- ],
93
- [
94
- /@symbols/,
95
- {
96
- cases: {
97
- '@operators': 'operator.sql',
98
- '@default': '',
99
- },
100
- },
101
- ],
102
- ],
103
- whitespace: [[/\s+/, 'white']],
104
- comments: [
105
- [/--.*/, 'comment'],
106
- [/\/\*/, { token: 'comment.quote', next: ansi ? '@commentAnsi' : '@comment' }],
107
- ],
108
- comment: [
109
- [/[^*/]+/, 'comment'],
110
- [/\*\//, { token: 'comment.quote', next: '@pop' }],
111
- [/./, 'comment'],
112
- ],
113
- commentAnsi: [
114
- [/\/\*/, { token: 'comment.quote', next: '@comment' }],
115
- [/[^*/]+/, 'comment'],
116
- [/\*\//, { token: 'comment.quote', next: '@pop' }],
117
- [/./, 'comment'],
118
- ],
119
- numbers: [
120
- [/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?f?\b/, 'number.float'],
121
- [/[+-]?(?:\d+|0b[01]+|0o[0-8]+|0x[\da-f]+)(?:u?[lst]?)?\b/, 'number'],
122
- ],
123
- strings: [
124
- [/'/, { token: 'string', next: ansi ? '@stringAnsiSingle' : '@stringSingle' }],
125
- [/"/, { token: 'string', next: ansi ? '@stringAnsiDouble' : '@stringDouble' }],
126
- [/[@]{2}/, { token: 'string', next: '@multilineString' }],
127
- ],
128
- stringSingle: [
129
- [/[^\\']+/, 'string'],
130
- [/@escapes/, 'string.escape'],
131
- [/\\./, 'string.escape.invalid'],
132
- [/'[uyj]?/, { token: 'string', next: '@pop' }],
133
- ],
134
- stringAnsiSingle: [
135
- [/[^']+/, 'string'],
136
- [/''/, 'string'],
137
- [/'[uyj]?/, { token: 'string', next: '@pop' }],
138
- ],
139
- stringDouble: [
140
- [/[^\\"]+/, 'string'],
141
- [/@escapes/, 'string.escape'],
142
- [/\\./, 'string.escape.invalid'],
143
- [/"[uyj]?/, { token: 'string', next: '@pop' }],
144
- ],
145
- stringAnsiDouble: [
146
- [/[^"]+/, 'string'],
147
- [/""/, 'string'],
148
- [/"[uyj]?/, { token: 'string', next: '@pop' }],
149
- ],
150
- multilineString: [
151
- [
152
- /#py/,
153
- { token: 'string.python', nextEmbedded: 'python', next: '@embedded', goBack: 3 },
154
- ],
155
- [
156
- /\/\/js/,
157
- { token: 'string.js', nextEmbedded: 'javascript', next: '@embedded', goBack: 4 },
158
- ],
159
- [/[^@]+/, 'string'],
160
- [/[@]{4}/, 'string'],
161
- [/[@]{2}[uyj]?/, { token: 'string', next: '@pop' }],
162
- [/./, 'string'],
163
- ],
164
- embedded: [
165
- [
166
- /([^@]|^)([@]{4})*[@]{2}([@]([^@]|$)|[^@]|$)/,
167
- { token: '@rematch', next: '@pop', nextEmbedded: '@pop' },
168
- ],
169
- ],
170
- tablePath: [[/((`)?[\w/]+\2\s*\.\s*)?`/, { token: 'string.tablepath', next: '@table' }]],
171
- table: [
172
- [/[^\\`]+/, 'string.tablepath'],
173
- [/``/, 'string.tablepath'],
174
- [/@escapes/, 'string.escape.tablepath'],
175
- [/\\./, 'string.escape.invalid.tablepath'],
176
- [/`/, { token: 'string.tablepath', next: '@pop' }],
177
- ],
178
- },
179
- };
180
- }
@@ -1,3 +0,0 @@
1
- export declare const keywords: string[];
2
- export declare const typeKeywords: string[];
3
- export declare const builtinFunctions: string[];
@@ -1,3 +0,0 @@
1
- export const keywords = '$row|$rows|action|all|and|any|as|asc|assume|begin|bernoulli|between|by|case|columns|commit|compact|create|cross|cube|declare|define|delete|desc|dict|discard|distinct|do|drop|else|empty_action|end|erase|evaluate|exclusion|exists|export|flatten|for|from|full|group|grouping|having|if|ignore|ilike|import|in|inner|insert|into|is|join|left|like|limit|list|match|not|null|nulls|offset|on|only|optional|or|order|over|partition|pragma|presort|process|reduce|regexp|repeatable|replace|respect|result|return|right|rlike|rollup|sample|schema|select|semi|set|sets|stream|subquery|table|tablesample|then|truncate|union|update|upsert|use|using|values|view|when|where|window|with|without|xor'.split('|');
2
- export const typeKeywords = 'bool|date|datetime|decimal|double|float|int16|int32|int64|int8|interval|json|string|timestamp|tzdate|tzdatetime|tztimestamp|uint16|uint32|uint64|uint8|utf8|uuid|yson'.split('|');
3
- export const builtinFunctions = 'abs|aggregate_by|aggregate_list|aggregate_list_distinct|agg_list|agg_list_distinct|as_table|avg|avg_if|adaptivedistancehistogram|adaptivewardhistogram|adaptiveweighthistogram|addmember|addtimezone|aggregateflatten|aggregatetransforminput|aggregatetransformoutput|aggregationfactory|asatom|asdict|asdictstrict|asenum|aslist|asliststrict|asset|assetstrict|asstruct|astagged|astuple|asvariant|atomcode|bitcast|bit_and|bit_or|bit_xor|bool_and|bool_or|bool_xor|bottom|bottom_by|blockwardhistogram|blockweighthistogram|cast|coalesce|concat|concat_strict|correlation|count|count_if|covariance|covariance_population|covariance_sample|callableargument|callableargumenttype|callableresulttype|callabletype|callabletypecomponents|callabletypehandle|choosemembers|combinemembers|countdistinctestimate|currentauthenticateduser|currentoperationid|currentoperationsharedid|currenttzdate|currenttzdatetime|currenttztimestamp|currentutcdate|currentutcdatetime|currentutctimestamp|dense_rank|datatype|datatypecomponents|datatypehandle|dictaggregate|dictcontains|dictcreate|dicthasitems|dictitems|dictkeytype|dictkeys|dictlength|dictlookup|dictpayloadtype|dictpayloads|dicttype|dicttypecomponents|dicttypehandle|each|each_strict|emptydicttype|emptydicttypehandle|emptylisttype|emptylisttypehandle|endswith|ensure|ensureconvertibleto|ensuretype|enum|evaluateatom|evaluatecode|evaluateexpr|evaluatetype|expandstruct|filter|filter_strict|find|first_value|folder|filecontent|filepath|flattenmembers|forceremovemember|forceremovemembers|forcerenamemembers|forcespreadmembers|formatcode|formattype|frombytes|funccode|greatest|grouping|gathermembers|generictype|histogram|hll|hyperloglog|if|if_strict|instanceof|json_exists|json_query|json_value|jointablerow|just|lag|last_value|lead|least|len|length|like|likely|like_strict|lambdaargumentscount|lambdacode|linearhistogram|listaggregate|listall|listany|listavg|listcode|listcollect|listconcat|listcreate|listdistinct|listenumerate|listextend|listextendstrict|listextract|listfilter|listflatmap|listflatten|listfromrange|listhas|listhasitems|listhead|listindexof|listitemtype|listlast|listlength|listmap|listmax|listmin|listnotnull|listreplicate|listreverse|listskip|listskipwhile|listskipwhileinclusive|listsort|listsortasc|listsortdesc|listsum|listtake|listtakewhile|listtakewhileinclusive|listtype|listtypehandle|listunionall|listuniq|listzip|listzipall|loghistogram|logarithmichistogram|max|max_by|max_of|median|min|min_by|min_of|mode|multi_aggregate_by|nanvl|nvl|nothing|nulltype|nulltypehandle|optionalitemtype|optionaltype|optionaltypehandle|percentile|parsefile|parsetype|parsetypehandle|pickle|quotecode|range|range_strict|rank|regexp|regexp_strict|rfind|row_number|random|randomnumber|randomuuid|removemember|removemembers|removetimezone|renamemembers|replacemember|reprcode|resourcetype|resourcetypehandle|resourcetypetag|some|stddev|stddev_population|stddev_sample|substring|sum|sum_if|sessionstart|sessionwindow|setcreate|setdifference|setincludes|setintersection|setisdisjoint|setsymmetricdifference|setunion|spreadmembers|stablepickle|startswith|staticmap|streamitemtype|streamtype|streamtypehandle|structmembertype|structmembers|structtypecomponents|structtypehandle|subqueryextend|subqueryextendfor|subquerymerge|subquerymergefor|subqueryunionall|subqueryunionallfor|subqueryunionmerge|subqueryunionmergefor|top|topfreq|top_by|tablename|tablepath|tablerecordindex|tablerow|taggedtype|taggedtypecomponents|taggedtypehandle|tobytes|todict|tomultidict|toset|tosorteddict|tosortedmultidict|trymember|tupleelementtype|tupletype|tupletypecomponents|tupletypehandle|typehandle|typekind|typeof|udaf|unittype|unpickle|untag|unwrap|variance|variance_population|variance_sample|variant|varianttype|varianttypehandle|variantunderlyingtype|voidtype|voidtypehandle|way|worldcode'.split('|');