ydb-embedded-ui 6.33.0 → 6.35.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +21 -0
  2. package/dist/components/ConfirmationDialog/ConfirmationDialog.js +31 -0
  3. package/dist/components/ConfirmationDialog/ConfirmationDialog.js.map +1 -0
  4. package/dist/components/ConfirmationDialog/ConfirmationDialog.scss +6 -0
  5. package/dist/components/ConfirmationDialog/i18n/en.json +3 -0
  6. package/dist/components/ConfirmationDialog/i18n/index.d.ts +1 -0
  7. package/dist/components/ConfirmationDialog/i18n/index.js +5 -0
  8. package/dist/components/ConfirmationDialog/i18n/index.js.map +1 -0
  9. package/dist/components/EntityStatus/EntityStatus.js +1 -1
  10. package/dist/components/EntityStatus/EntityStatus.js.map +1 -1
  11. package/dist/components/MemoryViewer/MemoryViewer.d.ts +14 -0
  12. package/dist/components/MemoryViewer/MemoryViewer.js +84 -0
  13. package/dist/components/MemoryViewer/MemoryViewer.js.map +1 -0
  14. package/dist/components/MemoryViewer/MemoryViewer.scss +104 -0
  15. package/dist/components/MemoryViewer/i18n/en.json +11 -0
  16. package/dist/components/MemoryViewer/i18n/index.d.ts +2 -0
  17. package/dist/components/MemoryViewer/i18n/index.js +5 -0
  18. package/dist/components/MemoryViewer/i18n/index.js.map +1 -0
  19. package/dist/components/MemoryViewer/utils.d.ts +10 -0
  20. package/dist/components/MemoryViewer/utils.js +71 -0
  21. package/dist/components/MemoryViewer/utils.js.map +1 -0
  22. package/dist/components/NodeHostWrapper/NodeHostWrapper.d.ts +5 -3
  23. package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -2
  24. package/dist/components/NodeHostWrapper/NodeHostWrapper.js.map +1 -1
  25. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  26. package/dist/components/ProgressViewer/ProgressViewer.d.ts +1 -1
  27. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
  28. package/dist/components/nodesColumns/__test__/utils.test.d.ts +1 -0
  29. package/dist/components/nodesColumns/__test__/utils.test.js +28 -0
  30. package/dist/components/nodesColumns/__test__/utils.test.js.map +1 -0
  31. package/dist/components/nodesColumns/columns.d.ts +32 -9
  32. package/dist/components/nodesColumns/columns.js +91 -21
  33. package/dist/components/nodesColumns/columns.js.map +1 -1
  34. package/dist/components/nodesColumns/constants.d.ts +16 -5
  35. package/dist/components/nodesColumns/constants.js +114 -11
  36. package/dist/components/nodesColumns/constants.js.map +1 -1
  37. package/dist/components/nodesColumns/i18n/en.json +18 -5
  38. package/dist/components/nodesColumns/i18n/index.d.ts +1 -1
  39. package/dist/components/nodesColumns/utils.d.ts +2 -0
  40. package/dist/components/nodesColumns/utils.js +11 -0
  41. package/dist/components/nodesColumns/utils.js.map +1 -0
  42. package/dist/containers/App/App.d.ts +1 -1
  43. package/dist/containers/App/Providers.js +2 -1
  44. package/dist/containers/App/Providers.js.map +1 -1
  45. package/dist/containers/AsideNavigation/AsideNavigation.d.ts +2 -0
  46. package/dist/containers/AsideNavigation/AsideNavigation.js +2 -1
  47. package/dist/containers/AsideNavigation/AsideNavigation.js.map +1 -1
  48. package/dist/containers/Clusters/constants.d.ts +1 -1
  49. package/dist/containers/Nodes/Nodes.js +2 -2
  50. package/dist/containers/Nodes/Nodes.js.map +1 -1
  51. package/dist/containers/Nodes/NodesControls/NodesControls.d.ts +3 -1
  52. package/dist/containers/Nodes/NodesControls/NodesControls.js +3 -3
  53. package/dist/containers/Nodes/NodesControls/NodesControls.js.map +1 -1
  54. package/dist/containers/Nodes/PaginatedNodes.d.ts +11 -3
  55. package/dist/containers/Nodes/PaginatedNodes.js +16 -19
  56. package/dist/containers/Nodes/PaginatedNodes.js.map +1 -1
  57. package/dist/containers/Nodes/columns/columns.js +2 -2
  58. package/dist/containers/Nodes/columns/columns.js.map +1 -1
  59. package/dist/containers/Nodes/columns/constants.d.ts +3 -2
  60. package/dist/containers/Nodes/columns/constants.js +10 -10
  61. package/dist/containers/Nodes/columns/constants.js.map +1 -1
  62. package/dist/containers/Nodes/getNodes.js +4 -5
  63. package/dist/containers/Nodes/getNodes.js.map +1 -1
  64. package/dist/containers/Nodes/useNodesPageQueryParams.d.ts +3 -2
  65. package/dist/containers/Nodes/useNodesPageQueryParams.js +2 -2
  66. package/dist/containers/Nodes/useNodesPageQueryParams.js.map +1 -1
  67. package/dist/containers/Storage/StorageGroups/columns/columns.js +3 -3
  68. package/dist/containers/Storage/StorageGroups/columns/columns.js.map +1 -1
  69. package/dist/containers/Storage/StorageGroups/columns/constants.d.ts +3 -7
  70. package/dist/containers/Storage/StorageGroups/columns/constants.js +54 -10
  71. package/dist/containers/Storage/StorageGroups/columns/constants.js.map +1 -1
  72. package/dist/containers/Storage/StorageGroups/getGroups.js +3 -5
  73. package/dist/containers/Storage/StorageGroups/getGroups.js.map +1 -1
  74. package/dist/containers/Storage/StorageNodes/columns/columns.js +2 -3
  75. package/dist/containers/Storage/StorageNodes/columns/columns.js.map +1 -1
  76. package/dist/containers/Storage/StorageNodes/columns/constants.js +2 -2
  77. package/dist/containers/Storage/StorageNodes/columns/constants.js.map +1 -1
  78. package/dist/containers/Storage/StorageNodes/getNodes.js +4 -5
  79. package/dist/containers/Storage/StorageNodes/getNodes.js.map +1 -1
  80. package/dist/containers/Storage/utils/index.d.ts +1 -1
  81. package/dist/containers/Tablets/i18n/index.d.ts +1 -1
  82. package/dist/containers/Tenant/Diagnostics/Diagnostics.js +2 -2
  83. package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
  84. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.d.ts +4 -0
  85. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.js +23 -0
  86. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.js.map +1 -0
  87. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.d.ts +5 -0
  88. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.js +23 -0
  89. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.js.map +1 -0
  90. package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.d.ts +6 -0
  91. package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.js +26 -0
  92. package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.js.map +1 -0
  93. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +1 -1
  94. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js.map +1 -1
  95. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.d.ts +2 -2
  96. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js +3 -2
  97. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js.map +1 -1
  98. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +3 -1
  99. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js.map +1 -1
  100. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +2 -7
  101. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js.map +1 -1
  102. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  103. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +3 -1
  104. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js.map +1 -1
  105. package/dist/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.js +5 -1
  106. package/dist/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.js.map +1 -1
  107. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +5 -2
  108. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js.map +1 -1
  109. package/dist/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.d.ts +7 -0
  110. package/dist/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.js +40 -0
  111. package/dist/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.js.map +1 -0
  112. package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.js +1 -1
  113. package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.js.map +1 -1
  114. package/dist/containers/Tenant/Query/ExecuteResult/i18n/en.json +4 -1
  115. package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +1 -1
  116. package/dist/containers/Tenant/Query/NewSQL/NewSQL.js +8 -7
  117. package/dist/containers/Tenant/Query/NewSQL/NewSQL.js.map +1 -1
  118. package/dist/containers/Tenant/Query/NewSQL/i18n/en.json +1 -2
  119. package/dist/containers/Tenant/Query/NewSQL/i18n/index.d.ts +1 -1
  120. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +3 -1
  121. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js.map +1 -1
  122. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +2 -27
  123. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +47 -52
  124. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js.map +1 -1
  125. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +1 -1
  126. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js.map +1 -1
  127. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.d.ts +18 -3
  128. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js +41 -15
  129. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js.map +1 -1
  130. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +8 -3
  131. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js.map +1 -1
  132. package/dist/containers/Tenant/utils/newSQLQueryActions.d.ts +1 -2
  133. package/dist/containers/Tenant/utils/newSQLQueryActions.js +2 -4
  134. package/dist/containers/Tenant/utils/newSQLQueryActions.js.map +1 -1
  135. package/dist/containers/Tenant/utils/schemaActions.d.ts +1 -0
  136. package/dist/containers/Tenant/utils/schemaActions.js +61 -41
  137. package/dist/containers/Tenant/utils/schemaActions.js.map +1 -1
  138. package/dist/containers/Tenant/utils/schemaQueryTemplates.js +87 -54
  139. package/dist/containers/Tenant/utils/schemaQueryTemplates.js.map +1 -1
  140. package/dist/containers/UserSettings/i18n/en.json +3 -0
  141. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  142. package/dist/containers/UserSettings/settings.d.ts +2 -0
  143. package/dist/containers/UserSettings/settings.js +11 -2
  144. package/dist/containers/UserSettings/settings.js.map +1 -1
  145. package/dist/services/api.d.ts +4 -0
  146. package/dist/services/api.js +11 -0
  147. package/dist/services/api.js.map +1 -1
  148. package/dist/services/settings.d.ts +2 -0
  149. package/dist/services/settings.js +3 -1
  150. package/dist/services/settings.js.map +1 -1
  151. package/dist/store/configureStore.d.ts +37 -15
  152. package/dist/store/defaultStore.d.ts +18 -7
  153. package/dist/store/reducers/capabilities/capabilities.d.ts +72 -16
  154. package/dist/store/reducers/capabilities/hooks.d.ts +1 -0
  155. package/dist/store/reducers/capabilities/hooks.js +3 -0
  156. package/dist/store/reducers/capabilities/hooks.js.map +1 -1
  157. package/dist/store/reducers/cluster/cluster.d.ts +54 -12
  158. package/dist/store/reducers/executeQuery.d.ts +41 -51
  159. package/dist/store/reducers/executeQuery.js +64 -160
  160. package/dist/store/reducers/executeQuery.js.map +1 -1
  161. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +180 -40
  162. package/dist/store/reducers/index.d.ts +28 -13
  163. package/dist/store/reducers/node/selectors.d.ts +9 -2
  164. package/dist/store/reducers/nodes/types.d.ts +13 -0
  165. package/dist/store/reducers/nodes/utils.d.ts +1 -1
  166. package/dist/store/reducers/nodes/utils.js +3 -3
  167. package/dist/store/reducers/nodes/utils.js.map +1 -1
  168. package/dist/store/reducers/nodesList.d.ts +9 -2
  169. package/dist/store/reducers/partitions/partitions.d.ts +4 -3
  170. package/dist/store/reducers/partitions/partitions.js +1 -3
  171. package/dist/store/reducers/partitions/partitions.js.map +1 -1
  172. package/dist/store/reducers/partitions/types.d.ts +0 -3
  173. package/dist/store/reducers/planToSvg.d.ts +8 -0
  174. package/dist/store/reducers/planToSvg.js +21 -0
  175. package/dist/store/reducers/planToSvg.js.map +1 -0
  176. package/dist/store/reducers/queryActions/queryActions.d.ts +0 -27
  177. package/dist/store/reducers/queryActions/queryActions.js +1 -1
  178. package/dist/store/reducers/queryActions/queryActions.js.map +1 -1
  179. package/dist/store/reducers/queryActions/types.d.ts +1 -1
  180. package/dist/store/reducers/schema/schema.d.ts +22 -7
  181. package/dist/store/reducers/schema/schema.js +16 -20
  182. package/dist/store/reducers/schema/schema.js.map +1 -1
  183. package/dist/store/reducers/tablets.d.ts +45 -10
  184. package/dist/store/reducers/tenantOverview/topShards/utils.d.ts +1 -1
  185. package/dist/store/reducers/tenants/selectors.d.ts +81 -18
  186. package/dist/store/reducers/tooltip.d.ts +1 -1
  187. package/dist/store/reducers/topic.d.ts +135 -30
  188. package/dist/store/reducers/trace.d.ts +1 -1
  189. package/dist/store/reducers/trace.js +1 -1
  190. package/dist/store/reducers/trace.js.map +1 -1
  191. package/dist/types/api/nodes.d.ts +74 -4
  192. package/dist/types/api/nodes.js.map +1 -1
  193. package/dist/types/store/executeQuery.d.ts +3 -6
  194. package/dist/types/store/executeQuery.js.map +1 -1
  195. package/dist/utils/constants.d.ts +2 -0
  196. package/dist/utils/constants.js +2 -0
  197. package/dist/utils/constants.js.map +1 -1
  198. package/dist/utils/dataFormatters/dataFormatters.d.ts +1 -1
  199. package/dist/utils/dataFormatters/dataFormatters.js +12 -6
  200. package/dist/utils/dataFormatters/dataFormatters.js.map +1 -1
  201. package/dist/utils/hooks/withConfirmation/i18n/en.json +4 -0
  202. package/dist/utils/hooks/withConfirmation/i18n/index.d.ts +2 -0
  203. package/dist/utils/hooks/withConfirmation/i18n/index.js +5 -0
  204. package/dist/utils/hooks/withConfirmation/i18n/index.js.map +1 -0
  205. package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.d.ts +3 -0
  206. package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.js +57 -0
  207. package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.js.map +1 -0
  208. package/dist/utils/monaco/insertSnippet.d.ts +1 -0
  209. package/dist/utils/monaco/insertSnippet.js +8 -0
  210. package/dist/utils/monaco/insertSnippet.js.map +1 -0
  211. package/dist/utils/nodes.d.ts +1 -4
  212. package/dist/utils/nodes.js +0 -36
  213. package/dist/utils/nodes.js.map +1 -1
  214. package/dist/utils/query.d.ts +1 -1
  215. package/dist/utils/storage.d.ts +1 -3
  216. package/dist/utils/storage.js +0 -17
  217. package/dist/utils/storage.js.map +1 -1
  218. package/dist/utils/timeParsers/parsers.d.ts +1 -1
  219. package/dist/utils/timeParsers/parsers.js +3 -2
  220. package/dist/utils/timeParsers/parsers.js.map +1 -1
  221. package/package.json +2 -1
