ydb-embedded-ui 6.12.0 → 6.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. package/dist/components/AutoRefreshControl/i18n/index.d.ts +1 -1
  2. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.d.ts +3 -2
  3. package/dist/components/ButtonWithConfirmDialog/ButtonWithConfirmDialog.js +9 -5
  4. package/dist/components/CriticalActionDialog/CriticalActionDialog.d.ts +5 -3
  5. package/dist/components/CriticalActionDialog/CriticalActionDialog.js +8 -7
  6. package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +1 -1
  7. package/dist/components/CriticalActionDialog/i18n/en.json +1 -0
  8. package/dist/components/CriticalActionDialog/i18n/index.d.ts +1 -1
  9. package/dist/components/Errors/PageError/PageError.d.ts +11 -0
  10. package/dist/components/Errors/PageError/PageError.js +19 -0
  11. package/dist/components/Errors/i18n/en.json +2 -1
  12. package/dist/components/Errors/i18n/index.d.ts +1 -1
  13. package/dist/components/Errors/i18n/ru.json +2 -1
  14. package/dist/components/Fullscreen/Fullscreen.d.ts +1 -1
  15. package/dist/components/Fullscreen/Fullscreen.js +34 -27
  16. package/dist/components/Fullscreen/Fullscreen.scss +16 -8
  17. package/dist/components/Graph/Graph.d.ts +13 -0
  18. package/dist/components/Graph/Graph.js +41 -0
  19. package/dist/components/LabelWithPopover/LabelWithPopover.d.ts +4 -1
  20. package/dist/components/LabelWithPopover/LabelWithPopover.js +1 -1
  21. package/dist/components/Loader/Loader.d.ts +2 -1
  22. package/dist/components/Loader/Loader.js +6 -1
  23. package/dist/components/LoaderWrapper/LoaderWrapper.d.ts +10 -0
  24. package/dist/components/LoaderWrapper/LoaderWrapper.js +8 -0
  25. package/dist/components/MetricChart/reducer.d.ts +2 -2
  26. package/dist/components/PDiskInfo/PDiskInfo.d.ts +2 -2
  27. package/dist/components/PDiskInfo/PDiskInfo.js +9 -6
  28. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  29. package/dist/components/ProgressViewer/ProgressViewer.js +3 -0
  30. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.js +13 -3
  31. package/dist/components/QueryExecutionStatus/QueryExecutionStatus.scss +4 -0
  32. package/dist/components/QuerySettingsDescription/QuerySettingsDescription.d.ts +7 -0
  33. package/dist/components/QuerySettingsDescription/QuerySettingsDescription.js +8 -0
  34. package/dist/components/QuerySettingsDescription/QuerySettingsDescription.scss +8 -0
  35. package/dist/components/QuerySettingsDescription/index.d.ts +1 -0
  36. package/dist/components/QuerySettingsDescription/index.js +1 -0
  37. package/dist/components/VDisk/VDisk.js +3 -4
  38. package/dist/components/VDiskInfo/VDiskInfo.d.ts +2 -2
  39. package/dist/components/VDiskInfo/VDiskInfo.js +4 -2
  40. package/dist/containers/App/Content.js +15 -19
  41. package/dist/containers/AsideNavigation/AsideNavigation.js +2 -1
  42. package/dist/containers/AsideNavigation/YdbInternalUser/YdbInternalUser.js +4 -4
  43. package/dist/containers/Authentication/Authentication.js +8 -10
  44. package/dist/containers/Authentication/utils.d.ts +8 -0
  45. package/dist/containers/Authentication/utils.js +15 -0
  46. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +6 -6
  47. package/dist/containers/Clusters/constants.d.ts +1 -1
  48. package/dist/containers/Heatmap/Heatmap.js +5 -4
  49. package/dist/containers/Node/Node.js +5 -7
  50. package/dist/containers/Node/Node.scss +4 -0
  51. package/dist/containers/Node/NodeStructure/NodeStructure.js +4 -4
  52. package/dist/containers/Node/NodeStructure/NodeStructure.scss +4 -0
  53. package/dist/containers/Node/NodeStructure/Pdisk.js +2 -2
  54. package/dist/containers/Nodes/Nodes.js +6 -8
  55. package/dist/containers/Nodes/getNodesColumns.js +6 -21
  56. package/dist/containers/PDiskPage/PDiskPage.js +19 -8
  57. package/dist/containers/PDiskPage/i18n/en.json +1 -0
  58. package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
  59. package/dist/containers/Storage/PDisk/PDisk.js +3 -4
  60. package/dist/containers/Storage/Storage.js +4 -6
  61. package/dist/containers/Tablet/Tablet.js +2 -2
  62. package/dist/containers/Tablet/TabletControls/TabletControls.js +2 -1
  63. package/dist/containers/Tablets/Tablets.js +3 -5
  64. package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.js +2 -5
  65. package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +10 -13
  66. package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.scss +1 -0
  67. package/dist/containers/Tenant/Diagnostics/Network/Network.js +8 -11
  68. package/dist/containers/Tenant/Diagnostics/Network/Network.scss +1 -0
  69. package/dist/containers/Tenant/Diagnostics/Overview/Overview.d.ts +1 -2
  70. package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +3 -5
  71. package/dist/containers/Tenant/Diagnostics/Overview/TopicStats/TopicStats.js +3 -4
  72. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +1 -4
  73. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.js +3 -3
  74. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  75. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +4 -3
  76. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +4 -3
  77. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.d.ts +2 -2
  78. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +56 -20
  79. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +10 -6
  80. package/dist/containers/Tenant/Query/ExecuteResult/i18n/en.json +7 -0
  81. package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +2 -0
  82. package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.js +4 -0
  83. package/dist/containers/Tenant/Query/ExecuteResult/utils.d.ts +18 -0
  84. package/dist/containers/Tenant/Query/ExecuteResult/utils.js +36 -0
  85. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.d.ts +23 -1
  86. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +56 -111
  87. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.scss +1 -30
  88. package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.d.ts +7 -0
  89. package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.js +18 -0
  90. package/dist/containers/Tenant/Query/ExplainResult/components/Ast/Ast.scss +8 -0
  91. package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.d.ts +8 -0
  92. package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.js +14 -0
  93. package/dist/containers/Tenant/Query/ExplainResult/components/Graph/Graph.scss +14 -0
  94. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/MetricsCell.d.ts +6 -0
  95. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/MetricsCell.js +11 -0
  96. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationCell.d.ts +13 -0
  97. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationCell.js +48 -0
  98. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationParams.d.ts +6 -0
  99. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/OperationParams.js +66 -0
  100. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.d.ts +7 -0
  101. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.js +100 -0
  102. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/SimplifiedPlan.scss +128 -0
  103. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/types.d.ts +5 -0
  104. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/utils.d.ts +5 -0
  105. package/dist/containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/utils.js +59 -0
  106. package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.d.ts +8 -0
  107. package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.js +11 -0
  108. package/dist/containers/Tenant/Query/ExplainResult/components/TextExplain/TextExplain.scss +14 -0
  109. package/dist/containers/Tenant/Query/ExplainResult/i18n/en.json +8 -0
  110. package/dist/containers/Tenant/Query/ExplainResult/i18n/index.d.ts +2 -0
  111. package/dist/containers/Tenant/Query/ExplainResult/i18n/index.js +4 -0
  112. package/dist/containers/Tenant/Query/Preview/Preview.js +2 -3
  113. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +1 -19
  114. package/dist/containers/Tenant/Query/QueryDuration/QueryDuration.js +1 -1
  115. package/dist/containers/Tenant/Query/QueryDuration/QueryDuration.scss +11 -0
  116. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +1 -1
  117. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +91 -95
  118. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.d.ts +4 -6
  119. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +18 -49
  120. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.d.ts +2 -0
  121. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.js +5 -0
  122. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.d.ts +1 -0
  123. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettings.test.js +42 -0
  124. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.d.ts +5 -0
  125. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.js +19 -0
  126. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.d.ts +1 -0
  127. package/dist/containers/Tenant/Query/QueryEditorControls/utils/getChangedQueryExecutionSettingsDescription.test.js +56 -0
  128. package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.d.ts +2 -0
  129. package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.js +12 -0
  130. package/dist/containers/Tenant/Query/QuerySettingsBanner/QuerySettingsBanner.scss +3 -0
  131. package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js +20 -23
  132. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +123 -7
  133. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +32 -10
  134. package/dist/containers/Tenant/Query/i18n/en.json +3 -1
  135. package/dist/containers/Tenant/Query/i18n/index.d.ts +1 -1
  136. package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js +6 -6
  137. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +5 -2
  138. package/dist/containers/Tenant/Schema/SchemaViewer/columns.d.ts +2 -1
  139. package/dist/containers/Tenant/Schema/SchemaViewer/columns.js +13 -1
  140. package/dist/containers/Tenant/Schema/SchemaViewer/i18n/en.json +1 -0
  141. package/dist/containers/Tenant/Schema/SchemaViewer/i18n/index.d.ts +1 -1
  142. package/dist/containers/Tenant/Schema/SchemaViewer/prepareData.js +3 -2
  143. package/dist/containers/Tenant/Schema/SchemaViewer/types.d.ts +1 -0
  144. package/dist/containers/Tenant/Tenant.js +4 -8
  145. package/dist/containers/Tenant/utils/schemaActions.d.ts +2 -2
  146. package/dist/containers/Tenant/utils/schemaActions.js +2 -2
  147. package/dist/containers/Tenants/Tenants.js +4 -7
  148. package/dist/containers/UserSettings/i18n/en.json +3 -5
  149. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  150. package/dist/containers/UserSettings/settings.d.ts +2 -3
  151. package/dist/containers/UserSettings/settings.js +17 -23
  152. package/dist/containers/VDiskPage/VDiskPage.js +27 -13
  153. package/dist/containers/VDiskPage/i18n/en.json +1 -0
  154. package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
  155. package/dist/services/api.d.ts +21 -8
  156. package/dist/services/api.js +29 -42
  157. package/dist/services/settings.d.ts +11 -4
  158. package/dist/services/settings.js +7 -6
  159. package/dist/store/configureStore.d.ts +7 -7
  160. package/dist/store/defaultStore.d.ts +3 -3
  161. package/dist/store/reducers/api.d.ts +1 -1
  162. package/dist/store/reducers/api.js +1 -1
  163. package/dist/store/reducers/authentication/authentication.d.ts +37 -24
  164. package/dist/store/reducers/authentication/authentication.js +77 -57
  165. package/dist/store/reducers/authentication/types.d.ts +0 -8
  166. package/dist/store/reducers/capabilities/capabilities.d.ts +106 -0
  167. package/dist/store/reducers/capabilities/capabilities.js +22 -0
  168. package/dist/store/reducers/capabilities/hooks.d.ts +2 -0
  169. package/dist/store/reducers/capabilities/hooks.js +13 -0
  170. package/dist/store/reducers/cluster/cluster.d.ts +2 -2
  171. package/dist/store/reducers/clusterNodes/clusterNodes.d.ts +2 -2
  172. package/dist/store/reducers/clusters/clusters.d.ts +2 -2
  173. package/dist/store/reducers/describe.d.ts +2 -2
  174. package/dist/store/reducers/executeQuery.d.ts +7 -14
  175. package/dist/store/reducers/executeQuery.js +19 -14
  176. package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +2 -2
  177. package/dist/store/reducers/explainQuery/explainQuery.d.ts +5 -4
  178. package/dist/store/reducers/explainQuery/explainQuery.js +14 -4
  179. package/dist/store/reducers/explainQuery/types.d.ts +13 -1
  180. package/dist/store/reducers/explainQuery/utils.js +7 -2
  181. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +58 -58
  182. package/dist/store/reducers/heatmap.d.ts +2 -2
  183. package/dist/store/reducers/hotKeys/hotKeys.d.ts +2 -2
  184. package/dist/store/reducers/index.d.ts +6 -6
  185. package/dist/store/reducers/network/network.d.ts +2 -2
  186. package/dist/store/reducers/node/node.d.ts +3 -3
  187. package/dist/store/reducers/node/selectors.d.ts +1 -1
  188. package/dist/store/reducers/nodes/nodes.d.ts +3 -3
  189. package/dist/store/reducers/nodesList.d.ts +3 -3
  190. package/dist/store/reducers/overview/overview.d.ts +2 -2
  191. package/dist/store/reducers/partitions/partitions.d.ts +2 -2
  192. package/dist/store/reducers/pdisk/pdisk.d.ts +3 -3
  193. package/dist/store/reducers/preview.d.ts +2 -2
  194. package/dist/store/reducers/schema/schema.d.ts +3 -3
  195. package/dist/store/reducers/schema/schema.js +10 -3
  196. package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +2 -2
  197. package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +2 -2
  198. package/dist/store/reducers/storage/storage.d.ts +3 -3
  199. package/dist/store/reducers/tablet.d.ts +3 -3
  200. package/dist/store/reducers/tablets.d.ts +13 -13
  201. package/dist/store/reducers/tabletsFilters.d.ts +1 -1
  202. package/dist/store/reducers/tenant/tenant.d.ts +2 -2
  203. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +2 -2
  204. package/dist/store/reducers/tenantOverview/topNodes/topNodes.d.ts +2 -2
  205. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +2 -2
  206. package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.d.ts +2 -2
  207. package/dist/store/reducers/tenants/selectors.d.ts +31 -30
  208. package/dist/store/reducers/tenants/selectors.js +8 -2
  209. package/dist/store/reducers/tenants/tenants.d.ts +2 -2
  210. package/dist/store/reducers/topic.d.ts +44 -44
  211. package/dist/store/reducers/vdisk/vdisk.d.ts +2 -2
  212. package/dist/store/reducers/viewSchema/viewSchema.d.ts +2 -2
  213. package/dist/styles/mixins.scss +2 -0
  214. package/dist/types/api/capabilities.d.ts +7 -0
  215. package/dist/types/api/capabilities.js +1 -0
  216. package/dist/types/api/modifyDisk.d.ts +8 -0
  217. package/dist/types/api/modifyDisk.js +1 -0
  218. package/dist/types/api/query.d.ts +39 -3
  219. package/dist/types/api/query.js +9 -1
  220. package/dist/types/api/schema/shared.d.ts +8 -0
  221. package/dist/types/store/query.d.ts +7 -0
  222. package/dist/utils/__test__/prepareQueryExplain.test.d.ts +1 -0
  223. package/dist/utils/__test__/prepareQueryExplain.test.js +115 -0
  224. package/dist/utils/constants.d.ts +13 -4
  225. package/dist/utils/constants.js +15 -4
  226. package/dist/utils/dataFormatters/dataFormatters.d.ts +0 -1
  227. package/dist/utils/dataFormatters/dataFormatters.js +1 -4
  228. package/dist/utils/hooks/index.d.ts +2 -1
  229. package/dist/utils/hooks/index.js +2 -1
  230. package/dist/utils/hooks/useChangedQuerySettings.d.ts +10 -0
  231. package/dist/utils/hooks/useChangedQuerySettings.js +46 -0
  232. package/dist/utils/hooks/useDelayed.d.ts +1 -0
  233. package/dist/utils/hooks/useDelayed.js +13 -0
  234. package/dist/utils/hooks/useEventHandler.d.ts +6 -0
  235. package/dist/utils/hooks/useEventHandler.js +17 -0
  236. package/dist/utils/hooks/useLastQueryExecutionSettings.d.ts +2 -0
  237. package/dist/utils/hooks/useLastQueryExecutionSettings.js +5 -0
  238. package/dist/utils/hooks/useQueryExecutionSettings.d.ts +8 -0
  239. package/dist/utils/hooks/useQueryExecutionSettings.js +15 -0
  240. package/dist/utils/prepareQueryExplain.d.ts +3 -1
  241. package/dist/utils/prepareQueryExplain.js +54 -2
  242. package/dist/utils/query.js +1 -0
  243. package/dist/utils/query.test.js +3 -0
  244. package/dist/utils/utils.d.ts +8 -7
  245. package/dist/utils/utils.js +23 -11
  246. package/package.json +4 -2
  247. package/dist/containers/Tenant/Query/ExplainResult/utils.d.ts +0 -2
  248. package/dist/containers/Tenant/Query/ExplainResult/utils.js +0 -4
  249. package/dist/store/utils.d.ts +0 -23
  250. package/dist/store/utils.js +0 -49
  251. package/dist/types/api/restartPDisk.d.ts +0 -4
  252. package/dist/utils/hooks/useQueryModes.d.ts +0 -2
  253. package/dist/utils/hooks/useQueryModes.js +0 -5
  254. /package/dist/{types/api/restartPDisk.js → containers/Tenant/Query/ExplainResult/components/SimplifiedPlan/types.js} +0 -0
