ydb-embedded-ui 6.34.0 → 6.36.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/AutoRefreshControl/AutoRefreshControl.js +1 -1
  2. package/dist/components/AutoRefreshControl/AutoRefreshControl.js.map +1 -1
  3. package/dist/components/MemoryViewer/MemoryViewer.d.ts +1 -3
  4. package/dist/components/MemoryViewer/MemoryViewer.js +3 -1
  5. package/dist/components/MemoryViewer/MemoryViewer.js.map +1 -1
  6. package/dist/components/NodeHostWrapper/NodeHostWrapper.d.ts +5 -3
  7. package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -2
  8. package/dist/components/NodeHostWrapper/NodeHostWrapper.js.map +1 -1
  9. package/dist/components/PaginatedTable/PaginatedTable.js +9 -7
  10. package/dist/components/PaginatedTable/PaginatedTable.js.map +1 -1
  11. package/dist/components/PaginatedTable/TableChunk.d.ts +4 -5
  12. package/dist/components/PaginatedTable/TableChunk.js +7 -1
  13. package/dist/components/PaginatedTable/TableChunk.js.map +1 -1
  14. package/dist/components/nodesColumns/__test__/utils.test.d.ts +1 -0
  15. package/dist/components/nodesColumns/__test__/utils.test.js +28 -0
  16. package/dist/components/nodesColumns/__test__/utils.test.js.map +1 -0
  17. package/dist/components/nodesColumns/columns.d.ts +28 -2
  18. package/dist/components/nodesColumns/columns.js +83 -5
  19. package/dist/components/nodesColumns/columns.js.map +1 -1
  20. package/dist/components/nodesColumns/constants.d.ts +12 -0
  21. package/dist/components/nodesColumns/constants.js +36 -0
  22. package/dist/components/nodesColumns/constants.js.map +1 -1
  23. package/dist/components/nodesColumns/i18n/en.json +11 -1
  24. package/dist/components/nodesColumns/i18n/index.d.ts +1 -1
  25. package/dist/components/nodesColumns/utils.d.ts +2 -0
  26. package/dist/components/nodesColumns/utils.js +11 -0
  27. package/dist/components/nodesColumns/utils.js.map +1 -0
  28. package/dist/containers/Nodes/Nodes.js +2 -2
  29. package/dist/containers/Nodes/Nodes.js.map +1 -1
  30. package/dist/containers/Nodes/NodesControls/NodesControls.d.ts +3 -1
  31. package/dist/containers/Nodes/NodesControls/NodesControls.js +3 -3
  32. package/dist/containers/Nodes/NodesControls/NodesControls.js.map +1 -1
  33. package/dist/containers/Nodes/PaginatedNodes.d.ts +11 -3
  34. package/dist/containers/Nodes/PaginatedNodes.js +16 -19
  35. package/dist/containers/Nodes/PaginatedNodes.js.map +1 -1
  36. package/dist/containers/Nodes/columns/constants.d.ts +3 -2
  37. package/dist/containers/Nodes/columns/constants.js +8 -8
  38. package/dist/containers/Nodes/columns/constants.js.map +1 -1
  39. package/dist/containers/Nodes/useNodesPageQueryParams.d.ts +3 -2
  40. package/dist/containers/Nodes/useNodesPageQueryParams.js +2 -2
  41. package/dist/containers/Nodes/useNodesPageQueryParams.js.map +1 -1
  42. package/dist/containers/Tenant/Diagnostics/Diagnostics.js +2 -2
  43. package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
  44. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.d.ts +4 -0
  45. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.js +23 -0
  46. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/columns.js.map +1 -0
  47. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.d.ts +5 -0
  48. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.js +23 -0
  49. package/dist/containers/Tenant/Diagnostics/Network/NetworkTable/constants.js.map +1 -0
  50. package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.d.ts +6 -0
  51. package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.js +26 -0
  52. package/dist/containers/Tenant/Diagnostics/Network/NetworkWrapper.js.map +1 -0
  53. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +1 -1
  54. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js.map +1 -1
  55. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.d.ts +2 -2
  56. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js +3 -2
  57. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js.map +1 -1
  58. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +1 -1
  59. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js.map +1 -1
  60. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.d.ts +5 -1
  61. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.js +6 -2
  62. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TenantMemory.js.map +1 -1
  63. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +1 -1
  64. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js.map +1 -1
  65. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +5 -0
  66. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +1 -1
  67. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js.map +1 -1
  68. package/dist/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.js +1 -1
  69. package/dist/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.js.map +1 -1
  70. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.d.ts +2 -2
  71. package/dist/containers/Tenant/Query/ExecuteResult/utils.d.ts +1 -1
  72. package/dist/containers/Tenant/Query/ExecuteResult/utils.js +1 -1
  73. package/dist/containers/Tenant/Query/ExecuteResult/utils.js.map +1 -1
  74. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.d.ts +2 -2
  75. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +1 -1
  76. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js.map +1 -1
  77. package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.d.ts +2 -2
  78. package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.js +1 -1
  79. package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.js.map +1 -1
  80. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.d.ts +1 -1
  81. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/types.d.ts +1 -1
  82. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/utils.d.ts +1 -1
  83. package/dist/containers/Tenant/Query/NewSQL/NewSQL.js +3 -9
  84. package/dist/containers/Tenant/Query/NewSQL/NewSQL.js.map +1 -1
  85. package/dist/containers/Tenant/Query/NewSQL/i18n/en.json +1 -2
  86. package/dist/containers/Tenant/Query/NewSQL/i18n/index.d.ts +1 -1
  87. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +1 -1
  88. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js.map +1 -1
  89. package/dist/containers/Tenant/Query/Query.js +1 -1
  90. package/dist/containers/Tenant/Query/Query.js.map +1 -1
  91. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +25 -12
  92. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js.map +1 -1
  93. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js +5 -3
  94. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js.map +1 -1
  95. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.d.ts +1 -0
  96. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.js +1 -1
  97. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.js.map +1 -1
  98. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/en.json +1 -0
  99. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.d.ts +1 -1
  100. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/ru.json +1 -0
  101. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.d.ts +12 -3
  102. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js +25 -10
  103. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js.map +1 -1
  104. package/dist/containers/Tenant/utils/newSQLQueryActions.d.ts +0 -1
  105. package/dist/containers/Tenant/utils/newSQLQueryActions.js +0 -1
  106. package/dist/containers/Tenant/utils/newSQLQueryActions.js.map +1 -1
  107. package/dist/containers/Tenant/utils/schemaActions.js +5 -4
  108. package/dist/containers/Tenant/utils/schemaActions.js.map +1 -1
  109. package/dist/containers/Tenant/utils/schemaQueryTemplates.js +86 -53
  110. package/dist/containers/Tenant/utils/schemaQueryTemplates.js.map +1 -1
  111. package/dist/containers/UserSettings/i18n/en.json +3 -2
  112. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  113. package/dist/containers/UserSettings/settings.d.ts +1 -0
  114. package/dist/containers/UserSettings/settings.js +6 -2
  115. package/dist/containers/UserSettings/settings.js.map +1 -1
  116. package/dist/containers/Versions/groupNodes.js +1 -1
  117. package/dist/containers/Versions/groupNodes.js.map +1 -1
  118. package/dist/services/api.js +1 -0
  119. package/dist/services/api.js.map +1 -1
  120. package/dist/services/settings.d.ts +1 -0
  121. package/dist/services/settings.js +2 -1
  122. package/dist/services/settings.js.map +1 -1
  123. package/dist/store/configureStore.d.ts +16 -8
  124. package/dist/store/configureStore.js +1 -1
  125. package/dist/store/configureStore.js.map +1 -1
  126. package/dist/store/defaultStore.d.ts +8 -4
  127. package/dist/store/reducers/cancelQuery.js +2 -2
  128. package/dist/store/reducers/cancelQuery.js.map +1 -1
  129. package/dist/store/reducers/capabilities/capabilities.d.ts +32 -16
  130. package/dist/store/reducers/capabilities/hooks.d.ts +1 -0
  131. package/dist/store/reducers/capabilities/hooks.js +3 -0
  132. package/dist/store/reducers/capabilities/hooks.js.map +1 -1
  133. package/dist/store/reducers/cluster/cluster.d.ts +24 -12
  134. package/dist/store/reducers/cluster/utils.js +2 -2
  135. package/dist/store/reducers/cluster/utils.js.map +1 -1
  136. package/dist/store/reducers/executeTopQueries/executeTopQueries.js +3 -3
  137. package/dist/store/reducers/executeTopQueries/executeTopQueries.js.map +1 -1
  138. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +80 -40
  139. package/dist/store/reducers/index.d.ts +12 -6
  140. package/dist/store/reducers/index.js +2 -2
  141. package/dist/store/reducers/index.js.map +1 -1
  142. package/dist/store/reducers/node/selectors.d.ts +4 -2
  143. package/dist/store/reducers/nodes/types.d.ts +13 -0
  144. package/dist/store/reducers/nodes/utils.js +3 -3
  145. package/dist/store/reducers/nodes/utils.js.map +1 -1
  146. package/dist/store/reducers/nodesList.d.ts +4 -2
  147. package/dist/store/reducers/partitions/partitions.d.ts +4 -3
  148. package/dist/store/reducers/partitions/partitions.js +1 -3
  149. package/dist/store/reducers/partitions/partitions.js.map +1 -1
  150. package/dist/store/reducers/partitions/types.d.ts +0 -3
  151. package/dist/store/reducers/preview.js +2 -2
  152. package/dist/store/reducers/preview.js.map +1 -1
  153. package/dist/store/reducers/query/__test__/utils.test.d.ts +1 -0
  154. package/dist/store/reducers/query/__test__/utils.test.js +24 -0
  155. package/dist/store/reducers/query/__test__/utils.test.js.map +1 -0
  156. package/dist/store/reducers/query/prepareQueryData.d.ts +6 -0
  157. package/dist/store/reducers/{explainQuery/utils.js → query/prepareQueryData.js} +11 -10
  158. package/dist/store/reducers/query/prepareQueryData.js.map +1 -0
  159. package/dist/store/reducers/query/query.d.ts +55 -0
  160. package/dist/store/reducers/{executeQuery.js → query/query.js} +32 -45
  161. package/dist/store/reducers/query/query.js.map +1 -0
  162. package/dist/store/reducers/query/types.d.ts +57 -0
  163. package/dist/store/reducers/query/types.js.map +1 -0
  164. package/dist/store/reducers/query/utils.d.ts +7 -0
  165. package/dist/store/reducers/query/utils.js +21 -0
  166. package/dist/store/reducers/query/utils.js.map +1 -0
  167. package/dist/store/reducers/queryActions/queryActions.js +1 -1
  168. package/dist/store/reducers/queryActions/queryActions.js.map +1 -1
  169. package/dist/store/reducers/queryActions/types.d.ts +1 -1
  170. package/dist/store/reducers/shardsWorkload/shardsWorkload.js +2 -2
  171. package/dist/store/reducers/shardsWorkload/shardsWorkload.js.map +1 -1
  172. package/dist/store/reducers/tablets.d.ts +20 -10
  173. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js +2 -2
  174. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js.map +1 -1
  175. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +2 -2
  176. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js.map +1 -1
  177. package/dist/store/reducers/tenants/selectors.d.ts +36 -18
  178. package/dist/store/reducers/topic.d.ts +60 -30
  179. package/dist/store/reducers/trace.js +1 -1
  180. package/dist/store/reducers/trace.js.map +1 -1
  181. package/dist/types/api/nodes.d.ts +56 -0
  182. package/dist/types/api/nodes.js.map +1 -1
  183. package/dist/types/api/tenant.d.ts +2 -1
  184. package/dist/types/api/tenant.js.map +1 -1
  185. package/dist/utils/constants.d.ts +1 -0
  186. package/dist/utils/constants.js +1 -0
  187. package/dist/utils/constants.js.map +1 -1
  188. package/dist/utils/dataFormatters/dataFormatters.d.ts +1 -1
  189. package/dist/utils/dataFormatters/dataFormatters.js +12 -6
  190. package/dist/utils/dataFormatters/dataFormatters.js.map +1 -1
  191. package/dist/utils/hooks/useQueryExecutionSettings.d.ts +2 -8
  192. package/dist/utils/hooks/useQueryExecutionSettings.js +14 -3
  193. package/dist/utils/hooks/useQueryExecutionSettings.js.map +1 -1
  194. package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.js +13 -9
  195. package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.js.map +1 -1
  196. package/dist/utils/monaco/insertSnippet.d.ts +1 -0
  197. package/dist/utils/monaco/insertSnippet.js +8 -0
  198. package/dist/utils/monaco/insertSnippet.js.map +1 -0
  199. package/dist/utils/prepareQueryExplain.d.ts +1 -1
  200. package/dist/utils/query.d.ts +1 -2
  201. package/dist/utils/query.js +5 -10
  202. package/dist/utils/query.js.map +1 -1
  203. package/dist/utils/query.test.js +20 -34
  204. package/dist/utils/query.test.js.map +1 -1
  205. package/dist/utils/timeParsers/parsers.d.ts +1 -1
  206. package/dist/utils/timeParsers/parsers.js +3 -2
  207. package/dist/utils/timeParsers/parsers.js.map +1 -1
  208. package/package.json +2 -2
  209. package/dist/store/reducers/executeQuery.d.ts +0 -54
  210. package/dist/store/reducers/executeQuery.js.map +0 -1
  211. package/dist/store/reducers/explainQuery/explainQuery.d.ts +0 -10
  212. package/dist/store/reducers/explainQuery/explainQuery.js +0 -72
  213. package/dist/store/reducers/explainQuery/explainQuery.js.map +0 -1
  214. package/dist/store/reducers/explainQuery/types.d.ts +0 -28
  215. package/dist/store/reducers/explainQuery/types.js.map +0 -1
  216. package/dist/store/reducers/explainQuery/utils.d.ts +0 -6
  217. package/dist/store/reducers/explainQuery/utils.js.map +0 -1
  218. package/dist/types/store/executeQuery.d.ts +0 -42
  219. package/dist/types/store/executeQuery.js +0 -6
  220. package/dist/types/store/executeQuery.js.map +0 -1
  221. /package/dist/store/reducers/{explainQuery → query}/types.js +0 -0
