ydb-embedded-ui 6.3.0 → 6.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. package/README.md +39 -17
  2. package/dist/assets/icons/disableFullscreen.svg +4 -0
  3. package/dist/assets/icons/emptyState.svg +13 -0
  4. package/dist/assets/icons/key.svg +6 -0
  5. package/dist/assets/icons/monitoring.svg +9 -0
  6. package/dist/assets/icons/network.svg +21 -0
  7. package/dist/components/AsyncReplicationState/AsyncReplicationState.d.ts +6 -0
  8. package/dist/components/AsyncReplicationState/AsyncReplicationState.js +20 -0
  9. package/dist/components/AsyncReplicationState/index.d.ts +1 -0
  10. package/dist/components/AsyncReplicationState/index.js +1 -0
  11. package/dist/components/BasicNodeViewer/BasicNodeViewer.js +11 -5
  12. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +6 -2
  13. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +12 -3
  14. package/dist/components/CriticalActionDialog/CriticalActionDialog.js +3 -4
  15. package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +2 -0
  16. package/dist/components/EmptyState/EmptyState.js +3 -2
  17. package/dist/components/EnableFullscreenButton/EnableFullscreenButton.js +3 -3
  18. package/dist/components/Errors/ResponseError/ResponseError.js +3 -0
  19. package/dist/components/Fullscreen/Fullscreen.js +3 -3
  20. package/dist/components/MonitoringButton/MonitoringButton.js +3 -3
  21. package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -3
  22. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  23. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.d.ts +1 -2
  24. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.js +6 -6
  25. package/dist/components/StatusIcon/StatusIcon.js +5 -7
  26. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
  27. package/dist/containers/App/App.js +1 -2
  28. package/dist/containers/AsideNavigation/AsideNavigation.js +4 -9
  29. package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js +2 -3
  30. package/dist/containers/AsideNavigation/useNavigationMenuItems.js +5 -6
  31. package/dist/containers/Authentication/Authentication.js +2 -4
  32. package/dist/containers/Clusters/Clusters.js +7 -2
  33. package/dist/containers/Clusters/constants.d.ts +1 -3
  34. package/dist/containers/Clusters/constants.js +0 -18
  35. package/dist/containers/Node/NodeStructure/Pdisk.js +4 -4
  36. package/dist/containers/Nodes/Nodes.js +19 -15
  37. package/dist/containers/Nodes/VirtualNodes.js +23 -6
  38. package/dist/containers/PDiskPage/PDiskPage.js +3 -2
  39. package/dist/containers/PDiskPage/i18n/en.json +2 -1
  40. package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
  41. package/dist/containers/Storage/Storage.js +50 -22
  42. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +2 -2
  43. package/dist/containers/Storage/VirtualStorage.js +32 -10
  44. package/dist/containers/Storage/utils/index.d.ts +4 -1
  45. package/dist/containers/Storage/utils/index.js +29 -0
  46. package/dist/containers/Tablet/Tablet.js +3 -3
  47. package/dist/containers/Tablet/TabletControls/TabletControls.js +3 -1
  48. package/dist/containers/Tablet/i18n/en.json +3 -0
  49. package/dist/containers/Tablet/i18n/index.d.ts +1 -1
  50. package/dist/containers/Tablet/i18n/index.js +1 -2
  51. package/dist/containers/Tablets/Tablets.d.ts +1 -2
  52. package/dist/containers/Tablets/Tablets.js +113 -53
  53. package/dist/containers/Tablets/i18n/en.json +10 -4
  54. package/dist/containers/Tablets/i18n/index.d.ts +1 -1
  55. package/dist/containers/Tablets/i18n/index.js +1 -2
  56. package/dist/containers/Tenant/Diagnostics/Diagnostics.js +5 -5
  57. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +7 -0
  58. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +2 -0
  59. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +31 -19
  60. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.scss +14 -4
  61. package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/en.json +2 -1
  62. package/dist/containers/Tenant/Diagnostics/HotKeys/i18n/index.d.ts +1 -1
  63. package/dist/containers/Tenant/Diagnostics/Network/Network.js +3 -3
  64. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.d.ts +7 -0
  65. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/AsyncReplicationInfo.js +39 -0
  66. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/Credentials.d.ts +6 -0
  67. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/Credentials.js +14 -0
  68. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/en.json +7 -0
  69. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/index.d.ts +2 -0
  70. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/i18n/index.js +4 -0
  71. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/index.d.ts +1 -0
  72. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationInfo/index.js +1 -0
  73. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.d.ts +7 -0
  74. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.js +34 -0
  75. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/AsyncReplicationPaths.scss +7 -0
  76. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/en.json +7 -0
  77. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/index.d.ts +2 -0
  78. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/i18n/index.js +4 -0
  79. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/index.d.ts +1 -0
  80. package/dist/containers/Tenant/Diagnostics/Overview/AsyncReplicationPaths/index.js +1 -0
  81. package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +2 -0
  82. package/dist/containers/Tenant/Diagnostics/TenantOverview/Healthcheck/HealthcheckPreview.js +2 -2
  83. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +2 -1
  84. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +2 -1
  85. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +2 -1
  86. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  87. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +3 -3
  88. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +3 -3
  89. package/dist/containers/Tenant/ObjectGeneral/ObjectGeneral.js +2 -8
  90. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +23 -9
  91. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.d.ts +2 -2
  92. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +5 -6
  93. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +6 -14
  94. package/dist/containers/Tenant/Query/Issues/Issues.js +6 -9
  95. package/dist/containers/Tenant/Query/Preview/Preview.js +5 -5
  96. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +2 -8
  97. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +18 -19
  98. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +4 -4
  99. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +3 -3
  100. package/dist/containers/Tenant/Schema/SchemaViewer/helpers.js +3 -2
  101. package/dist/containers/Tenant/Tenant.js +3 -2
  102. package/dist/containers/Tenant/utils/ToggleButton.scss +0 -2
  103. package/dist/containers/Tenant/utils/paneVisibilityToggleHelpers.js +4 -4
  104. package/dist/containers/Tenant/utils/schema.js +8 -0
  105. package/dist/containers/Tenant/utils/schemaActions.js +1 -0
  106. package/dist/containers/Tenant/utils/schemaControls.js +4 -3
  107. package/dist/containers/VDiskPage/VDiskPage.js +3 -2
  108. package/dist/containers/VDiskPage/i18n/en.json +2 -1
  109. package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
  110. package/dist/routes.d.ts +1 -1
  111. package/dist/services/api.d.ts +3 -3
  112. package/dist/services/settings.d.ts +19 -1
  113. package/dist/services/settings.js +2 -1
  114. package/dist/store/configureStore.d.ts +0 -12
  115. package/dist/store/defaultStore.d.ts +0 -6
  116. package/dist/store/reducers/authentication/authentication.d.ts +187 -13
  117. package/dist/store/reducers/authentication/authentication.js +12 -3
  118. package/dist/store/reducers/authentication/types.d.ts +5 -1
  119. package/dist/store/reducers/cluster/cluster.js +4 -0
  120. package/dist/store/reducers/executeQuery.d.ts +4 -65
  121. package/dist/store/reducers/executeQuery.js +38 -34
  122. package/dist/store/reducers/executeTopQueries/executeTopQueries.js +4 -1
  123. package/dist/store/reducers/explainQuery/explainQuery.d.ts +9 -0
  124. package/dist/store/reducers/explainQuery/explainQuery.js +32 -0
  125. package/dist/store/reducers/explainQuery/types.d.ts +12 -0
  126. package/dist/store/reducers/explainQuery/utils.d.ts +6 -0
  127. package/dist/store/reducers/explainQuery/utils.js +40 -0
  128. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +0 -60
  129. package/dist/store/reducers/host.d.ts +61 -4
  130. package/dist/store/reducers/index.d.ts +0 -9
  131. package/dist/store/reducers/index.js +0 -6
  132. package/dist/store/reducers/node/selectors.d.ts +0 -3
  133. package/dist/store/reducers/nodes/nodes.d.ts +1 -5
  134. package/dist/store/reducers/nodes/nodes.js +0 -27
  135. package/dist/store/reducers/nodes/types.d.ts +4 -13
  136. package/dist/store/reducers/nodesList.d.ts +0 -3
  137. package/dist/store/reducers/olapStats.js +4 -1
  138. package/dist/store/reducers/preview.js +4 -1
  139. package/dist/store/reducers/schema/schema.d.ts +61 -4
  140. package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +61 -4
  141. package/dist/store/reducers/shardsWorkload/shardsWorkload.js +4 -1
  142. package/dist/store/reducers/storage/selectors.d.ts +2 -17
  143. package/dist/store/reducers/storage/selectors.js +1 -36
  144. package/dist/store/reducers/storage/storage.d.ts +2 -6
  145. package/dist/store/reducers/storage/storage.js +0 -44
  146. package/dist/store/reducers/storage/types.d.ts +15 -22
  147. package/dist/store/reducers/storage/types.js +4 -1
  148. package/dist/store/reducers/tablets.d.ts +91 -1
  149. package/dist/store/reducers/tablets.js +16 -1
  150. package/dist/store/reducers/tabletsFilters.d.ts +61 -4
  151. package/dist/store/reducers/tenant/tenant.d.ts +2 -2
  152. package/dist/store/reducers/tenant/tenant.js +10 -1
  153. package/dist/store/reducers/tenant/types.d.ts +8 -3
  154. package/dist/store/reducers/tenant/types.js +3 -1
  155. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js +6 -3
  156. package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.js +6 -3
  157. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +6 -3
  158. package/dist/store/reducers/tenants/selectors.d.ts +0 -27
  159. package/dist/store/reducers/tenants/utils.d.ts +4 -4
  160. package/dist/store/reducers/tenants/utils.js +8 -8
  161. package/dist/store/reducers/topic.d.ts +0 -45
  162. package/dist/store/state-url-mapping.js +0 -22
  163. package/dist/store/utils.d.ts +2 -3
  164. package/dist/store/utils.js +1 -1
  165. package/dist/types/api/schema/replication.d.ts +74 -0
  166. package/dist/types/api/schema/replication.js +7 -0
  167. package/dist/types/api/schema/schema.d.ts +4 -1
  168. package/dist/types/api/schema/schema.js +1 -0
  169. package/dist/types/api/whoami.d.ts +6 -0
  170. package/dist/types/store/executeQuery.d.ts +2 -9
  171. package/dist/utils/constants.d.ts +1 -0
  172. package/dist/utils/constants.js +1 -0
  173. package/dist/utils/monaco/yql/constants.d.ts +2 -0
  174. package/dist/utils/monaco/yql/constants.js +33 -0
  175. package/dist/utils/monaco/yql/generateSuggestions.d.ts +1 -0
  176. package/dist/utils/monaco/yql/generateSuggestions.js +28 -11
  177. package/dist/utils/monaco/yql/yqlSuggestions.js +6 -1
  178. package/dist/utils/nodes.d.ts +2 -0
  179. package/dist/utils/nodes.js +4 -0
  180. package/dist/utils/query.d.ts +5 -3
  181. package/dist/utils/query.js +27 -4
  182. package/dist/utils/response.d.ts +4 -0
  183. package/dist/utils/response.js +9 -0
  184. package/dist/utils/tablet.d.ts +2 -0
  185. package/dist/utils/tablet.js +14 -0
  186. package/package.json +4 -3
  187. package/dist/assets/icons/bug.svg +0 -1
  188. package/dist/assets/icons/circle-exclamation.svg +0 -1
  189. package/dist/assets/icons/circle-info.svg +0 -1
  190. package/dist/assets/icons/circle-xmark.svg +0 -1
  191. package/dist/assets/icons/close.svg +0 -1
  192. package/dist/assets/icons/control-menu-button.svg +0 -1
  193. package/dist/assets/icons/dots.svg +0 -1
  194. package/dist/assets/icons/hide.svg +0 -1
  195. package/dist/assets/icons/question.svg +0 -1
  196. package/dist/assets/icons/server.svg +0 -1
  197. package/dist/assets/icons/settings-with-dot.svg +0 -1
  198. package/dist/assets/icons/settings.svg +0 -1
  199. package/dist/assets/icons/shield.svg +0 -3
  200. package/dist/assets/icons/show.svg +0 -1
  201. package/dist/assets/icons/signIn.svg +0 -1
  202. package/dist/assets/icons/signOut.svg +0 -1
  203. package/dist/assets/icons/storage.svg +0 -1
  204. package/dist/assets/icons/support.svg +0 -1
  205. package/dist/assets/icons/triangle-exclamation.svg +0 -1
  206. package/dist/assets/icons/update-arrow.svg +0 -6
  207. package/dist/components/Icon/Icon.d.ts +0 -14
  208. package/dist/components/Icon/Icon.js +0 -16
  209. package/dist/components/Icon/index.d.ts +0 -1
  210. package/dist/components/Icon/index.js +0 -1
  211. package/dist/containers/AppIcons/AppIcons.d.ts +0 -2
  212. package/dist/containers/AppIcons/AppIcons.js +0 -9
  213. package/dist/containers/Tablet/i18n/ru.json +0 -10
  214. package/dist/containers/Tablets/Tablets.scss +0 -35
  215. package/dist/containers/Tablets/i18n/ru.json +0 -6
  216. package/dist/store/reducers/explainQuery.d.ts +0 -149
  217. package/dist/store/reducers/explainQuery.js +0 -94
  218. package/dist/types/store/explainQuery.d.ts +0 -27
  219. package/dist/utils/error.d.ts +0 -2
  220. package/dist/utils/error.js +0 -13
  221. /package/dist/{types/store/explainQuery.js → store/reducers/explainQuery/types.js} +0 -0
