ydb-embedded-ui 6.10.3 → 6.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (250) hide show
  1. package/dist/components/DateRange/DateRange.d.ts +4 -4
  2. package/dist/components/DateRange/DateRange.js +23 -26
  3. package/dist/components/DateRange/DateRange.scss +14 -13
  4. package/dist/components/DateRange/__test__/fromDateRangeValues.test.d.ts +1 -0
  5. package/dist/components/DateRange/__test__/fromDateRangeValues.test.js +80 -0
  6. package/dist/components/DateRange/__test__/getdatePickerSize.test.d.ts +1 -0
  7. package/dist/components/DateRange/__test__/getdatePickerSize.test.js +56 -0
  8. package/dist/components/DateRange/__test__/toDateRangeValues.test.d.ts +1 -0
  9. package/dist/components/DateRange/__test__/toDateRangeValues.test.js +80 -0
  10. package/dist/components/DateRange/i18n/en.json +4 -0
  11. package/dist/components/DateRange/i18n/index.d.ts +2 -0
  12. package/dist/components/DateRange/i18n/index.js +5 -0
  13. package/dist/components/DateRange/i18n/ru.json +4 -0
  14. package/dist/components/DateRange/utils.d.ts +5 -0
  15. package/dist/components/DateRange/utils.js +41 -0
  16. package/dist/components/DeveloperUILinkButton/DeveloperUILinkButton.d.ts +8 -0
  17. package/dist/components/DeveloperUILinkButton/DeveloperUILinkButton.js +9 -0
  18. package/dist/components/DeveloperUILinkButton/DeveloperUILinkButton.scss +12 -0
  19. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.d.ts +6 -1
  20. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js +22 -12
  21. package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +45 -45
  22. package/dist/components/EntityStatus/EntityStatus.js +1 -1
  23. package/dist/components/EntityStatus/EntityStatus.scss +6 -2
  24. package/dist/components/MetricChart/reducer.d.ts +2 -2
  25. package/dist/components/MonacoEditor/MonacoEditor.js +0 -2
  26. package/dist/components/NodeHostWrapper/NodeHostWrapper.d.ts +0 -1
  27. package/dist/components/NodeHostWrapper/NodeHostWrapper.js +11 -7
  28. package/dist/components/PDiskInfo/PDiskInfo.d.ts +7 -4
  29. package/dist/components/PDiskInfo/PDiskInfo.js +73 -26
  30. package/dist/components/PDiskInfo/PDiskInfo.scss +15 -1
  31. package/dist/components/PDiskInfo/i18n/en.json +11 -5
  32. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  33. package/dist/components/PDiskPopup/PDiskPopup.js +8 -2
  34. package/dist/components/VDiskInfo/VDiskInfo.d.ts +3 -2
  35. package/dist/components/VDiskInfo/VDiskInfo.js +9 -4
  36. package/dist/components/VDiskInfo/VDiskInfo.scss +7 -1
  37. package/dist/components/VDiskInfo/i18n/en.json +2 -1
  38. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
  39. package/dist/containers/Cluster/Cluster.scss +1 -4
  40. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +1 -1
  41. package/dist/containers/Heatmap/Heatmap.d.ts +2 -1
  42. package/dist/containers/Heatmap/Heatmap.js +2 -2
  43. package/dist/containers/Node/Node.scss +1 -4
  44. package/dist/containers/Node/NodeStructure/NodeStructure.scss +0 -20
  45. package/dist/containers/Node/NodeStructure/Pdisk.js +2 -2
  46. package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.d.ts +6 -0
  47. package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js +24 -0
  48. package/dist/containers/PDiskPage/PDiskPage.js +62 -24
  49. package/dist/containers/PDiskPage/PDiskPage.scss +8 -5
  50. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.d.ts +7 -0
  51. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js +93 -0
  52. package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.scss +52 -0
  53. package/dist/containers/PDiskPage/PDiskSpaceDistribution/utils.d.ts +4 -0
  54. package/dist/containers/PDiskPage/PDiskSpaceDistribution/utils.js +9 -0
  55. package/dist/containers/PDiskPage/i18n/en.json +8 -1
  56. package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
  57. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +16 -6
  58. package/dist/containers/Tablets/Tablets.js +12 -5
  59. package/dist/containers/Tenant/Acl/Acl.d.ts +2 -1
  60. package/dist/containers/Tenant/Acl/Acl.js +10 -8
  61. package/dist/containers/Tenant/Acl/Acl.scss +8 -8
  62. package/dist/containers/Tenant/Acl/i18n/en.json +6 -0
  63. package/dist/containers/Tenant/Acl/i18n/index.d.ts +2 -0
  64. package/dist/containers/Tenant/Acl/i18n/index.js +4 -0
  65. package/dist/containers/Tenant/Diagnostics/Describe/Describe.d.ts +2 -1
  66. package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +4 -4
  67. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.js +1 -1
  68. package/dist/containers/Tenant/Diagnostics/Diagnostics.js +3 -3
  69. package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +3 -1
  70. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.d.ts +2 -1
  71. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +3 -3
  72. package/dist/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -1
  73. package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +6 -18
  74. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/TableInfo.d.ts +1 -3
  75. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/TableInfo.js +2 -2
  76. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/en.json +14 -1
  77. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.d.ts +1 -1
  78. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.js +1 -2
  79. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo.d.ts +2 -3
  80. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo.js +64 -76
  81. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +8 -5
  82. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +28 -3
  83. package/dist/containers/Tenant/Diagnostics/TenantOverview/getSectionTitle.d.ts +2 -1
  84. package/dist/containers/Tenant/Diagnostics/TenantOverview/getSectionTitle.js +2 -2
  85. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +3 -2
  86. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  87. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +2 -2
  88. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.d.ts +2 -2
  89. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js +19 -28
  90. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +7 -17
  91. package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.js +6 -2
  92. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +31 -18
  93. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +2 -2
  94. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +8 -3
  95. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.d.ts +2 -1
  96. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +9 -7
  97. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.d.ts +2 -0
  98. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js +38 -0
  99. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.scss +63 -0
  100. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.d.ts +15 -0
  101. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.js +14 -0
  102. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.scss +19 -0
  103. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +99 -0
  104. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +109 -0
  105. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/en.json +13 -0
  106. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.d.ts +2 -0
  107. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.js +5 -0
  108. package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/ru.json +13 -0
  109. package/dist/containers/Tenant/Query/i18n/en.json +14 -0
  110. package/dist/containers/Tenant/Query/i18n/index.d.ts +1 -1
  111. package/dist/containers/Tenant/Schema/CreateDirectoryDialog/CreateDirectoryDialog.d.ts +3 -2
  112. package/dist/containers/Tenant/Schema/CreateDirectoryDialog/CreateDirectoryDialog.js +2 -2
  113. package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js +2 -2
  114. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +1 -1
  115. package/dist/containers/Tenant/Tenant.js +1 -1
  116. package/dist/containers/Tenant/TenantPages.d.ts +12 -1
  117. package/dist/containers/Tenant/TenantPages.js +1 -1
  118. package/dist/containers/Tenant/i18n/en.json +2 -2
  119. package/dist/containers/Tenant/i18n/index.d.ts +1 -1
  120. package/dist/containers/Tenant/utils/schema.js +1 -1
  121. package/dist/containers/Tenants/Tenants.js +1 -1
  122. package/dist/containers/Tenants/Tenants.scss +0 -4
  123. package/dist/containers/UserSettings/i18n/en.json +2 -0
  124. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  125. package/dist/containers/UserSettings/settings.d.ts +1 -0
  126. package/dist/containers/UserSettings/settings.js +6 -1
  127. package/dist/routes.js +2 -2
  128. package/dist/services/api.d.ts +39 -21
  129. package/dist/services/api.js +45 -56
  130. package/dist/services/settings.d.ts +1 -0
  131. package/dist/services/settings.js +2 -1
  132. package/dist/store/configureStore.d.ts +4 -4
  133. package/dist/store/defaultStore.d.ts +2 -2
  134. package/dist/store/reducers/api.d.ts +1 -1
  135. package/dist/store/reducers/api.js +1 -1
  136. package/dist/store/reducers/cluster/cluster.d.ts +2 -2
  137. package/dist/store/reducers/clusterNodes/clusterNodes.d.ts +2 -2
  138. package/dist/store/reducers/clusters/clusters.d.ts +2 -2
  139. package/dist/store/reducers/describe.d.ts +5 -2
  140. package/dist/store/reducers/describe.js +2 -2
  141. package/dist/store/reducers/executeQuery.d.ts +2 -2
  142. package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +2 -2
  143. package/dist/store/reducers/executeTopQueries/executeTopQueries.js +20 -14
  144. package/dist/store/reducers/executeTopQueries/types.d.ts +2 -2
  145. package/dist/store/reducers/executeTopQueries/utils.js +11 -7
  146. package/dist/store/reducers/explainQuery/explainQuery.d.ts +2 -2
  147. package/dist/store/reducers/explainQuery/explainQuery.js +6 -1
  148. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +58 -58
  149. package/dist/store/reducers/heatmap.d.ts +2 -2
  150. package/dist/store/reducers/heatmap.js +3 -3
  151. package/dist/store/reducers/hotKeys/hotKeys.d.ts +3 -2
  152. package/dist/store/reducers/hotKeys/hotKeys.js +3 -3
  153. package/dist/store/reducers/index.d.ts +3 -3
  154. package/dist/store/reducers/network/network.d.ts +2 -2
  155. package/dist/store/reducers/network/network.js +1 -1
  156. package/dist/store/reducers/node/node.d.ts +3 -3
  157. package/dist/store/reducers/node/selectors.d.ts +1 -1
  158. package/dist/store/reducers/node/selectors.js +2 -2
  159. package/dist/store/reducers/nodes/nodes.d.ts +3 -3
  160. package/dist/store/reducers/nodesList.d.ts +3 -3
  161. package/dist/store/reducers/overview/overview.d.ts +5 -2
  162. package/dist/store/reducers/overview/overview.js +2 -2
  163. package/dist/store/reducers/partitions/partitions.d.ts +2 -2
  164. package/dist/store/reducers/pdisk/pdisk.d.ts +3 -3
  165. package/dist/store/reducers/pdisk/pdisk.js +15 -2
  166. package/dist/store/reducers/pdisk/types.d.ts +17 -1
  167. package/dist/store/reducers/pdisk/utils.d.ts +2 -2
  168. package/dist/store/reducers/pdisk/utils.js +68 -8
  169. package/dist/store/reducers/preview.d.ts +2 -2
  170. package/dist/store/reducers/preview.js +1 -1
  171. package/dist/store/reducers/queryActions/types.d.ts +1 -1
  172. package/dist/store/reducers/schema/schema.d.ts +28 -10
  173. package/dist/store/reducers/schema/schema.js +11 -12
  174. package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +4 -2
  175. package/dist/store/reducers/schemaAcl/schemaAcl.js +9 -3
  176. package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +2 -2
  177. package/dist/store/reducers/shardsWorkload/shardsWorkload.js +22 -6
  178. package/dist/store/reducers/shardsWorkload/types.d.ts +2 -2
  179. package/dist/store/reducers/storage/storage.d.ts +3 -3
  180. package/dist/store/reducers/tablet.d.ts +3 -3
  181. package/dist/store/reducers/tablets.d.ts +13 -13
  182. package/dist/store/reducers/tabletsFilters.d.ts +1 -1
  183. package/dist/store/reducers/tenant/tenant.d.ts +2 -2
  184. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +2 -2
  185. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js +1 -1
  186. package/dist/store/reducers/tenantOverview/topNodes/topNodes.d.ts +2 -2
  187. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +2 -2
  188. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +1 -1
  189. package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.d.ts +2 -2
  190. package/dist/store/reducers/tenants/selectors.d.ts +27 -27
  191. package/dist/store/reducers/tenants/tenants.d.ts +2 -2
  192. package/dist/store/reducers/topic.d.ts +44 -44
  193. package/dist/store/reducers/vdisk/vdisk.d.ts +2 -2
  194. package/dist/store/reducers/vdisk/vdisk.js +1 -1
  195. package/dist/store/reducers/viewSchema/viewSchema.d.ts +2 -2
  196. package/dist/store/reducers/viewSchema/viewSchema.js +1 -1
  197. package/dist/store/state-url-mapping.d.ts +70 -0
  198. package/dist/store/state-url-mapping.js +1 -5
  199. package/dist/styles/mixins.scss +11 -0
  200. package/dist/types/api/acl.d.ts +1 -0
  201. package/dist/types/api/pdisk.d.ts +65 -2
  202. package/dist/types/api/schema/schema.d.ts +21 -0
  203. package/dist/types/api/vdisk.d.ts +33 -2
  204. package/dist/types/common.d.ts +3 -0
  205. package/dist/types/store/heatmap.d.ts +1 -0
  206. package/dist/types/store/query.d.ts +4 -1
  207. package/dist/utils/constants.d.ts +1 -0
  208. package/dist/utils/constants.js +1 -0
  209. package/dist/utils/dataFormatters/dataFormatters.d.ts +0 -4
  210. package/dist/utils/dataFormatters/dataFormatters.js +2 -8
  211. package/dist/utils/developerUI/developerUI.d.ts +1 -0
  212. package/dist/utils/developerUI/developerUI.js +3 -0
  213. package/dist/utils/diagnostics.d.ts +21 -17
  214. package/dist/utils/diagnostics.js +28 -7
  215. package/dist/utils/disks/getPDiskType.d.ts +3 -3
  216. package/dist/utils/disks/helpers.d.ts +1 -0
  217. package/dist/utils/disks/helpers.js +3 -0
  218. package/dist/utils/disks/prepareDisks.d.ts +2 -2
  219. package/dist/utils/disks/prepareDisks.js +17 -22
  220. package/dist/utils/disks/types.d.ts +7 -5
  221. package/dist/utils/monaco/constats.d.ts +2 -0
  222. package/dist/utils/monaco/constats.js +2 -0
  223. package/dist/utils/monaco/yql/constants.d.ts +0 -1
  224. package/dist/utils/monaco/yql/constants.js +0 -1
  225. package/dist/utils/monaco/yql/yql.completionItemProvider.js +3 -3
  226. package/dist/utils/query.d.ts +24 -1
  227. package/dist/utils/query.js +40 -0
  228. package/package.json +5 -1
  229. package/dist/components/NodeHostWrapper/NodeHostWrapper.scss +0 -15
  230. package/dist/containers/Node/NodeStructure/Vdisk.d.ts +0 -6
  231. package/dist/containers/Node/NodeStructure/Vdisk.js +0 -13
  232. package/dist/containers/PDiskPage/PDiskGroups.d.ts +0 -9
  233. package/dist/containers/PDiskPage/PDiskGroups.js +0 -20
  234. package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/ru.json +0 -5
  235. package/dist/store/reducers/olapStats.d.ts +0 -5
  236. package/dist/store/reducers/olapStats.js +0 -31
  237. package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.d.ts +0 -5
  238. package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.js +0 -38
  239. package/dist/utils/monaco/index.d.ts +0 -1
  240. package/dist/utils/monaco/index.js +0 -6
  241. package/dist/utils/monaco/s-expression/constants.d.ts +0 -1
  242. package/dist/utils/monaco/s-expression/constants.js +0 -1
  243. package/dist/utils/monaco/s-expression/registerLanguage.d.ts +0 -1
  244. package/dist/utils/monaco/s-expression/registerLanguage.js +0 -59
  245. package/dist/utils/monaco/yql/registerLanguage.d.ts +0 -1
  246. package/dist/utils/monaco/yql/registerLanguage.js +0 -8
  247. package/dist/utils/monaco/yql/yql.d.ts +0 -7
  248. package/dist/utils/monaco/yql/yql.js +0 -180
  249. package/dist/utils/monaco/yql/yql.keywords.d.ts +0 -3
  250. package/dist/utils/monaco/yql/yql.keywords.js +0 -3