@@ -5,11 +5,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  import React from 'react';
6
6
  import { NavigationTree } from 'ydb-ui-components';
7
7
  import { useCreateDirectoryFeatureAvailable } from '../../../../store/reducers/capabilities/hooks';
8
+ import { selectUserInput } from '../../../../store/reducers/executeQuery';
8
9
  import { schemaApi } from '../../../../store/reducers/schema/schema';
9
10
  import { tableSchemaDataApi } from '../../../../store/reducers/tableSchemaData';
10
11
  import { wait } from '../../../../utils';
11
12
  import { SECOND_IN_MS } from '../../../../utils/constants';
12
- import { useQueryExecutionSettings, useTypedDispatch } from '../../../../utils/hooks';
13
+ import { useQueryExecutionSettings, useTypedDispatch, useTypedSelector, } from '../../../../utils/hooks';
14
+ import { getConfirmation } from '../../../../utils/hooks/withConfirmation/useChangeInputWithConfirmation';
13
15
  import { getSchemaControls } from '../../utils/controls';
14
16
  import { isChildlessPathType, mapPathTypeToNavigationTreeType } from '../../utils/schema';
15
17
  import { getActions } from '../../utils/schemaActions';
@@ -20,6 +22,7 @@ export function SchemaTree(props) {
20
22
  const createDirectoryFeatureAvailable = useCreateDirectoryFeatureAvailable();
21
23
  const { rootPath, rootName, rootType, currentPath, onActivePathUpdate } = props;
22
24
  const dispatch = useTypedDispatch();
25
+ const input = useTypedSelector(selectUserInput);
23
26
  const [getTableSchemaDataMutation] = tableSchemaDataApi.useGetTableSchemaDataMutation();
24
27
  const getTableSchemaDataPromise = React.useCallback(async (args) => {
25
28
  try {
@@ -98,6 +101,7 @@ export function SchemaTree(props) {
98
101
  ? handleOpenCreateDirectoryDialog
99
102
  : undefined,
100
103
  getTableSchemaDataPromise,
104
+ getConfirmation: input ? getConfirmation : undefined,
101
105
  }, rootPath), renderAdditionalNodeElements: getSchemaControls(dispatch, {
102
106
  setActivePath: onActivePathUpdate,
103
107
  }), activePath: currentPath, onActivePathUpdate: onActivePathUpdate, cache: false, virtualize: true }, schemaTreeKey)] }));
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaTree.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,0FAA0F;AAC1F,uGAAuG;AACvG,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAC,kCAAkC,EAAC,MAAM,+CAA+C,CAAC;AACjG,OAAO,EAAC,SAAS,EAAC,MAAM,0CAA0C,CAAC;AACnE,OAAO,EAAC,kBAAkB,EAAC,MAAM,4CAA4C,CAAC;AAG9E,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAC,yBAAyB,EAAE,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAC,mBAAmB,EAAE,+BAA+B,EAAC,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAA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U,EAAE,UAAU,CAClB,QAAQ,EACR;oBACI,aAAa,EAAE,kBAAkB;oBACjC,4BAA4B,EAAE,CAAC,QAAQ,EAAE,EAAE,CACvC,yBAAyB,CAAC,EAAC,GAAG,aAAa,EAAE,GAAG,QAAQ,EAAC,CAAC;oBAC9D,yBAAyB,EAAE,+BAA+B;wBACtD,CAAC,CAAC,+BAA+B;wBACjC,CAAC,CAAC,SAAS;oBACf,yBAAyB;iBAC5B,EACD,QAAQ,CACX,EACD,4BAA4B,EAAE,iBAAiB,CAAC,QAAQ,EAAE;oBACtD,aAAa,EAAE,kBAAkB;iBACpC,CAAC,EACF,UAAU,EAAE,WAAW,EACvB,kBAAkB,EAAE,kBAAkB,EACtC,KAAK,EAAE,KAAK,EACZ,UAAU,UA3BL,aAAa,CA4BpB,IACW,CACpB,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"SchemaTree.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,0FAA0F;AAC1F,uGAAuG;AACvG,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAC,kCAAkC,EAAC,MAAM,+CAA+C,CAAC;AACjG,OAAO,EAAC,eAAe,EAAC,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAC,SAAS,EAAC,MAAM,0CAA0C,CAAC;AACnE,OAAO,EAAC,kBAAkB,EAAC,MAAM,4CAA4C,CAAC;AAG9E,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACzD,OAAO,EACH,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,eAAe,EAAC,MAAM,yEAAyE,CAAC;AACxG,OAAO,EAAC,iBAAi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EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,+BAA+B,CAAC,QAAQ,CAAC;oBAC/C,SAAS,EAAE,KAAK;iBACnB,EACD,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,CAClB,QAAQ,EACR;oBACI,aAAa,EAAE,kBAAkB;oBACjC,4BAA4B,EAAE,CAAC,QAAQ,EAAE,EAAE,CACvC,yBAAyB,CAAC,EAAC,GAAG,aAAa,EAAE,GAAG,QAAQ,EAAC,CAAC;oBAC9D,yBAAyB,EAAE,+BAA+B;wBACtD,CAAC,CAAC,+BAA+B;wBACjC,CAAC,CAAC,SAAS;oBACf,yBAAyB;oBACzB,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS;iBACvD,EACD,QAAQ,CACX,EACD,4BAA4B,EAAE,iBAAiB,CAAC,QAAQ,EAAE;oBACtD,aAAa,EAAE,kBAAkB;iBACpC,CAAC,EACF,UAAU,EAAE,WAAW,EACvB,kBAAkB,EAAE,kBAAkB,EACtC,KAAK,EAAE,KAAK,EACZ,UAAU,UA5BL,aAAa,CA6BpB,IACW,CACpB,CAAC;AACN,CAAC"}
@@ -13,8 +13,9 @@ import { QueryResultTable } from '../../../../components/QueryResultTable/QueryR
13
13
  import { disableFullscreen } from '../../../../store/reducers/fullscreen';