@@ -1,11 +1,12 @@
1
+ import { __rest } from "tslib";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import React from 'react';
3
4
  import throttle from 'lodash/throttle';
4
5
  import { connect } from 'react-redux';
5
6
  import { MonacoEditor } from '../../../../components/MonacoEditor/MonacoEditor';
6
7
  import SplitPane from '../../../../components/SplitPane';
7
- import { goToNextQuery, goToPreviousQuery, saveQueryToHistory, sendExecuteQuery, setTenantPath, } from '../../../../store/reducers/executeQuery';
8
- import { getExplainQuery, getExplainQueryAst } from '../../../../store/reducers/explainQuery';
8
+ import { executeQueryApi, goToNextQuery, goToPreviousQuery, saveQueryToHistory, setTenantPath, } from '../../../../store/reducers/executeQuery';
9
+ import { explainQueryApi } from '../../../../store/reducers/explainQuery/explainQuery';
9
10
  import { setShowPreview } from '../../../../store/reducers/schema/schema';
10
11
  import { cn } from '../../../../utils/cn';
11
12
  import { DEFAULT_IS_QUERY_RESULT_COLLAPSED, DEFAULT_SIZE_RESULT_PANE_KEY, LAST_USED_QUERY_ACTION_KEY, QUERY_USE_MULTI_SCHEMA_KEY, SAVED_QUERIES_KEY, } from '../../../../utils/constants';