@@ -2,37 +2,34 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { Dialog, Link as ExternalLink, Flex, TextInput } from '@gravity-ui/uikit';
4
4
  import { Controller, useForm } from 'react-hook-form';
5
+ import { ENABLE_TRACING_LEVEL_KEY } from '../../../../lib';
5
6
  import { selectQueryAction, setQueryAction, } from '../../../../store/reducers/queryActions/queryActions';
6
7
  import { cn } from '../../../../utils/cn';
7
- import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
8
- import { ISOLATION_LEVELS, QUERY_MODES, STATISTICS_MODES, TRACING_LEVELS, } from '../../../../utils/query';
8
+ import { useQueryExecutionSettings, useSetting, useTypedDispatch, useTypedSelector, } from '../../../../utils/hooks';
9
9
  import { QuerySettingsSelect } from './QuerySettingsSelect';
10
- import { ISOLATION_LEVEL_SELECT_OPTIONS, QUERY_MODE_SELECT_OPTIONS, STATISTICS_MODE_SELECT_OPTIONS, TRACING_LEVEL_SELECT_OPTIONS, } from './constants';
10
+ import { QUERY_SETTINGS_FIELD_SETTINGS } from './constants';
11
11
  import i18n from './i18n';
12
12
  import './QuerySettingsDialog.scss';