@@ -18,8 +18,10 @@ export declare const selectConsumersNames: ((state: {
18
18
  showPreview: boolean;
19
19
  };
20
20
  tenants: import("./tenants/types").TenantsState;
21
- partitions: import("./partitions/types").PartitionsState;
22
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
21
+ partitions: {
22
+ selectedConsumer?: string;
23
+ };
24
+ query: import("./query/types").QueryState;
23
25
  heatmap: import("../../types/store/heatmap").IHeatmapState;
24
26
  settings: import("./settings/types").SettingsState;
25
27
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -54,8 +56,10 @@ export declare const selectConsumersNames: ((state: {
54
56
  showPreview: boolean;
55
57
  };
56
58
  tenants: import("./tenants/types").TenantsState;
57
- partitions: import("./partitions/types").PartitionsState;
58
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
59
+ partitions: {
60
+ selectedConsumer?: string;
61
+ };
62
+ query: import("./query/types").QueryState;
59
63
  heatmap: import("../../types/store/heatmap").IHeatmapState;
60
64
  settings: import("./settings/types").SettingsState;
61
65
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -83,8 +87,10 @@ export declare const selectConsumersNames: ((state: {
83
87
  showPreview: boolean;
84
88
  };
85
89
  tenants: import("./tenants/types").TenantsState;
86
- partitions: import("./partitions/types").PartitionsState;
87
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
90
+ partitions: {
91
+ selectedConsumer?: string;
92
+ };
93
+ query: import("./query/types").QueryState;
88
94
  heatmap: import("../../types/store/heatmap").IHeatmapState;
89
95
  settings: import("./settings/types").SettingsState;
90
96
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -116,8 +122,10 @@ export declare const selectConsumersNames: ((state: {
116
122
  showPreview: boolean;
117
123
  };
118
124
  tenants: import("./tenants/types").TenantsState;
119
- partitions: import("./partitions/types").PartitionsState;
120
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
125
+ partitions: {
126
+ selectedConsumer?: string;
127
+ };
128
+ query: import("./query/types").QueryState;
121
129
  heatmap: import("../../types/store/heatmap").IHeatmapState;
122
130
  settings: import("./settings/types").SettingsState;
123
131
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -154,8 +162,10 @@ export declare const selectConsumersNames: ((state: {
154
162
  showPreview: boolean;
155
163
  };
156
164
  tenants: import("./tenants/types").TenantsState;
157
- partitions: import("./partitions/types").PartitionsState;
158
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
165
+ partitions: {
166
+ selectedConsumer?: string;
167
+ };
168
+ query: import("./query/types").QueryState;
159
169
  heatmap: import("../../types/store/heatmap").IHeatmapState;
160
170
  settings: import("./settings/types").SettingsState;
161
171
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -203,8 +213,10 @@ export declare const selectPreparedTopicStats: ((state: {
203
213
  showPreview: boolean;
204
214
  };
205
215
  tenants: import("./tenants/types").TenantsState;
206
- partitions: import("./partitions/types").PartitionsState;
207
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
216
+ partitions: {
217
+ selectedConsumer?: string;
218
+ };
219
+ query: import("./query/types").QueryState;
208
220
  heatmap: import("../../types/store/heatmap").IHeatmapState;
209
221
  settings: import("./settings/types").SettingsState;
210
222
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -259,8 +271,10 @@ export declare const selectPreparedTopicStats: ((state: {
259
271
  showPreview: boolean;
260
272
  };
261
273
  tenants: import("./tenants/types").TenantsState;
262
- partitions: import("./partitions/types").PartitionsState;
263
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
274
+ partitions: {
275
+ selectedConsumer?: string;
276
+ };
277
+ query: import("./query/types").QueryState;
264
278
  heatmap: import("../../types/store/heatmap").IHeatmapState;
265
279
  settings: import("./settings/types").SettingsState;
266
280
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -288,8 +302,10 @@ export declare const selectPreparedTopicStats: ((state: {
288
302
  showPreview: boolean;
289
303
  };
290
304
  tenants: import("./tenants/types").TenantsState;
291
- partitions: import("./partitions/types").PartitionsState;
292
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
305
+ partitions: {
306
+ selectedConsumer?: string;
307
+ };
308
+ query: import("./query/types").QueryState;
293
309
  heatmap: import("../../types/store/heatmap").IHeatmapState;
294
310
  settings: import("./settings/types").SettingsState;
295
311
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -321,8 +337,10 @@ export declare const selectPreparedTopicStats: ((state: {
321
337
  showPreview: boolean;
322
338
  };
323
339
  tenants: import("./tenants/types").TenantsState;
324
- partitions: import("./partitions/types").PartitionsState;
325
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
340
+ partitions: {
341
+ selectedConsumer?: string;
342
+ };
343
+ query: import("./query/types").QueryState;
326
344
  heatmap: import("../../types/store/heatmap").IHeatmapState;
327
345
  settings: import("./settings/types").SettingsState;
328
346
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -359,8 +377,10 @@ export declare const selectPreparedTopicStats: ((state: {
359
377
  showPreview: boolean;
360
378
  };
361
379
  tenants: import("./tenants/types").TenantsState;
362
- partitions: import("./partitions/types").PartitionsState;
363
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
380
+ partitions: {
381
+ selectedConsumer?: string;
382
+ };
383
+ query: import("./query/types").QueryState;
364
384
  heatmap: import("../../types/store/heatmap").IHeatmapState;
365
385
  settings: import("./settings/types").SettingsState;
366
386
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -408,8 +428,10 @@ export declare const selectPreparedConsumersData: ((state: {
408
428
  showPreview: boolean;
409
429
  };
410
430
  tenants: import("./tenants/types").TenantsState;
411
- partitions: import("./partitions/types").PartitionsState;
412
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
431
+ partitions: {
432
+ selectedConsumer?: string;
433
+ };
434
+ query: import("./query/types").QueryState;
413
435
  heatmap: import("../../types/store/heatmap").IHeatmapState;
414
436
  settings: import("./settings/types").SettingsState;
415
437
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -468,8 +490,10 @@ export declare const selectPreparedConsumersData: ((state: {
468
490
  showPreview: boolean;
469
491
  };
470
492
  tenants: import("./tenants/types").TenantsState;
471
- partitions: import("./partitions/types").PartitionsState;
472
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
493
+ partitions: {
494
+ selectedConsumer?: string;
495
+ };
496
+ query: import("./query/types").QueryState;
473
497
  heatmap: import("../../types/store/heatmap").IHeatmapState;
474
498
  settings: import("./settings/types").SettingsState;
475
499
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -497,8 +521,10 @@ export declare const selectPreparedConsumersData: ((state: {
497
521
  showPreview: boolean;
498
522
  };
499
523
  tenants: import("./tenants/types").TenantsState;
500
- partitions: import("./partitions/types").PartitionsState;
501
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
524
+ partitions: {
525
+ selectedConsumer?: string;
526
+ };
527
+ query: import("./query/types").QueryState;
502
528
  heatmap: import("../../types/store/heatmap").IHeatmapState;
503
529
  settings: import("./settings/types").SettingsState;
504
530
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -530,8 +556,10 @@ export declare const selectPreparedConsumersData: ((state: {
530
556
  showPreview: boolean;
531
557
  };
532
558
  tenants: import("./tenants/types").TenantsState;
533
- partitions: import("./partitions/types").PartitionsState;
534
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
559
+ partitions: {
560
+ selectedConsumer?: string;
561
+ };
562
+ query: import("./query/types").QueryState;
535
563
  heatmap: import("../../types/store/heatmap").IHeatmapState;
536
564
  settings: import("./settings/types").SettingsState;
537
565
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -568,8 +596,10 @@ export declare const selectPreparedConsumersData: ((state: {
568
596
  showPreview: boolean;
569
597
  };
570
598
  tenants: import("./tenants/types").TenantsState;
571
- partitions: import("./partitions/types").PartitionsState;
572
- executeQuery: import("../../types/store/executeQuery").ExecuteQueryState;
599
+ partitions: {
600
+ selectedConsumer?: string;
601
+ };
602
+ query: import("./query/types").QueryState;
573
603
  heatmap: import("../../types/store/heatmap").IHeatmapState;
574
604
  settings: import("./settings/types").SettingsState;
575
605
  executeTopQueries: import("./executeTopQueries/types").TopQueriesFilters;
@@ -1,5 +1,5 @@
1
1
  import { api } from './api';
2
- import { setQueryTraceReady } from './executeQuery';
2
+ import { setQueryTraceReady } from './query/query';
3
3
  export const traceApi = api.injectEndpoints({
4
4
  endpoints: (build) => ({
5
5
  checkTrace: build.query({
@@ -1 +1 @@
1
- {"version":3,"file":"trace.js","sourceRoot":"","sources":["../../../src/store/reducers/trace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAC1B,OAAO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AAC,UAAU,CAAC,EAAC,GAAG,EAAC,EAAE,EAAC,MAAM,EAAC,CAAC,CAAC;oBAE9D,QAAQ,CAAC,kBAAkB,EAAE,CAAC,CAAC;oBAC/B,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC;gBAC5B,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACb,OAAO,EAAC,KAAK,EAAE,KAAK,EAAC,CAAC;gBAC1B,CAAC;YACL,CAAC;SACJ,CAAC;KACL,CAAC;IACF,gBAAgB,EAAE,OAAO;CAC5B,CAAC,CAAC"}
@@ -19,13 +19,42 @@ export interface TNodesInfo {
19
19
  }
20
20
  export interface TNodeInfo {
21
21
  NodeId: number;
22
+ Database?: string;
22
23
  CpuUsage?: number;
23
24
  DiskSpaceUsage?: number;
24
25
  UptimeSeconds?: number;
26
+ Disconnected?: boolean;
25
27
  SystemState: TSystemStateInfo;
26
28
  PDisks?: TPDiskStateInfo[];
27
29
  VDisks?: TVDiskStateInfo[];
28
30
  Tablets?: TTabletStateInfo[];
31
+ Connections?: number;
32
+ ConnectStatus?: EFlag;
33
+ /** uint64 */
34
+ ReceiveThroughput?: string;
35
+ /** uint64 */
36
+ SendThroughput?: string;
37
+ NetworkUtilization?: number;
38
+ NetworkUtilizationMin?: number;
39
+ NetworkUtilizationMax?: number;
40
+ /** int64 */
41
+ ClockSkewUs?: string;
42
+ /** int64 */
43
+ ClockSkewMinUs?: string;
44
+ /** int64 */
45
+ ClockSkewMaxUs?: string;
46
+ /** int64 */
47
+ ReverseClockSkewUs?: string;
48
+ /** uint64 */
49
+ PingTimeUs?: string;
50
+ /** uint64 */
51
+ PingTimeMinUs?: string;
52
+ /** uint64 */
53
+ PingTimeMaxUs?: string;
54
+ /** uint64 */
55
+ ReversePingTimeUs?: string;
56
+ Peers?: TNodeStateInfo[];
57
+ ReversePeers?: TNodeStateInfo[];
29
58
  }
30
59
  export interface TNodesGroup {
31
60
  GroupName: string;
@@ -99,6 +128,33 @@ export interface TSystemStateInfo {
99
128
  TotalSessions?: number;
100
129
  NodeName?: string;
101
130
  }
131
+ interface TNodeStateInfo {
132
+ PeerName?: string;
133
+ Connected?: boolean;
134
+ NodeId?: number;
135
+ /** uint64 */
136
+ ChangeTime?: string;
137
+ /** uint32 */
138
+ OutputQueueSize?: string;
139
+ ConnectStatus?: EFlag;
140
+ /** uint64 */
141
+ ConnectTime?: string;
142
+ PeerNodeId?: number;
143
+ /** int64 */
144
+ ClockSkewUs?: string;
145
+ /** uint32 */
146
+ PingTimeUs?: string;
147
+ Utilization?: number;
148
+ ScopeId?: unknown;
149
+ /** uint32 */
150
+ Count?: string;
151
+ /** uint64 */
152
+ BytesWritten?: string;
153
+ /** uint64 */
154
+ WriteThroughput?: string;
155
+ SessionState?: ESessionState;
156
+ }
157
+ type ESessionState = 'CLOSED' | 'PENDING_CONNECTION' | 'CONNECTED';
102
158
  export type PoolName = 'System' | 'User' | 'Batch' | 'IO' | 'IC';
103
159
  export interface TPoolStats {
104
160
  Name?: PoolName;
@@ -1 +1 @@
1
- {"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../../src/types/api/nodes.ts"],"names":[],"mappings":"AAgKA,IAAK,YAGJ;AAHD,WAAK,YAAY;IACb,yCAA2B,CAAA;IAC3B,qCAAuB,CAAA;AAC3B,CAAC,EAHI,YAAY,KAAZ,YAAY,QAGhB"}
1
+ {"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../../src/types/api/nodes.ts"],"names":[],"mappings":"AA6NA,IAAK,YAGJ;AAHD,WAAK,YAAY;IACb,yCAA2B,CAAA;IAC3B,qCAAuB,CAAA;AAC3B,CAAC,EAHI,YAAY,KAAZ,YAAY,QAGhB"}
@@ -1,5 +1,5 @@
1
1
  import type { EFlag } from './enums';
2
- import type { TPoolStats, TSystemStateInfo } from './nodes';
2
+ import type { TMemoryStats, TPoolStats, TSystemStateInfo } from './nodes';
3
3
  import type { TTabletStateInfo } from './tablet';
4
4
  /**
5
5
  * endpoint: /viewer/json/tenants
@@ -47,6 +47,7 @@ export interface TTenant {
47
47
  MemoryUsed?: string;
48
48
  /** uint64 */
49
49
  MemoryLimit?: string;
50
+ MemoryStats?: TMemoryStats;
50
51
  /** double */
51
52
  CoresUsed?: number;
52
53
  /** uint64 */
@@ -1 +1 @@
1
- {"version":3,"file":"tenant.js","sourceRoot":"","sources":["../../../src/types/api/tenant.ts"],"names":[],"mappings":"AAoIA,MAAM,CAAN,IAAY,KAOX;AAPD,WAAY,KAAK;IACb,gDAAyC,CAAA;IACzC,8BAAuB,CAAA;IACvB,4BAAqB,CAAA;IACrB,8BAAuB,CAAA;IACvB,gDAAyC,CAAA;IACzC,oCAA6B,CAAA;AACjC,CAAC,EAPW,KAAK,KAAL,KAAK,QAOhB;AAED,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC5B,uFAAiE,CAAA;IACjE,uFAAiE,CAAA;IACjE,uFAAiE,CAAA;IACjE,yFAAmE,CAAA;IACnE,uFAAiE,CAAA;AACrE,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAuBD,MAAM,CAAN,IAAY,KAIX;AAJD,WAAY,KAAK;IACb,sBAAa,CAAA;IACb,oBAAW,CAAA;IACX,oBAAW,CAAA;AACf,CAAC,EAJW,KAAK,KAAL,KAAK,QAIhB"}
1
+ {"version":3,"file":"tenant.js","sourceRoot":"","sources":["../../../src/types/api/tenant.ts"],"names":[],"mappings":"AAqIA,MAAM,CAAN,IAAY,KAOX;AAPD,WAAY,KAAK;IACb,gDAAyC,CAAA;IACzC,8BAAuB,CAAA;IACvB,4BAAqB,CAAA;IACrB,8BAAuB,CAAA;IACvB,gDAAyC,CAAA;IACzC,oCAA6B,CAAA;AACjC,CAAC,EAPW,KAAK,KAAL,KAAK,QAOhB;AAED,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC5B,uFAAiE,CAAA;IACjE,uFAAiE,CAAA;IACjE,uFAAiE,CAAA;IACjE,yFAAmE,CAAA;IACnE,uFAAiE,CAAA;AACrE,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAuBD,MAAM,CAAN,IAAY,KAIX;AAJD,WAAY,KAAK;IACb,sBAAa,CAAA;IACb,oBAAW,CAAA;IACX,oBAAW,CAAA;AACf,CAAC,EAJW,KAAK,KAAL,KAAK,QAIhB"}
@@ -102,6 +102,7 @@ export declare const LAST_USED_QUERY_ACTION_KEY = "last_used_query_action";
102
102
  export declare const PARTITIONS_HIDDEN_COLUMNS_KEY = "partitionsHiddenColumns";
103
103
  export declare const TENANT_INITIAL_PAGE_KEY = "saved_tenant_initial_tab";
104
104
  export declare const USE_PAGINATED_TABLES_KEY = "useBackendParamsForTables";
105
+ export declare const ENABLE_NETWORK_TABLE_KEY = "enableNetworkTable";
105
106
  export declare const USE_SHOW_PLAN_SVG_KEY = "useShowPlanToSvg";
106
107
  export declare const SHOW_DOMAIN_DATABASE_KEY = "showDomainDatabase";
107
108
  export declare const USE_CLUSTER_BALANCER_AS_BACKEND_KEY = "useClusterBalancerAsBacked";
@@ -105,6 +105,7 @@ export const TENANT_INITIAL_PAGE_KEY = 'saved_tenant_initial_tab';
105
105
  // Setting to use paginated tables
106
106
  // Old key value for backward compatibility
107
107
  export const USE_PAGINATED_TABLES_KEY = 'useBackendParamsForTables';
108
+ export const ENABLE_NETWORK_TABLE_KEY = 'enableNetworkTable';
108
109
  export const USE_SHOW_PLAN_SVG_KEY = 'useShowPlanToSvg';
109
110
  // Setting to hide domain in database list
110
111
  export const SHOW_DOMAIN_DATABASE_KEY = 'showDomainDatabase';
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,8BAA8B,CAAC;AAGrD,OAAO,EAAC,KAAK,EAAC,MAAM,qBAAqB,CAAC;AAE1C,MAAM,MAAM,GAAG,IAAI,CAAC;AAEpB,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE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AM,CAAC,MAAM,iCAAiC,GAAG,+BAA+B,CAAC;AACjF,MAAM,CAAC,MAAM,qCAAqC,GAAG,+BAA+B,CAAC;AAErF,MAAM,CAAC,MAAM,0BAA0B,GAAG,wBAAwB,CAAC;AAEnE,MAAM,CAAC,MAAM,6BAA6B,GAAG,yBAAyB,CAAC;AAEvE,sDAAsD;AACtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,0BAA0B,CAAC;AAElE,kCAAkC;AAClC,2CAA2C;AAC3C,MAAM,CAAC,MAAM,wBAAwB,GAAG,2BAA2B,CAAC;AAEpE,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE7D,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAExD,0CAA0C;AAC1C,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE7D,MAAM,CAAC,MAAM,mCAAmC,GAAG,4BAA4B,CAAC;AAEhF,MAAM,CAAC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAAG,qBAAqB,CAAC;AAE3D,MAAM,CAAC,MAAM,0BAA0B,GAAG,qBAAqB,CAAC;AAEhE,MAAM,CAAC,MAAM,mCAAmC,GAAG,iCAAiC,CAAC"}
@@ -11,7 +11,7 @@ export declare function formatNumericValues(value?: number, total?: number, size
11
11
  export declare const formatStorageValuesToGb: (value?: number, total?: number) => string[];
12
12
  export declare const formatStorageValuesToTb: (value?: number, total?: number) => string[];
13
13
  export declare const formatNumber: (number?: unknown) => string;
14
- export declare const formatPercent: (number?: unknown) => string;
14
+ export declare const formatPercent: (number?: unknown, precision?: number) => string;
15
15
  export declare const formatSecondsToHours: (seconds: number) => string;
16
16
  export declare const roundToPrecision: (value: number | string, precision?: number) => number;
17
17
  export declare const formatCPU: (value?: number | string) => string | undefined;
@@ -55,12 +55,16 @@ export const formatNumber = (number) => {
55
55
  // "," in format is delimiter sign, not delimiter itself
56
56
  return configuredNumeral(number).format('0,0.[00000]');
57
57
  };
58
- export const formatPercent = (number) => {
58
+ export const formatPercent = (number, precision = 2) => {
59
59
  if (!isNumeric(number)) {
60
60
  return '';
61
61
  }
62
- const configuredNumber = configuredNumeral(number);
63
- const format = '0%';
62
+ // Numeral doesn't work well with very low numbers (for example 2e-27)
63
+ // We can receive such numbers from backend in float fields
64
+ // So we need apply toFixed before configuration
65
+ const preparedNumber = Number(number).toFixed(precision);
66
+ const configuredNumber = configuredNumeral(preparedNumber);
67
+ const format = '0.[00]%';
64
68
  return configuredNumber.format(format);
65
69
  };
66
70
  export const formatSecondsToHours = (seconds) => {
@@ -68,12 +72,14 @@ export const formatSecondsToHours = (seconds) => {
68
72
  return `${formatNumber(hours)} hours`;
69
73
  };
70
74
  export const roundToPrecision = (value, precision = 0) => {
71
- let [digits] = String(value).split('.');
72
- if (Number(value) < 1) {
75
+ // Prevent "-" counting as digit in negative values
76
+ const valueAbs = Math.abs(Number(value));
77
+ let [digits] = String(valueAbs).split('.');
78
+ if (Number(valueAbs) < 1) {
73
79
  digits = '';
74
80
  }
75
81
  if (digits.length >= precision) {
76
- return Math.round(Number(value));
82
+ return Number(Number(value).toFixed(0));
77
83
  }
78
84
  return Number(Number(value).toFixed(precision - digits.length));
79
85
  };
@@ -1 +1 @@
1
- {"version":3,"file":"dataFormatters.js","sourceRoot":"","sources":["../../../src/utils/dataFormatters/dataFormatters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAGrD,OAAO,EACH,WAAW,IAAI,iBAAiB,EAChC,4BAA4B,GAC/B,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAC,iBAAiB,EAAC,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CA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MAAM,eAAe,GAAG,CAAC,KAAuB,EAAE,YAAY,GAAG,EAAE,EAAE,EAAE;;IAC1E,MAAM,aAAa,GAAG,MAAA,aAAa,CAAC,KAAK,CAAC,0CAAE,MAAM,CAAC,yBAAyB,CAAC,CAAC;IAE9E,OAAO,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,YAAY,CAAC;AACzC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,YAA6B,EAAE,EAAE;IACjE,MAAM,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;IAC1D,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;AACvC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,YAA8B,EAAE,EAAE;IACzD,OAAO,YAAY,CAAC,mBAAmB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AACnE,CAAC,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC7C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,EAAE,CAAC;IACd,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;SAAM,CAAC;QACJ,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC5B,CAAC;AACL,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type { QuerySettings } from '../../types/store/query';
1
2
  export declare const useQueryExecutionSettings: () => readonly [{
2
3
  queryMode: "scan" | "script" | "data" | "query" | "pg";
3
4
  transactionMode: "serializable-read-write" | "stale-read-only" | "online-read-only" | "snapshot-read-only" | "implicit";
@@ -5,11 +6,4 @@ export declare const useQueryExecutionSettings: () => readonly [{
5
6
  tracingLevel: "basic" | "off" | "toplevel" | "detailed" | "diagnostic" | "trace";
6
7
  timeout?: number | undefined;
7
8
  limitRows?: number | undefined;
8
- }, (value: {
9
- queryMode: "scan" | "script" | "data" | "query" | "pg";
10
- transactionMode: "serializable-read-write" | "stale-read-only" | "online-read-only" | "snapshot-read-only" | "implicit";
11
- statisticsMode: "none" | "basic" | "full" | "profile";
12
- tracingLevel: "basic" | "off" | "toplevel" | "detailed" | "diagnostic" | "trace";
13
- timeout?: number | undefined;
14
- limitRows?: number | undefined;
15
- }) => void];
9
+ }, (settings: QuerySettings) => void];
@@ -1,17 +1,28 @@
1
+ import React from 'react';
1
2
  import { useTracingLevelOptionAvailable } from '../../store/reducers/capabilities/hooks';
2
- import { QUERY_EXECUTION_SETTINGS_KEY } from '../constants';
3
- import { DEFAULT_QUERY_SETTINGS, querySettingsRestoreSchema } from '../query';
3
+ import { QUERY_EXECUTION_SETTINGS_KEY, USE_SHOW_PLAN_SVG_KEY } from '../constants';
4
+ import { DEFAULT_QUERY_SETTINGS, STATISTICS_MODES, querySettingsRestoreSchema } from '../query';
4
5
  import { useSetting } from './useSetting';
5
6
  export const useQueryExecutionSettings = () => {
6
7
  const enableTracingLevel = useTracingLevelOptionAvailable();
7
8
  const [storageSettings, setSettings] = useSetting(QUERY_EXECUTION_SETTINGS_KEY);
8
9
  const validatedSettings = querySettingsRestoreSchema.parse(storageSettings);
10
+ const [useShowPlanToSvg] = useSetting(USE_SHOW_PLAN_SVG_KEY);
11
+ const setQueryExecutionSettings = React.useCallback((settings) => {
12
+ setSettings({
13
+ ...settings,
14
+ statisticsMode: useShowPlanToSvg
15
+ ? validatedSettings.statisticsMode
16
+ : settings.statisticsMode,
17
+ });
18
+ }, [setSettings, useShowPlanToSvg, validatedSettings.statisticsMode]);
9
19
  const settings = {
10
20
  ...validatedSettings,
21
+ statisticsMode: useShowPlanToSvg ? STATISTICS_MODES.full : validatedSettings.statisticsMode,
11
22
  tracingLevel: enableTracingLevel
12
23
  ? validatedSettings.tracingLevel
13
24
  : DEFAULT_QUERY_SETTINGS.tracingLevel,
14
25
  };
15
- return [settings, setSettings];
26
+ return [settings, setQueryExecutionSettings];
16
27
  };
17
28
  //# sourceMappingURL=useQueryExecutionSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useQueryExecutionSettings.js","sourceRoot":"","sources":["../../../src/utils/hooks/useQueryExecutionSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,8BAA8B,EAAC,MAAM,yCAAyC,CAAC;AAEvF,OAAO,EAAC,4BAA4B,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAC,sBAAsB,EAAE,0BAA0B,EAAC,MAAM,UAAU,CAAC;AAE5E,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,EAAE;IAC1C,MAAM,kBAAkB,GAAG,8BAA8B,EAAE,CAAC;IAC5D,MAAM,CAAC,eAAe,EAAE,WAAW,CAAC,GAAG,UAAU,CAAgB,4BAA4B,CAAC,CAAC;IAE/F,MAAM,iBAAiB,GAAG,0BAA0B,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAE5E,MAAM,QAAQ,GAAkB;QAC5B,GAAG,iBAAiB;QACpB,YAAY,EAAE,kBAAkB;YAC5B,CAAC,CAAC,iBAAiB,CAAC,YAAY;YAChC,CAAC,CAAC,sBAAsB,CAAC,YAAY;KAC5C,CAAC;IAEF,OAAO,CAAC,QAAQ,EAAE,WAAW,CAAU,CAAC;AAC5C,CAAC,CAAC"}
1
+ {"version":3,"file":"useQueryExecutionSettings.js","sourceRoot":"","sources":["../../../src/utils/hooks/useQueryExecutionSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,8BAA8B,EAAC,MAAM,yCAAyC,CAAC;AAEvF,OAAO,EAAC,4BAA4B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useTypedSelector } from '..';
5
5
  import { CONFIRMATION_DIALOG } from '../../../components/ConfirmationDialog/ConfirmationDialog';
6
- import { SaveQueryButton, SaveQueryDialog, } from '../../../containers/Tenant/Query/SaveQuery/SaveQuery';
7
- import { selectUserInput } from '../../../store/reducers/executeQuery';
6
+ import { SaveQueryButton } from '../../../containers/Tenant/Query/SaveQuery/SaveQuery';
7
+ import { selectUserInput } from '../../../store/reducers/query/query';
8
8
  import i18n from './i18n';
9
9
  function ExtendedSaveQueryButton() {
10
10
  const modal = NiceModal.useModal(CONFIRMATION_DIALOG);
11
- const closeModal = () => {
11
+ const closeModal = React.useCallback(() => {
12
12
  modal.hide();
13
13
  modal.remove();
14
- };
15
- const handleSaveQuerySuccess = () => {
14
+ }, [modal]);
15
+ const handleSaveQuerySuccess = React.useCallback(() => {
16
16
  modal.resolve(true);
17
17
  closeModal();
18
- };
19
- const handleCancelQuerySave = () => {
18
+ }, [modal, closeModal]);
19
+ const handleCancelQuerySave = React.useCallback(() => {
20
20
  modal.resolve(false);
21
21
  closeModal();
22
- };
23
- return (_jsxs(React.Fragment, { children: [_jsx(SaveQueryDialog, { onSuccess: handleSaveQuerySuccess, onCancel: handleCancelQuerySave }), _jsx(SaveQueryButton, { view: "action", size: "l" })] }));
22
+ }, [closeModal, modal]);
23
+ const dialogProps = React.useMemo(() => ({
24
+ onSuccess: handleSaveQuerySuccess,
25
+ onCancel: handleCancelQuerySave,
26
+ }), [handleSaveQuerySuccess, handleCancelQuerySave]);
27
+ return _jsx(SaveQueryButton, { view: "action", size: "l", dialogProps: dialogProps });
24
28
  }
25
29
  export async function getConfirmation() {
26
30
  return await NiceModal.show(CONFIRMATION_DIALOG, {
@@ -1 +1 @@
1
- {"version":3,"file":"useChangeInputWithConfirmation.js","sourceRoot":"","sources":["../../../../src/utils/hooks/withConfirmation/useChangeInputWithConfirmation.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,SAAS,MAAM,w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a,EAAE,CAAC,WAA4B,EAAE,YAA6B,EAAE,EAAE;YAC3E,OAAO,CACH,MAAC,KAAK,CAAC,QAAQ,eACV,YAAY,EACb,KAAC,uBAAuB,KAAG,EAC1B,WAAW,IACC,CACpB,CAAC;QACN,CAAC;KACJ,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAI,QAA2B;IACtE,OAAO,KAAK,EAAE,IAAO,EAAE,EAAE;QACrB,MAAM,SAAS,GAAG,MAAM,eAAe,EAAE,CAAC;QAC1C,IAAI,CAAC,SAAS,EAAE,CAAC;YACb,OAAO;QACX,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC,CAAC;AACN,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAI,QAA2B;IACzE,MAAM,SAAS,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACpD,MAAM,wBAAwB,GAAG,KAAK,CAAC,OAAO,CAC1C,GAAG,EAAE,CAAC,2BAA2B,CAAI,QAAQ,CAAC,EAC9C,CAAC,QAAQ,CAAC,CACb,CAAC;IACF,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,QAAQ,CAAC;IACpB,CAAC;IACD,OAAO,wBAAwB,CAAC;AACpC,CAAC"}
1
+ {"version":3,"file":"useChangeInputWithConfirmation.js","sourceRoot":"","sources":["../../../../src/utils/hooks/withConfirmation/useChangeInputWithConfirmation.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAC,gBAAgB,EAAC,MAAM,IAAI,CAAC;AACpC,OAAO,EAAC,mBAAmB,EAAC,MAAM,2DAA2D,CAAC;AAC9F,OAAO,EAAC,eAAe,EAAC,MAAM,sDAAsD,CAAC;AACrF,OAAO,EAAC,eAAe,EAAC,MAAM,qCAAqC,CAAC;AAEpE,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,SA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a,EAAE,CAAC,WAA4B,EAAE,YAA6B,EAAE,EAAE;YAC3E,OAAO,CACH,MAAC,KAAK,CAAC,QAAQ,eACV,YAAY,EACb,KAAC,uBAAuB,KAAG,EAC1B,WAAW,IACC,CACpB,CAAC;QACN,CAAC;KACJ,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAI,QAA2B;IACtE,OAAO,KAAK,EAAE,IAAO,EAAE,EAAE;QACrB,MAAM,SAAS,GAAG,MAAM,eAAe,EAAE,CAAC;QAC1C,IAAI,CAAC,SAAS,EAAE,CAAC;YACb,OAAO;QACX,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC,CAAC;AACN,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAI,QAA2B;IACzE,MAAM,SAAS,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACpD,MAAM,wBAAwB,GAAG,KAAK,CAAC,OAAO,CAC1C,GAAG,EAAE,CAAC,2BAA2B,CAAI,QAAQ,CAAC,EAC9C,CAAC,QAAQ,CAAC,CACb,CAAC;IACF,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,QAAQ,CAAC;IACpB,CAAC;IACD,OAAO,wBAAwB,CAAC;AACpC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function insertSnippetToEditor(input: string): void;
@@ -0,0 +1,8 @@
1
+ export function insertSnippetToEditor(input) {
2
+ var _a;
3
+ if (!window.ydbEditor) {
4
+ console.error('Monaco editor not found');
5
+ }
6
+ (_a = window.ydbEditor) === null || _a === void 0 ? void 0 : _a.trigger(undefined, 'insertSnippetToEditor', input);
7
+ }
8
+ //# sourceMappingURL=insertSnippet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insertSnippet.js","sourceRoot":"","sources":["../../../src/utils/monaco/insertSnippet.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,qBAAqB,CAAC,KAAa;;IAC/C,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,MAAA,MAAM,CAAC,SAAS,0CAAE,OAAO,CAAC,SAAS,EAAE,uBAAuB,EAAE,KAAK,CAAC,CAAC;AACzE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { ExplainPlanNodeData, GraphNode, Link } from '@gravity-ui/paranoid';
2
- import type { SimplifiedPlanItem } from '../store/reducers/explainQuery/types';
2
+ import type { SimplifiedPlanItem } from '../store/reducers/query/types';
3
3
  import type { PlanNode, SimplifiedNode } from '../types/api/query';
4
4
  export declare function preparePlan(plan: PlanNode): {
5
5
  nodes: GraphNode<ExplainPlanNodeData>[];
@@ -46,8 +46,7 @@ type UnsupportedQueryResponseFormat = Array<unknown> | string | null | undefined
46
46
  result: string | Record<string, unknown>;
47
47
  };
48
48
  export declare function isQueryErrorResponse(data: unknown): data is ErrorResponse;
49
- export declare const parseQueryAPIExecuteResponse: (data: ExecuteResponse | UnsupportedQueryResponseFormat) => IQueryResult;
50
- export declare const parseQueryAPIExplainResponse: (data: ExplainResponse | UnsupportedQueryResponseFormat) => IQueryResult;
49
+ export declare function parseQueryAPIResponse(data: ExecuteResponse | ExplainResponse | UnsupportedQueryResponseFormat): IQueryResult;
51
50
  export declare const parseQueryExplainPlan: (plan: ScriptPlan | QueryPlan) => QueryPlan;
52
51
  export declare const prepareQueryResponse: (data?: KeyValueRow[]) => KeyValueRow[];
53
52
  export declare const parseQueryError: (error: unknown) => ErrorResponse | string | undefined;
@@ -134,8 +134,9 @@ const parseExecuteResponse = (data) => {
134
134
  ...restData,
135
135
  };
136
136
  };
137
- const isSupportedType = (response) => Boolean(response &&
137
+ const isSupportedExecuteResponse = (response) => Boolean(response &&
138
138
  !Array.isArray(response) &&
139
+ 'result' in response &&
139
140
  Array.isArray(response.result) &&
140
141
  typeof response.result[0] === 'object' &&
141
142
  'rows' in response.result[0] &&
@@ -151,21 +152,15 @@ export function isQueryErrorResponse(data) {
151
152
  }
152
153
  // Although schema is set in request, if schema is not supported default schema for the version will be used
153
154
  // So we should additionally parse response
154
- export const parseQueryAPIExecuteResponse = (data) => {
155
+ export function parseQueryAPIResponse(data) {
155
156
  if (isUnsupportedType(data)) {
156
157
  return {};
157
158
  }
158
- if (isSupportedType(data)) {
159
+ if (isSupportedExecuteResponse(data)) {
159
160
  return parseExecuteResponse(data);
160
161
  }
161
162
  return data;
162
- };
163
- export const parseQueryAPIExplainResponse = (data) => {
164
- if (isUnsupportedType(data)) {
165
- return {};
166
- }
167
- return data;
168
- };
163
+ }
169
164
  const isExplainScriptPlan = (plan) => Boolean(plan && 'queries' in plan);
170
165
  export const parseQueryExplainPlan = (plan) => {
171
166
  if (isExplainScriptPlan(plan)) {