@@ -38,7 +39,7 @@ const initialTenantCommonInfoState = {
38
39
  };
39
40
  function QueryEditor(props) {
40
41
  const editorOptions = useEditorOptions();
41
- const { path, setTenantPath: setPath, executeQuery, explainQuery, type, theme, changeUserInput, showPreview, } = props;
42
+ const { path, setTenantPath: setPath, executeQuery, type, theme, changeUserInput, showPreview, } = props;
42
43
  const { tenantPath: savedPath } = executeQuery;
43
44
  const [resultType, setResultType] = React.useState(RESULT_TYPES.EXECUTE);
44
45
  const [isResultLoaded, setIsResultLoaded] = React.useState(false);
@@ -47,6 +48,8 @@ function QueryEditor(props) {
47
48
  const [lastUsedQueryAction, setLastUsedQueryAction] = useSetting(LAST_USED_QUERY_ACTION_KEY);
48
49
  const [savedQueries, setSavedQueries] = useSetting(SAVED_QUERIES_KEY);
49
50
  const [monacoHotKey, setMonacoHotKey] = React.useState(null);
51
+ const [sendExecuteQuery, executeQueryResult] = executeQueryApi.useExecuteQueryMutation();
52
+ const [sendExplainQuery, explainQueryResult] = explainQueryApi.useExplainQueryMutation();
50
53
  React.useEffect(() => {
51
54
  if (savedPath !== path) {
52
55
  if (savedPath) {
@@ -125,7 +128,7 @@ function QueryEditor(props) {
125
128
  const query = text !== null && text !== void 0 ? text : input;
126
129
  setLastUsedQueryAction(QUERY_ACTIONS.execute);
127
130
  setResultType(RESULT_TYPES.EXECUTE);
128
- props.sendExecuteQuery({
131
+ sendExecuteQuery({
129
132
  query,
130
133
  database: path,
131
134
  mode,
@@ -146,7 +149,7 @@ function QueryEditor(props) {
146
149
  const { input } = executeQuery;
147
150
  setLastUsedQueryAction(QUERY_ACTIONS.explain);
148
151
  setResultType(RESULT_TYPES.EXPLAIN);
149
- props.getExplainQuery({
152
+ sendExplainQuery({
150
153
  query: input,
151
154
  database: path,
152
155
  mode: mode,
@@ -257,9 +260,6 @@ function QueryEditor(props) {
257
260
  const onChange = (newValue) => {
258
261
  props.changeUserInput({ input: newValue });
259
262
  };
260
- const handleAstQuery = () => {
261
- props.getExplainQueryAst({ query: executeQuery.input, database: path });
262
- };
263
263
  const onCollapseResultHandler = () => {
264
264
  dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerCollapse);
265
265
  };
@@ -283,41 +283,40 @@ function QueryEditor(props) {
283
283
  setSavedQueries(newSavedQueries);
284
284
  };
285
285
  const renderControls = () => {
286
- return (_jsx(QueryEditorControls, { onRunButtonClick: handleSendExecuteClick, runIsLoading: executeQuery.loading, onExplainButtonClick: handleGetExplainQueryClick, explainIsLoading: explainQuery.loading, onSaveQueryClick: onSaveQueryHandler, savedQueries: savedQueries, disabled: !executeQuery.input, onUpdateQueryMode: setQueryMode, queryMode: queryMode, highlightedAction: lastUsedQueryAction }));
286
+ return (_jsx(QueryEditorControls, { onRunButtonClick: handleSendExecuteClick, runIsLoading: executeQueryResult.isLoading, onExplainButtonClick: handleGetExplainQueryClick, explainIsLoading: explainQueryResult.isLoading, onSaveQueryClick: onSaveQueryHandler, savedQueries: savedQueries, disabled: !executeQuery.input, onUpdateQueryMode: setQueryMode, queryMode: queryMode, highlightedAction: lastUsedQueryAction }));
287
287
  };
288
288
  return (_jsx("div", { className: b(), children: _jsxs(SplitPane, { direction: "vertical", defaultSizePaneKey: DEFAULT_SIZE_RESULT_PANE_KEY, triggerCollapse: resultVisibilityState.triggerCollapse, triggerExpand: resultVisibilityState.triggerExpand, minSize: [0, 52], collapsedSizes: [100, 0], onSplitStartDragAdditional: onSplitStartDragAdditional, children: [_jsxs("div", { className: b('pane-wrapper', {
289
289
  top: true,
290
- }), children: [_jsx("div", { className: b('monaco-wrapper'), children: _jsx("div", { className: b('monaco'), children: _jsx(MonacoEditor, { language: LANGUAGE_YQL_ID, value: executeQuery.input, options: editorOptions, onChange: onChange, editorDidMount: editorDidMount, theme: `vs-${theme}` }) }) }), renderControls()] }), _jsx("div", { className: b('pane-wrapper'), children: _jsx(Result, { executeQuery: executeQuery, explainQuery: explainQuery, resultVisibilityState: resultVisibilityState, onExpandResultHandler: onExpandResultHandler, onCollapseResultHandler: onCollapseResultHandler, type: type, handleAstQuery: handleAstQuery, theme: theme, resultType: resultType, path: path, showPreview: showPreview }) })] }) }));
290
+ }), children: [_jsx("div", { className: b('monaco-wrapper'), children: _jsx("div", { className: b('monaco'), children: _jsx(MonacoEditor, { language: LANGUAGE_YQL_ID, value: executeQuery.input, options: editorOptions, onChange: onChange, editorDidMount: editorDidMount, theme: `vs-${theme}` }) }) }), renderControls()] }), _jsx("div", { className: b('pane-wrapper'), children: _jsx(Result, { executeQueryData: executeQueryResult.data, executeQueryError: executeQueryResult.error, explainQueryData: explainQueryResult.data, explainQueryError: explainQueryResult.error, explainQueryLoading: explainQueryResult.isLoading, resultVisibilityState: resultVisibilityState, onExpandResultHandler: onExpandResultHandler, onCollapseResultHandler: onCollapseResultHandler, type: type, theme: theme, resultType: resultType, path: path, showPreview: showPreview }) })] }) }));
291
291
  }
292
292
  const mapStateToProps = (state) => {
293
293
  return {
294
294
  executeQuery: state.executeQuery,
295
- explainQuery: state.explainQuery,
296
295
  showPreview: state.schema.showPreview,
297
296
  };
298
297
  };
299
298
  const mapDispatchToProps = {
300
- sendExecuteQuery,
301
299
  saveQueryToHistory,
302
300
  goToPreviousQuery,
303
301
  goToNextQuery,
304
- getExplainQuery,
305
- getExplainQueryAst,
306
302
  setShowPreview,
307
303
  setTenantPath,
308
304
  };
309
305
  export default connect(mapStateToProps, mapDispatchToProps)(QueryEditor);
310
- function Result({ executeQuery, explainQuery, resultVisibilityState, onExpandResultHandler, onCollapseResultHandler, type, handleAstQuery, theme, resultType, path, showPreview, }) {
306
+ function Result({ executeQueryData, executeQueryError, explainQueryData, explainQueryError, explainQueryLoading, resultVisibilityState, onExpandResultHandler, onCollapseResultHandler, type, theme, resultType, path, showPreview, }) {
311
307
  if (showPreview) {
312
308
  return _jsx(Preview, { database: path, type: type });
313
309
  }
314
310
  if (resultType === RESULT_TYPES.EXECUTE) {
315
- const { data, error, stats } = executeQuery;
316
- return data || error ? (_jsx(ExecuteResult, { data: data, stats: stats, error: error, isResultsCollapsed: resultVisibilityState.collapsed, onExpandResults: onExpandResultHandler, onCollapseResults: onCollapseResultHandler })) : null;
311
+ if (executeQueryData || executeQueryError) {
312
+ const _a = executeQueryData || {}, { stats } = _a, data = __rest(_a, ["stats"]);
313
+ return (_jsx(ExecuteResult, { data: data, stats: stats, error: executeQueryError, isResultsCollapsed: resultVisibilityState.collapsed, onExpandResults: onExpandResultHandler, onCollapseResults: onCollapseResultHandler }));
314
+ }
315
+ return null;
317
316
  }
318
317
  if (resultType === RESULT_TYPES.EXPLAIN) {
319
- const { data, dataAst, error, loading, loadingAst } = explainQuery;
320
- return (_jsx(ExplainResult, { error: error, explain: data, astQuery: handleAstQuery, ast: dataAst, loading: loading, loadingAst: loadingAst, theme: theme, isResultsCollapsed: resultVisibilityState.collapsed, onExpandResults: onExpandResultHandler, onCollapseResults: onCollapseResultHandler }));
318
+ const { plan, ast } = explainQueryData || {};
319
+ return (_jsx(ExplainResult, { error: explainQueryError, explain: plan, ast: ast, loading: explainQueryLoading, theme: theme, isResultsCollapsed: resultVisibilityState.collapsed, onExpandResults: onExpandResultHandler, onCollapseResults: onCollapseResultHandler }));
321
320
  }
322
321
  return null;
323
322
  }
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { Button, DropdownMenu } from '@gravity-ui/uikit';
4
- import { Icon } from '../../../../components/Icon';
3
+ import { ChevronDown, PlayFill } from '@gravity-ui/icons';
4
+ import { Button, DropdownMenu, Icon } from '@gravity-ui/uikit';
5
5
  import { LabelWithPopover } from '../../../../components/LabelWithPopover';
6
6
  import { cn } from '../../../../utils/cn';
7
7
  import { QUERY_MODES, QUERY_MODES_TITLES } from '../../../../utils/query';
@@ -48,10 +48,10 @@ export const QueryEditorControls = ({ onRunButtonClick, runIsLoading, onExplainB
48
48
  const explainView = highlightedAction === 'explain' ? 'action' : undefined;
49
49
  return (_jsxs("div", { className: b(), children: [_jsxs("div", { className: b('left'), children: [_jsxs(Button, { onClick: () => {
50
50
  onRunButtonClick(queryMode);
51
- }, disabled: disabled, loading: runIsLoading, view: runView, children: [_jsx(Icon, { name: "startPlay", viewBox: "0 0 16 16", width: 16, height: 16 }), 'Run'] }), _jsx(Button, { onClick: () => {
51
+ }, disabled: disabled, loading: runIsLoading, view: runView, children: [_jsx(Icon, { data: PlayFill, size: 14 }), 'Run'] }), _jsx(Button, { onClick: () => {
52
52
  onExplainButtonClick(queryMode);
53
53
  }, disabled: disabled, loading: explainIsLoading, view: explainView, children: "Explain" }), _jsx("div", { className: b('mode-selector'), children: _jsx(DropdownMenu, { items: querySelectorMenuItems, popupProps: {
54
54
  className: b('mode-selector__popup'),
55
55
  qa: queryModeSelectorPopupQa,
56
- }, switcher: _jsx(Button, { className: b('mode-selector__button'), qa: queryModeSelectorQa, children: _jsxs("span", { className: b('mode-selector__button-content'), children: [`${i18n('controls.query-mode-selector_type')} ${QueryModeSelectorOptions[queryMode].title}`, _jsx(Icon, { name: "chevron-down", width: 16, height: 16 })] }) }) }) })] }), _jsx(SaveQuery, { savedQueries: savedQueries, onSaveQuery: onSaveQueryClick, saveButtonDisabled: disabled })] }));
56
+ }, switcher: _jsx(Button, { className: b('mode-selector__button'), qa: queryModeSelectorQa, children: _jsxs("span", { className: b('mode-selector__button-content'), children: [`${i18n('controls.query-mode-selector_type')} ${QueryModeSelectorOptions[queryMode].title}`, _jsx(Icon, { data: ChevronDown })] }) }) }) })] }), _jsx(SaveQuery, { savedQueries: savedQueries, onSaveQuery: onSaveQueryClick, saveButtonDisabled: disabled })] }));
57
57
  };
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
+ import { Pencil, TrashBin } from '@gravity-ui/icons';
3
4
  import DataTable from '@gravity-ui/react-data-table';