@@ -13,8 +13,8 @@ import type { MetaClusters } from '../types/api/meta';
13
13
  import type { TNetInfo } from '../types/api/netInfo';
14
14
  import type { TNodesInfo } from '../types/api/nodes';
15
15
  import type { TEvNodesInfo } from '../types/api/nodesList';
16
- import type { TEvPDiskStateResponse } from '../types/api/pdisk';
17
- import type { Actions, ErrorResponse, ExplainActions, ExplainResponse, QueryAPIResponse, Schemas } from '../types/api/query';
16
+ import type { TEvPDiskStateResponse, TPDiskInfoResponse } from '../types/api/pdisk';
17
+ import type { Actions, ErrorResponse, QueryAPIResponse, Schemas } from '../types/api/query';
18
18
  import type { JsonRenderRequestParams, JsonRenderResponse } from '../types/api/render';
19
19
  import type { RestartPDiskResponse } from '../types/api/restartPDisk';
20
20
  import type { TEvDescribeSchemeResult } from '../types/api/schema';
@@ -30,57 +30,72 @@ import type { Nullable } from '../utils/typecheckers';
30
30
  type AxiosOptions = {
31
31
  concurrentId?: string;
32
32
  signal?: AbortSignal;
33
+ withRetries?: boolean;
33
34
  };