13
13
  const b = cn('ydb-query-settings-dialog');
14
14
  export function QuerySettingsDialog() {
15
15
  const dispatch = useTypedDispatch();
16
16
  const queryAction = useTypedSelector(selectQueryAction);
17
- const { control, handleSubmit, reset } = useForm({
18
- defaultValues: {
19
- queryMode: QUERY_MODES.script,
20
- timeout: '60',
21
- isolationLevel: ISOLATION_LEVELS.serializable,
22
- statisticsMode: STATISTICS_MODES.none,
23
- tracingLevel: TRACING_LEVELS.detailed,
24
- },
25
- });
26
- const onCloseDialog = () => {
17
+ const [querySettings, setQuerySettings] = useQueryExecutionSettings();
18
+ const onClose = React.useCallback(() => {
27
19
  dispatch(setQueryAction('idle'));
28
- reset();
29
- };
30
- const onSaveClick = (data) => {
31
- console.log('Form Data:', data);
32
- // dispatch(saveQuerySettings(data));
33
- onCloseDialog();
34
- };
35
- return (_jsxs(Dialog, { open: queryAction === 'settings', size: "s", onClose: onCloseDialog, className: b(), hasCloseButton: false, children: [_jsx(Dialog.Header, { caption: i18n('action.settings') }), _jsxs("form", { onSubmit: handleSubmit(onSaveClick), children: [_jsxs(Dialog.Body, { className: b('dialog-body'), children: [_jsxs(Flex, { direction: "row", alignItems: "flex-start", className: b('dialog-row'), children: [_jsx("label", { htmlFor: "queryMode", className: b('field-title'), children: i18n('form.query-mode') }), _jsx("div", { className: b('control-wrapper'), children: _jsx(Controller, { name: "queryMode", control: control, render: ({ field }) => (_jsx(QuerySettingsSelect, { setting: field.value, onUpdateSetting: field.onChange, settingOptions: QUERY_MODE_SELECT_OPTIONS })) }) })] }), _jsxs(Flex, { direction: "row", alignItems: "flex-start", className: b('dialog-row'), children: [_jsx("label", { htmlFor: "timeout", className: b('field-title'), children: i18n('form.timeout') }), _jsx("div", { className: b('control-wrapper'), children: _jsx(Controller, { name: "timeout", control: control, render: ({ field }) => (_jsxs(React.Fragment, { children: [_jsx(TextInput, { type: "number", ...field, className: b('timeout'), placeholder: "60" }), _jsx("span", { className: b('timeout-suffix'), children: i18n('form.timeout.seconds') })] })) }) })] }), _jsxs(Flex, { direction: "row", alignItems: "flex-start", className: b('dialog-row'), children: [_jsx("label", { htmlFor: "tracingLevel", className: b('field-title'), children: i18n('form.tracing-level') }), _jsx("div", { className: b('control-wrapper'), children: _jsx(Controller, { name: "tracingLevel", control: control, render: ({ field }) => (_jsx(QuerySettingsSelect, { setting: field.value, onUpdateSetting: field.onChange, settingOptions: TRACING_LEVEL_SELECT_OPTIONS })) }) })] }), _jsxs(Flex, { direction: "row", alignItems: "flex-start", className: b('dialog-row'), children: [_jsx("label", { htmlFor: "isolationLevel", className: b('field-title'), children: i18n('form.isolation-level') }), _jsx("div", { className: b('control-wrapper'), children: _jsx(Controller, { name: "isolationLevel", control: control, render: ({ field }) => (_jsx(QuerySettingsSelect, { setting: field.value, onUpdateSetting: field.onChange, settingOptions: ISOLATION_LEVEL_SELECT_OPTIONS })) }) })] }), _jsxs(Flex, { direction: "row", alignItems: "flex-start", className: b('dialog-row'), children: [_jsx("label", { htmlFor: "statisticsMode", className: b('field-title'), children: i18n('form.statistics-mode') }), _jsx("div", { className: b('control-wrapper'), children: _jsx(Controller, { name: "statisticsMode", control: control, render: ({ field }) => (_jsx(QuerySettingsSelect, { setting: field.value, onUpdateSetting: field.onChange, settingOptions: STATISTICS_MODE_SELECT_OPTIONS })) }) })] })] }), _jsx(Dialog.Footer, { textButtonApply: i18n('button-done'), textButtonCancel: i18n('button-cancel'), onClickButtonCancel: onCloseDialog, propsButtonApply: {
36
- type: 'submit',
37
- }, renderButtons: (buttonApply, buttonCancel) => (_jsxs("div", { className: b('buttons-container'), children: [_jsx(ExternalLink, { href: "https://ydb.tech/docs/ru/concepts/transactions", target: "_blank", className: b('documentation-link'), children: i18n('docs') }), _jsxs("div", { className: b('main-buttons'), children: [buttonCancel, buttonApply] })] })) })] })] }));
20
+ }, [dispatch]);
21
+ const onSubmit = React.useCallback((data) => {
22
+ setQuerySettings(data);
23
+ onClose();
24
+ }, [onClose, setQuerySettings]);
25
+ return (_jsxs(Dialog, { open: queryAction === 'settings', size: "s", onClose: onClose, className: b(), hasCloseButton: false, children: [_jsx(Dialog.Header, { caption: i18n('action.settings') }), _jsx(QuerySettingsForm, { initialValues: querySettings, onSubmit: onSubmit, onClose: onClose })] }));
26
+ }
27
+ function QuerySettingsForm({ initialValues, onSubmit, onClose }) {
28
+ const { control, handleSubmit } = useForm({
29
+ defaultValues: initialValues,
30
+ });
31
+ const [enableTracingLevel] = useSetting(ENABLE_TRACING_LEVEL_KEY);
32
+ return (_jsxs("form", { onSubmit: handleSubmit(onSubmit), children: [_jsxs(Dialog.Body, { className: b('dialog-body'), children: [_jsxs(Flex, { direction: "row", alignItems: "flex-start", className: b('dialog-row'), children: [_jsx("label", { htmlFor: "queryMode", className: b('field-title'), children: QUERY_SETTINGS_FIELD_SETTINGS.queryMode.title }), _jsx("div", { className: b('control-wrapper', { queryMode: true }), children: _jsx(Controller, { name: "queryMode", control: control, render: ({ field }) => (_jsx(QuerySettingsSelect, { setting: field.value, onUpdateSetting: field.onChange, settingOptions: QUERY_SETTINGS_FIELD_SETTINGS.queryMode.options })) }) })] }), _jsxs(Flex, { direction: "row", alignItems: "flex-start", className: b('dialog-row'), children: [_jsx("label", { htmlFor: "timeout", className: b('field-title'), children: QUERY_SETTINGS_FIELD_SETTINGS.timeout.title }), _jsx("div", { className: b('control-wrapper'), children: _jsx(Controller, { name: "timeout", control: control, render: ({ field }) => (_jsxs(React.Fragment, { children: [_jsx(TextInput, { type: "number", ...field, className: b('timeout'), placeholder: "60" }), _jsx("span", { className: b('timeout-suffix'), children: i18n('form.timeout.seconds') })] })) }) })] }), enableTracingLevel && (_jsxs(Flex, { direction: "row", alignItems: "flex-start", className: b('dialog-row'), children: [_jsx("label", { htmlFor: "tracingLevel", className: b('field-title'), children: QUERY_SETTINGS_FIELD_SETTINGS.tracingLevel.title }), _jsx("div", { className: b('control-wrapper'), children: _jsx(Controller, { name: "tracingLevel", control: control, render: ({ field }) => (_jsx(QuerySettingsSelect, { setting: field.value, onUpdateSetting: field.onChange, settingOptions: QUERY_SETTINGS_FIELD_SETTINGS.tracingLevel.options })) }) })] })), _jsxs(Flex, { direction: "row", alignItems: "flex-start", className: b('dialog-row'), children: [_jsx("label", { htmlFor: "isolationLevel", className: b('field-title'), children: QUERY_SETTINGS_FIELD_SETTINGS.isolationLevel.title }), _jsx("div", { className: b('control-wrapper', { isolationLevel: true }), children: _jsx(Controller, { name: "isolationLevel", control: control, render: ({ field }) => (_jsx(QuerySettingsSelect, { setting: field.value, onUpdateSetting: field.onChange, settingOptions: QUERY_SETTINGS_FIELD_SETTINGS.isolationLevel.options })) }) })] }), _jsxs(Flex, { direction: "row", alignItems: "flex-start", className: b('dialog-row'), children: [_jsx("label", { htmlFor: "statisticsMode", className: b('field-title'), children: QUERY_SETTINGS_FIELD_SETTINGS.statisticsMode.title }), _jsx("div", { className: b('control-wrapper'), children: _jsx(Controller, { name: "statisticsMode", control: control, render: ({ field }) => (_jsx(QuerySettingsSelect, { setting: field.value, onUpdateSetting: field.onChange, settingOptions: QUERY_SETTINGS_FIELD_SETTINGS.statisticsMode.options })) }) })] })] }), _jsx(Dialog.Footer, { textButtonApply: i18n('button-done'), textButtonCancel: i18n('button-cancel'), onClickButtonCancel: onClose, propsButtonApply: {
33
+ type: 'submit',
34
+ }, renderButtons: (buttonApply, buttonCancel) => (_jsxs("div", { className: b('buttons-container'), children: [_jsx(ExternalLink, { href: "https://ydb.tech/docs", target: "_blank", className: b('documentation-link'), children: i18n('docs') }), _jsxs("div", { className: b('main-buttons'), children: [buttonCancel, buttonApply] })] })) })] }));
38
35
  }