4
- import { Button, Dialog } from '@gravity-ui/uikit';
5
- import { Icon } from '../../../../components/Icon';
5
+ import { Button, Dialog, Icon } from '@gravity-ui/uikit';
6
6
  import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
7
7
  import { TruncatedQuery } from '../../../../components/TruncatedQuery/TruncatedQuery';
8
8
  import { setQueryNameToEdit } from '../../../../store/reducers/saveQuery';
@@ -56,7 +56,7 @@ export const SavedQueries = ({ savedQueries, changeUserInput, onDeleteQuery }) =
56
56
  {
57
57
  name: 'body',
58
58
  header: 'Query Text',
59
- render: ({ row: query }) => (_jsxs("div", { className: b('query'), children: [_jsx("div", { className: b('query-body'), children: _jsx(TruncatedQuery, { value: query.body, maxQueryHeight: MAX_QUERY_HEIGHT }) }), _jsxs("span", { className: b('controls'), children: [_jsx(Button, { view: "flat-secondary", children: _jsx(Icon, { name: "pencil", viewBox: "0 0 24 24" }) }), _jsx(Button, { view: "flat-secondary", onClick: onDeleteQueryClick(query.name), children: _jsx(Icon, { name: "trash", viewBox: "0 0 24 24" }) })] })] })),
59
+ render: ({ row: query }) => (_jsxs("div", { className: b('query'), children: [_jsx("div", { className: b('query-body'), children: _jsx(TruncatedQuery, { value: query.body, maxQueryHeight: MAX_QUERY_HEIGHT }) }), _jsxs("span", { className: b('controls'), children: [_jsx(Button, { view: "flat-secondary", children: _jsx(Icon, { data: Pencil }) }), _jsx(Button, { view: "flat-secondary", onClick: onDeleteQueryClick(query.name), children: _jsx(Icon, { data: TrashBin }) })] })] })),
60
60
  sortable: false,
61
61
  resizeMinWidth: 650,
62
62
  },
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import DataTable from '@gravity-ui/react-data-table';
3
- import { Icon } from '../../../../components/Icon';
3
+ import { Icon } from '@gravity-ui/uikit';
4
4
  import { EColumnCodec } from '../../../../types/api/schema';