34
35
  export declare class YdbEmbeddedAPI extends AxiosWrapper {
36
+ DEFAULT_RETRIES_COUNT: number;
35
37
  constructor(options?: AxiosWrapperOptions);
36
38
  getPath(path: string): string;
37
39
  getClusterInfo(clusterName?: string, { concurrentId, signal }?: AxiosOptions): Promise<TClusterInfo>;
38
40
  getClusterNodes({ concurrentId, signal }?: AxiosOptions): Promise<TEvSystemStateResponse>;
39
41
  getNodeInfo(id?: string | number, { concurrentId, signal }?: AxiosOptions): Promise<TEvSystemStateResponse>;
40
42
  getTenants(clusterName?: string, { concurrentId, signal }?: AxiosOptions): Promise<TTenantInfo>;
41
- getTenantInfo({ path }: {
43
+ getTenantInfo({ path, database }: {
42
44
  path: string;
45
+ database?: string;
43
46
  }, { concurrentId, signal }?: AxiosOptions): Promise<TTenantInfo>;
44
47
  getNodes({ visibleEntities, type, tablets, sortOrder, sortValue, ...params }: NodesApiRequestParams, { concurrentId, signal }?: AxiosOptions): Promise<TNodesInfo>;
45
48
  /** @deprecated use getNodes instead */
46
49
  getCompute({ sortOrder, sortValue, ...params }: ComputeApiRequestParams, { concurrentId, signal }?: AxiosOptions): Promise<TComputeInfo>;
47
50
  getStorageInfo({ tenant, visibleEntities, nodeId, poolName, groupId, sortOrder, sortValue, ...params }: StorageApiRequestParams, { concurrentId, signal }?: AxiosOptions): Promise<TStorageInfo>;
48
- getPDiskInfo({ nodeId, pDiskId }: {
51
+ getNodeWhiteboardPDiskInfo({ nodeId, pDiskId }: {
49
52
  nodeId: string | number;
50
53
  pDiskId: string | number;
51
54
  }, { concurrentId, signal }?: AxiosOptions): Promise<TEvPDiskStateResponse>;
55
+ getPDiskInfo({ nodeId, pDiskId }: {
56
+ nodeId: string | number;
57
+ pDiskId: string | number;
58
+ }, { concurrentId, signal }?: AxiosOptions): Promise<TPDiskInfoResponse>;
52
59
  getVDiskInfo({ vDiskSlotId, pDiskId, nodeId, }: {
53
60
  vDiskSlotId: string | number;
54
61
  pDiskId: string | number;
55
62
  nodeId: string | number;
56
63
  }, { concurrentId, signal }?: AxiosOptions): Promise<TEvVDiskStateResponse>;
57
64
  getGroupInfo(groupId: string | number, { concurrentId, signal }?: AxiosOptions): Promise<TStorageInfo>;
58
- getHostInfo({ concurrentId, signal }?: AxiosOptions): Promise<TEvSystemStateResponse>;
59
- getTabletsInfo({ nodes, path }: {
65
+ getTabletsInfo({ nodes, path, database }: {
60
66
  nodes?: string[];
61
67
  path?: string;
68
+ database?: string;
62
69
  }, { concurrentId, signal }?: AxiosOptions): Promise<TEvTabletStateResponse>;
63
- getSchema({ path }: {
70
+ getSchema({ path, database }: {
64
71
  path: string;
72
+ database: string;
65
73
  }, { concurrentId, signal }?: AxiosOptions): Promise<Nullable<TEvDescribeSchemeResult>>;
66
- getDescribe({ path }: {
74
+ getDescribe({ path, database }: {
67
75
  path: string;
76
+ database: string;
68
77
  }, { concurrentId, signal }?: AxiosOptions): Promise<Nullable<TEvDescribeSchemeResult>>;
69
- getSchemaAcl({ path }: {
78
+ getSchemaAcl({ path, database }: {
70
79
  path: string;
80
+ database: string;
71
81
  }, { concurrentId, signal }?: AxiosOptions): Promise<TMetaInfo>;
72
- getHeatmapData({ path }: {
82
+ getHeatmapData({ path, database }: {
73
83
  path: string;
84
+ database: string;
74
85
  }, { concurrentId, signal }?: AxiosOptions): Promise<Nullable<TEvDescribeSchemeResult>>;
75
- getNetwork(path: string, { concurrentId, signal }?: AxiosOptions): Promise<TNetInfo>;
76
- getTopic({ path }: {
86
+ getNetwork({ path, database }: {
87
+ path: string;
88
+ database: string;
89
+ }, { concurrentId, signal }?: AxiosOptions): Promise<TNetInfo>;
90
+ getTopic({ path, database }: {
77
91
  path?: string;
92
+ database?: string;
78
93
  }, { concurrentId, signal }?: AxiosOptions): Promise<DescribeTopicResult>;
79
- getConsumer({ path, consumer }: {
94
+ getConsumer({ path, consumer, database }: {
80
95
  path: string;
81
96
  consumer: string;
97
+ database?: string;
82
98
  }, { concurrentId, signal }?: AxiosOptions): Promise<DescribeConsumerResult>;
83
- getPoolInfo(poolName: string, { concurrentId, signal }?: AxiosOptions): Promise<TStorageInfo>;
84
99
  getTablet({ id }: {
85
100
  id?: string;
86
101
  }, { concurrentId, signal }?: AxiosOptions): Promise<TEvTabletStateResponse>;
@@ -96,10 +111,12 @@ export declare class YdbEmbeddedAPI extends AxiosWrapper {
96
111
  stats?: string;
97
112
  schema?: Schema;
98
113
  syntax?: QuerySyntax;
99
- }, { concurrentId, signal }?: AxiosOptions): Promise<ErrorResponse | QueryAPIResponse<Action, Schema>>;
100
- getExplainQuery<Action extends ExplainActions>(query: string, database: string, action: Action, syntax?: QuerySyntax): Promise<ErrorResponse | ExplainResponse<Action>>;
101
- getExplainQueryAst(query: string, database: string): Promise<import("../types/api/query").ExplainQueryResponse>;
102
- getHotKeys(path: string, enableSampling: boolean, { concurrentId, signal }?: AxiosOptions): Promise<JsonHotKeysResponse>;
114
+ }, { concurrentId, signal, withRetries }?: AxiosOptions): Promise<ErrorResponse | QueryAPIResponse<Action, Schema>>;
115
+ getHotKeys({ path, database, enableSampling }: {
116
+ path: string;
117
+ database: string;
118
+ enableSampling: boolean;
119
+ }, { concurrentId, signal }?: AxiosOptions): Promise<JsonHotKeysResponse>;
103
120
  getHealthcheckInfo({ database, maxLevel }: {
104
121
  database: string;
105
122
  maxLevel?: number;
@@ -117,8 +134,6 @@ export declare class YdbEmbeddedAPI extends AxiosWrapper {
117
134
  resumeTablet(id?: string, hiveId?: string): Promise<string>;
118
135
  getTabletDescribe(tenantId: TDomainKey, { concurrentId, signal }?: AxiosOptions): Promise<Nullable<TEvDescribeSchemeResult>>;
119
136
  getChartData({ target, from, until, maxDataPoints, database }: JsonRenderRequestParams, { concurrentId, signal }?: AxiosOptions): Promise<JsonRenderResponse>;
120
- /** @deprecated use localStorage instead */
121
- postSetting(settingsApi: string, name: string, value: string): Promise<any>;
122
137
  authenticate(user: string, password: string): Promise<any>;
123
138
  logout(): Promise<any>;
124
139
  whoami(): Promise<TUserToken>;
@@ -131,7 +146,10 @@ export declare class YdbEmbeddedAPI extends AxiosWrapper {
131
146
  getClustersList(_?: never, { signal }?: {
132
147
  signal?: AbortSignal;
133
148
  }): Promise<MetaClusters>;
134
- createSchemaDirectory(database: string, path: string, { signal }?: {
149
+ createSchemaDirectory({ database, path }: {
150
+ database: string;
151
+ path: string;
152
+ }, { signal }?: {
135
153
  signal?: AbortSignal;
136
154
  }): Promise<{
137
155
  test: string;
@@ -10,8 +10,9 @@ import { settingsManager } from './settings';
10
10
  export class YdbEmbeddedAPI extends AxiosWrapper {
11
11
  constructor(options) {
12
12
  super(options);
13
+ this.DEFAULT_RETRIES_COUNT = 3;
13
14
  axiosRetry(this._axios, {
14
- retries: 3,
15
+ retries: this.DEFAULT_RETRIES_COUNT,
15
16
  retryDelay: axiosRetry.exponentialDelay,
16
17
  });
17
18
  // Interceptor to process OIDC auth
@@ -51,16 +52,17 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
51
52
  cluster_name: clusterName,
52
53
  }, { concurrentId, requestConfig: { signal } });
53
54
  }
54
- getTenantInfo({ path }, { concurrentId, signal } = {}) {
55
+ getTenantInfo({ path, database = path }, { concurrentId, signal } = {}) {
55
56
  return this.get(this.getPath('/viewer/json/tenantinfo'), {
57
+ database,
56
58
  path,
57
59
  tablets: true,
58
60
  storage: true,
59
- }, { concurrentId: concurrentId || `getTenantInfo|${path}`, requestConfig: { signal } });
61
+ }, { concurrentId, requestConfig: { signal } });
60
62
  }
61
63
  getNodes({ visibleEntities, type = 'any', tablets = true, sortOrder, sortValue, ...params }, { concurrentId, signal } = {}) {
62
64
  const sort = prepareSortValue(sortValue, sortOrder);
63
- return this.get(this.getPath('/viewer/json/nodes?enums=true'), { with: visibleEntities, type, tablets, sort, ...params }, { concurrentId, requestConfig: { signal } });
65
+ return this.get(this.getPath('/viewer/json/nodes?enums=true'), { with: visibleEntities, type, tablets, sort, database: params.tenant, ...params }, { concurrentId, requestConfig: { signal } });
64
66
  }
65
67
  /** @deprecated use getNodes instead */
66
68
  getCompute({ sortOrder, sortValue, ...params }, { concurrentId, signal } = {}) {
@@ -70,6 +72,7 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
70
72
  getStorageInfo({ tenant, visibleEntities, nodeId, poolName, groupId, sortOrder, sortValue, ...params }, { concurrentId, signal } = {}) {
71
73
  const sort = prepareSortValue(sortValue, sortOrder);
72
74
  return this.get(this.getPath(`/viewer/json/storage?enums=true`), {
75
+ database: tenant,
73
76
  tenant,
74
77
  node_id: nodeId,
75
78
  pool: poolName,
@@ -79,11 +82,17 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
79
82
  ...params,
80
83
  }, { concurrentId, requestConfig: { signal } });
81
84
  }
82
- getPDiskInfo({ nodeId, pDiskId }, { concurrentId, signal } = {}) {
85
+ getNodeWhiteboardPDiskInfo({ nodeId, pDiskId }, { concurrentId, signal } = {}) {
83
86
  return this.get(this.getPath('/viewer/json/pdiskinfo?enums=true'), {
84
87
  filter: `(NodeId=${nodeId}${pDiskId ? `;PDiskId=${pDiskId}` : ''})`,
85
88
  }, { concurrentId, requestConfig: { signal } });
86
89
  }
90
+ getPDiskInfo({ nodeId, pDiskId }, { concurrentId, signal } = {}) {
91
+ return this.get(this.getPath('/pdisk/info'), {
92
+ node_id: nodeId,
93
+ pdisk_id: pDiskId,
94
+ }, { concurrentId, requestConfig: { signal } });
95
+ }
87
96
  getVDiskInfo({ vDiskSlotId, pDiskId, nodeId, }, { concurrentId, signal } = {}) {
88
97
  return this.get(this.getPath('/viewer/json/vdiskinfo?enums=true'), {
89
98
  node_id: nodeId,
@@ -95,19 +104,18 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
95
104
  group_id: groupId,
96
105
  }, { concurrentId, requestConfig: { signal } });
97
106
  }
98
- getHostInfo({ concurrentId, signal } = {}) {
99
- return this.get(this.getPath('/viewer/json/sysinfo?node_id=.&enums=true'), { concurrentId, requestConfig: { signal } });
100
- }
101
- getTabletsInfo({ nodes = [], path }, { concurrentId, signal } = {}) {
107
+ getTabletsInfo({ nodes = [], path, database }, { concurrentId, signal } = {}) {
102
108
  const filter = nodes.length > 0 && `(NodeId=[${nodes.join(',')}])`;
103
109
  return this.get(this.getPath('/viewer/json/tabletinfo'), {
110
+ database,
104
111
  filter,
105
112
  path,
106
113
  enums: true,
107
114
  }, { concurrentId, requestConfig: { signal } });
108
115
  }
109
- getSchema({ path }, { concurrentId, signal } = {}) {
116
+ getSchema({ path, database }, { concurrentId, signal } = {}) {
110
117
  return this.get(this.getPath('/viewer/json/describe'), {
118
+ database,
111
119
  path,
112
120
  enums: true,
113
121
  backup: false,
@@ -118,22 +126,25 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
118
126
  subs: 1,
119
127
  }, { concurrentId, requestConfig: { signal } });
120
128
  }
121
- getDescribe({ path }, { concurrentId, signal } = {}) {
129
+ getDescribe({ path, database }, { concurrentId, signal } = {}) {
122
130
  return this.get(this.getPath('/viewer/json/describe'), {
131
+ database,
123
132
  path,
124
133
  enums: true,
125
134
  partition_stats: true,
126
135
  subs: 0,
127
136
  }, { concurrentId: concurrentId || `getDescribe|${path}`, requestConfig: { signal } });
128
137
  }
129
- getSchemaAcl({ path }, { concurrentId, signal } = {}) {
138
+ getSchemaAcl({ path, database }, { concurrentId, signal } = {}) {
130
139
  return this.get(this.getPath('/viewer/json/acl'), {
140
+ database,
131
141
  path,
132
142
  merge_rules: true,
133
- }, { concurrentId: concurrentId || `getSchemaAcl`, requestConfig: { signal } });
143
+ }, { concurrentId, requestConfig: { signal } });
134
144
  }
135
- getHeatmapData({ path }, { concurrentId, signal } = {}) {
145
+ getHeatmapData({ path, database }, { concurrentId, signal } = {}) {
136
146
  return this.get(this.getPath('/viewer/json/describe'), {
147
+ database,
137
148
  path,
138
149
  enums: true,
139
150
  backup: false,
@@ -142,33 +153,30 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
142
153
  partition_stats: true,
143
154
  }, { concurrentId, requestConfig: { signal } });
144
155
  }
145
- getNetwork(path, { concurrentId, signal } = {}) {
156
+ getNetwork({ path, database }, { concurrentId, signal } = {}) {
146
157
  return this.get(this.getPath('/viewer/json/netinfo'), {
147
158
  enums: true,
159
+ database,
148
160
  path,
149
161
  }, { concurrentId, requestConfig: { signal } });
150
162
  }
151
- getTopic({ path }, { concurrentId, signal } = {}) {
163
+ getTopic({ path, database }, { concurrentId, signal } = {}) {
152
164
  return this.get(this.getPath('/viewer/json/describe_topic'), {
153
165
  enums: true,
154
166
  include_stats: true,
167
+ database,
155
168
  path,
156
169
  }, { concurrentId, requestConfig: { signal } });
157
170
  }
158
- getConsumer({ path, consumer }, { concurrentId, signal } = {}) {
171
+ getConsumer({ path, consumer, database }, { concurrentId, signal } = {}) {
159
172
  return this.get(this.getPath('/viewer/json/describe_consumer'), {
160
173
  enums: true,
161
174
  include_stats: true,
175
+ database,
162
176
  path,
163
177
  consumer,
164
178
  }, { concurrentId: concurrentId || 'getConsumer', requestConfig: { signal } });
165
179
  }
166
- getPoolInfo(poolName, { concurrentId, signal } = {}) {
167
- return this.get(this.getPath('/viewer/json/storage'), {
168
- pool: poolName,
169
- enums: true,
170
- }, { concurrentId, requestConfig: { signal } });
171
- }
172
180
  getTablet({ id }, { concurrentId, signal } = {}) {
173
181
  return this.get(this.getPath(`/viewer/json/tabletinfo?filter=(TabletId=${id})`), {
174
182
  enums: true,
@@ -203,7 +211,7 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
203
211
  requestConfig: { signal },
204
212
  });
205
213
  }
206
- sendQuery({ schema, ...params }, { concurrentId, signal } = {}) {
214
+ sendQuery({ schema, ...params }, { concurrentId, signal, withRetries } = {}) {
207
215
  // Time difference to ensure that timeout from ui will be shown rather than backend error
208
216
  const uiTimeout = 9 * 60 * 1000;
209
217
  const backendTimeout = 10 * 60 * 1000;
@@ -215,34 +223,21 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
215
223
  return this.post(this.getPath(`/viewer/json/query?timeout=${backendTimeout}&base64=${base64}${schema ? `&schema=${schema}` : ''}`), params, {}, {
216
224
  concurrentId,
217
225
  timeout: uiTimeout,
218
- requestConfig: { signal },
226
+ requestConfig: {
227
+ signal,
228
+ 'axios-retry': { retries: withRetries ? this.DEFAULT_RETRIES_COUNT : 0 },
229
+ },
219
230
  });
220
231
  }
221
- getExplainQuery(query, database, action, syntax) {
222
- return this.post(this.getPath('/viewer/json/query'), {
223
- query,
224
- database,
225
- action: action || 'explain',
226
- syntax,
227
- timeout: 600000,
228
- }, {});
229
- }
230
- getExplainQueryAst(query, database) {
231
- return this.post(this.getPath('/viewer/json/query'), {
232
- query,
233
- database,
234
- action: 'explain-ast',
235
- timeout: 600000,
236
- }, {});
237
- }
238
- getHotKeys(path, enableSampling, { concurrentId, signal } = {}) {
232
+ getHotKeys({ path, database, enableSampling }, { concurrentId, signal } = {}) {
239
233
  return this.get(this.getPath('/viewer/json/hotkeys'), {
234
+ database,
240
235
  path,
241
236
  enable_sampling: enableSampling,
242
237
  }, { concurrentId: concurrentId || 'getHotKeys', requestConfig: { signal } });
243
238
  }
244
239
  getHealthcheckInfo({ database, maxLevel }, { concurrentId, signal } = {}) {
245
- return this.get(this.getPath('/viewer/json/healthcheck?merge_records=true'), { tenant: database, max_level: maxLevel }, { concurrentId, requestConfig: { signal } });
240
+ return this.get(this.getPath('/viewer/json/healthcheck?merge_records=true'), { database, tenant: database, max_level: maxLevel }, { concurrentId, requestConfig: { signal } });
246
241
  }
247
242
  evictVDisk({ groupId, groupGeneration, failRealmIdx, failDomainIdx, vDiskIdx, }) {
248
243
  // BSC Id is constant for all ydb clusters
@@ -263,6 +258,7 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
263
258
  // Automatic headers may not suit
264
259
  Accept: 'application/json',
265
260
  },
261
+ requestConfig: { 'axios-retry': { retries: 0 } },
266
262
  });
267
263
  }
268
264
  restartPDisk(nodeId, pDiskId) {
@@ -275,16 +271,17 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
275
271
  headers: {
276
272
  'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
277
273
  },
274
+ requestConfig: { 'axios-retry': { retries: 0 } },
278
275
  });
279
276
  }
280
277
  killTablet(id) {
281
- return this.get(this.getPath(`/tablets?KillTabletID=${id}`), {});
278
+ return this.get(this.getPath(`/tablets?KillTabletID=${id}`), {}, { requestConfig: { 'axios-retry': { retries: 0 } } });
282
279
  }
283
280
  stopTablet(id, hiveId) {
284
- return this.get(this.getPath(`/tablets/app?TabletID=${hiveId}&page=StopTablet&tablet=${id}`), {});
281
+ return this.get(this.getPath(`/tablets/app?TabletID=${hiveId}&page=StopTablet&tablet=${id}`), {}, { requestConfig: { 'axios-retry': { retries: 0 } } });
285
282
  }
286
283
  resumeTablet(id, hiveId) {
287
- return this.get(this.getPath(`/tablets/app?TabletID=${hiveId}&page=ResumeTablet&tablet=${id}`), {});
284
+ return this.get(this.getPath(`/tablets/app?TabletID=${hiveId}&page=ResumeTablet&tablet=${id}`), {}, { requestConfig: { 'axios-retry': { retries: 0 } } });
288
285
  }
289
286
  getTabletDescribe(tenantId, { concurrentId, signal } = {}) {
290
287
  return this.get(this.getPath('/viewer/json/describe'), {
@@ -302,14 +299,6 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
302
299
  requestConfig: { signal },
303
300
  });
304
301
  }
305
- /** @deprecated use localStorage instead */
306
- postSetting(settingsApi, name, value) {
307
- return this.request({
308
- method: 'PATCH',
309
- url: settingsApi,
310
- data: { [name]: value },
311
- });
312
- }
313
302
  authenticate(user, password) {
314
303
  return this.post(this.getPath('/login'), {
315
304
  user,
@@ -333,7 +322,7 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
333
322
  requestConfig: { signal },
334
323
  });
335
324
  }
336
- createSchemaDirectory(database, path, { signal } = {}) {
325
+ createSchemaDirectory({ database, path }, { signal } = {}) {
337
326
  return this.post(this.getPath('/scheme/directory'), {}, {
338
327
  database,
339
328
  path,
@@ -21,6 +21,7 @@ export declare const DEFAULT_USER_SETTINGS: {
21
21
  readonly isHotKeysHelpHidden: false;
22
22
  readonly "auto-refresh-interval": 0;
23
23
  readonly useDirectoryOperations: false;
24
+ readonly query_settings: false;
24
25
  };
25
26
  declare class SettingsManager {
26
27
  /**
@@ -1,5 +1,5 @@
1
1
  import { TENANT_PAGES_IDS } from '../store/reducers/tenant/constants';
2
- import { ASIDE_HEADER_COMPACT_KEY, AUTOCOMPLETE_ON_ENTER, AUTO_REFRESH_INTERVAL, BINARY_DATA_IN_PLAIN_TEXT_DISPLAY, ENABLE_AUTOCOMPLETE, INVERTED_DISKS_KEY, IS_HOTKEYS_HELP_HIDDEN_KEY, LANGUAGE_KEY, LAST_USED_QUERY_ACTION_KEY, PARTITIONS_HIDDEN_COLUMNS_KEY, QUERY_INITIAL_MODE_KEY, QUERY_USE_MULTI_SCHEMA_KEY, SAVED_QUERIES_KEY, TENANT_INITIAL_PAGE_KEY, THEME_KEY, USE_CLUSTER_BALANCER_AS_BACKEND_KEY, USE_DIRECTORY_OPERATIONS, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY, USE_PAGINATED_TABLES_KEY, USE_SEPARATE_DISKS_PAGES_KEY, } from '../utils/constants';
2
+ import { ASIDE_HEADER_COMPACT_KEY, AUTOCOMPLETE_ON_ENTER, AUTO_REFRESH_INTERVAL, BINARY_DATA_IN_PLAIN_TEXT_DISPLAY, ENABLE_AUTOCOMPLETE, INVERTED_DISKS_KEY, IS_HOTKEYS_HELP_HIDDEN_KEY, LANGUAGE_KEY, LAST_USED_QUERY_ACTION_KEY, PARTITIONS_HIDDEN_COLUMNS_KEY, QUERY_INITIAL_MODE_KEY, QUERY_SETTINGS, QUERY_USE_MULTI_SCHEMA_KEY, SAVED_QUERIES_KEY, TENANT_INITIAL_PAGE_KEY, THEME_KEY, USE_CLUSTER_BALANCER_AS_BACKEND_KEY, USE_DIRECTORY_OPERATIONS, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY, USE_PAGINATED_TABLES_KEY, USE_SEPARATE_DISKS_PAGES_KEY, } from '../utils/constants';
3
3
  import { QUERY_ACTIONS, QUERY_MODES } from '../utils/query';
4
4
  import { parseJson } from '../utils/utils';
5
5
  /** User settings keys and their default values */
@@ -24,6 +24,7 @@ export const DEFAULT_USER_SETTINGS = {
24
24
  [IS_HOTKEYS_HELP_HIDDEN_KEY]: false,
25
25
  [AUTO_REFRESH_INTERVAL]: 0,
26
26
  [USE_DIRECTORY_OPERATIONS]: false,
27
+ [QUERY_SETTINGS]: false,
27
28
  };
28
29
  class SettingsManager {
29
30
  constructor() {
@@ -6,7 +6,7 @@ export declare const customBackend: string | undefined;
6
6
  export declare const metaBackend: string | undefined;
7
7
  export declare function configureStore({ aRootReducer, singleClusterMode, api, }?: {
8
8
  aRootReducer?: Reducer<{
9
- api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
9
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData", "api">;
10
10
  singleClusterMode: boolean;
11
11
  cluster: import("./reducers/cluster/types").ClusterState;
12
12
  tenant: import("./reducers/tenant/types").TenantState;
@@ -37,7 +37,7 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
37
37
  } | {
38
38
  readonly type: "DISABLE_FULLSCREEN_MODE";
39
39
  } | Action<string>, Partial<{
40
- api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api"> | undefined;
40
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData", "api"> | undefined;
41
41
  singleClusterMode: boolean | undefined;
42
42
  cluster: import("./reducers/cluster/types").ClusterState | undefined;
43
43
  tenant: import("./reducers/tenant/types").TenantState | undefined;
@@ -62,7 +62,7 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
62
62
  }): {
63
63
  history: History<unknown>;
64
64
  store: import("@reduxjs/toolkit").EnhancedStore<{
65
- api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
65
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData", "api">;
66
66
  singleClusterMode: boolean;
67
67
  cluster: import("./reducers/cluster/types").ClusterState;
68
68
  tenant: import("./reducers/tenant/types").TenantState;
@@ -94,7 +94,7 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
94
94
  readonly type: "DISABLE_FULLSCREEN_MODE";
95
95
  } | Action<string>, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
96
96
  dispatch: import("redux-thunk").ThunkDispatch<{
97
- api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
97
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData", "api">;
98
98
  singleClusterMode: boolean;
99
99
  cluster: import("./reducers/cluster/types").ClusterState;
100
100
  tenant: import("./reducers/tenant/types").TenantState;
@@ -1,5 +1,5 @@
1
1
  export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
2
- api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
2
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData", "api">;
3
3
  singleClusterMode: boolean;
4
4
  cluster: import("./reducers/cluster/types").ClusterState;
5
5
  tenant: import("./reducers/tenant/types").TenantState;
@@ -31,7 +31,7 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
31
31
  readonly type: "DISABLE_FULLSCREEN_MODE";
32
32
  } | import("redux").Action<string>, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
33
33
  dispatch: import("redux-thunk").ThunkDispatch<{
34
- api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
34
+ api: import("@reduxjs/toolkit/query").CombinedState<{}, "All" | "PDiskData", "api">;
35
35
  singleClusterMode: boolean;
36
36
  cluster: import("./reducers/cluster/types").ClusterState;
37
37
  tenant: import("./reducers/tenant/types").TenantState;
@@ -1,3 +1,3 @@
1
1
  import type { BaseQueryFn } from '@reduxjs/toolkit/query';
2
- export declare const api: import("@reduxjs/toolkit/query").Api<BaseQueryFn<void, typeof _NEVER, unknown, {}>, {}, "api", "All", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
2
+ export declare const api: import("@reduxjs/toolkit/query").Api<BaseQueryFn<void, typeof _NEVER, unknown, {}>, {}, "api", "All" | "PDiskData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
3
3
  export declare const _NEVER: unique symbol;
@@ -7,7 +7,7 @@ export const api = createApi({
7
7
  */
8
8
  endpoints: () => ({}),
9
9
  invalidationBehavior: 'immediately',
10
- tagTypes: ['All'],
10
+ tagTypes: ['All', 'PDiskData'],
11
11
  });
12
12
  export const _NEVER = Symbol();
13
13
  /**
@@ -5,8 +5,8 @@ export declare function updateDefaultClusterTab(tab: string): (dispatch: Dispatc
5
5
  declare const _default: import("redux").Reducer<ClusterState>;
6
6
  export default _default;
7
7
  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", {
8
+ getClusterInfo: import("@reduxjs/toolkit/query").QueryDefinition<string | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData", {
9
9
  clusterData: TClusterInfo;
10
10
  groupsStats?: ClusterGroupsStats;
11
11
  }, "api">;
12
- }, "api", "All", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
12
+ }, "api", "All" | "PDiskData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
@@ -1,5 +1,5 @@
1
1
  import type { PreparedNodeSystemState } from '../../../utils/nodes';
2
2
  export type PreparedClusterNode = PreparedNodeSystemState;
3
3
  export declare const clusterNodesApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, {
4
- getClusterNodes: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All", PreparedNodeSystemState[] | undefined, "api">;
5
- }, "api", "All", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
4
+ getClusterNodes: import("@reduxjs/toolkit/query").QueryDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData", PreparedNodeSystemState[] | undefined, "api">;
5
+ }, "api", "All" | "PDiskData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
@@ -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", import("./types").PreparedCluster[] | undefined, "api">;
7
- }, "api", "All", 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", import("./types").PreparedCluster[] | undefined, "api">;
7
+ }, "api", "All" | "PDiskData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
@@ -1,4 +1,7 @@
1
1
  import type { IDescribeData } from '../../types/store/describe';
2
2
  export declare const describeApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("./api")._NEVER, unknown, {}>, {
3
- getDescribe: import("@reduxjs/toolkit/query").QueryDefinition<string[], import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("./api")._NEVER, unknown, {}>, "All", IDescribeData | undefined, "api">;
4
- }, "api", "All", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
3
+ getDescribe: import("@reduxjs/toolkit/query").QueryDefinition<{
4
+ paths: string[];
5
+ database: string;
6
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("./api")._NEVER, unknown, {}>, "All" | "PDiskData", IDescribeData | undefined, "api">;
7
+ }, "api", "All" | "PDiskData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
@@ -2,9 +2,9 @@ import { api } from './api';
2
2
  export const describeApi = api.injectEndpoints({
3
3
  endpoints: (build) => ({
4
4
  getDescribe: build.query({
5
- queryFn: async (paths, { signal }) => {
5
+ queryFn: async ({ paths, database }, { signal }) => {
6
6
  try {
7
- const response = await Promise.all(paths.map((p) => window.api.getDescribe({ path: p }, { signal })));
7
+ const response = await Promise.all(paths.map((p) => window.api.getDescribe({ path: p, database }, { signal })));
8
8
  const data = response.reduce((acc, item) => {
9
9
  if (item === null || item === void 0 ? void 0 : item.Path) {
10
10
  acc[item.Path] = item;
@@ -13,8 +13,8 @@ interface SendQueryParams extends QueryRequestParams {
13
13
  schema?: Schemas;
14
14
  }
15
15
  export declare const executeQueryApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("./api")._NEVER, unknown, {}>, {
16
- executeQuery: import("@reduxjs/toolkit/query").MutationDefinition<SendQueryParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("./api")._NEVER, unknown, {}>, "All", IQueryResult, "api">;
17
- }, "api", "All", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
16
+ executeQuery: import("@reduxjs/toolkit/query").MutationDefinition<SendQueryParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("./api")._NEVER, unknown, {}>, "All" | "PDiskData", IQueryResult, "api">;
17
+ }, "api", "All" | "PDiskData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
18
18
  export declare const saveQueryToHistory: (queryText: string, mode: QueryMode) => {
19
19
  readonly type: "query/SAVE_QUERY_TO_HISTORY";
20
20
  readonly data: {
@@ -6,5 +6,5 @@ export declare const topQueriesApi: import("@reduxjs/toolkit/query").Api<import(
6
6
  getTopQueries: import("@reduxjs/toolkit/query").QueryDefinition<{
7
7
  database: string;
8
8
  filters?: TopQueriesFilters;
9
- }, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All", import("../../../types/store/query").IQueryResult | undefined, "api">;
10
- }, "api", "All", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
9
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../api")._NEVER, unknown, {}>, "All" | "PDiskData", import("../../../types/store/query").IQueryResult | undefined, "api">;
10
+ }, "api", "All" | "PDiskData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
@@ -1,5 +1,5 @@
1
+ import { isLikeRelative } from '@gravity-ui/date-utils';
1
2
  import { createSlice } from '@reduxjs/toolkit';
2
- import { HOUR_IN_SECONDS } from '../../../utils/constants';
3
3
  import { isQueryErrorResponse, parseQueryAPIExecuteResponse } from '../../../utils/query';
4
4
  import { api } from '../api';
5
5
  import { getFiltersConditions } from './utils';
@@ -29,39 +29,45 @@ SELECT
29
29
  Duration
30
30
  FROM \`${path}/.sys/top_queries_by_cpu_time_one_hour\`
31
31
  WHERE ${filterConditions || 'true'}
32
+ ORDER BY CPUTimeUs DESC
32
33
  `;
33
34
  };
34
35
  export const topQueriesApi = api.injectEndpoints({
35
36
  endpoints: (build) => ({
36
37
  getTopQueries: build.query({
37
- queryFn: async ({ database, filters }, { signal, dispatch }) => {
38
- var _a, _b;
38
+ queryFn: async ({ database, filters }, { signal }) => {
39
+ const preparedFilters = {
40
+ ...filters,
41
+ from: (filters === null || filters === void 0 ? void 0 : filters.from) || 'now-1h',
42
+ to: (filters === null || filters === void 0 ? void 0 : filters.to) || 'now',
43
+ };
39
44
  try {
40
45
  const response = await window.api.sendQuery({
41
46
  schema: 'modern',
42
- query: getQueryText(database, filters),
47
+ query: getQueryText(database, preparedFilters),
43
48
  database,
44
49
  action: 'execute-scan',
45
- }, { signal });
50
+ }, { signal, withRetries: true });
46
51
  if (isQueryErrorResponse(response)) {
47
52
  return { error: response };
48
53
  }
49
54
  const data = parseQueryAPIExecuteResponse(response);
50
- // FIXME: do we really need this?
51
- if (!(filters === null || filters === void 0 ? void 0 : filters.from) && !(filters === null || filters === void 0 ? void 0 : filters.to)) {
52
- const intervalEnd = (_b = (_a = data === null || data === void 0 ? void 0 : data.result) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.IntervalEnd;
53
- if (intervalEnd) {
54
- const to = new Date(intervalEnd).getTime();
55
- const from = new Date(to - HOUR_IN_SECONDS * 1000).getTime();
56
- dispatch(setTopQueriesFilters({ from, to }));
57
- }
58
- }
59
55
  return { data };
60
56
  }
61
57
  catch (error) {
62
58
  return { error };
63
59
  }
64
60
  },
61
+ forceRefetch: ({ currentArg }) => {
62
+ var _a, _b, _c, _d;
63
+ if (!((_a = currentArg === null || currentArg === void 0 ? void 0 : currentArg.filters) === null || _a === void 0 ? void 0 : _a.from) ||
64
+ !((_b = currentArg === null || currentArg === void 0 ? void 0 : currentArg.filters) === null || _b === void 0 ? void 0 : _b.to) ||
65
+ isLikeRelative((_c = currentArg === null || currentArg === void 0 ? void 0 : currentArg.filters) === null || _c === void 0 ? void 0 : _c.from) ||
66
+ isLikeRelative((_d = currentArg === null || currentArg === void 0 ? void 0 : currentArg.filters) === null || _d === void 0 ? void 0 : _d.to)) {
67
+ return true;
68
+ }
69
+ return false;
70
+ },
65
71
  }),
66
72
  }),
67
73
  overrideExisting: 'throw',