ydb-embedded-ui 6.18.0 → 6.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (316) hide show
  1. package/dist/components/ComponentsProvider/ComponentsProvider.d.ts +2 -2
  2. package/dist/components/CriticalActionDialog/CriticalActionDialog.d.ts +2 -1
  3. package/dist/components/CriticalActionDialog/CriticalActionDialog.js +11 -3
  4. package/dist/components/CriticalActionDialog/CriticalActionDialog.js.map +1 -1
  5. package/dist/components/CriticalActionDialog/i18n/en.json +2 -1
  6. package/dist/components/CriticalActionDialog/i18n/index.d.ts +1 -1
  7. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +7 -36
  8. package/dist/components/GroupInfo/GroupInfo.js +3 -3
  9. package/dist/components/MetricChart/reducer.d.ts +2 -2
  10. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  11. package/dist/components/PaginatedTable/PaginatedTable.scss +4 -0
  12. package/dist/components/PaginatedTable/TableChunk.js +5 -2
  13. package/dist/components/PaginatedTable/TableChunk.js.map +1 -1
  14. package/dist/components/PaginatedTable/TableRow.js +1 -1
  15. package/dist/components/PaginatedTable/TableRow.js.map +1 -1
  16. package/dist/components/TabletsStatistic/TabletsStatistic.d.ts +2 -4
  17. package/dist/components/TabletsStatistic/TabletsStatistic.js.map +1 -1
  18. package/dist/components/Tag/Tag.d.ts +2 -1
  19. package/dist/components/Tag/Tag.js.map +1 -1
  20. package/dist/components/Tags/Tags.d.ts +2 -1
  21. package/dist/components/Tags/Tags.js.map +1 -1
  22. package/dist/containers/AppWithClusters/ExtendedNode/ExtendedNode.js +4 -2
  23. package/dist/containers/AppWithClusters/ExtendedNode/ExtendedNode.js.map +1 -1
  24. package/dist/containers/AppWithClusters/ExtendedTenant/ExtendedTenant.js +4 -3
  25. package/dist/containers/AppWithClusters/ExtendedTenant/ExtendedTenant.js.map +1 -1
  26. package/dist/containers/AppWithClusters/useClusterData.d.ts +7 -1
  27. package/dist/containers/AppWithClusters/useClusterData.js +8 -8
  28. package/dist/containers/AppWithClusters/useClusterData.js.map +1 -1
  29. package/dist/containers/AsideNavigation/AsideNavigation.d.ts +3 -0
  30. package/dist/containers/AsideNavigation/AsideNavigation.js +6 -10
  31. package/dist/containers/AsideNavigation/AsideNavigation.js.map +1 -1
  32. package/dist/containers/AsideNavigation/Navigation.js +4 -1
  33. package/dist/containers/AsideNavigation/Navigation.js.map +1 -1
  34. package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.d.ts +3 -1
  35. package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js +2 -4
  36. package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js.map +1 -1
  37. package/dist/containers/Cluster/Cluster.js +5 -13
  38. package/dist/containers/Cluster/Cluster.js.map +1 -1
  39. package/dist/containers/Cluster/Cluster.scss +1 -0
  40. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +3 -112
  41. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js.map +1 -1
  42. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +7 -14
  43. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.d.ts +7 -0
  44. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.js +43 -0
  45. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.js.map +1 -0
  46. package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.scss +11 -0
  47. package/dist/containers/Cluster/ClusterInfo/components/NodesState/NodesState.d.ts +8 -0
  48. package/dist/containers/Cluster/ClusterInfo/components/NodesState/NodesState.js +8 -0
  49. package/dist/containers/Cluster/ClusterInfo/components/NodesState/NodesState.js.map +1 -0
  50. package/dist/containers/Cluster/ClusterInfo/components/NodesState/NodesState.scss +16 -0
  51. package/dist/containers/Cluster/ClusterInfo/shared.d.ts +1 -0
  52. package/dist/containers/Cluster/ClusterInfo/shared.js +3 -0
  53. package/dist/containers/Cluster/ClusterInfo/shared.js.map +1 -0
  54. package/dist/containers/Cluster/ClusterInfo/utils.d.ts +12 -0
  55. package/dist/containers/Cluster/ClusterInfo/utils.js +145 -0
  56. package/dist/containers/Cluster/ClusterInfo/utils.js.map +1 -1
  57. package/dist/containers/Cluster/i18n/en.json +7 -1
  58. package/dist/containers/Cluster/i18n/index.d.ts +1 -1
  59. package/dist/containers/Cluster/i18n/index.js +1 -2
  60. package/dist/containers/Cluster/i18n/index.js.map +1 -1
  61. package/dist/containers/Header/Header.js +3 -7
  62. package/dist/containers/Header/Header.js.map +1 -1
  63. package/dist/containers/Node/Node.js +1 -5
  64. package/dist/containers/Node/Node.js.map +1 -1
  65. package/dist/containers/Node/NodePages.js +5 -4
  66. package/dist/containers/Node/NodePages.js.map +1 -1
  67. package/dist/containers/Node/NodeStructure/NodeStructure.js +9 -3
  68. package/dist/containers/Node/NodeStructure/NodeStructure.js.map +1 -1
  69. package/dist/containers/Nodes/Nodes.js +3 -13
  70. package/dist/containers/Nodes/Nodes.js.map +1 -1
  71. package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.js +1 -1
  72. package/dist/containers/PDiskPage/DecommissionButton/DecommissionButton.js.map +1 -1
  73. package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js +16 -7
  74. package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js.map +1 -1
  75. package/dist/containers/PDiskPage/PDiskGroups/utils.d.ts +2 -0
  76. package/dist/containers/PDiskPage/PDiskGroups/utils.js +14 -0
  77. package/dist/containers/PDiskPage/PDiskGroups/utils.js.map +1 -0
  78. package/dist/containers/PDiskPage/PDiskPage.js +1 -1
  79. package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
  80. package/dist/containers/Storage/Storage.js +9 -9
  81. package/dist/containers/Storage/Storage.js.map +1 -1
  82. package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.js +7 -2
  83. package/dist/containers/Storage/StorageGroups/PaginatedStorageGroups.js.map +1 -1
  84. package/dist/containers/Storage/StorageGroups/columns/getStorageGroupsColumns.d.ts +1 -1
  85. package/dist/containers/Storage/StorageGroups/columns/getStorageGroupsColumns.js +7 -20
  86. package/dist/containers/Storage/StorageGroups/columns/getStorageGroupsColumns.js.map +1 -1
  87. package/dist/containers/Storage/StorageGroups/getGroups.d.ts +3 -1
  88. package/dist/containers/Storage/StorageGroups/getGroups.js +27 -24
  89. package/dist/containers/Storage/StorageGroups/getGroups.js.map +1 -1
  90. package/dist/containers/Storage/StorageNodes/PaginatedStorageNodes.js +1 -1
  91. package/dist/containers/Storage/utils/index.js +3 -4
  92. package/dist/containers/Storage/utils/index.js.map +1 -1
  93. package/dist/containers/Tablets/i18n/index.d.ts +1 -1
  94. package/dist/containers/Tenant/Diagnostics/Configs/Configs.d.ts +6 -0
  95. package/dist/containers/Tenant/Diagnostics/Configs/Configs.js +79 -0
  96. package/dist/containers/Tenant/Diagnostics/Configs/Configs.js.map +1 -0
  97. package/dist/containers/Tenant/Diagnostics/Configs/Configs.scss +8 -0
  98. package/dist/containers/Tenant/Diagnostics/Configs/i18n/en.json +11 -0
  99. package/dist/containers/Tenant/Diagnostics/Configs/i18n/index.d.ts +2 -0
  100. package/dist/containers/Tenant/Diagnostics/Configs/i18n/index.js +5 -0
  101. package/dist/containers/Tenant/Diagnostics/Configs/i18n/index.js.map +1 -0
  102. package/dist/containers/Tenant/Diagnostics/Diagnostics.js +4 -0
  103. package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
  104. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +3 -0
  105. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +5 -0
  106. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js.map +1 -1
  107. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.d.ts +1 -1
  108. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +21 -4
  109. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js.map +1 -1
  110. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/utils.d.ts +2 -0
  111. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/utils.js +7 -0
  112. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/utils.js.map +1 -0
  113. package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.js +8 -3
  114. package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.js.map +1 -1
  115. package/dist/containers/Tenant/Query/CancelQueryButton/CancelQueryButton.d.ts +7 -0
  116. package/dist/containers/Tenant/Query/CancelQueryButton/CancelQueryButton.js +17 -0
  117. package/dist/containers/Tenant/Query/CancelQueryButton/CancelQueryButton.js.map +1 -0
  118. package/dist/containers/Tenant/Query/CancelQueryButton/CancelQueryButton.scss +9 -0
  119. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.d.ts +5 -9
  120. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +7 -7
  121. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js.map +1 -1
  122. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +0 -12
  123. package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.d.ts +1 -1
  124. package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.js +9 -24
  125. package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.js.map +1 -1
  126. package/dist/containers/Tenant/Query/ExecuteResult/i18n/en.json +0 -1
  127. package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +1 -1
  128. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.d.ts +4 -12
  129. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +7 -5
  130. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js.map +1 -1
  131. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.scss +0 -6
  132. package/dist/containers/Tenant/Query/ExplainResult/i18n/en.json +1 -2
  133. package/dist/containers/Tenant/Query/ExplainResult/i18n/index.d.ts +1 -1
  134. package/dist/containers/Tenant/Query/Query.js +14 -2
  135. package/dist/containers/Tenant/Query/Query.js.map +1 -1
  136. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +3 -2
  137. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +18 -36
  138. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js.map +1 -1
  139. package/dist/containers/Tenant/Query/i18n/en.json +1 -0
  140. package/dist/containers/Tenant/Query/i18n/index.d.ts +1 -1
  141. package/dist/containers/Tenant/utils/queryTemplates.js +1 -1
  142. package/dist/containers/Tenant/utils/queryTemplates.js.map +1 -1
  143. package/dist/containers/UserSettings/i18n/en.json +0 -2
  144. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  145. package/dist/containers/UserSettings/settings.d.ts +0 -1
  146. package/dist/containers/UserSettings/settings.js +2 -12
  147. package/dist/containers/UserSettings/settings.js.map +1 -1
  148. package/dist/containers/VDiskPage/VDiskPage.d.ts +3 -4
  149. package/dist/containers/VDiskPage/VDiskPage.js +33 -10
  150. package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
  151. package/dist/containers/VDiskPage/utils.d.ts +2 -0
  152. package/dist/containers/VDiskPage/utils.js +7 -0
  153. package/dist/containers/VDiskPage/utils.js.map +1 -0
  154. package/dist/lib.d.ts +1 -0
  155. package/dist/lib.js +1 -0
  156. package/dist/lib.js.map +1 -1
  157. package/dist/services/api.d.ts +20 -16
  158. package/dist/services/api.js +62 -21
  159. package/dist/services/api.js.map +1 -1
  160. package/dist/services/parsers/parseMetaCluster.d.ts +14 -0
  161. package/dist/services/parsers/parseMetaCluster.js +17 -31
  162. package/dist/services/parsers/parseMetaCluster.js.map +1 -1
  163. package/dist/services/settings.d.ts +0 -1
  164. package/dist/services/settings.js +1 -2
  165. package/dist/services/settings.js.map +1 -1
  166. package/dist/store/configureStore.d.ts +4 -4
  167. package/dist/store/defaultStore.d.ts +2 -2
  168. package/dist/store/getUrlData.js +9 -6
  169. package/dist/store/getUrlData.js.map +1 -1
  170. package/dist/store/reducers/api.d.ts +1 -1
  171. package/dist/store/reducers/api.js +1 -1
  172. package/dist/store/reducers/api.js.map +1 -1
  173. package/dist/store/reducers/authentication/authentication.d.ts +4 -4
  174. package/dist/store/reducers/cancelQuery.d.ts +2 -2
  175. package/dist/store/reducers/cancelQuery.js.map +1 -1
  176. package/dist/store/reducers/capabilities/capabilities.d.ts +6 -6
  177. package/dist/store/reducers/capabilities/hooks.d.ts +2 -0
  178. package/dist/store/reducers/capabilities/hooks.js +8 -1
  179. package/dist/store/reducers/capabilities/hooks.js.map +1 -1
  180. package/dist/store/reducers/cluster/cluster.d.ts +230 -2
  181. package/dist/store/reducers/cluster/cluster.js +45 -3
  182. package/dist/store/reducers/cluster/cluster.js.map +1 -1
  183. package/dist/store/reducers/cluster/utils.d.ts +4 -1
  184. package/dist/store/reducers/cluster/utils.js +16 -3
  185. package/dist/store/reducers/cluster/utils.js.map +1 -1
  186. package/dist/store/reducers/clusters/clusters.d.ts +2 -2
  187. package/dist/store/reducers/describe.d.ts +2 -2
  188. package/dist/store/reducers/executeQuery.d.ts +8 -4
  189. package/dist/store/reducers/executeQuery.js +35 -2
  190. package/dist/store/reducers/executeQuery.js.map +1 -1
  191. package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +2 -2
  192. package/dist/store/reducers/explainQuery/explainQuery.d.ts +2 -3
  193. package/dist/store/reducers/explainQuery/explainQuery.js +23 -2
  194. package/dist/store/reducers/explainQuery/explainQuery.js.map +1 -1
  195. package/dist/store/reducers/explainQuery/types.d.ts +1 -0
  196. package/dist/store/reducers/explainQuery/utils.d.ts +1 -1
  197. package/dist/store/reducers/explainQuery/utils.js.map +1 -1
  198. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +58 -58
  199. package/dist/store/reducers/heatmap.d.ts +2 -2
  200. package/dist/store/reducers/hotKeys/hotKeys.d.ts +2 -2
  201. package/dist/store/reducers/index.d.ts +3 -3
  202. package/dist/store/reducers/network/network.d.ts +2 -2
  203. package/dist/store/reducers/node/node.d.ts +3 -3
  204. package/dist/store/reducers/node/selectors.d.ts +1 -1
  205. package/dist/store/reducers/nodes/nodes.d.ts +3 -4
  206. package/dist/store/reducers/nodes/nodes.js +1 -17
  207. package/dist/store/reducers/nodes/nodes.js.map +1 -1
  208. package/dist/store/reducers/nodes/types.d.ts +1 -6
  209. package/dist/store/reducers/nodes/utils.d.ts +1 -4
  210. package/dist/store/reducers/nodes/utils.js +1 -41
  211. package/dist/store/reducers/nodes/utils.js.map +1 -1
  212. package/dist/store/reducers/nodesList.d.ts +3 -3
  213. package/dist/store/reducers/overview/overview.d.ts +2 -2
  214. package/dist/store/reducers/partitions/partitions.d.ts +2 -2
  215. package/dist/store/reducers/pdisk/pdisk.d.ts +2 -3
  216. package/dist/store/reducers/pdisk/pdisk.js +1 -21
  217. package/dist/store/reducers/pdisk/pdisk.js.map +1 -1
  218. package/dist/store/reducers/pdisk/utils.d.ts +0 -3
  219. package/dist/store/reducers/pdisk/utils.js +0 -22
  220. package/dist/store/reducers/pdisk/utils.js.map +1 -1
  221. package/dist/store/reducers/preview.d.ts +2 -2
  222. package/dist/store/reducers/schema/schema.d.ts +3 -3
  223. package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +2 -2
  224. package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +2 -2
  225. package/dist/store/reducers/storage/requestStorageData.d.ts +5 -0
  226. package/dist/store/reducers/storage/requestStorageData.js +12 -0
  227. package/dist/store/reducers/storage/requestStorageData.js.map +1 -0
  228. package/dist/store/reducers/storage/selectors.js +1 -1
  229. package/dist/store/reducers/storage/storage.d.ts +6 -4
  230. package/dist/store/reducers/storage/storage.js +6 -6
  231. package/dist/store/reducers/storage/storage.js.map +1 -1
  232. package/dist/store/reducers/storage/types.d.ts +11 -23
  233. package/dist/store/reducers/storage/utils.d.ts +3 -2
  234. package/dist/store/reducers/storage/utils.js +52 -26
  235. package/dist/store/reducers/storage/utils.js.map +1 -1
  236. package/dist/store/reducers/tableData.d.ts +1 -1
  237. package/dist/store/reducers/tablet.d.ts +7 -7
  238. package/dist/store/reducers/tablets.d.ts +13 -13
  239. package/dist/store/reducers/tenant/constants.d.ts +1 -0
  240. package/dist/store/reducers/tenant/constants.js +1 -0
  241. package/dist/store/reducers/tenant/constants.js.map +1 -1
  242. package/dist/store/reducers/tenant/tenant.d.ts +5 -2
  243. package/dist/store/reducers/tenant/tenant.js +12 -0
  244. package/dist/store/reducers/tenant/tenant.js.map +1 -1
  245. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +2 -2
  246. package/dist/store/reducers/tenantOverview/topNodes/topNodes.d.ts +2 -2
  247. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +2 -2
  248. package/dist/store/reducers/tenants/selectors.d.ts +27 -27
  249. package/dist/store/reducers/tenants/tenants.d.ts +2 -2
  250. package/dist/store/reducers/topic.d.ts +44 -44
  251. package/dist/store/reducers/trace.d.ts +4 -5
  252. package/dist/store/reducers/trace.js +5 -8
  253. package/dist/store/reducers/trace.js.map +1 -1
  254. package/dist/store/reducers/vdisk/utils.d.ts +0 -2
  255. package/dist/store/reducers/vdisk/utils.js +0 -10
  256. package/dist/store/reducers/vdisk/utils.js.map +1 -1
  257. package/dist/store/reducers/vdisk/vdisk.d.ts +8 -5
  258. package/dist/store/reducers/vdisk/vdisk.js +17 -32
  259. package/dist/store/reducers/vdisk/vdisk.js.map +1 -1
  260. package/dist/store/reducers/viewSchema/viewSchema.d.ts +2 -2
  261. package/dist/store/reducers/viewSchema/viewSchema.js +1 -1
  262. package/dist/store/reducers/viewSchema/viewSchema.js.map +1 -1
  263. package/dist/styles/mixins.scss +45 -0
  264. package/dist/types/api/capabilities.d.ts +1 -1
  265. package/dist/types/api/cluster.d.ts +31 -1
  266. package/dist/types/api/cluster.js +3 -1
  267. package/dist/types/api/cluster.js.map +1 -1
  268. package/dist/types/api/featureFlags.d.ts +13 -0
  269. package/dist/types/api/featureFlags.js +2 -0
  270. package/dist/types/api/featureFlags.js.map +1 -0
  271. package/dist/types/api/meta.d.ts +6 -4
  272. package/dist/types/api/pdisk.d.ts +1 -1
  273. package/dist/types/api/storage.d.ts +132 -6
  274. package/dist/types/api/storage.js +1 -5
  275. package/dist/types/api/storage.js.map +1 -1
  276. package/dist/types/api/trace.d.ts +16 -6
  277. package/dist/types/api/trace.js +7 -1
  278. package/dist/types/api/trace.js.map +1 -1
  279. package/dist/types/api/vdisk.d.ts +1 -1
  280. package/dist/types/store/executeQuery.d.ts +25 -3
  281. package/dist/types/store/executeQuery.js +5 -1
  282. package/dist/types/store/executeQuery.js.map +1 -1
  283. package/dist/utils/constants.d.ts +0 -1
  284. package/dist/utils/constants.js +0 -1
  285. package/dist/utils/constants.js.map +1 -1
  286. package/dist/utils/disks/helpers.d.ts +4 -1
  287. package/dist/utils/disks/helpers.js +7 -1
  288. package/dist/utils/disks/helpers.js.map +1 -1
  289. package/dist/utils/monaco/yql/generateSuggestions.js +8 -3
  290. package/dist/utils/monaco/yql/generateSuggestions.js.map +1 -1
  291. package/dist/utils/nodes.d.ts +1 -2
  292. package/dist/utils/nodes.js.map +1 -1
  293. package/dist/utils/storage.d.ts +2 -21
  294. package/dist/utils/storage.js +14 -19
  295. package/dist/utils/storage.js.map +1 -1
  296. package/dist/utils/versions/parseNodesToVersionsValues.d.ts +1 -1
  297. package/dist/utils/versions/parseNodesToVersionsValues.js +3 -2
  298. package/dist/utils/versions/parseNodesToVersionsValues.js.map +1 -1
  299. package/package.json +2 -6
  300. package/dist/components/NotRenderUntilFirstVisible/NotRenderUntilFirstVisible.d.ts +0 -9
  301. package/dist/components/NotRenderUntilFirstVisible/NotRenderUntilFirstVisible.js +0 -9
  302. package/dist/components/NotRenderUntilFirstVisible/NotRenderUntilFirstVisible.js.map +0 -1
  303. package/dist/components/NotRenderUntilFirstVisible/NotRenderUntilFirstVisible.scss +0 -3
  304. package/dist/containers/Cluster/i18n/ru.json +0 -16
  305. package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.d.ts +0 -4
  306. package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.js +0 -29
  307. package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.js.map +0 -1
  308. package/dist/store/reducers/tenantOverview/topStorageGroups/types.d.ts +0 -4
  309. package/dist/store/reducers/tenantOverview/topStorageGroups/types.js +0 -2
  310. package/dist/store/reducers/tenantOverview/topStorageGroups/types.js.map +0 -1
  311. package/dist/store/reducers/tenantOverview/topStorageGroups/utils.d.ts +0 -3
  312. package/dist/store/reducers/tenantOverview/topStorageGroups/utils.js +0 -13
  313. package/dist/store/reducers/tenantOverview/topStorageGroups/utils.js.map +0 -1
  314. package/dist/types/api/compute.d.ts +0 -60
  315. package/dist/types/api/compute.js +0 -6
  316. package/dist/types/api/compute.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"cancelQuery.js","sourceRoot":"","sources":["../../../src/store/reducers/cancelQuery.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,oBAAoB,EAAE,4BAA4B,EAAC,MAAM,mBAAmB,CAAC;AAErF,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAM1B,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC,eAAe,CAAC;IAC9C,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACnB,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAgC;YACvD,OAAO,EAAE,KAAK,EAAE,EAAC,OAAO,EAAE,QAAQ,EAAC,EAAE,EAAC,MAAM,EAAC,EAAE,EAAE;gBAC7C,MAAM,MAAM,GAAkB,cAAc,CAAC;gBAE7C,IAAI,CAAC;oBACD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,SAAS,CACvC;wBACI,QAAQ;wBACR,MAAM;wBACN,QAAQ,E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;oBAED,MAAM,IAAI,GAAG,4BAA4B,CAAC,QAAQ,CAAC,CAAC;oBAEpD,OAAO,EAAC,IAAI,EAAC,CAAC;gBAClB,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACb,OAAO,EAAC,KAAK,EAAC,CAAC;gBACnB,CAAC;YACL,CAAC;SACJ,CAAC;KACL,CAAC;IACF,gBAAgB,EAAE,OAAO;CAC5B,CAAC,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import type { Capability } from '../../../types/api/capabilities';
2
2
  import type { RootState } from '../../defaultStore';
3
3
  export declare const capabilitiesApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("./../api")._NEVER, unknown, {}>, {
4
- getClusterCapabilities: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("./../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "UserData" | "PreviewData" | "Tablet", import("../../../types/api/capabilities").CapabilitiesResponse | undefined, "api">;
5
- }, "api", "All" | "PDiskData" | "UserData" | "PreviewData" | "Tablet", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
4
+ getClusterCapabilities: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("./../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", import("../../../types/api/capabilities").CapabilitiesResponse | undefined, "api">;
5
+ }, "api", "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
6
6
  export declare const selectCapabilityVersion: ((state: {
7
- api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData" | "UserData" | "PreviewData" | "Tablet", "api">;
7
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", "api">;
8
8
  singleClusterMode: boolean;
9
9
  cluster: import("../cluster/types").ClusterState;
10
10
  tenant: import("../tenant/types").TenantState;
@@ -28,7 +28,7 @@ export declare const selectCapabilityVersion: ((state: {
28
28
  resetResultsCount: () => void;
29
29
  } & {
30
30
  resultFunc: (resultFuncArgs_0: {
31
- api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData" | "UserData" | "PreviewData" | "Tablet", "api">;
31
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", "api">;
32
32
  singleClusterMode: boolean;
33
33
  cluster: import("../cluster/types").ClusterState;
34
34
  tenant: import("../tenant/types").TenantState;
@@ -48,7 +48,7 @@ export declare const selectCapabilityVersion: ((state: {
48
48
  clusters: import("../clusters/types").ClustersFilters;
49
49
  }, resultFuncArgs_1: Capability) => number | undefined;
50
50
  memoizedResultFunc: ((resultFuncArgs_0: {
51
- api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData" | "UserData" | "PreviewData" | "Tablet", "api">;
51
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", "api">;
52
52
  singleClusterMode: boolean;
53
53
  cluster: import("../cluster/types").ClusterState;
54
54
  tenant: import("../tenant/types").TenantState;
@@ -73,7 +73,7 @@ export declare const selectCapabilityVersion: ((state: {
73
73
  };
74
74
  lastResult: () => number | undefined;
75
75
  dependencies: [(state: RootState) => {
76
- api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData" | "UserData" | "PreviewData" | "Tablet", "api">;
76
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", "api">;
77
77
  singleClusterMode: boolean;
78
78
  cluster: import("../cluster/types").ClusterState;
79
79
  tenant: import("../tenant/types").TenantState;
@@ -1,3 +1,5 @@
1
+ export declare function useCapabilitiesLoaded(): boolean;
1
2
  export declare const useCreateDirectoryFeatureAvailable: () => boolean;
2
3
  export declare const useDiskPagesAvailable: () => boolean;
3
4
  export declare const useTracingLevelOptionAvailable: () => boolean;
5
+ export declare const useStorageGroupsHandlerAvailable: () => boolean;
@@ -1,5 +1,9 @@
1
1
  import { useTypedSelector } from '../../../utils/hooks';
2
- import { selectCapabilityVersion } from './capabilities';
2
+ import { capabilitiesApi, selectCapabilityVersion } from './capabilities';
3
+ export function useCapabilitiesLoaded() {
4
+ const { data, error } = capabilitiesApi.useGetClusterCapabilitiesQuery(undefined);
5
+ return Boolean(data || error);
6
+ }
3
7
  const useGetFeatureVersion = (feature) => {
4
8
  return useTypedSelector((state) => selectCapabilityVersion(state, feature) || 0);
5
9
  };
@@ -14,4 +18,7 @@ export const useDiskPagesAvailable = () => {
14
18
  export const useTracingLevelOptionAvailable = () => {
15
19
  return useGetFeatureVersion('/viewer/query') > 2;
16
20
  };
21
+ export const useStorageGroupsHandlerAvailable = () => {
22
+ return useGetFeatureVersion('/storage/groups') > 2;
23
+ };
17
24
  //# sourceMappingURL=hooks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../src/store/reducers/capabilities/hooks.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAC,uBAAuB,EAAC,MAAM,gBAAgB,CAAC;AAEvD,MAAM,oBAAoB,GAAG,CAAC,OAAmB,EAAE,EAAE;IACjD,OAAO,gBAAgB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAuB,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AACrF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAA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;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,EAAE;IAC/C,OAAO,oBAAoB,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,EAAE;IACjD,OAAO,oBAAoB,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;AACvD,CAAC,CAAC"}
@@ -1,12 +1,240 @@
1
1
  import type { Dispatch } from '@reduxjs/toolkit';
2
2
  import type { TClusterInfo } from '../../../types/api/cluster';
3
+ import type { RootState } from '../../defaultStore';
3
4
  import type { ClusterGroupsStats, ClusterState } from './types';
4
5
  export declare function updateDefaultClusterTab(tab: string): (dispatch: Dispatch) => void;
5
6
  declare const _default: import("redux").Reducer<ClusterState>;
6
7
  export default _default;
7
8
  export declare const clusterApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, {
8
- getClusterInfo: import("@reduxjs/toolkit/query").QueryDefinition<string | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "UserData" | "PreviewData" | "Tablet", {
9
+ getClusterInfo: import("@reduxjs/toolkit/query").QueryDefinition<string | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", {
9
10
  clusterData: TClusterInfo;
10
11
  groupsStats?: ClusterGroupsStats;
11
12
  }, "api">;
12
- }, "api", "All" | "PDiskData" | "UserData" | "PreviewData" | "Tablet", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
13
+ getClusterBaseInfo: import("@reduxjs/toolkit/query").QueryDefinition<string, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", import("../../../types/api/meta").MetaBaseClusterInfo | undefined, "api">;
14
+ }, "api", "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
15
+ export declare function useClusterBaseInfo(): {
16
+ name: string | undefined;
17
+ monitoring: string | undefined;
18
+ traceCheck: {
19
+ url: string;
20
+ } | undefined;
21
+ traceView: {
22
+ url: string;
23
+ } | undefined;
24
+ owner?: string;
25
+ location?: string;
26
+ image?: string;
27
+ title?: string;
28
+ endpoint?: string;
29
+ mvp_token?: string;
30
+ status?: string;
31
+ scale?: number;
32
+ environment?: string;
33
+ control_plane?: string;
34
+ description?: string;
35
+ balancer?: string;
36
+ service?: string;
37
+ } | {
38
+ name: string | undefined;
39
+ monitoring: string | undefined;
40
+ traceCheck?: undefined;
41
+ traceView?: undefined;
42
+ owner?: string;
43
+ location?: string;
44
+ image?: string;
45
+ title?: string;
46
+ endpoint?: string;
47
+ mvp_token?: string;
48
+ status?: string;
49
+ scale?: number;
50
+ environment?: string;
51
+ control_plane?: string;
52
+ description?: string;
53
+ balancer?: string;
54
+ service?: string;
55
+ };
56
+ export declare const selectClusterInfo: ((state: {
57
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", "api">;
58
+ singleClusterMode: boolean;
59
+ cluster: ClusterState;
60
+ tenant: import("../tenant/types").TenantState;
61
+ tooltip: import("../../../types/store/tooltip").ITooltipState;
62
+ schema: import("../schema/types").SchemaState;
63
+ tenants: import("../tenants/types").TenantsState;
64
+ partitions: import("../partitions/types").PartitionsState;
65
+ executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
66
+ heatmap: import("../../../types/store/heatmap").IHeatmapState;
67
+ settings: import("../settings/types").SettingsState;
68
+ executeTopQueries: import("../executeTopQueries/types").TopQueriesFilters;
69
+ shardsWorkload: import("../shardsWorkload/types").ShardsWorkloadFilters;
70
+ authentication: import("../authentication/types").AuthenticationState;
71
+ header: import("../header/types").HeaderState;
72
+ queryActions: import("../queryActions/types").QueryActionsState;
73
+ fullscreen: boolean;
74
+ clusters: import("../clusters/types").ClustersFilters;
75
+ }, clusterName?: string | undefined) => {
76
+ clusterData: TClusterInfo;
77
+ groupsStats?: ClusterGroupsStats;
78
+ } | undefined) & {
79
+ clearCache: () => void;
80
+ resultsCount: () => number;
81
+ resetResultsCount: () => void;
82
+ } & {
83
+ resultFunc: (resultFuncArgs_0: {
84
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", "api">;
85
+ singleClusterMode: boolean;
86
+ cluster: ClusterState;
87
+ tenant: import("../tenant/types").TenantState;
88
+ tooltip: import("../../../types/store/tooltip").ITooltipState;
89
+ schema: import("../schema/types").SchemaState;
90
+ tenants: import("../tenants/types").TenantsState;
91
+ partitions: import("../partitions/types").PartitionsState;
92
+ executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
93
+ heatmap: import("../../../types/store/heatmap").IHeatmapState;
94
+ settings: import("../settings/types").SettingsState;
95
+ executeTopQueries: import("../executeTopQueries/types").TopQueriesFilters;
96
+ shardsWorkload: import("../shardsWorkload/types").ShardsWorkloadFilters;
97
+ authentication: import("../authentication/types").AuthenticationState;
98
+ header: import("../header/types").HeaderState;
99
+ queryActions: import("../queryActions/types").QueryActionsState;
100
+ fullscreen: boolean;
101
+ clusters: import("../clusters/types").ClustersFilters;
102
+ }, resultFuncArgs_1: (state: import("@reduxjs/toolkit/query").RootState<{
103
+ getClusterInfo: import("@reduxjs/toolkit/query").QueryDefinition<string | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", {
104
+ clusterData: TClusterInfo;
105
+ groupsStats?: ClusterGroupsStats;
106
+ }, "api">;
107
+ getClusterBaseInfo: import("@reduxjs/toolkit/query").QueryDefinition<string, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", import("../../../types/api/meta").MetaBaseClusterInfo | undefined, "api">;
108
+ }, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", "api">) => import("@reduxjs/toolkit/query").QueryResultSelectorResult<import("@reduxjs/toolkit/query").QueryDefinition<string | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", {
109
+ clusterData: TClusterInfo;
110
+ groupsStats?: ClusterGroupsStats;
111
+ }, "api">>) => {
112
+ clusterData: TClusterInfo;
113
+ groupsStats?: ClusterGroupsStats;
114
+ } | undefined;
115
+ memoizedResultFunc: ((resultFuncArgs_0: {
116
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", "api">;
117
+ singleClusterMode: boolean;
118
+ cluster: ClusterState;
119
+ tenant: import("../tenant/types").TenantState;
120
+ tooltip: import("../../../types/store/tooltip").ITooltipState;
121
+ schema: import("../schema/types").SchemaState;
122
+ tenants: import("../tenants/types").TenantsState;
123
+ partitions: import("../partitions/types").PartitionsState;
124
+ executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
125
+ heatmap: import("../../../types/store/heatmap").IHeatmapState;
126
+ settings: import("../settings/types").SettingsState;
127
+ executeTopQueries: import("../executeTopQueries/types").TopQueriesFilters;
128
+ shardsWorkload: import("../shardsWorkload/types").ShardsWorkloadFilters;
129
+ authentication: import("../authentication/types").AuthenticationState;
130
+ header: import("../header/types").HeaderState;
131
+ queryActions: import("../queryActions/types").QueryActionsState;
132
+ fullscreen: boolean;
133
+ clusters: import("../clusters/types").ClustersFilters;
134
+ }, resultFuncArgs_1: (state: import("@reduxjs/toolkit/query").RootState<{
135
+ getClusterInfo: import("@reduxjs/toolkit/query").QueryDefinition<string | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", {
136
+ clusterData: TClusterInfo;
137
+ groupsStats?: ClusterGroupsStats;
138
+ }, "api">;
139
+ getClusterBaseInfo: import("@reduxjs/toolkit/query").QueryDefinition<string, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", import("../../../types/api/meta").MetaBaseClusterInfo | undefined, "api">;
140
+ }, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", "api">) => import("@reduxjs/toolkit/query").QueryResultSelectorResult<import("@reduxjs/toolkit/query").QueryDefinition<string | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", {
141
+ clusterData: TClusterInfo;
142
+ groupsStats?: ClusterGroupsStats;
143
+ }, "api">>) => {
144
+ clusterData: TClusterInfo;
145
+ groupsStats?: ClusterGroupsStats;
146
+ } | undefined) & {
147
+ clearCache: () => void;
148
+ resultsCount: () => number;
149
+ resetResultsCount: () => void;
150
+ };
151
+ lastResult: () => {
152
+ clusterData: TClusterInfo;
153
+ groupsStats?: ClusterGroupsStats;
154
+ } | undefined;
155
+ dependencies: [(state: RootState) => {
156
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", "api">;
157
+ singleClusterMode: boolean;
158
+ cluster: ClusterState;
159
+ tenant: import("../tenant/types").TenantState;
160
+ tooltip: import("../../../types/store/tooltip").ITooltipState;
161
+ schema: import("../schema/types").SchemaState;
162
+ tenants: import("../tenants/types").TenantsState;
163
+ partitions: import("../partitions/types").PartitionsState;
164
+ executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
165
+ heatmap: import("../../../types/store/heatmap").IHeatmapState;
166
+ settings: import("../settings/types").SettingsState;
167
+ executeTopQueries: import("../executeTopQueries/types").TopQueriesFilters;
168
+ shardsWorkload: import("../shardsWorkload/types").ShardsWorkloadFilters;
169
+ authentication: import("../authentication/types").AuthenticationState;
170
+ header: import("../header/types").HeaderState;
171
+ queryActions: import("../queryActions/types").QueryActionsState;
172
+ fullscreen: boolean;
173
+ clusters: import("../clusters/types").ClustersFilters;
174
+ }, (_state: RootState, clusterName?: string) => (state: import("@reduxjs/toolkit/query").RootState<{
175
+ getClusterInfo: import("@reduxjs/toolkit/query").QueryDefinition<string | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", {
176
+ clusterData: TClusterInfo;
177
+ groupsStats?: ClusterGroupsStats;
178
+ }, "api">;
179
+ getClusterBaseInfo: import("@reduxjs/toolkit/query").QueryDefinition<string, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", import("../../../types/api/meta").MetaBaseClusterInfo | undefined, "api">;
180
+ }, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", "api">) => import("@reduxjs/toolkit/query").QueryResultSelectorResult<import("@reduxjs/toolkit/query").QueryDefinition<string | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", {
181
+ clusterData: TClusterInfo;
182
+ groupsStats?: ClusterGroupsStats;
183
+ }, "api">>];
184
+ recomputations: () => number;
185
+ resetRecomputations: () => void;
186
+ dependencyRecomputations: () => number;
187
+ resetDependencyRecomputations: () => void;
188
+ } & {
189
+ argsMemoize: typeof import("reselect").weakMapMemoize;
190
+ memoize: typeof import("reselect").weakMapMemoize;
191
+ };
192
+ export declare const selectClusterTitle: ((state: {
193
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", "api">;
194
+ singleClusterMode: boolean;
195
+ cluster: ClusterState;
196
+ tenant: import("../tenant/types").TenantState;
197
+ tooltip: import("../../../types/store/tooltip").ITooltipState;
198
+ schema: import("../schema/types").SchemaState;
199
+ tenants: import("../tenants/types").TenantsState;
200
+ partitions: import("../partitions/types").PartitionsState;
201
+ executeQuery: import("../../../types/store/executeQuery").ExecuteQueryState;
202
+ heatmap: import("../../../types/store/heatmap").IHeatmapState;
203
+ settings: import("../settings/types").SettingsState;
204
+ executeTopQueries: import("../executeTopQueries/types").TopQueriesFilters;
205
+ shardsWorkload: import("../shardsWorkload/types").ShardsWorkloadFilters;
206
+ authentication: import("../authentication/types").AuthenticationState;
207
+ header: import("../header/types").HeaderState;
208
+ queryActions: import("../queryActions/types").QueryActionsState;
209
+ fullscreen: boolean;
210
+ clusters: import("../clusters/types").ClustersFilters;
211
+ }, clusterName?: string | undefined) => string) & {
212
+ clearCache: () => void;
213
+ resultsCount: () => number;
214
+ resetResultsCount: () => void;
215
+ } & {
216
+ resultFunc: (resultFuncArgs_0: string | undefined, resultFuncArgs_1: {
217
+ clusterData: TClusterInfo;
218
+ groupsStats?: ClusterGroupsStats;
219
+ } | undefined) => string;
220
+ memoizedResultFunc: ((resultFuncArgs_0: string | undefined, resultFuncArgs_1: {
221
+ clusterData: TClusterInfo;
222
+ groupsStats?: ClusterGroupsStats;
223
+ } | undefined) => string) & {
224
+ clearCache: () => void;
225
+ resultsCount: () => number;
226
+ resetResultsCount: () => void;
227
+ };
228
+ lastResult: () => string;
229
+ dependencies: [(_state: RootState, clusterName?: string) => string | undefined, (state: RootState, clusterName?: string) => {
230
+ clusterData: TClusterInfo;
231
+ groupsStats?: ClusterGroupsStats;
232
+ } | undefined];
233
+ recomputations: () => number;
234
+ resetRecomputations: () => void;
235
+ dependencyRecomputations: () => number;
236
+ resetDependencyRecomputations: () => void;
237
+ } & {
238
+ argsMemoize: typeof import("reselect").weakMapMemoize;
239
+ memoize: typeof import("reselect").weakMapMemoize;
240
+ };
@@ -1,9 +1,13 @@
1
- import { createSlice } from '@reduxjs/toolkit';
1
+ import { createSelector, createSlice } from '@reduxjs/toolkit';
2
+ import { skipToken } from '@reduxjs/toolkit/query';
3
+ import { StringParam, useQueryParam } from 'use-query-params';
2
4
  import { clusterTabsIds, isClusterTab } from '../../../containers/Cluster/utils';
3
- import { DEFAULT_CLUSTER_TAB_KEY } from '../../../utils/constants';
5
+ import { parseTraceFields } from '../../../services/parsers/parseMetaCluster';
6
+ import { isClusterInfoV2 } from '../../../types/api/cluster';
7
+ import { CLUSTER_DEFAULT_TITLE, DEFAULT_CLUSTER_TAB_KEY } from '../../../utils/constants';
4
8
  import { isQueryErrorResponse } from '../../../utils/query';
5
9
  import { api } from '../api';
6
- import { createSelectClusterGroupsQuery, parseGroupsStatsQueryResponse } from './utils';
10
+ import { createSelectClusterGroupsQuery, getGroupStatsFromClusterInfo, normalizeDomain, parseGroupsStatsQueryResponse, } from './utils';
7
11
  const defaultClusterTabLS = localStorage.getItem(DEFAULT_CLUSTER_TAB_KEY);
8
12
  let defaultClusterTab;
9
13
  if (isClusterTab(defaultClusterTabLS)) {
@@ -44,6 +48,14 @@ export const clusterApi = api.injectEndpoints({
44
48
  if (!clusterRoot) {
45
49
  return { data: { clusterData } };
46
50
  }
51
+ if (isClusterInfoV2(clusterData)) {
52
+ return {
53
+ data: {
54
+ clusterData,
55
+ groupsStats: getGroupStatsFromClusterInfo(clusterData),
56
+ },
57
+ };
58
+ }
47
59
  try {
48
60
  const query = createSelectClusterGroupsQuery(clusterRoot);
49
61
  // Normally query request should be fulfilled within 300-400ms even on very big clusters
@@ -75,7 +87,37 @@ export const clusterApi = api.injectEndpoints({
75
87
  },
76
88
  providesTags: ['All'],
77
89
  }),
90
+ getClusterBaseInfo: builder.query({
91
+ queryFn: async (clusterName, { signal }) => {
92
+ try {
93
+ const data = await window.api.getClusterBaseInfo(clusterName, { signal });
94
+ return { data };
95
+ }
96
+ catch (error) {
97
+ return { error };
98
+ }
99
+ },
100
+ providesTags: ['All'],
101
+ }),
78
102
  }),
79
103
  overrideExisting: 'throw',
80
104
  });
105
+ export function useClusterBaseInfo() {
106
+ var _a;
107
+ const [clusterName] = useQueryParam('clusterName', StringParam);
108
+ const { currentData } = clusterApi.useGetClusterBaseInfoQuery(clusterName !== null && clusterName !== void 0 ? clusterName : skipToken);
109
+ const { solomon: monitoring, name, trace_check: traceCheck, trace_view: traceView, ...data } = currentData || {};
110
+ return {
111
+ ...data,
112
+ ...parseTraceFields({ traceCheck, traceView }),
113
+ name: (_a = name !== null && name !== void 0 ? name : clusterName) !== null && _a !== void 0 ? _a : undefined,
114
+ monitoring,
115
+ };
116
+ }
117
+ const createClusterInfoSelector = createSelector((clusterName) => clusterName, (clusterName) => clusterApi.endpoints.getClusterInfo.select(clusterName));
118
+ export const selectClusterInfo = createSelector((state) => state, (_state, clusterName) => createClusterInfoSelector(clusterName), (state, selectGetClusterInfo) => selectGetClusterInfo(state).data);
119
+ export const selectClusterTitle = createSelector((_state, clusterName) => clusterName, (state, clusterName) => selectClusterInfo(state, clusterName), (clusterName, clusterInfo) => {
120
+ const { Name, Domain } = (clusterInfo === null || clusterInfo === void 0 ? void 0 : clusterInfo.clusterData) || {};
121
+ return Name || clusterName || normalizeDomain(Domain) || CLUSTER_DEFAULT_TITLE;
122
+ });
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,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAC5C,CAAC,MAAiB,EAAE,WAAoB,EAAE,EAAE,CAAC,WAAW,EACxD,CAAC,KAAgB,EAAE,WAAoB,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,EAAE,WAAW,CAAC,EACjF,CAAC,WAAW,EAAE,WAAW,EAAE,EAAE;IACzB,MAAM,EAAC,IAAI,EAAE,MAAM,EAAC,GAAG,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAW,KAAI,EAAE,CAAC;IAEtD,OAAO,IAAI,IAAI,WAAW,IAAI,eAAe,CAAC,MAAM,CAAC,IAAI,qBAAqB,CAAC;AACnF,CAAC,CACJ,CAAC"}
@@ -1,4 +1,7 @@
1
+ import type { TClusterInfoV2 } from '../../../types/api/cluster';
1
2
  import type { ExecuteQueryResponse } from '../../../types/api/query';
2
3
  import type { ClusterGroupsStats } from './types';
3
4
  export declare const createSelectClusterGroupsQuery: (clusterRoot: string) => string;
4
- export declare const parseGroupsStatsQueryResponse: (data: ExecuteQueryResponse<"modern">) => ClusterGroupsStats;
5
+ export declare const parseGroupsStatsQueryResponse: (data: ExecuteQueryResponse<"modern"> | null) => ClusterGroupsStats;
6
+ export declare function getGroupStatsFromClusterInfo(info: TClusterInfoV2): ClusterGroupsStats;
7
+ export declare function normalizeDomain(domain?: string): string | undefined;
@@ -23,10 +23,9 @@ const getDiskType = (rawTypeString) => {
23
23
  }
24
24
  return diskType;
25
25
  };
26
- export const parseGroupsStatsQueryResponse = (data) => {
27
- const parsedData = parseQueryAPIExecuteResponse(data).result;
26
+ function getGroupStats(data) {
28
27
  const result = {};
29
- parsedData === null || parsedData === void 0 ? void 0 : parsedData.forEach((stats) => {
28
+ data === null || data === void 0 ? void 0 : data.forEach((stats) => {
30
29
  const { PDiskFilter, ErasureSpecies: erasure, CurrentAvailableSize, CurrentAllocatedSize, CurrentGroupsCreated, AvailableGroupsToCreate, } = stats;
31
30
  const createdGroups = Number(CurrentGroupsCreated) || 0;
32
31
  const availableGroupsToCreate = Number(AvailableGroupsToCreate) || 0;
@@ -65,5 +64,19 @@ export const parseGroupsStatsQueryResponse = (data) => {
65
64
  }
66
65
  });
67
66
  return result;
67
+ }
68
+ export const parseGroupsStatsQueryResponse = (data) => {
69
+ const parsedData = parseQueryAPIExecuteResponse(data).result;
70
+ return getGroupStats(parsedData);
68
71
  };
72
+ export function getGroupStatsFromClusterInfo(info) {
73
+ return getGroupStats(info.StorageStats);
74
+ }
75
+ export function normalizeDomain(domain) {
76
+ if (!domain) {
77
+ return undefined;
78
+ }
79
+ const normalizedDomain = domain.startsWith('/') ? domain.slice(1) : domain;
80
+ return normalizedDomain.toUpperCase();
81
+ }
69
82
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/store/reducers/cluster/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,4BAA4B,EAAC,MAAM,sBAAsB,CAAC;AAIlE,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,WAAmB,EAAE,EAAE;IAClE,OAAO;;;;;;;;aAQE,WAAW;;CAEvB,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,aAAqB,EAAE,EAAE;;IAC1C,6DAA6D;IAC7D,MAAM,UAAU,GAAG,0BAA0B,CAAC;IAE9C,MAAM,QAAQ,GAAG,MAAA,MAAA,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,0CAAE,MAAM,0CAAG,MAAM,CAAC,CAAC;IAEnE,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;QACrB,qBAAqB;QACrB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CACzC,IAAoC,EAClB,EAAE;IACpB,MAAM,UAAU,GAAG,4BAA4B,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC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G,aAAa;qBAC5D,CAAC;gBACN,CAAC;qBAAM,CAAC;oBACJ,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,GAAG,aAAa,CAAC;gBAC9C,CAAC;YACL,CAAC;iBAAM,CAAC;gBACJ,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAC,CAAC,OAAO,CAAC,EAAE,aAAa,EAAC,CAAC;YAClD,CAAC;QACL,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,CACzC,IAA2C,EACzB,EAAE;IACpB,MAAM,UAAU,GAAG,4BAA4B,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;IAC7D,OAAO,aAAa,CAAC,UAAU,CAAC,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,UAAU,4BAA4B,CAAC,IAAoB;IAC7D,OAAO,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,MAAe;IAC3C,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,MAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAC3E,OAAO,gBAAgB,CAAC,WAAW,EAAE,CAAC;AAC1C,CAAC"}
@@ -3,5 +3,5 @@ declare const _default: import("redux").Reducer<ClustersFilters>;
3
3
  export default _default;
4
4
  export declare const changeClustersFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<ClustersFilters>, "clusters/changeClustersFilters">;
5
5
  export declare const clustersApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, {
6
- getClustersList: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "UserData" | "PreviewData" | "Tablet", import("./types").PreparedCluster[] | undefined, "api">;
7
- }, "api", "All" | "PDiskData" | "UserData" | "PreviewData" | "Tablet", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
6
+ getClustersList: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", import("./types").PreparedCluster[] | undefined, "api">;
7
+ }, "api", "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
@@ -3,5 +3,5 @@ export declare const describeApi: import("@reduxjs/toolkit/query").Api<import("@
3
3
  getDescribe: import("@reduxjs/toolkit/query").QueryDefinition<{
4
4
  paths: string[];
5
5
  database: string;
6
- }, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("./api")._NEVER, unknown, {}>, "All" | "PDiskData" | "UserData" | "PreviewData" | "Tablet", IDescribeData | undefined, "api">;
7
- }, "api", "All" | "PDiskData" | "UserData" | "PreviewData" | "Tablet", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
6
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("./api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", IDescribeData | undefined, "api">;
7
+ }, "api", "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
@@ -1,7 +1,7 @@
1
1
  import type { Reducer } from '@reduxjs/toolkit';
2
2
  import type { Schemas } from '../../types/api/query';
3
- import type { ExecuteQueryAction, ExecuteQueryState, ExecuteQueryStateSlice, QueryInHistory } from '../../types/store/executeQuery';
4
- import type { IQueryResult, QueryRequestParams, QuerySettings } from '../../types/store/query';
3
+ import type { ExecuteQueryAction, ExecuteQueryState, ExecuteQueryStateSlice, QueryInHistory, QueryResult } from '../../types/store/executeQuery';
4
+ import type { QueryRequestParams, QuerySettings } from '../../types/store/query';
5
5
  declare const executeQuery: Reducer<ExecuteQueryState, ExecuteQueryAction>;
6
6
  interface SendQueryParams extends QueryRequestParams {
7
7
  queryId: string;
@@ -14,8 +14,8 @@ interface QueryStats {
14
14
  endTime?: string | number;
15
15
  }
16
16
  export declare const executeQueryApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("./api")._NEVER, unknown, {}>, {
17
- executeQuery: import("@reduxjs/toolkit/query").MutationDefinition<SendQueryParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("./api")._NEVER, unknown, {}>, "All" | "PDiskData" | "UserData" | "PreviewData" | "Tablet", IQueryResult, "api">;
18
- }, "api", "All" | "PDiskData" | "UserData" | "PreviewData" | "Tablet", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
17
+ executeQuery: import("@reduxjs/toolkit/query").MutationDefinition<SendQueryParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("./api")._NEVER, unknown, {}>, "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", null, "api">;
18
+ }, "api", "All" | "PDiskData" | "PreviewData" | "StorageData" | "Tablet" | "UserData" | "VDiskData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
19
19
  export declare const saveQueryToHistory: (queryText: string, queryId: string) => {
20
20
  readonly type: "query/SAVE_QUERY_TO_HISTORY";
21
21
  readonly data: {
@@ -30,6 +30,10 @@ export declare function updateQueryInHistory(stats: QueryStats, queryId: string)
30
30
  readonly stats: QueryStats;
31
31
  };
32
32
  };
33
+ export declare function setQueryResult(data?: QueryResult): {
34
+ readonly type: "query/SET_QUERY_RESULT";
35
+ readonly data: QueryResult | undefined;
36
+ };
33
37
  export declare const goToPreviousQuery: () => {
34
38
  readonly type: "query/GO_TO_PREVIOUS_QUERY";
35
39
  };
@@ -1,11 +1,13 @@
1
1
  import { settingsManager } from '../../services/settings';
2
2
  import { TracingLevelNumber } from '../../types/api/query';
3
+ import { ResultType } from '../../types/store/executeQuery';
3
4
  import { QUERIES_HISTORY_KEY } from '../../utils/constants';
4
5
  import { QUERY_SYNTAX, isQueryErrorResponse, parseQueryAPIExecuteResponse } from '../../utils/query';
5
6
  import { isNumeric } from '../../utils/utils';
6
7
  import { api } from './api';
7
8
  const MAXIMUM_QUERIES_IN_HISTORY = 20;
8
9
  const CHANGE_USER_INPUT = 'query/CHANGE_USER_INPUT';
10
+ const SET_QUERY_RESULT = 'query/SET_QUERY_RESULT';
9
11
  const SAVE_QUERY_TO_HISTORY = 'query/SAVE_QUERY_TO_HISTORY';
10
12
  const UPDATE_QUERY_IN_HISTORY = 'query/UPDATE_QUERY_IN_HISTORY';
11
13
  const SET_QUERY_HISTORY_FILTER = 'query/SET_QUERY_HISTORY_FILTER';
@@ -35,6 +37,12 @@ const executeQuery = (state = initialState, action) => {
35
37
  input: action.data.input,
36
38
  };
37
39
  }
40
+ case SET_QUERY_RESULT: {
41
+ return {
42
+ ...state,
43
+ result: action.data,
44
+ };
45
+ }
38
46
  case SAVE_QUERY_TO_HISTORY: {
39
47
  const { queryText, queryId } = action.data;
40
48
  const newQueries = [...state.history.queries, { queryText, queryId }].slice(state.history.queries.length >= MAXIMUM_QUERIES_IN_HISTORY ? 1 : 0);
@@ -132,6 +140,7 @@ export const executeQueryApi = api.injectEndpoints({
132
140
  var _a;
133
141
  let action = 'execute';
134
142
  let syntax = QUERY_SYNTAX.yql;
143
+ dispatch(setQueryResult({ type: ResultType.EXECUTE, queryId, isLoading: true }));
135
144
  if (querySettings.queryMode === 'pg') {
136
145
  action = 'execute-query';
137
146
  syntax = QUERY_SYNTAX.pg;
@@ -160,10 +169,16 @@ export const executeQueryApi = api.injectEndpoints({
160
169
  query_id: queryId,
161
170
  }, { signal });
162
171
  if (isQueryErrorResponse(response)) {
172
+ dispatch(setQueryResult({
173
+ type: ResultType.EXECUTE,
174
+ error: response,
175
+ isLoading: false,
176
+ queryId,
177
+ }));
163
178
  return { error: response };
164
179
  }
165
180
  const data = parseQueryAPIExecuteResponse(response);
166
- data.traceId = (_a = response._meta) === null || _a === void 0 ? void 0 : _a.traceId;
181
+ data.traceId = (_a = response === null || response === void 0 ? void 0 : response._meta) === null || _a === void 0 ? void 0 : _a.traceId;
167
182
  const queryStats = {};
168
183
  if (data.stats) {
169
184
  const { DurationUs, Executions: [{ FinishTimeMs }] = [{}] } = data.stats;
@@ -176,9 +191,21 @@ export const executeQueryApi = api.injectEndpoints({
176
191
  queryStats.endTime = now;
177
192
  }
178
193
  dispatch(updateQueryInHistory(queryStats, queryId));
179
- return { data };
194
+ dispatch(setQueryResult({
195
+ type: ResultType.EXECUTE,
196
+ data,
197
+ isLoading: false,
198
+ queryId,
199
+ }));
200
+ return { data: null };
180
201
  }
181
202
  catch (error) {
203
+ dispatch(setQueryResult({
204
+ type: ResultType.EXECUTE,
205
+ error,
206
+ isLoading: false,
207
+ queryId,
208
+ }));
182
209
  return { error };
183
210
  }
184
211
  },
@@ -198,6 +225,12 @@ export function updateQueryInHistory(stats, queryId) {
198
225
  data: { queryId, stats },
199
226
  };
200
227
  }
228
+ export function setQueryResult(data) {
229
+ return {
230
+ type: SET_QUERY_RESULT,
231
+ data,
232
+ };
233
+ }
201
234
  export const goToPreviousQuery = () => {
202
235
  return {
203
236
  type: GO_TO_PREVIOUS_QUERY,