5
5
  import { isColumnEntityType, isExternalTableType, isRowTableType, isTableType, } from '../../utils/schema';
6
+ import keyIcon from '../../../../assets/icons/key.svg';
6
7
  export const SchemaViewerColumns = {
7
8
  id: 'Id',
8
9
  name: 'Name',
@@ -94,7 +95,7 @@ export function prepareSchemaTableColumns(options) {
94
95
  // Values in keyColumnsOrderValues are always negative, so it will be 1 for not key columns
95
96
  sortAccessor: (row) => (row.Id && keyColumnsOrderValues[row.Id]) || 1,
96
97
  render: ({ row }) => {
97
- return row.Id && options.keyColumnIds.includes(row.Id) ? (_jsx("div", { className: options.b('key-icon'), children: _jsx(Icon, { name: "key", viewBox: "0 0 12 7", width: 12, height: 7 }) })) : null;
98
+ return row.Id && options.keyColumnIds.includes(row.Id) ? (_jsx("div", { className: options.b('key-icon'), children: _jsx(Icon, { data: keyIcon, width: 12, height: 7 }) })) : null;
98
99
  },
99
100
  });
100
101
  }
@@ -58,10 +58,11 @@ function Tenant(props) {
58
58
  dispatch(getSchema({ path: tenantName }));
59
59
  }, [tenantName, dispatch]);
60
60
  React.useEffect(() => {
61
- if (currentSchemaPath) {
61
+ //TODO: should be refactored when move to @reduxjs/toolkit/query
62
+ if (currentSchemaPath && currentSchemaPath !== tenantName) {
62
63
  dispatch(getSchema({ path: currentSchemaPath }));
63
64
  }
64
- }, [currentSchemaPath, dispatch]);
65
+ }, [currentSchemaPath, dispatch, tenantName]);
65
66
  React.useEffect(() => {
66
67
  if (tenantName) {
67
68
  dispatch(setHeaderBreadcrumbs('tenant', { tenantName }));
@@ -17,8 +17,6 @@
17
17
  &_left.rotate {
18
18
  transform: rotate(90deg);
19
19
  }
20
- &_top {
21
- }
22
20
 
23
21
  &_top.rotate {
24
22
  transform: rotate(180deg);
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { Button } from '@gravity-ui/uikit';
4
- import { Icon } from '../../../components/Icon';
3
+ import { ChevronsUp } from '@gravity-ui/icons';
4
+ import { Button, Icon } from '@gravity-ui/uikit';
5
5
  import { cn } from '../../../utils/cn';
6
6
  import './ToggleButton.scss';
7
7
  export var PaneVisibilityActionTypes;
@@ -44,7 +44,7 @@ const b = cn('kv-pane-visibility-button');
44
44
  export function PaneVisibilityToggleButtons({ onCollapse, onExpand, isCollapsed, initialDirection = 'top', className, }) {
45
45
  return (_jsxs(React.Fragment, { children: [_jsx(Button, { view: "flat-secondary", onClick: onCollapse, className: b({
46
46
  hidden: isCollapsed,
47
- }, className), title: "Collapse", children: _jsx(Icon, { name: "collapse", viewBox: "0 0 384 512", width: 14, height: 14, className: b({ [initialDirection]: true }) }) }), _jsx(Button, { view: "flat-secondary", onClick: onExpand, className: b({
47
+ }, className), title: "Collapse", children: _jsx(Icon, { data: ChevronsUp, className: b({ [initialDirection]: true }) }) }), _jsx(Button, { view: "flat-secondary", onClick: onExpand, className: b({
48
48
  hidden: !isCollapsed,
49
- }, className), title: "Expand", children: _jsx(Icon, { name: "collapse", viewBox: "0 0 384 512", width: 14, height: 14, className: b({ [initialDirection]: true }, 'rotate') }) })] }));
49
+ }, className), title: "Expand", children: _jsx(Icon, { data: ChevronsUp, className: b({ [initialDirection]: true }, 'rotate') }) })] }));
50
50
  }
@@ -23,6 +23,7 @@ const pathTypeToNodeType = {
23
23
  [EPathType.EPathTypeExternalDataSource]: 'external_data_source',
24
24
  [EPathType.EPathTypeExternalTable]: 'external_table',
25
25
  [EPathType.EPathTypeView]: 'view',
26
+ [EPathType.EPathTypeReplication]: 'async_replication',
26
27
  };
27
28
  export const mapPathTypeToNavigationTreeType = (type = EPathType.EPathTypeDir, subType, defaultType = 'directory') => (subType && pathSubTypeToNodeType[subType]) || pathTypeToNodeType[type] || defaultType;
28
29
  // ====================
@@ -46,6 +47,7 @@ const pathTypeToEntityName = {
46
47
  [EPathType.EPathTypeExternalDataSource]: 'External Data Source',
47
48
  [EPathType.EPathTypeExternalTable]: 'External Table',
48
49
  [EPathType.EPathTypeView]: 'View',
50
+ [EPathType.EPathTypeReplication]: 'Async Replication',
49
51
  };
50
52
  export const mapPathTypeToEntityName = (type, subType) => (subType && pathSubTypeToEntityName[subType]) || (type && pathTypeToEntityName[type]);
51
53
  // ====================
@@ -72,6 +74,7 @@ const pathTypeToIsTable = {
72
74
  [EPathType.EPathTypeCdcStream]: false,
73
75
  [EPathType.EPathTypePersQueueGroup]: false,
74
76
  [EPathType.EPathTypeExternalDataSource]: false,
77
+ [EPathType.EPathTypeReplication]: false,
75
78
  };