14
14
  import { getArray } from '../../../../utils';
15
15
  import { cn } from '../../../../utils/cn';
16
+ import { USE_SHOW_PLAN_SVG_KEY } from '../../../../utils/constants';
16
17
  import { getStringifiedData } from '../../../../utils/dataFormatters/dataFormatters';
17
- import { useTypedDispatch } from '../../../../utils/hooks';
18
+ import { useSetting, useTypedDispatch } from '../../../../utils/hooks';
18
19
  import { parseQueryError } from '../../../../utils/query';
19
20
  import { PaneVisibilityToggleButtons } from '../../utils/paneVisibilityToggleHelpers';
20
21
  import { CancelQueryButton } from '../CancelQueryButton/CancelQueryButton';
@@ -24,6 +25,7 @@ import { QueryDuration } from '../QueryDuration/QueryDuration';
24
25
  import { QuerySettingsBanner } from '../QuerySettingsBanner/QuerySettingsBanner';
25
26
  import { getPreparedResult } from '../utils/getPreparedResult';
26
27
  import { isQueryCancelledError } from '../utils/isQueryCancelledError';
28
+ import { PlanToSvgButton } from './PlanToSvgButton';
27
29
  import { TraceButton } from './TraceButton';
28
30
  import i18n from './i18n';
29
31
  import { getPlan } from './utils';