@@ -67,27 +67,27 @@ export declare const STATISTICS_MODE_SELECT_OPTIONS: ({
67
67
  isDefault?: undefined;
68
68
  })[];
69
69
  export declare const TRACING_LEVEL_SELECT_OPTIONS: ({
70
- value: "basic";
70
+ value: "off";
71
71
  content: string;
72
72
  text: string;
73
73
  isDefault?: undefined;
74
74
  } | {
75
- value: "detailed";
75
+ value: "toplevel";
76
76
  content: string;
77
77
  text: string;
78
- isDefault: boolean;
78
+ isDefault?: undefined;
79
79
  } | {
80
- value: "diagnostic";
80
+ value: "basic";
81
81
  content: string;
82
82
  text: string;
83
83
  isDefault?: undefined;
84
84
  } | {
85
- value: "off";
85
+ value: "detailed";
86
86
  content: string;
87
87
  text: string;
88
- isDefault?: undefined;
88
+ isDefault: boolean;
89
89
  } | {
90
- value: "toplevel";
90
+ value: "diagnostic";
91
91
  content: string;
92
92
  text: string;
93
93
  isDefault?: undefined;
@@ -97,3 +97,119 @@ export declare const TRACING_LEVEL_SELECT_OPTIONS: ({
97
97
  text: string;
98
98
  isDefault?: undefined;
99
99
  })[];
100
+ export declare const QUERY_SETTINGS_FIELD_SETTINGS: {
101
+ readonly isolationLevel: {
102
+ readonly title: string;
103
+ readonly options: ({
104
+ value: "serializable-read-write";
105
+ content: string;
106
+ text: string;
107
+ isDefault: boolean;
108
+ } | {
109
+ value: "online-read-only";
110
+ content: string;
111
+ text: string;
112
+ isDefault?: undefined;
113
+ } | {
114
+ value: "stale-read-only";
115
+ content: string;
116
+ text: string;
117
+ isDefault?: undefined;
118
+ } | {
119
+ value: "snapshot-read-only";
120
+ content: string;
121
+ text: string;
122
+ isDefault?: undefined;
123
+ })[];
124
+ };
125
+ readonly queryMode: {
126
+ readonly title: string;
127
+ readonly options: ({
128
+ value: "script";
129
+ content: string;
130
+ text: string;
131
+ isDefault: boolean;
132
+ } | {
133
+ value: "scan";
134
+ content: string;
135
+ text: string;
136
+ isDefault?: undefined;
137
+ } | {
138
+ value: "data";
139
+ content: string;
140
+ text: string;
141
+ isDefault?: undefined;
142
+ } | {
143
+ value: "query";
144
+ content: string;
145
+ text: string;
146
+ isDefault?: undefined;
147
+ } | {
148
+ value: "pg";
149
+ content: string;
150
+ text: string;
151
+ isDefault?: undefined;
152
+ })[];
153
+ };
154
+ readonly statisticsMode: {
155
+ readonly title: string;
156
+ readonly options: ({
157
+ value: "none";
158
+ content: string;
159
+ text: string;
160
+ isDefault: boolean;
161
+ } | {
162
+ value: "basic";
163
+ content: string;
164
+ text: string;
165
+ isDefault?: undefined;
166
+ } | {
167
+ value: "full";
168
+ content: string;
169
+ text: string;
170
+ isDefault?: undefined;
171
+ } | {
172
+ value: "profile";
173
+ content: string;
174
+ text: string;
175
+ isDefault?: undefined;
176
+ })[];
177
+ };
178
+ readonly tracingLevel: {
179
+ readonly title: string;
180
+ readonly options: ({
181
+ value: "off";
182
+ content: string;
183
+ text: string;
184
+ isDefault?: undefined;
185
+ } | {
186
+ value: "toplevel";
187
+ content: string;
188
+ text: string;
189
+ isDefault?: undefined;
190
+ } | {
191
+ value: "basic";
192
+ content: string;
193
+ text: string;
194
+ isDefault?: undefined;
195
+ } | {
196
+ value: "detailed";
197
+ content: string;
198
+ text: string;
199
+ isDefault: boolean;
200
+ } | {
201
+ value: "diagnostic";
202
+ content: string;
203
+ text: string;
204
+ isDefault?: undefined;
205
+ } | {
206
+ value: "trace";
207
+ content: string;
208
+ text: string;
209
+ isDefault?: undefined;
210
+ })[];
211
+ };
212
+ readonly timeout: {
213
+ readonly title: string;
214
+ };
215
+ };
@@ -1,5 +1,6 @@
1
1
  import { ISOLATION_LEVELS, ISOLATION_LEVELS_TITLES, QUERY_MODES, QUERY_MODES_TITLES, STATISTICS_MODES, STATISTICS_MODES_TITLES, TRACING_LEVELS, TRACING_LEVELS_TITLES, } from '../../../../utils/query';
2
2
  import i18n from '../i18n';
3
+ import formI18n from './i18n';
3
4
  export const ISOLATION_LEVEL_SELECT_OPTIONS = [
4
5
  {
5
6
  value: ISOLATION_LEVELS.serializable,
@@ -75,6 +76,16 @@ export const STATISTICS_MODE_SELECT_OPTIONS = [
75
76
  },
76
77
  ];
77
78
  export const TRACING_LEVEL_SELECT_OPTIONS = [
79
+ {
80
+ value: TRACING_LEVELS.off,
81
+ content: TRACING_LEVELS_TITLES[TRACING_LEVELS.off],
82
+ text: i18n('tracing-level-description.off'),
83
+ },
84
+ {
85
+ value: TRACING_LEVELS.toplevel,
86
+ content: TRACING_LEVELS_TITLES[TRACING_LEVELS.toplevel],
87
+ text: i18n('tracing-level-description.toplevel'),
88
+ },
78
89
  {
79
90
  value: TRACING_LEVELS.basic,
80
91
  content: TRACING_LEVELS_TITLES[TRACING_LEVELS.basic],
@@ -91,19 +102,30 @@ export const TRACING_LEVEL_SELECT_OPTIONS = [
91
102
  content: TRACING_LEVELS_TITLES[TRACING_LEVELS.diagnostic],
92
103
  text: i18n('tracing-level-description.diagnostic'),
93
104
  },
94
- {
95
- value: TRACING_LEVELS.off,
96
- content: TRACING_LEVELS_TITLES[TRACING_LEVELS.off],
97
- text: i18n('tracing-level-description.off'),
98
- },
99
- {
100
- value: TRACING_LEVELS.toplevel,
101
- content: TRACING_LEVELS_TITLES[TRACING_LEVELS.toplevel],
102
- text: i18n('tracing-level-description.toplevel'),
103
- },
104
105
  {
105
106
  value: TRACING_LEVELS.trace,
106
107
  content: TRACING_LEVELS_TITLES[TRACING_LEVELS.trace],
107
108
  text: i18n('tracing-level-description.trace'),
108
109
  },
109
110
  ];
111
+ export const QUERY_SETTINGS_FIELD_SETTINGS = {
112
+ isolationLevel: {
113
+ title: formI18n('form.isolation-level'),
114
+ options: ISOLATION_LEVEL_SELECT_OPTIONS,
115
+ },
116
+ queryMode: {
117
+ title: formI18n('form.query-mode'),
118
+ options: QUERY_MODE_SELECT_OPTIONS,
119
+ },
120
+ statisticsMode: {
121
+ title: formI18n('form.statistics-mode'),
122
+ options: STATISTICS_MODE_SELECT_OPTIONS,
123
+ },
124
+ tracingLevel: {
125
+ title: formI18n('form.tracing-level'),
126
+ options: TRACING_LEVEL_SELECT_OPTIONS,
127
+ },
128
+ timeout: {
129
+ title: formI18n('form.timeout'),
130
+ },
131
+ };
@@ -36,5 +36,7 @@
36
36
  "action.send-selected-query": "Send selected query",
37
37
  "action.previous-query": "Previous query in history",
38
38
  "action.next-query": "Next query in history",
39
- "action.save-query": "Save query"
39
+ "action.save-query": "Save query",
40
+ "gear.tooltip": "Query execution settings have been changed for ",
41
+ "banner.query-settings.message": "Query results are displayed for "
40
42
  }
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "controls.query-mode-selector_type" | "tabs.newQuery" | "tabs.history" | "tabs.saved" | "history.empty" | "saved.empty" | "delete-dialog.header" | "delete-dialog.question" | "delete-dialog.delete" | "delete-dialog.cancel" | "preview.title" | "preview.not-available" | "preview.close" | "method-description.script" | "method-description.scan" | "method-description.data" | "method-description.query" | "method-description.pg" | "isolation-level-description.serializable" | "isolation-level-description.onlinero" | "isolation-level-description.stalero" | "isolation-level-description.snapshot" | "tracing-level-description.basic" | "tracing-level-description.detailed" | "tracing-level-description.diagnostic" | "tracing-level-description.off" | "tracing-level-description.toplevel" | "tracing-level-description.trace" | "statistics-mode-description.none" | "statistics-mode-description.basic" | "statistics-mode-description.full" | "statistics-mode-description.profile" | "query-duration.description" | "action.send-query" | "action.send-selected-query" | "action.previous-query" | "action.next-query" | "action.save-query", params?: import("@gravity-ui/i18n").Params) => string;
1
+ declare const _default: (key: "controls.query-mode-selector_type" | "tabs.newQuery" | "tabs.history" | "tabs.saved" | "history.empty" | "saved.empty" | "delete-dialog.header" | "delete-dialog.question" | "delete-dialog.delete" | "delete-dialog.cancel" | "preview.title" | "preview.not-available" | "preview.close" | "method-description.script" | "method-description.scan" | "method-description.data" | "method-description.query" | "method-description.pg" | "isolation-level-description.serializable" | "isolation-level-description.onlinero" | "isolation-level-description.stalero" | "isolation-level-description.snapshot" | "tracing-level-description.basic" | "tracing-level-description.detailed" | "tracing-level-description.diagnostic" | "tracing-level-description.off" | "tracing-level-description.toplevel" | "tracing-level-description.trace" | "statistics-mode-description.none" | "statistics-mode-description.basic" | "statistics-mode-description.full" | "statistics-mode-description.profile" | "query-duration.description" | "action.send-query" | "action.send-selected-query" | "action.previous-query" | "action.next-query" | "action.save-query" | "gear.tooltip" | "banner.query-settings.message", params?: import("@gravity-ui/i18n").Params) => string;
2
2
  export default _default;
@@ -4,18 +4,18 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  // In this case we can store state of tree - uploaded entities, opened nodes, selected entity and so on
5
5
  import React from 'react';
6
6
  import { NavigationTree } from 'ydb-ui-components';
7
- import { USE_DIRECTORY_OPERATIONS } from '../../../../lib';
7
+ import { useCreateDirectoryFeatureAvailable } from '../../../../store/reducers/capabilities/hooks';
8
8
  import { schemaApi } from '../../../../store/reducers/schema/schema';
9
- import { useQueryModes, useSetting, useTypedDispatch } from '../../../../utils/hooks';
9
+ import { useQueryExecutionSettings, useTypedDispatch } from '../../../../utils/hooks';
10
10
  import { isChildlessPathType, mapPathTypeToNavigationTreeType } from '../../utils/schema';
11
11
  import { getActions } from '../../utils/schemaActions';
12
12
  import { getControls } from '../../utils/schemaControls';
13
13
  import { CreateDirectoryDialog } from '../CreateDirectoryDialog/CreateDirectoryDialog';
14
14
  export function SchemaTree(props) {
15
- const [useDirectoryActions] = useSetting(USE_DIRECTORY_OPERATIONS);
15
+ const createDirectoryFeatureAvailable = useCreateDirectoryFeatureAvailable();
16
16
  const { rootPath, rootName, rootType, currentPath, onActivePathUpdate } = props;
17
17
  const dispatch = useTypedDispatch();
18
- const [_, setQueryMode] = useQueryModes();
18
+ const [querySettings, setQueryExecutionSettings] = useQueryExecutionSettings();
19
19
  const [createDirectoryOpen, setCreateDirectoryOpen] = React.useState(false);
20
20
  const [parentPath, setParentPath] = React.useState('');
21
21
  const [schemaTreeKey, setSchemaTreeKey] = React.useState('');
@@ -74,8 +74,8 @@ export function SchemaTree(props) {
74
74
  collapsed: false,
75
75
  }, fetchPath: fetchPath, getActions: getActions(dispatch, {
76
76
  setActivePath: onActivePathUpdate,
77
- setQueryMode,
78
- showCreateDirectoryDialog: useDirectoryActions
77
+ updateQueryExecutionSettings: (settings) => setQueryExecutionSettings({ ...querySettings, ...settings }),
78
+ showCreateDirectoryDialog: createDirectoryFeatureAvailable
79
79
  ? handleOpenCreateDirectoryDialog
80
80
  : undefined,
81
81
  }), renderAdditionalNodeElements: getControls(dispatch, {
@@ -25,6 +25,9 @@ export const SchemaViewer = ({ type, path, tenantName, extended = false }) => {
25
25
  const hasAutoIncrement = React.useMemo(() => {
26
26
  return tableData.some((i) => i.autoIncrement);
27
27
  }, [tableData]);
28
+ const hasDefaultValue = React.useMemo(() => {
29
+ return tableData.some((i) => i.defaultValue);
30
+ }, [tableData]);
28
31
  const columns = React.useMemo(() => {
29
32
  if (isViewType(type)) {
30
33
  return getViewColumns();
@@ -36,10 +39,10 @@ export const SchemaViewer = ({ type, path, tenantName, extended = false }) => {
36
39
  return getColumnTableColumns();
37
40
  }
38
41
  if (isRowTableType(type)) {
39
- return getRowTableColumns(extended, hasAutoIncrement);
42
+ return getRowTableColumns(extended, hasAutoIncrement, hasDefaultValue);
40
43
  }
41
44
  return [];
42
- }, [type, extended, hasAutoIncrement]);
45
+ }, [type, extended, hasAutoIncrement, hasDefaultValue]);
43
46
  const renderContent = () => {
44
47
  if (loading || isViewSchemaLoading) {
45
48
  return _jsx(TableSkeleton, {});
@@ -7,6 +7,7 @@ export declare const SCHEMA_TABLE_COLUMS_IDS: {
7
7
  type: "type";
8
8
  notNull: "notNull";
9
9
  autoIncrement: "autoIncrement";
10
+ defaultValue: "defaultValue";
10
11
  familyName: "familyName";
11
12
  prefferedPoolKind: "prefferedPoolKind";
12
13
  columnCodec: "columnCodec";
@@ -14,4 +15,4 @@ export declare const SCHEMA_TABLE_COLUMS_IDS: {
14
15
  export declare function getViewColumns(): SchemaColumn[];
15
16
  export declare function getExternalTableColumns(): SchemaColumn[];
16
17
  export declare function getColumnTableColumns(): SchemaColumn[];
17
- export declare function getRowTableColumns(extended: boolean, hasAutoIncrement: boolean): SchemaColumn[];
18
+ export declare function getRowTableColumns(extended: boolean, hasAutoIncrement: boolean, hasDefaultValue: boolean): SchemaColumn[];
@@ -12,6 +12,7 @@ export const SCHEMA_TABLE_COLUMS_IDS = {
12
12
  type: 'type',
13
13
  notNull: 'notNull',
14
14
  autoIncrement: 'autoIncrement',
15
+ defaultValue: 'defaultValue',
15
16
  familyName: 'familyName',
16
17
  prefferedPoolKind: 'prefferedPoolKind',
17
18
  columnCodec: 'columnCodec',
@@ -84,6 +85,14 @@ const autoIncrementColumn = {
84
85
  return undefined;
85
86
  },
86
87
  };
88
+ const defaultValueColumn = {
89
+ name: SCHEMA_TABLE_COLUMS_IDS.defaultValue,
90
+ get header() {
91
+ return i18n('column-title.defaultValue');
92
+ },
93
+ width: 100,
94
+ render: ({ row }) => row.defaultValue,
95
+ };
87
96
  const familyColumn = {
88
97
  name: SCHEMA_TABLE_COLUMS_IDS.familyName,
89
98
  get header() {
@@ -117,8 +126,11 @@ export function getExternalTableColumns() {
117
126
  export function getColumnTableColumns() {
118
127
  return [idColumn, keyColumn, nameColumn, typeColumn, notNullColumn];
119
128
  }
120
- export function getRowTableColumns(extended, hasAutoIncrement) {
129
+ export function getRowTableColumns(extended, hasAutoIncrement, hasDefaultValue) {
121
130
  const rowTableColumns = [idColumn, keyColumn, nameColumn, typeColumn, notNullColumn];
131
+ if (hasDefaultValue) {
132
+ rowTableColumns.push(defaultValueColumn);
133
+ }
122
134
  if (extended) {
123
135
  rowTableColumns.push(familyColumn, mediaColumn, compressionColumn);
124
136
  }
@@ -5,6 +5,7 @@
5
5
  "column-title.type": "Type",
6
6
  "column-title.notNull": "NotNull",
7
7
  "column-title.autoIncrement": "AutoIncrement",
8
+ "column-title.defaultValue": "Default",
8
9
  "column-title.family": "Family",
9
10
  "column-title.media": "Media",
10
11
  "column-title.compression": "Compression"
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "column-title.id" | "column-title.name" | "column-title.key" | "column-title.type" | "column-title.notNull" | "column-title.autoIncrement" | "column-title.family" | "column-title.media" | "column-title.compression", params?: import("@gravity-ui/i18n").Params) => string;
1
+ declare const _default: (key: "column-title.id" | "column-title.name" | "column-title.key" | "column-title.type" | "column-title.notNull" | "column-title.autoIncrement" | "column-title.defaultValue" | "column-title.family" | "column-title.media" | "column-title.compression", params?: import("@gravity-ui/i18n").Params) => string;
2
2
  export default _default;
@@ -36,8 +36,8 @@ function prepareRowTableSchema(data = {}) {
36
36
  const { Columns, KeyColumnIds } = data;
37
37
  const keyAccessorsMap = getKeyColumnsSortAccessorMap(KeyColumnIds);
38
38
  const preparedColumns = Columns === null || Columns === void 0 ? void 0 : Columns.map((column) => {
39
- var _a, _b;
40
- const { Id, Name, NotNull, Type, Family, DefaultFromSequence } = column;
39
+ var _a, _b, _c;
40
+ const { Id, Name, NotNull, Type, Family, DefaultFromSequence, DefaultFromLiteral } = column;
41
41
  const isKeyColumn = Boolean(KeyColumnIds === null || KeyColumnIds === void 0 ? void 0 : KeyColumnIds.find((keyColumnId) => keyColumnId === Id));
42
42
  // Values in keyAccessorsMap are always negative, so it will be 1 for not key columns
43
43
  const keyAccessor = Id && keyAccessorsMap[Id] ? keyAccessorsMap[Id] : 1;
@@ -54,6 +54,7 @@ function prepareRowTableSchema(data = {}) {
54
54
  type: Type,
55
55
  notNull: NotNull,
56
56
  autoIncrement: Boolean(DefaultFromSequence),
57
+ defaultValue: (_c = DefaultFromLiteral === null || DefaultFromLiteral === void 0 ? void 0 : DefaultFromLiteral.value) === null || _c === void 0 ? void 0 : _c.text_value,
57
58
  familyName,
58
59
  prefferedPoolKind,
59
60
  columnCodec,
@@ -11,6 +11,7 @@ export interface SchemaData {
11
11
  familyName?: string;
12
12
  prefferedPoolKind?: string;
13
13
  columnCodec?: string;
14
+ defaultValue?: string;
14
15
  }
15
16
  export interface SchemaColumn extends Column<SchemaData> {
16
17
  name: keyof SchemaData;
@@ -2,8 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { Helmet } from 'react-helmet-async';
4
4
  import { StringParam, useQueryParams } from 'use-query-params';
5
- import { AccessDenied } from '../../components/Errors/403';
6
- import { Loader } from '../../components/Loader';
5
+ import { PageError, isAccessError } from '../../components/Errors/PageError/PageError';
7
6
  import SplitPane from '../../components/SplitPane';
8
7
  import { setHeaderBreadcrumbs } from '../../store/reducers/header/header';
9
8
  import { useGetSchemaQuery } from '../../store/reducers/schema/schema';
@@ -47,12 +46,9 @@ export function Tenant(props) {
47
46
  dispatch(setHeaderBreadcrumbs('tenant', { tenantName }));
48
47
  }, [tenantName, dispatch]);
49
48
  const path = schema !== null && schema !== void 0 ? schema : tenantName;
50
- const { data: currentItem, error, isLoading } = useGetSchemaQuery({ path, database: tenantName });
49
+ const { data: currentItem, error } = useGetSchemaQuery({ path, database: tenantName });
51
50
  const { PathType: currentPathType, PathSubType: currentPathSubType } = ((_a = currentItem === null || currentItem === void 0 ? void 0 : currentItem.PathDescription) === null || _a === void 0 ? void 0 : _a.Self) || {};
52
- let showBlockingError = false;
53
- if (error && typeof error === 'object' && 'status' in error) {
54
- showBlockingError = error.status === 403;
55
- }
51
+ const showBlockingError = isAccessError(error);
56
52
  const onCollapseSummaryHandler = () => {
57
53
  dispatchSummaryVisibilityAction(PaneVisibilityActionTypes.triggerCollapse);
58
54
  };
@@ -63,5 +59,5 @@ export function Tenant(props) {
63
59
  dispatchSummaryVisibilityAction(PaneVisibilityActionTypes.clear);
64
60
  };
65
61
  const title = path || i18n('page.title');
66
- return (_jsxs("div", { className: b(), children: [_jsx(Helmet, { defaultTitle: `${title} — YDB Monitoring`, titleTemplate: `%s — ${title} — YDB Monitoring` }), showBlockingError ? (_jsx(AccessDenied, {})) : (_jsxs(SplitPane, { defaultSizePaneKey: DEFAULT_SIZE_TENANT_KEY, defaultSizes: [25, 75], triggerCollapse: summaryVisibilityState.triggerCollapse, triggerExpand: summaryVisibilityState.triggerExpand, minSize: [36, 200], onSplitStartDragAdditional: onSplitStartDragAdditional, children: [_jsx(ObjectSummary, { type: currentPathType, subType: currentPathSubType, tenantName: tenantName, path: path, onCollapseSummary: onCollapseSummaryHandler, onExpandSummary: onExpandSummaryHandler, isCollapsed: summaryVisibilityState.collapsed }), _jsx("div", { className: b('main'), children: isLoading ? (_jsx(Loader, { size: "l" })) : (_jsx(ObjectGeneral, { type: currentPathType, additionalTenantProps: props.additionalTenantProps, additionalNodesProps: props.additionalNodesProps, tenantName: tenantName, path: path })) })] }))] }));
62
+ return (_jsxs("div", { className: b(), children: [_jsx(Helmet, { defaultTitle: `${title} — YDB Monitoring`, titleTemplate: `%s — ${title} — YDB Monitoring` }), _jsx(PageError, { error: showBlockingError ? error : undefined, children: _jsxs(SplitPane, { defaultSizePaneKey: DEFAULT_SIZE_TENANT_KEY, defaultSizes: [25, 75], triggerCollapse: summaryVisibilityState.triggerCollapse, triggerExpand: summaryVisibilityState.triggerExpand, minSize: [36, 200], onSplitStartDragAdditional: onSplitStartDragAdditional, children: [_jsx(ObjectSummary, { type: currentPathType, subType: currentPathSubType, tenantName: tenantName, path: path, onCollapseSummary: onCollapseSummaryHandler, onExpandSummary: onExpandSummaryHandler, isCollapsed: summaryVisibilityState.collapsed }), _jsx("div", { className: b('main'), children: _jsx(ObjectGeneral, { type: currentPathType, additionalTenantProps: props.additionalTenantProps, additionalNodesProps: props.additionalNodesProps, tenantName: tenantName, path: path }) })] }) })] }));
67
63
  }
@@ -1,7 +1,7 @@
1
1
  import type { NavigationTreeNodeType } from 'ydb-ui-components';
2
- import type { QueryMode } from '../../../types/store/query';
2
+ import type { QuerySettings } from '../../../types/store/query';
3
3
  interface ActionsAdditionalEffects {
4
- setQueryMode: (mode: QueryMode) => void;
4
+ updateQueryExecutionSettings: (settings?: Partial<QuerySettings>) => void;
5
5
  setActivePath: (path: string) => void;
6
6
  showCreateDirectoryDialog?: (path: string) => void;
7
7
  }
@@ -6,10 +6,10 @@ import createToast from '../../../utils/createToast';
6
6
  import i18n from '../i18n';
7
7
  import { alterAsyncReplicationTemplate, alterTableTemplate, alterTopicTemplate, createAsyncReplicationTemplate, createColumnTableTemplate, createExternalTableTemplate, createTableTemplate, createTopicTemplate, createViewTemplate, dropAsyncReplicationTemplate, dropExternalTableTemplate, dropTopicTemplate, dropViewTemplate, selectQueryTemplate, upsertQueryTemplate, } from './queryTemplates';
8
8
  const bindActions = (path, dispatch, additionalEffects) => {
9
- const { setActivePath, setQueryMode, showCreateDirectoryDialog } = additionalEffects;
9
+ const { setActivePath, updateQueryExecutionSettings, showCreateDirectoryDialog } = additionalEffects;
10
10
  const inputQuery = (tmpl, mode) => () => {
11
11
  if (mode) {
12
- setQueryMode(mode);
12
+ updateQueryExecutionSettings({ queryMode: mode });
13
13
  }
14
14
  dispatch(changeUserInput({ input: tmpl(path) }));
15
15
  dispatch(setTenantPage(TENANT_PAGES_IDS.query));
@@ -18,7 +18,7 @@ import { selectFilteredTenants, selectTenantsSearchValue, } from '../../store/re
18
18
  import { setSearchValue, tenantsApi } from '../../store/reducers/tenants/tenants';
19
19
  import { cn } from '../../utils/cn';
20
20
  import { DEFAULT_TABLE_SETTINGS } from '../../utils/constants';
21
- import { formatBytesToGigabyte, formatCPU, formatNumber, } from '../../utils/dataFormatters/dataFormatters';
21
+ import { formatCPU, formatNumber, formatStorageValuesToGb, } from '../../utils/dataFormatters/dataFormatters';
22
22
  import { useAutoRefreshInterval, useTypedDispatch, useTypedSelector } from '../../utils/hooks';
23
23
  import { getTenantPath } from '../Tenant/TenantPages';
24
24
  import './Tenants.scss';
@@ -110,7 +110,7 @@ export const Tenants = ({ additionalTenantsProps }) => {
110
110
  name: 'memory',
111
111
  header: 'Memory',
112
112
  width: 120,
113
- render: ({ row }) => (row.memory ? formatBytesToGigabyte(row.memory) : '—'),
113
+ render: ({ row }) => (row.memory ? formatStorageValuesToGb(row.memory) : '—'),
114
114
  align: DataTable.RIGHT,
115
115
  defaultOrder: DataTable.DESCENDING,
116
116
  },
@@ -118,7 +118,7 @@ export const Tenants = ({ additionalTenantsProps }) => {
118
118
  name: 'storage',
119
119
  header: 'Storage',
120
120
  width: 120,
121
- render: ({ row }) => (row.storage ? formatBytesToGigabyte(row.storage) : '—'),
121
+ render: ({ row }) => (row.storage ? formatStorageValuesToGb(row.storage) : '—'),
122
122
  align: DataTable.RIGHT,
123
123
  defaultOrder: DataTable.DESCENDING,
124
124
  },
@@ -165,8 +165,5 @@ export const Tenants = ({ additionalTenantsProps }) => {
165
165
  }
166
166
  return (_jsx(ResizeableDataTable, { columnsWidthLSKey: DATABASES_COLUMNS_WIDTH_LS_KEY, data: filteredTenants, columns: columns, settings: DEFAULT_TABLE_SETTINGS, emptyDataMessage: "No such tenants" }));
167
167
  };
168
- if (error) {
169
- return _jsx(ResponseError, { error: error });
170
- }
171
- return (_jsxs(TableWithControlsLayout, { children: [_jsx(TableWithControlsLayout.Controls, { children: renderControls() }), _jsx(TableWithControlsLayout.Table, { loading: loading, children: renderTable() })] }));
168
+ return (_jsxs(TableWithControlsLayout, { children: [_jsx(TableWithControlsLayout.Controls, { children: renderControls() }), error ? _jsx(ResponseError, { error: error }) : null, _jsx(TableWithControlsLayout.Table, { loading: loading, children: currentData ? renderTable() : null })] }));
172
169
  };
@@ -25,13 +25,11 @@
25
25
  "settings.useNodesEndpoint.description": "Use /viewer/json/nodes endpoint for Nodes tab in diagnostics. It could return incorrect data on versions before 24-1",
26
26
  "settings.usePaginatedTables.title": "Use paginated tables",
27
27
  "settings.usePaginatedTables.description": " Use table with data load on scroll for Nodes and Storage tabs. It will increase performance, but could work unstable",
28
- "settings.useQuerySettings.title": "Use query settings",
29
- "settings.useQuerySettings.description": "Use query settings",
28
+ "settings.showDomainDatabase.title": "Show domain database",
29
+ "settings.enableTracingLevel.title": "Enable tracing level select",
30
+ "settings.enableTracingLevel.description": "Caution: Enabling this setting may break running of queries",
30
31
  "settings.queryUseMultiSchema.title": "Allow queries with multiple result sets",
31
32
  "settings.queryUseMultiSchema.description": "Use 'multi' schema for queries. It enables queries with multiple result sets. It returns nothing on versions 23-3 and older",
32
- "settings.useSeparateDisksPages.title": "Use separate PDisk and VDisk pages",
33
- "settings.useSeparateDisksPages.description": "Use separate pages instead of node structure tab",
34
- "settings.useDirectoryOperations.title": "Enable operations with directories",
35
33
  "settings.useClusterBalancerAsBackend.title": "Use cluster balancer as backend",
36
34
  "settings.useClusterBalancerAsBackend.description": "By default random cluster node is used as backend. It causes saved links to become invalid after some time, when node is restarted. Using balancer as backend fixes it",
37
35
  "settings.about.interfaceVersionInfoField.title": "Interface version"
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "page.general" | "section.appearance" | "page.experiments" | "section.experiments" | "page.editor" | "section.dev-setting" | "page.about" | "section.about" | "settings.editor.autocomplete.title" | "settings.editor.autocomplete.description" | "settings.editor.autocomplete-on-enter.title" | "settings.editor.autocomplete-on-enter.description" | "settings.theme.title" | "settings.theme.option-dark" | "settings.theme.option-light" | "settings.theme.option-system" | "settings.language.title" | "settings.language.option-russian" | "settings.language.option-english" | "settings.binaryDataInPlainTextDisplay.title" | "settings.binaryDataInPlainTextDisplay.description" | "settings.invertedDisks.title" | "settings.useNodesEndpoint.title" | "settings.useNodesEndpoint.description" | "settings.usePaginatedTables.title" | "settings.usePaginatedTables.description" | "settings.useQuerySettings.title" | "settings.useQuerySettings.description" | "settings.queryUseMultiSchema.title" | "settings.queryUseMultiSchema.description" | "settings.useSeparateDisksPages.title" | "settings.useSeparateDisksPages.description" | "settings.useDirectoryOperations.title" | "settings.useClusterBalancerAsBackend.title" | "settings.useClusterBalancerAsBackend.description" | "settings.about.interfaceVersionInfoField.title", params?: import("@gravity-ui/i18n").Params) => string;
1
+ declare const _default: (key: "page.general" | "section.appearance" | "page.experiments" | "section.experiments" | "page.editor" | "section.dev-setting" | "page.about" | "section.about" | "settings.editor.autocomplete.title" | "settings.editor.autocomplete.description" | "settings.editor.autocomplete-on-enter.title" | "settings.editor.autocomplete-on-enter.description" | "settings.theme.title" | "settings.theme.option-dark" | "settings.theme.option-light" | "settings.theme.option-system" | "settings.language.title" | "settings.language.option-russian" | "settings.language.option-english" | "settings.binaryDataInPlainTextDisplay.title" | "settings.binaryDataInPlainTextDisplay.description" | "settings.invertedDisks.title" | "settings.useNodesEndpoint.title" | "settings.useNodesEndpoint.description" | "settings.usePaginatedTables.title" | "settings.usePaginatedTables.description" | "settings.showDomainDatabase.title" | "settings.enableTracingLevel.title" | "settings.enableTracingLevel.description" | "settings.queryUseMultiSchema.title" | "settings.queryUseMultiSchema.description" | "settings.useClusterBalancerAsBackend.title" | "settings.useClusterBalancerAsBackend.description" | "settings.about.interfaceVersionInfoField.title", params?: import("@gravity-ui/i18n").Params) => string;
2
2
  export default _default;
@@ -18,10 +18,9 @@ export declare const binaryDataInPlainTextDisplay: SettingProps;
18
18
  export declare const invertedDisksSetting: SettingProps;
19
19
  export declare const useNodesEndpointSetting: SettingProps;
20
20
  export declare const usePaginatedTables: SettingProps;
21
- export declare const useQuerySettings: SettingProps;
21
+ export declare const showDomainDatabase: SettingProps;
22
+ export declare const enableTracingLevel: SettingProps;
22
23
  export declare const queryUseMultiSchemaSetting: SettingProps;
23
- export declare const useSeparateDisksPagesSetting: SettingProps;
24
- export declare const useDirectoryActionsSetting: SettingProps;
25
24
  export declare const useClusterBalancerAsBackendSetting: SettingProps;
26
25
  export declare const enableAutocompleteSetting: SettingProps;
27
26
  export declare const autocompleteOnEnterSetting: SettingProps;