76
79
  export const isTableType = (pathType) => { var _a; return (_a = (pathType && pathTypeToIsTable[pathType])) !== null && _a !== void 0 ? _a : false; };
77
80
  // ====================
@@ -97,6 +100,7 @@ const pathTypeToIsColumn = {
97
100
  [EPathType.EPathTypeExternalDataSource]: false,
98
101
  [EPathType.EPathTypeExternalTable]: false,
99
102
  [EPathType.EPathTypeView]: false,
103
+ [EPathType.EPathTypeReplication]: false,
100
104
  };
101
105
  export const isColumnEntityType = (type) => { var _a; return (_a = (type && pathTypeToIsColumn[type])) !== null && _a !== void 0 ? _a : false; };
102
106
  // ====================
@@ -114,6 +118,7 @@ const pathTypeToIsDatabase = {
114
118
  [EPathType.EPathTypeExternalDataSource]: false,
115
119
  [EPathType.EPathTypeExternalTable]: false,
116
120
  [EPathType.EPathTypeView]: false,
121
+ [EPathType.EPathTypeReplication]: false,
117
122
  };
118
123
  export const isDatabaseEntityType = (type) => { var _a; return (_a = (type && pathTypeToIsDatabase[type])) !== null && _a !== void 0 ? _a : false; };
119
124
  // ====================
@@ -133,6 +138,7 @@ const pathTypeToEntityWithMergedImplementation = {
133
138
  [EPathType.EPathTypeExternalDataSource]: false,
134
139
  [EPathType.EPathTypeExternalTable]: false,
135
140
  [EPathType.EPathTypeView]: false,
141
+ [EPathType.EPathTypeReplication]: false,
136
142
  };
137
143
  export const isEntityWithMergedImplementation = (type) => { var _a; return (_a = (type && pathTypeToEntityWithMergedImplementation[type])) !== null && _a !== void 0 ? _a : false; };
138
144
  // ====================