@@ -40,6 +42,7 @@ export function ExecuteResult({ result, isResultsCollapsed, theme, tenantName, o
40
42
  const [selectedResultSet, setSelectedResultSet] = React.useState(0);
41
43
  const [activeSection, setActiveSection] = React.useState(resultOptionsIds.result);
42
44
  const dispatch = useTypedDispatch();
45
+ const [useShowPlanToSvg] = useSetting(USE_SHOW_PLAN_SVG_KEY);
43
46
  const { error, isLoading, queryId, data } = result;
44
47
  const stats = data === null || data === void 0 ? void 0 : data.stats;
45
48
  const resultsSetsCount = ((_a = data === null || data === void 0 ? void 0 : data.resultSets) === null || _a === void 0 ? void 0 : _a.length) || 0;
@@ -146,6 +149,6 @@ export function ExecuteResult({ result, isResultsCollapsed, theme, tenantName, o
146
149
  }
147
150
  return null;
148
151
  };
149
- return (_jsxs(React.Fragment, { children: [_jsxs("div", { className: b('controls'), children: [_jsxs("div", { className: b('controls-right'), children: [_jsx(QueryExecutionStatus, { error: error, loading: isLoading }), !error && !isLoading && (_jsxs(React.Fragment, { children: [(stats === null || stats === void 0 ? void 0 : stats.DurationUs) !== undefined && (_jsx(QueryDuration, { duration: Number(stats.DurationUs) })), resultOptions && activeSection && (_jsxs(React.Fragment, { children: [_jsx(Divider, {}), _jsx(RadioButton, { options: resultOptions, value: activeSection, onUpdate: onSelectSection })] }))] })), isLoading ? (_jsxs(React.Fragment, { children: [_jsx(ElapsedTime, { className: b('elapsed-time') }), _jsx(CancelQueryButton, { queryId: queryId, tenantName: tenantName })] })) : null, (data === null || data === void 0 ? void 0 : data.traceId) ? (_jsx(TraceButton, { traceId: data.traceId, isTraceReady: result.isTraceReady })) : null] }), _jsxs("div", { className: b('controls-left'), children: [renderClipboardButton(), _jsx(EnableFullscreenButton, {}), _jsx(PaneVisibilityToggleButtons, { onCollapse: onCollapseResults, onExpand: onExpandResults, isCollapsed: isResultsCollapsed, initialDirection: "bottom" })] })] }), isLoading || isQueryCancelledError(error) ? null : _jsx(QuerySettingsBanner, {}), _jsx(LoaderWrapper, { loading: isLoading, children: _jsx(Fullscreen, { children: renderResultSection() }) })] }));
152
+ return (_jsxs(React.Fragment, { children: [_jsxs("div", { className: b('controls'), children: [_jsxs("div", { className: b('controls-right'), children: [_jsx(QueryExecutionStatus, { error: error, loading: isLoading }), !error && !isLoading && (_jsxs(React.Fragment, { children: [(stats === null || stats === void 0 ? void 0 : stats.DurationUs) !== undefined && (_jsx(QueryDuration, { duration: Number(stats.DurationUs) })), resultOptions && activeSection && (_jsxs(React.Fragment, { children: [_jsx(Divider, {}), _jsx(RadioButton, { options: resultOptions, value: activeSection, onUpdate: onSelectSection })] }))] })), isLoading ? (_jsxs(React.Fragment, { children: [_jsx(ElapsedTime, { className: b('elapsed-time') }), _jsx(CancelQueryButton, { queryId: queryId, tenantName: tenantName })] })) : null, (data === null || data === void 0 ? void 0 : data.traceId) ? (_jsx(TraceButton, { traceId: data.traceId, isTraceReady: result.isTraceReady })) : null, (data === null || data === void 0 ? void 0 : data.plan) && useShowPlanToSvg ? (_jsx(PlanToSvgButton, { plan: data === null || data === void 0 ? void 0 : data.plan, database: tenantName })) : null] }), _jsxs("div", { className: b('controls-left'), children: [renderClipboardButton(), _jsx(EnableFullscreenButton, {}), _jsx(PaneVisibilityToggleButtons, { onCollapse: onCollapseResults, onExpand: onExpandResults, isCollapsed: isResultsCollapsed, initialDirection: "bottom" })] })] }), isLoading || isQueryCancelledError(error) ? null : _jsx(QuerySettingsBanner, {}), _jsx(LoaderWrapper, { loading: isLoading, children: _jsx(Fullscreen, { children: renderResultSection() }) })] }));
150
153
  }
151
154
  //# sourceMappingURL=Exec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J,IAAI,CAAE,IAAI,KAAI,gBAAgB,CAAC,CAAC,CAAC,CAC9B,KAAC,eAAe,IAAC,IAAI,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,GAAI,CAC9D,CAAC,CAAC,CAAC,IAAI,IACN,EACN,eAAK,SAAS,EAAE,CAAC,CAAC,eAAe,CAAC,aAC7B,qBAAqB,EAAE,EACxB,KAAC,sBAAsB,KAAG,EAC1B,KAAC,2BAA2B,IACxB,UAAU,EAAE,iBAAiB,EAC7B,QAAQ,EAAE,eAAe,EACzB,WAAW,EAAE,kBAAkB,EAC/B,gBAAgB,EAAC,QAAQ,GAC3B,IACA,IACJ,EACL,SAAS,IAAI,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,mBAAmB,KAAG,EAC3E,KAAC,aAAa,IAAC,OAAO,EAAE,SAAS,YAC7B,KAAC,UAAU,cAAE,mBAAmB,EAAE,GAAc,GACpC,IACH,CACpB,CAAC;AACN,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { QueryPlan, ScriptPlan } from '../../../../types/api/query';
2
+ interface PlanToSvgButtonProps {
3
+ plan: QueryPlan | ScriptPlan;
4
+ database: string;
5
+ }
6
+ export declare function PlanToSvgButton({ plan, database }: PlanToSvgButtonProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,40 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { ArrowUpRightFromSquare } from '@gravity-ui/icons';
4
+ import { Button, Tooltip } from '@gravity-ui/uikit';
5
+ import { planToSvgApi } from '../../../../store/reducers/planToSvg';
6
+ import i18n from './i18n';
7
+ function getButtonView(error, isLoading) {
8
+ if (error) {
9
+ return 'flat-danger';
10
+ }
11
+ return isLoading ? 'flat-secondary' : 'flat-info';
12
+ }
13
+ export function PlanToSvgButton({ plan, database }) {
14
+ const [error, setError] = React.useState(null);
15
+ const [blobUrl, setBlobUrl] = React.useState(null);
16
+ const [getPlanToSvg, { isLoading }] = planToSvgApi.useLazyPlanToSvgQueryQuery();
17
+ const handleClick = React.useCallback(() => {
18
+ getPlanToSvg({ plan, database })
19
+ .unwrap()
20
+ .then((result) => {
21
+ const blob = new Blob([result], { type: 'image/svg+xml' });
22
+ const url = URL.createObjectURL(blob);
23
+ setBlobUrl(url);
24
+ setError(null);
25
+ window.open(url, '_blank');
26
+ })
27
+ .catch((err) => {
28
+ setError(JSON.stringify(err));
29
+ });
30
+ }, [database, getPlanToSvg, plan]);
31
+ React.useEffect(() => {
32
+ return () => {
33
+ if (blobUrl) {
34
+ URL.revokeObjectURL(blobUrl);
35
+ }
36
+ };
37
+ }, [blobUrl]);
38
+ return (_jsx(Tooltip, { content: error ? i18n('text_error-plan-svg', { error }) : i18n('text_open-plan-svg'), children: _jsxs(Button, { view: getButtonView(error, isLoading), loading: isLoading, onClick: handleClick, disabled: isLoading, children: [i18n('text_plan-svg'), _jsx(Button.Icon, { children: _jsx(ArrowUpRightFromSquare, {}) })] }) }));
39
+ }
40
+ //# sourceMappingURL=PlanToSvgButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlanToSvgButton.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,MAAM,EAAE,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAC,YAAY,EAAC,MAAM,sCAAsC,CAAC;AAGlE,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,SAAS,aAAa,CAAC,KAAoB,EAAE,SAAkB;IAC3D,IAAI,KAAK,EAAE,CAAC;QACR,OAAO,aAAa,CAAC;IACzB,CAAC;IACD,OAA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,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YACjC,CAAC;QACL,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CACH,KAAC,OAAO,IACJ,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAC,KAAK,EAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,YAElF,MAAC,MAAM,IACH,IAAI,EAAE,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,EACrC,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,SAAS,aAElB,IAAI,CAAC,eAAe,CAAC,EACtB,KAAC,MAAM,CAAC,IAAI,cACR,KAAC,sBAAsB,KAAG,GAChB,IACT,GACH,CACb,CAAC;AACN,CAAC"}
@@ -10,7 +10,7 @@ export function TraceButton({ traceId, isTraceReady }) {
10
10
  const { traceCheck, traceView } = useClusterBaseInfo();
11
11
  const checkTraceUrl = (traceCheck === null || traceCheck === void 0 ? void 0 : traceCheck.url) ? replaceParams(traceCheck.url, { traceId }) : '';
12
12
  const traceUrl = (traceView === null || traceView === void 0 ? void 0 : traceView.url) ? replaceParams(traceView.url, { traceId }) : '';
13
- const [checkTrace, { isLoading, isUninitialized }] = traceApi.useCheckTraceMutation();
13
+ const [checkTrace, { isLoading, isUninitialized }] = traceApi.useLazyCheckTraceQuery();
14
14
  React.useEffect(() => {
15
15
  let checkTraceMutation;
16
16
  if (checkTraceUrl && !isTraceReady) {
@@ -1 +1 @@
1
- {"version":3,"file":"TraceButton.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/ExecuteResult/TraceButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;A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C,OAAO,EAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAE/E,MAAM,CAAC,UAAU,EAAE,EAAC,SAAS,EAAE,eAAe,EAAC,CAAC,GAAG,QAAQ,CAAC,sBAAsB,EAAE,CAAC;IAErF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,kBAA8C,CAAC;QACnD,IAAI,aAAa,IAAI,CAAC,YAAY,EAAE,CAAC;YACjC,kBAAkB,GAAG,UAAU,CAAC,EAAC,GAAG,EAAE,aAAa,EAAC,CAAC,CAAC;QAC1D,CAAC;QAED,OAAO,GAAG,EAAE,CAAC,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,KAAK,EAAE,CAAC;IAC7C,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC;IAE9C,IAAI,CAAC,QAAQ,IAAI,CAAC,eAAe,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QAClD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,MAAC,MAAM,IACH,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,WAAW,EAChD,OAAO,EAAE,SAAS,EAClB,IAAI,EAAE,QAAQ,EACd,MAAM,EAAC,QAAQ,aAEd,IAAI,CAAC,OAAO,CAAC,EACd,KAAC,MAAM,CAAC,IAAI,cACR,KAAC,sBAAsB,KAAG,GAChB,IACT,CACZ,CAAC;AACN,CAAC"}
@@ -7,5 +7,8 @@
7
7
  "action.copy": "Copy {{activeSection}}",
8
8
  "trace": "Trace",
9
9
  "title.truncated": "Truncated",
10
- "title.result": "Result"
10
+ "title.result": "Result",
11
+ "text_plan-svg": "Execution plan",
12
+ "text_open-plan-svg": "Open execution plan in new window",
13
+ "text_error-plan-svg": "Error: {{error}}"
11
14
  }
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "trace" | "description.graph-is-not-supported" | "action.result" | "action.stats" | "action.schema" | "action.explain-plan" | "action.copy" | "title.truncated" | "title.result", params?: import("@gravity-ui/i18n").Params) => string;
1
+ declare const _default: (key: "trace" | "description.graph-is-not-supported" | "action.result" | "action.stats" | "action.schema" | "action.explain-plan" | "action.copy" | "title.truncated" | "title.result" | "text_plan-svg" | "text_open-plan-svg" | "text_error-plan-svg", params?: import("@gravity-ui/i18n").Params) => string;
2
2
  export default _default;
@@ -1,12 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
2
3
  import { ChevronDown } from '@gravity-ui/icons';
3
4
  import { Button, DropdownMenu } from '@gravity-ui/uikit';
4
- import { useTypedDispatch } from '../../../../utils/hooks';
5
+ import { useChangeInputWithConfirmation } from '../../../../utils/hooks/withConfirmation/useChangeInputWithConfirmation';
6
+ import { insertSnippetToEditor } from '../../../../utils/monaco/insertSnippet';
5
7
  import { bindActions } from '../../utils/newSQLQueryActions';
6
8
  import i18n from './i18n';
7
9
  export function NewSQL() {
8
- const dispatch = useTypedDispatch();
9
- const actions = bindActions(dispatch);
10
+ const insertTemplate = React.useCallback((input) => {
11
+ insertSnippetToEditor(input);
12
+ }, []);
13
+ const onTemplateClick = useChangeInputWithConfirmation(insertTemplate);
14
+ const actions = bindActions(onTemplateClick);
10
15
  const items = [
11
16
  {
12
17
  text: i18n('menu.tables'),
@@ -39,10 +44,6 @@ export function NewSQL() {
39
44
  text: i18n('action.select-rows'),
40
45
  action: actions.selectQuery,
41
46
  },
42
- {
43
- text: i18n('action.select-from-external-table'),
44
- action: actions.selectQueryFromExternalTable,
45
- },
46
47
  {
47
48
  text: i18n('action.delete-rows'),
48
49
  action: actions.deleteRows,
@@ -1 +1 @@
1
- {"version":3,"file":"NewSQL.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/NewSQL/NewSQL.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAC,M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1B,KAAK,EAAE;gBACH;oBACI,IAAI,EAAE,IAAI,CAAC,0BAA0B,CAAC;oBACtC,MAAM,EAAE,OAAO,CAAC,eAAe;iBAClC;aACJ;SACJ;QACD;YACI,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC;YACxB,KAAK,EAAE;gBACH;oBACI,IAAI,EAAE,IAAI,CAAC,oBAAoB,CAAC;oBAChC,MAAM,EAAE,OAAO,CAAC,UAAU;iBAC7B;gBACD;oBACI,IAAI,EAAE,IAAI,CAAC,qBAAqB,CAAC;oBACjC,MAAM,EAAE,OAAO,CAAC,WAAW;iBAC9B;gBACD;oBACI,IAAI,EAAE,IAAI,CAAC,kBAAkB,CAAC;oBAC9B,MAAM,EAAE,OAAO,CAAC,QAAQ;iBAC3B;gBACD;oBACI,IAAI,EAAE,IAAI,CAAC,mBAAmB,CAAC;oBAC/B,MAAM,EAAE,OAAO,CAAC,SAAS;iBAC5B;gBACD;oBACI,IAAI,EAAE,IAAI,CAAC,wBAAwB,CAAC;oBACpC,MAAM,EAAE,OAAO,CAAC,cAAc;iBACjC;gBACD;oBACI,IAAI,EAAE,IAAI,CAAC,yBAAyB,CAAC;oBACrC,MAAM,EAAE,OAAO,CAAC,eAAe;iBAClC;aACJ;SACJ;KACJ,CAAC;IAEF,OAAO,CACH,KAAC,YAAY,IACT,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CACvB,MAAC,MAAM,OAAK,KAAK,aACZ,IAAI,CAAC,gBAAgB,CAAC,EACvB,KAAC,MAAM,CAAC,IAAI,cACR,KAAC,WAAW,KAAG,GACL,IACT,CACZ,EACD,UAAU,EAAE,EAAC,SAAS,EAAE,KAAK,EAAC,GAChC,CACL,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"NewSQL.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/NewSQL/NewSQL.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;A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EAAE,KAAK,EAAC,GAChC,CACL,CAAC;AACN,CAAC"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "button.new-sql": "New SQL",
2
+ "button.new-sql": "New query",
3
3
  "action.create-row-table": "Create row table",
4
4
  "action.create-column-table": "Create column table",
5
5
  "action.create-external-table": "Create external table",
@@ -7,7 +7,6 @@
7
7
  "action.update-table": "Update table",
8
8
  "action.alter-table": "Alter table",
9
9
  "action.select-rows": "Select from a table",
10
- "action.select-from-external-table": "Select from external table",
11
10
  "action.delete-rows": "Delete rows",
12
11
  "action.drop-table": "Drop table",
13
12
  "action.add-index": "Add index",
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "button.new-sql" | "action.create-row-table" | "action.create-column-table" | "action.create-external-table" | "action.upsert-to-table" | "action.update-table" | "action.alter-table" | "action.select-rows" | "action.select-from-external-table" | "action.delete-rows" | "action.drop-table" | "action.add-index" | "action.drop-index" | "action.drop-external-table" | "menu.tables" | "menu.topics" | "menu.capture" | "menu.replication" | "menu.users" | "action.create-topic" | "action.drop-topic" | "action.alter-topic" | "action.create-cdc-stream" | "action.create-async-replication" | "action.create-user" | "action.create-group" | "action.drop-user" | "action.drop-group" | "action.grant-privilege" | "action.revoke-privilege" | "action.alter-async-replication" | "action.drop-async-replication", params?: import("@gravity-ui/i18n").Params) => string;
1
+ declare const _default: (key: "button.new-sql" | "action.create-row-table" | "action.create-column-table" | "action.create-external-table" | "action.upsert-to-table" | "action.update-table" | "action.alter-table" | "action.select-rows" | "action.delete-rows" | "action.drop-table" | "action.add-index" | "action.drop-index" | "action.drop-external-table" | "menu.tables" | "menu.topics" | "menu.capture" | "menu.replication" | "menu.users" | "action.create-topic" | "action.drop-topic" | "action.alter-topic" | "action.create-cdc-stream" | "action.create-async-replication" | "action.create-user" | "action.create-group" | "action.drop-user" | "action.drop-group" | "action.grant-privilege" | "action.revoke-privilege" | "action.alter-async-replication" | "action.drop-async-replication", params?: import("@gravity-ui/i18n").Params) => string;
2
2
  export default _default;
@@ -9,6 +9,7 @@ import { setQueryTab } from '../../../../store/reducers/tenant/tenant';
9
9
  import { cn } from '../../../../utils/cn';
10
10
  import { formatDateTime } from '../../../../utils/dataFormatters/dataFormatters';
11
11
  import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
12
+ import { useChangeInputWithConfirmation } from '../../../../utils/hooks/withConfirmation/useChangeInputWithConfirmation';
12
13
  import { formatToMs, parseUsToMs } from '../../../../utils/timeParsers';
13
14
  import { MAX_QUERY_HEIGHT, QUERY_TABLE_SETTINGS } from '../../utils/constants';
14
15
  import i18n from '../i18n';
@@ -20,10 +21,11 @@ function QueriesHistory({ changeUserInput }) {
20
21
  const queriesHistory = useTypedSelector(selectQueriesHistory);
21
22
  const filter = useTypedSelector(selectQueriesHistoryFilter);
22
23
  const reversedHistory = [...queriesHistory].reverse();
23
- const onQueryClick = (query) => {
24
+ const applyQueryClick = (query) => {
24
25
  changeUserInput({ input: query.queryText });
25
26
  dispatch(setQueryTab(TENANT_QUERY_TABS_ID.newQuery));
26
27
  };
28
+ const onQueryClick = useChangeInputWithConfirmation(applyQueryClick);
27
29
  const onChangeFilter = (value) => {
28
30
  dispatch(setQueryHistoryFilter(value));
29
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"QueriesHistory.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/QueriesHistory/QueriesHistory.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,mBAAmB,EAAC,MAAM,gEAAgE,CAAC;AACnG,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAC,uBAAuB,EAAC,MAAM,wEAAwE,CAAC;AAC/G,OAAO,EAAC,cAAc,EAAC,MAAM,sDAAsD,CAAC;AACpF,OAAO,EACH,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,GACxB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAC,WAAW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,CAAC,KAAK,cAC1B,KAAC,mBAAmB,IAChB,iBAAiB,EAAE,oCAAoC,EACvD,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,eAAe,EACrB,QAAQ,EAAE,oBAAoB,EAC9B,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,eAAe,CAAC,EACzE,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,EACtC,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,GACpC,GAC0B,IACV,CAC7B,CAAC;AACN,CAAC;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"QueriesHistory.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/QueriesHistory/QueriesHistory.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,mBAAmB,EAAC,MAAM,gEAAgE,CAAC;AACnG,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAC,uBAAuB,EAAC,MAAM,wEAAwE,CAAC;AAC/G,OAAO,EAAC,cAAc,EAAC,MAAM,sDAAsD,CAAC;AACpF,OAAO,EACH,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,GACxB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAC,WAAW,EAAC,MAAM,0CAA0C,CAAC;AAErE,OAAO,EAAC,EAAE,EAAC,MAAM,sBAAsB,CAAC;AACxC,OAAO,EAAC,cAAc,EAAC,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAC,gBAAgB,EAAE,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAC,8BAA8B,EAAC,MAAM,yEAAyE,CAAC;AACvH,OAAO,EAAC,UAAU,EAAE,WAAW,EAAC,MAAM,+BAA+B,CAAC;AACtE,OAAO,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,CAAC,eAAe,CAAC,EACzE,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,EACtC,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,GACpC,GAC0B,IACV,CAC7B,CAAC;AACN,CAAC;AAED,eAAe,cAAc,CAAC"}
@@ -1,9 +1,4 @@
1
- import React from 'react';
2
- import { goToNextQuery, goToPreviousQuery, saveQueryToHistory, setQueryResult, setTenantPath } from '../../../../store/reducers/executeQuery';
3
- import { setQueryAction } from '../../../../store/reducers/queryActions/queryActions';
4
- import { setShowPreview } from '../../../../store/reducers/schema/schema';
5
1
  import type { EPathType } from '../../../../types/api/schema';
6
- import type { ExecuteQueryState } from '../../../../types/store/executeQuery';
7
2
  import './QueryEditor.scss';
8
3
  interface QueryEditorProps {
9
4
  tenantName: string;
@@ -11,28 +6,8 @@ interface QueryEditorProps {
11
6
  changeUserInput: (arg: {
12
7
  input: string;
13
8
  }) => void;
14
- goToNextQuery: (...args: Parameters<typeof goToNextQuery>) => void;
15
- goToPreviousQuery: (...args: Parameters<typeof goToPreviousQuery>) => void;
16
- setTenantPath: (...args: Parameters<typeof setTenantPath>) => void;
17
- setQueryAction: (...args: Parameters<typeof setQueryAction>) => void;
18
- setQueryResult: (...args: Parameters<typeof setQueryResult>) => void;
19
- executeQuery: ExecuteQueryState;
20
9
  theme: string;
21
10
  type?: EPathType;
22
- showPreview: boolean;
23
- setShowPreview: (...args: Parameters<typeof setShowPreview>) => void;
24
- saveQueryToHistory: (...args: Parameters<typeof saveQueryToHistory>) => void;
25
11
  }
26
- declare function QueryEditor(props: QueryEditorProps): import("react/jsx-runtime").JSX.Element;
27
- declare const _default: import("react-redux").ConnectedComponent<typeof QueryEditor, {
28
- theme: string;
29
- path: string;
30
- type?: EPathType;
31
- tenantName: string;
32
- changeUserInput: (arg: {
33
- input: string;
34
- }) => void;
35
- context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction> | null>;
36
- store?: import("redux").Store;
37
- }>;
38
- export default _default;
12
+ export default function QueryEditor(props: QueryEditorProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -1,20 +1,20 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
+ import NiceModal from '@ebay/nice-modal-react';
3
4
  import { isEqual } from 'lodash';
4
5
  import throttle from 'lodash/throttle';
5
- import { connect } from 'react-redux';
6
6
  import { v4 as uuidv4 } from 'uuid';
7
7
  import { MonacoEditor } from '../../../../components/MonacoEditor/MonacoEditor';
8
8
  import SplitPane from '../../../../components/SplitPane';
9
9
  import { useTracingLevelOptionAvailable } from '../../../../store/reducers/capabilities/hooks';
10
- import { executeQueryApi, goToNextQuery, goToPreviousQuery, saveQueryToHistory, setQueryResult, setTenantPath, } from '../../../../store/reducers/executeQuery';
10
+ import { executeQueryApi, goToNextQuery, goToPreviousQuery, saveQueryToHistory, selectQueriesHistory, selectQueriesHistoryCurrentIndex, selectResult, selectTenantPath, selectUserInput, setTenantPath, } from '../../../../store/reducers/executeQuery';
11
11
  import { explainQueryApi } from '../../../../store/reducers/explainQuery/explainQuery';
12
12
  import { setQueryAction } from '../../../../store/reducers/queryActions/queryActions';
13
- import { setShowPreview } from '../../../../store/reducers/schema/schema';
13
+ import { selectShowPreview, setShowPreview } from '../../../../store/reducers/schema/schema';
14
14
  import { ResultType } from '../../../../types/store/executeQuery';
15
15
  import { cn } from '../../../../utils/cn';
16
16
  import { DEFAULT_IS_QUERY_RESULT_COLLAPSED, DEFAULT_SIZE_RESULT_PANE_KEY, LAST_USED_QUERY_ACTION_KEY, } from '../../../../utils/constants';
17
- import { useEventHandler, useQueryExecutionSettings, useSetting } from '../../../../utils/hooks';
17
+ import { useEventHandler, useQueryExecutionSettings, useSetting, useTypedDispatch, useTypedSelector, } from '../../../../utils/hooks';
18
18
  import { useChangedQuerySettings } from '../../../../utils/hooks/useChangedQuerySettings';
19
19
  import { useLastQueryExecutionSettings } from '../../../../utils/hooks/useLastQueryExecutionSettings';
20
20
  import { YQL_LANGUAGE_ID } from '../../../../utils/monaco/constats';
@@ -25,7 +25,7 @@ import { ExplainResult } from '../ExplainResult/ExplainResult';
25
25
  import { Preview } from '../Preview/Preview';
26
26
  import { QueryEditorControls } from '../QueryEditorControls/QueryEditorControls';
27
27
  import { QuerySettingsDialog } from '../QuerySettingsDialog/QuerySettingsDialog';
28
- import { SaveQueryDialog } from '../SaveQuery/SaveQuery';
28
+ import { SAVE_QUERY_DIALOG } from '../SaveQuery/SaveQuery';
29
29
  import i18n from '../i18n';
30
30
  import { useEditorOptions } from './helpers';
31
31
  import { getKeyBindings } from './keybindings';
@@ -37,12 +37,17 @@ const initialTenantCommonInfoState = {
37
37
  triggerCollapse: false,
38
38
  collapsed: true,
39
39
  };
40
- function QueryEditor(props) {
41
- var _a;
40
+ export default function QueryEditor(props) {
42
41
  const editorOptions = useEditorOptions();
43
- const { tenantName, path, setTenantPath: setPath, executeQuery, type, theme, changeUserInput, setQueryResult, showPreview, } = props;
44
- const { tenantPath: savedPath } = executeQuery;
45
- const isResultLoaded = Boolean(executeQuery.result);
42
+ const dispatch = useTypedDispatch();
43
+ const { tenantName, path, type, theme, changeUserInput } = props;
44
+ const savedPath = useTypedSelector(selectTenantPath);
45
+ const result = useTypedSelector(selectResult);
46
+ const historyQueries = useTypedSelector(selectQueriesHistory);
47
+ const historyCurrentIndex = useTypedSelector(selectQueriesHistoryCurrentIndex);
48
+ const input = useTypedSelector(selectUserInput);
49
+ const showPreview = useTypedSelector(selectShowPreview);
50
+ const isResultLoaded = Boolean(result);
46
51
  const [querySettings] = useQueryExecutionSettings();
47
52
  const enableTracingLevel = useTracingLevelOptionAvailable();
48
53
  const [lastQueryExecutionSettings, setLastQueryExecutionSettings] = useLastQueryExecutionSettings();
@@ -52,33 +57,29 @@ function QueryEditor(props) {
52
57
  const [sendExplainQuery] = explainQueryApi.useExplainQueryMutation();
53
58
  React.useEffect(() => {
54
59
  if (savedPath !== tenantName) {
55
- if (savedPath) {
56
- changeUserInput({ input: '' });
57
- setQueryResult();
58
- }
59
- setPath(tenantName);
60
+ dispatch(setTenantPath(tenantName));
60
61
  }
61
- }, [changeUserInput, setPath, setQueryResult, tenantName, savedPath]);
62
+ }, [dispatch, tenantName, savedPath]);
62
63
  const [resultVisibilityState, dispatchResultVisibilityState] = React.useReducer(paneVisibilityToggleReducerCreator(DEFAULT_IS_QUERY_RESULT_COLLAPSED), initialTenantCommonInfoState);
63
64
  React.useEffect(() => {
64
65
  dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerCollapse);
65
66
  }, []);
66
67
  React.useEffect(() => {
67
- if (props.showPreview || isResultLoaded) {
68
+ if (showPreview || isResultLoaded) {
68
69
  dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerExpand);
69
70
  }
70
71
  else {
71
72
  dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerCollapse);
72
73
  }
73
- }, [props.showPreview, isResultLoaded]);
74
+ }, [showPreview, isResultLoaded]);
74
75
  const getLastQueryText = useEventHandler(() => {
75
- var _a;
76
- const { history } = executeQuery;
77
- return ((_a = history.queries[history.queries.length - 1]) === null || _a === void 0 ? void 0 : _a.queryText) || '';
76
+ if (!historyQueries || historyQueries.length === 0) {
77
+ return '';
78
+ }
79
+ return historyQueries[historyQueries.length - 1].queryText;
78
80
  });
79
81
  const handleSendExecuteClick = useEventHandler((text) => {
80
82
  var _a;
81
- const { input, history } = executeQuery;
82
83
  const query = text !== null && text !== void 0 ? text : input;
83
84
  setLastUsedQueryAction(QUERY_ACTIONS.execute);
84
85
  if (!isEqual(lastQueryExecutionSettings, querySettings)) {
@@ -93,21 +94,19 @@ function QueryEditor(props) {
93
94
  enableTracingLevel,
94
95
  queryId,
95
96
  });
96
- props.setShowPreview(false);
97
+ dispatch(setShowPreview(false));
97
98
  // Don't save partial queries in history
98
99
  if (!text) {
99
- const { queries, currentIndex } = history;
100
- if (query !== ((_a = queries[currentIndex]) === null || _a === void 0 ? void 0 : _a.queryText)) {
101
- props.saveQueryToHistory(input, queryId);
100
+ if (query !== ((_a = historyQueries[historyCurrentIndex]) === null || _a === void 0 ? void 0 : _a.queryText)) {
101
+ dispatch(saveQueryToHistory({ queryText: input, queryId }));
102
102
  }
103
103
  }
104
104
  dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerExpand);
105
105
  });
106
106
  const handleSettingsClick = () => {
107
- props.setQueryAction('settings');
107
+ dispatch(setQueryAction('settings'));
108
108
  };
109
109
  const handleGetExplainQueryClick = useEventHandler(() => {
110
- const { input } = executeQuery;
111
110
  setLastUsedQueryAction(QUERY_ACTIONS.explain);
112
111
  if (!isEqual(lastQueryExecutionSettings, querySettings)) {
113
112
  resetBanner();
@@ -121,7 +120,7 @@ function QueryEditor(props) {
121
120
  enableTracingLevel,
122
121
  queryId,
123
122
  });
124
- props.setShowPreview(false);
123
+ dispatch(setShowPreview(false));
125
124
  dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerExpand);
126
125
  });
127
126
  const handleSendQuery = useEventHandler(() => {
@@ -132,8 +131,21 @@ function QueryEditor(props) {
132
131
  handleSendExecuteClick();
133
132
  }
134
133
  });
134
+ const editorWillUnmount = () => {
135
+ window.ydbEditor = undefined;
136
+ };
135
137
  const editorDidMount = (editor, monaco) => {
138
+ window.ydbEditor = editor;
136
139
  const keybindings = getKeyBindings(monaco);
140
+ monaco.editor.registerCommand('insertSnippetToEditor', (_asessor, input) => {
141
+ //suggestController is not properly typed yet in monaco-editor package
142
+ const contribution = editor.getContribution('snippetController2');
143
+ if (contribution) {
144
+ editor.focus();
145
+ editor.setValue('');
146
+ contribution.insert(input);
147
+ }
148
+ });
137
149
  initResizeHandler(editor);
138
150
  initUserPrompt(editor, getLastQueryText);
139
151
  editor.focus();
@@ -186,7 +198,7 @@ function QueryEditor(props) {
186
198
  contextMenuGroupId: CONTEXT_MENU_GROUP_ID,
187
199
  contextMenuOrder: 2,
188
200
  run: () => {
189
- props.goToPreviousQuery();
201
+ dispatch(goToPreviousQuery());
190
202
  },
191
203
  });
192
204
  editor.addAction({
@@ -196,7 +208,7 @@ function QueryEditor(props) {
196
208
  contextMenuGroupId: CONTEXT_MENU_GROUP_ID,
197
209
  contextMenuOrder: 3,
198
210
  run: () => {
199
- props.goToNextQuery();
211
+ dispatch(goToNextQuery());
200
212
  },
201
213
  });
202
214
  editor.addAction({
@@ -204,12 +216,12 @@ function QueryEditor(props) {
204
216
  label: i18n('action.save-query'),
205
217
  keybindings: [keybindings.saveQuery],
206
218
  run: () => {
207
- props.setQueryAction('save');
219
+ NiceModal.show(SAVE_QUERY_DIALOG);
208
220
  },
209
221
  });
210
222
  };
211
223
  const onChange = (newValue) => {
212
- props.changeUserInput({ input: newValue });
224
+ changeUserInput({ input: newValue });
213
225
  };
214
226
  const onCollapseResultHandler = () => {
215
227
  dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerCollapse);
@@ -221,29 +233,12 @@ function QueryEditor(props) {
221
233
  dispatchResultVisibilityState(PaneVisibilityActionTypes.clear);
222
234
  };
223
235
  const renderControls = () => {
224
- var _a;
225
- return (_jsx(QueryEditorControls, { handleSendExecuteClick: handleSendExecuteClick, onSettingsButtonClick: handleSettingsClick, isLoading: Boolean((_a = executeQuery.result) === null || _a === void 0 ? void 0 : _a.isLoading), handleGetExplainQueryClick: handleGetExplainQueryClick, disabled: !executeQuery.input, highlightedAction: lastUsedQueryAction }));
236
+ return (_jsx(QueryEditorControls, { handleSendExecuteClick: handleSendExecuteClick, onSettingsButtonClick: handleSettingsClick, isLoading: Boolean(result === null || result === void 0 ? void 0 : result.isLoading), handleGetExplainQueryClick: handleGetExplainQueryClick, disabled: !input, highlightedAction: lastUsedQueryAction }));
226
237
  };
227
238
  return (_jsxs("div", { className: b(), children: [_jsxs(SplitPane, { direction: "vertical", defaultSizePaneKey: DEFAULT_SIZE_RESULT_PANE_KEY, triggerCollapse: resultVisibilityState.triggerCollapse, triggerExpand: resultVisibilityState.triggerExpand, minSize: [0, 52], collapsedSizes: [100, 0], onSplitStartDragAdditional: onSplitStartDragAdditional, children: [_jsxs("div", { className: b('pane-wrapper', {
228
239
  top: true,
229
- }), children: [_jsx("div", { className: b('monaco-wrapper'), children: _jsx("div", { className: b('monaco'), children: _jsx(MonacoEditor, { language: YQL_LANGUAGE_ID, value: executeQuery.input, options: editorOptions, onChange: onChange, editorDidMount: editorDidMount, theme: `vs-${theme}` }) }) }), renderControls()] }), _jsx("div", { className: b('pane-wrapper'), children: _jsx(Result, { resultVisibilityState: resultVisibilityState, onExpandResultHandler: onExpandResultHandler, onCollapseResultHandler: onCollapseResultHandler, type: type, theme: theme, result: executeQuery.result, tenantName: tenantName, path: path, showPreview: showPreview }, (_a = executeQuery.result) === null || _a === void 0 ? void 0 : _a.queryId) })] }), _jsx(SaveQueryDialog, {}), _jsx(QuerySettingsDialog, {})] }));
240
+ }), children: [_jsx("div", { className: b('monaco-wrapper'), children: _jsx("div", { className: b('monaco'), children: _jsx(MonacoEditor, { language: YQL_LANGUAGE_ID, value: input, options: editorOptions, onChange: onChange, editorDidMount: editorDidMount, theme: `vs-${theme}`, editorWillUnmount: editorWillUnmount }) }) }), renderControls()] }), _jsx("div", { className: b('pane-wrapper'), children: _jsx(Result, { resultVisibilityState: resultVisibilityState, onExpandResultHandler: onExpandResultHandler, onCollapseResultHandler: onCollapseResultHandler, type: type, theme: theme, result: result, tenantName: tenantName, path: path, showPreview: showPreview }, result === null || result === void 0 ? void 0 : result.queryId) })] }), _jsx(QuerySettingsDialog, {})] }));
230
241
  }
231
- const mapStateToProps = (state) => {
232
- return {
233
- executeQuery: state.executeQuery,
234
- showPreview: state.schema.showPreview,
235
- };
236
- };
237
- const mapDispatchToProps = {
238
- saveQueryToHistory,
239
- goToPreviousQuery,
240
- goToNextQuery,
241
- setShowPreview,
242
- setTenantPath,
243
- setQueryAction,
244
- setQueryResult,
245
- };
246
- export default connect(mapStateToProps, mapDispatchToProps)(QueryEditor);
247
242
  function Result({ resultVisibilityState, onExpandResultHandler, onCollapseResultHandler, type, theme, result, tenantName, path, showPreview, }) {
248
243
  if (showPreview) {
249
244
  return _jsx(Preview, { database: tenantName, path: path, type: type });