@@ -148,6 +154,7 @@ const pathTypeToChildless = {
148
154
  [EPathType.EPathTypeExternalDataSource]: true,
149
155
  [EPathType.EPathTypeExternalTable]: true,
150
156
  [EPathType.EPathTypeView]: true,
157
+ [EPathType.EPathTypeReplication]: true,
151
158
  [EPathType.EPathTypeInvalid]: false,
152
159
  [EPathType.EPathTypeColumnStore]: false,
153
160
  [EPathType.EPathTypeColumnTable]: false,
@@ -173,6 +180,7 @@ const mapPathTypeToIsWithTopic = {
173
180
  [EPathType.EPathTypeExternalDataSource]: false,
174
181
  [EPathType.EPathTypeExternalTable]: false,
175
182
  [EPathType.EPathTypeView]: false,
183
+ [EPathType.EPathTypeReplication]: false,
176
184
  };
177
185
  export const isPathTypeWithTopic = (type) => { var _a; return (_a = (type && mapPathTypeToIsWithTopic[type])) !== null && _a !== void 0 ? _a : false; };
178
186
  // ====================
@@ -97,6 +97,7 @@ export const getActions = (dispatch, additionalEffects) => (path, type) => {
97
97
  // verbose mapping to guarantee a correct actions set for new node types
98
98
  // TS will error when a new type is added in the lib but is not mapped here
99
99
  const nodeTypeToActions = {
100
+ async_replication: JUST_COPY,
100
101
  database: DIR_SET,
101
102
  directory: DIR_SET,
102
103
  table: TABLE_SET,
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Button } from '@gravity-ui/uikit';
3
- import { Icon } from '../../../components/Icon';
2
+ import { LayoutHeaderCellsLargeFill } from '@gravity-ui/icons';
3
+ import { Button, Icon } from '@gravity-ui/uikit';
4
4
  import { setShowPreview } from '../../../store/reducers/schema/schema';
5
5
  import { TENANT_PAGES_IDS, TENANT_QUERY_TABS_ID } from '../../../store/reducers/tenant/constants';
6
6
  import { setQueryTab, setTenantPage } from '../../../store/reducers/tenant/tenant';
@@ -18,8 +18,9 @@ const bindActions = (path, dispatch, additionalEffects) => {
18
18
  };
19
19
  export const getControls = (dispatch, additionalEffects) => (path, type) => {
20
20
  const options = bindActions(path, dispatch, additionalEffects);
21
- const openPreview = (_jsx(Button, { view: "flat-secondary", onClick: options.openPreview, title: i18n('actions.openPreview'), size: "s", children: _jsx(Icon, { name: "tablePreview" }) }));
21
+ const openPreview = (_jsx(Button, { view: "flat-secondary", onClick: options.openPreview, title: i18n('actions.openPreview'), size: "s", children: _jsx(Icon, { data: LayoutHeaderCellsLargeFill }) }));
22
22
  const nodeTypeToControls = {
23
+ async_replication: undefined,
23
24
  database: undefined,
24
25
  directory: undefined,
25
26
  table: openPreview,
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
+ import { ArrowsOppositeToDots } from '@gravity-ui/icons';
3
4
  import { Icon } from '@gravity-ui/uikit';
4
5
  import { skipToken } from '@reduxjs/toolkit/query';
5
6
  import { Helmet } from 'react-helmet-async';
@@ -21,12 +22,12 @@ import { stringifyVdiskId } from '../../utils/dataFormatters/dataFormatters';
21
22
  import { getSeverityColor } from '../../utils/disks/helpers';
22
23
  import { useTypedDispatch, useTypedSelector } from '../../utils/hooks';
23
24
  import { vDiskPageKeyset } from './i18n';
24
- import ArrowsOppositeToDotsIcon from '@gravity-ui/icons/svgs/arrows-opposite-to-dots.svg';
25
25
  import './VDiskPage.scss';
26
26
  const vDiskPageCn = cn('ydb-vdisk-page');
27
27
  export function VDiskPage() {
28
28
  const dispatch = useTypedDispatch();
29
29
  const nodesMap = useTypedSelector(selectNodesMap);
30
+ const { isUserAllowedToMakeChanges } = useTypedSelector((state) => state.authentication);
30
31
  const [{ nodeId, pDiskId, vDiskSlotId }] = useQueryParams({
31
32
  nodeId: StringParam,
32
33
  pDiskId: StringParam,
@@ -84,7 +85,7 @@ export function VDiskPage() {
84
85
  return (_jsx(DiskPageTitle, { entityName: vDiskPageKeyset('vdisk'), status: getSeverityColor(Severity), id: stringifyVdiskId(vDiskData === null || vDiskData === void 0 ? void 0 : vDiskData.VDiskId) }));
85
86
  };
86
87
  const renderControls = () => {
87
- return (_jsx("div", { children: _jsxs(ButtonWithConfirmDialog, { onConfirmAction: handleEvictVDisk, onConfirmActionSuccess: handleAfterEvictVDisk, buttonDisabled: !VDiskId, buttonView: "normal", dialogContent: vDiskPageKeyset('evict-vdisk-dialog'), children: [_jsx(Icon, { data: ArrowsOppositeToDotsIcon }), vDiskPageKeyset('evict-vdisk-button')] }) }));
88
+ return (_jsx("div", { children: _jsxs(ButtonWithConfirmDialog, { onConfirmAction: handleEvictVDisk, onConfirmActionSuccess: handleAfterEvictVDisk, buttonDisabled: !VDiskId || !isUserAllowedToMakeChanges, buttonView: "normal", dialogContent: vDiskPageKeyset('evict-vdisk-dialog'), withPopover: true, popoverContent: vDiskPageKeyset('evict-vdisk-not-allowed'), popoverDisabled: isUserAllowedToMakeChanges, children: [_jsx(Icon, { data: ArrowsOppositeToDots }), vDiskPageKeyset('evict-vdisk-button')] }) }));
88
89
  };
89
90
  const renderInfo = () => {
90
91
  return _jsx(VDiskInfo, { data: vDiskData, isVDiskPage: true });
@@ -5,5 +5,6 @@
5
5
  "vdisk": "VDisk",
6
6
  "group": "Group",
7
7
  "evict-vdisk-button": "Evict VDisk",
8
- "evict-vdisk-dialog": "VDisk will be evicted. Do you want to proceed?"
8
+ "evict-vdisk-dialog": "VDisk will be evicted. Do you want to proceed?",
9
+ "evict-vdisk-not-allowed": "You don't have enough rights to evict VDisk"
9
10
  }
@@ -1 +1 @@
1
- export declare const vDiskPageKeyset: (key: "node" | "group" | "pdisk" | "vdisk" | "fqdn" | "evict-vdisk-button" | "evict-vdisk-dialog", params?: import("@gravity-ui/i18n").Params | undefined) => string;
1
+ export declare const vDiskPageKeyset: (key: "node" | "fqdn" | "group" | "pdisk" | "vdisk" | "evict-vdisk-button" | "evict-vdisk-dialog" | "evict-vdisk-not-allowed", params?: import("@gravity-ui/i18n").Params | undefined) => string;
package/dist/routes.d.ts CHANGED
@@ -20,7 +20,7 @@ declare const routes: {
20
20
  };
21
21
  export default routes;
22
22
  export declare const parseQuery: (location: Location) => qs.ParsedQs;
23
- export type Query = Record<string | number, string | number | string[] | number[] | undefined>;
23
+ export type Query = Record<string | number, string | number | string[] | number[] | undefined | null>;
24
24
  export declare function createHref(route: string, params?: Record<string, string | number>, query?: Query): string;
25
25
  export declare const createExternalUILink: (query?: {}) => string;
26
26
  export declare function getLocationObjectFromHref(href: string): {
@@ -13,7 +13,7 @@ import type { TNetInfo } from '../types/api/netInfo';
13
13
  import type { TNodesInfo } from '../types/api/nodes';
14
14
  import type { TEvNodesInfo } from '../types/api/nodesList';
15
15
  import type { TEvPDiskStateResponse } from '../types/api/pdisk';
16
- import type { Actions, ExplainActions, ExplainResponse, QueryAPIResponse, Schemas } from '../types/api/query';
16
+ import type { Actions, ErrorResponse, ExplainActions, ExplainResponse, QueryAPIResponse, Schemas } from '../types/api/query';
17
17
  import type { JsonRenderRequestParams, JsonRenderResponse } from '../types/api/render';
18
18
  import type { RestartPDiskResponse } from '../types/api/restartPDisk';
19
19
  import type { TEvDescribeSchemeResult } from '../types/api/schema';
@@ -94,8 +94,8 @@ export declare class YdbEmbeddedAPI extends AxiosWrapper {
94
94
  stats?: string;
95
95
  schema?: Schema;
96
96
  syntax?: QuerySyntax;
97
- }, { concurrentId, signal }?: AxiosOptions): Promise<QueryAPIResponse<Action, Schema>>;
98
- getExplainQuery<Action extends ExplainActions>(query: string, database: string, action: Action, syntax?: QuerySyntax): Promise<ExplainResponse<Action>>;
97
+ }, { concurrentId, signal }?: AxiosOptions): Promise<ErrorResponse | QueryAPIResponse<Action, Schema>>;
98
+ getExplainQuery<Action extends ExplainActions>(query: string, database: string, action: Action, syntax?: QuerySyntax): Promise<ErrorResponse | ExplainResponse<Action>>;
99
99
  getExplainQueryAst(query: string, database: string): Promise<import("../types/api/query").ExplainQueryResponse>;
100
100
  getHotKeys(path: string, enableSampling: boolean, { concurrentId, signal }?: AxiosOptions): Promise<JsonHotKeysResponse>;
101
101
  getHealthcheckInfo(database: string, { concurrentId, signal }?: AxiosOptions): Promise<HealthCheckAPIResponse>;
@@ -1,6 +1,24 @@
1
1
  export type SettingsObject = Record<string, unknown>;
2
2
  /** User settings keys and their default values */
3
- export declare const DEFAULT_USER_SETTINGS: SettingsObject;
3
+ export declare const DEFAULT_USER_SETTINGS: {
4
+ readonly theme: "system";
5
+ readonly language: undefined;
6
+ readonly invertedDisks: false;
7
+ readonly useNodesEndpointInDiagnostics: false;
8
+ readonly queryUseMultiSchema: false;
9
+ readonly binaryDataInPlainTextDisplay: true;
10
+ readonly saved_queries: readonly [];
11
+ readonly saved_tenant_initial_tab: "query";
12
+ readonly query_initial_mode: "script";
13
+ readonly last_used_query_action: "execute";
14
+ readonly asideHeaderCompact: true;
15
+ readonly partitionsHiddenColumns: readonly [];
16
+ readonly useBackendParamsForTables: false;
17
+ readonly useClusterBalancerAsBacked: true;
18
+ readonly enableAutocomplete: false;
19
+ readonly autocompleteOnEnter: true;
20
+ readonly isHotKeysHelpHidden: false;
21
+ };
4
22
  declare class SettingsManager {
5
23
  /**
6
24
  * Returns parsed settings value.
@@ -1,5 +1,5 @@
1
1
  import { TENANT_PAGES_IDS } from '../store/reducers/tenant/constants';
2
- import { ASIDE_HEADER_COMPACT_KEY, AUTOCOMPLETE_ON_ENTER, BINARY_DATA_IN_PLAIN_TEXT_DISPLAY, ENABLE_AUTOCOMPLETE, INVERTED_DISKS_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_BACKEND_PARAMS_FOR_TABLES_KEY, USE_CLUSTER_BALANCER_AS_BACKEND_KEY, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY, } from '../utils/constants';
2
+ import { ASIDE_HEADER_COMPACT_KEY, AUTOCOMPLETE_ON_ENTER, BINARY_DATA_IN_PLAIN_TEXT_DISPLAY, ENABLE_AUTOCOMPLETE, INVERTED_DISKS_KEY, IS_HOTKEYS_HELP_HIDDDEN_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_BACKEND_PARAMS_FOR_TABLES_KEY, USE_CLUSTER_BALANCER_AS_BACKEND_KEY, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_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 */
@@ -20,6 +20,7 @@ export const DEFAULT_USER_SETTINGS = {
20
20
  [USE_CLUSTER_BALANCER_AS_BACKEND_KEY]: true,
21
21
  [ENABLE_AUTOCOMPLETE]: false,
22
22
  [AUTOCOMPLETE_ON_ENTER]: true,
23
+ [IS_HOTKEYS_HELP_HIDDDEN_KEY]: false,
23
24
  };
24
25
  class SettingsManager {
25
26
  constructor() {
@@ -8,10 +8,8 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
8
8
  aRootReducer?: Reducer<{
9
9
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
10
10
  singleClusterMode: boolean;
11
- nodes: import("./reducers/nodes/types").NodesState;
12
11
  cluster: import("./reducers/cluster/types").ClusterState;
13
12
  tenant: import("./reducers/tenant/types").TenantState;
14
- storage: import("./reducers/storage/types").StorageState;
15
13
  tooltip: import("../types/store/tooltip").ITooltipState;
16
14
  tablets: import("../types/store/tablets").TabletsState;
17
15
  schema: import("./reducers/schema/types").SchemaState;
@@ -19,7 +17,6 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
19
17
  tenants: import("./reducers/tenants/types").TenantsState;
20
18
  partitions: import("./reducers/partitions/types").PartitionsState;
21
19
  executeQuery: import("../types/store/executeQuery").ExecuteQueryState;
22
- explainQuery: import("../types/store/explainQuery").ExplainQueryState;
23
20
  tabletsFilters: {
24
21
  loading: boolean;
25
22
  requestTime: number;
@@ -71,10 +68,8 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
71
68
  }, any, Partial<{
72
69
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api"> | undefined;
73
70
  singleClusterMode: boolean | undefined;
74
- nodes: import("./reducers/nodes/types").NodesState | undefined;
75
71
  cluster: import("./reducers/cluster/types").ClusterState | undefined;
76
72
  tenant: import("./reducers/tenant/types").TenantState | undefined;
77
- storage: import("./reducers/storage/types").StorageState | undefined;
78
73
  tooltip: never;
79
74
  tablets: import("../types/store/tablets").TabletsState | undefined;
80
75
  schema: never;
@@ -82,7 +77,6 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
82
77
  tenants: import("./reducers/tenants/types").TenantsState | undefined;
83
78
  partitions: import("./reducers/partitions/types").PartitionsState | undefined;
84
79
  executeQuery: never;
85
- explainQuery: never;
86
80
  tabletsFilters: {
87
81
  data: undefined;
88
82
  loading: boolean;
@@ -109,10 +103,8 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
109
103
  store: import("@reduxjs/toolkit").EnhancedStore<{
110
104
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
111
105
  singleClusterMode: boolean;
112
- nodes: import("./reducers/nodes/types").NodesState;
113
106
  cluster: import("./reducers/cluster/types").ClusterState;
114
107
  tenant: import("./reducers/tenant/types").TenantState;
115
- storage: import("./reducers/storage/types").StorageState;
116
108
  tooltip: import("../types/store/tooltip").ITooltipState;
117
109
  tablets: import("../types/store/tablets").TabletsState;
118
110
  schema: import("./reducers/schema/types").SchemaState;
@@ -120,7 +112,6 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
120
112
  tenants: import("./reducers/tenants/types").TenantsState;
121
113
  partitions: import("./reducers/partitions/types").PartitionsState;
122
114
  executeQuery: import("../types/store/executeQuery").ExecuteQueryState;
123
- explainQuery: import("../types/store/explainQuery").ExplainQueryState;
124
115
  tabletsFilters: {
125
116
  loading: boolean;
126
117
  requestTime: number;
@@ -173,10 +164,8 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
173
164
  dispatch: import("redux-thunk").ThunkDispatch<{
174
165
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
175
166
  singleClusterMode: boolean;
176
- nodes: import("./reducers/nodes/types").NodesState;
177
167
  cluster: import("./reducers/cluster/types").ClusterState;
178
168
  tenant: import("./reducers/tenant/types").TenantState;
179
- storage: import("./reducers/storage/types").StorageState;
180
169
  tooltip: import("../types/store/tooltip").ITooltipState;
181
170
  tablets: import("../types/store/tablets").TabletsState;
182
171
  schema: import("./reducers/schema/types").SchemaState;
@@ -184,7 +173,6 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
184
173
  tenants: import("./reducers/tenants/types").TenantsState;
185
174
  partitions: import("./reducers/partitions/types").PartitionsState;
186
175
  executeQuery: import("../types/store/executeQuery").ExecuteQueryState;
187
- explainQuery: import("../types/store/explainQuery").ExplainQueryState;
188
176
  tabletsFilters: {
189
177
  loading: boolean;
190
178
  requestTime: number;
@@ -1,10 +1,8 @@
1
1
  export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
2
2
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
3
3
  singleClusterMode: boolean;
4
- nodes: import("./reducers/nodes/types").NodesState;
5
4
  cluster: import("./reducers/cluster/types").ClusterState;
6
5
  tenant: import("./reducers/tenant/types").TenantState;
7
- storage: import("./reducers/storage/types").StorageState;
8
6
  tooltip: import("../types/store/tooltip").ITooltipState;
9
7
  tablets: import("../types/store/tablets").TabletsState;
10
8
  schema: import("./reducers/schema/types").SchemaState;
@@ -12,7 +10,6 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
12
10
  tenants: import("./reducers/tenants/types").TenantsState;
13
11
  partitions: import("./reducers/partitions/types").PartitionsState;
14
12
  executeQuery: import("../types/store/executeQuery").ExecuteQueryState;
15
- explainQuery: import("../types/store/explainQuery").ExplainQueryState;
16
13
  tabletsFilters: {
17
14
  loading: boolean;
18
15
  requestTime: number;
@@ -65,10 +62,8 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
65
62
  dispatch: import("redux-thunk").ThunkDispatch<{
66
63
  api: import("@reduxjs/toolkit/query").CombinedState<{}, "All", "api">;
67
64
  singleClusterMode: boolean;
68
- nodes: import("./reducers/nodes/types").NodesState;
69
65
  cluster: import("./reducers/cluster/types").ClusterState;
70
66
  tenant: import("./reducers/tenant/types").TenantState;
71
- storage: import("./reducers/storage/types").StorageState;
72
67
  tooltip: import("../types/store/tooltip").ITooltipState;
73
68
  tablets: import("../types/store/tablets").TabletsState;
74
69
  schema: import("./reducers/schema/types").SchemaState;
@@ -76,7 +71,6 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
76
71
  tenants: import("./reducers/tenants/types").TenantsState;
77
72
  partitions: import("./reducers/partitions/types").PartitionsState;
78
73
  executeQuery: import("../types/store/executeQuery").ExecuteQueryState;
79
- explainQuery: import("../types/store/explainQuery").ExplainQueryState;
80
74
  tabletsFilters: {
81
75
  loading: boolean;
82
76
  requestTime: number;