ydb-embedded-ui 6.9.2 → 6.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. package/README.md +7 -10
  2. package/dist/components/NodeHostWrapper/NodeHostWrapper.scss +1 -1
  3. package/dist/components/{VirtualTable/VirtualTable.d.ts → PaginatedTable/PaginatedTable.d.ts} +3 -3
  4. package/dist/components/{VirtualTable/VirtualTable.js → PaginatedTable/PaginatedTable.js} +4 -4
  5. package/dist/components/{VirtualTable/VirtualTable.scss → PaginatedTable/PaginatedTable.scss} +11 -11
  6. package/dist/components/PaginatedTable/ResizeablePaginatedTable.d.ts +6 -0
  7. package/dist/components/{VirtualTable/ResizeableVirtualTable.js → PaginatedTable/ResizeablePaginatedTable.js} +3 -3
  8. package/dist/components/{VirtualTable → PaginatedTable}/i18n/index.js +1 -1
  9. package/dist/components/PaginatedTable/index.d.ts +4 -0
  10. package/dist/components/PaginatedTable/index.js +4 -0
  11. package/dist/components/{VirtualTable → PaginatedTable}/reducer.d.ts +3 -3
  12. package/dist/components/{VirtualTable → PaginatedTable}/reducer.js +1 -1
  13. package/dist/components/PaginatedTable/shared.js +2 -0
  14. package/dist/components/{VirtualTable → PaginatedTable}/types.d.ts +2 -2
  15. package/dist/components/TableWithControlsLayout/TableWithControlsLayout.scss +1 -1
  16. package/dist/components/VDisk/VDisk.js +19 -6
  17. package/dist/containers/App/App.d.ts +1 -1
  18. package/dist/containers/App/App.js +2 -2
  19. package/dist/containers/App/App.scss +1 -1
  20. package/dist/containers/AppWithClusters/AppWithClusters.js +1 -10
  21. package/dist/containers/AsideNavigation/Navigation.d.ts +1 -1
  22. package/dist/containers/Heatmap/Histogram/Histogram.js +3 -3
  23. package/dist/containers/Heatmap/util.js +2 -1
  24. package/dist/containers/Nodes/NodesWrapper.js +5 -5
  25. package/dist/containers/Nodes/{VirtualNodes.d.ts → PaginatedNodes.d.ts} +1 -1
  26. package/dist/containers/Nodes/{VirtualNodes.js → PaginatedNodes.js} +3 -3
  27. package/dist/containers/Nodes/getNodesColumns.d.ts +2 -2
  28. package/dist/containers/Storage/PDisk/PDisk.js +10 -2
  29. package/dist/containers/Storage/{VirtualStorage.d.ts → PaginatedStorage.d.ts} +2 -2
  30. package/dist/containers/Storage/{VirtualStorage.js → PaginatedStorage.js} +5 -5
  31. package/dist/containers/Storage/Storage.js +3 -12
  32. package/dist/containers/Storage/StorageGroups/{VirtualStorageGroups.d.ts → PaginatedStorageGroups.d.ts} +3 -3
  33. package/dist/containers/Storage/StorageGroups/{VirtualStorageGroups.js → PaginatedStorageGroups.js} +3 -3
  34. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.d.ts +2 -2
  35. package/dist/containers/Storage/StorageNodes/{VirtualStorageNodes.d.ts → PaginatedStorageNodes.d.ts} +3 -3
  36. package/dist/containers/Storage/StorageNodes/{VirtualStorageNodes.js → PaginatedStorageNodes.js} +3 -3
  37. package/dist/containers/Storage/StorageWrapper.js +5 -5
  38. package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +1 -1
  39. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.scss +0 -5
  40. package/dist/containers/Tenant/Query/Query.js +2 -8
  41. package/dist/containers/Tenant/Query/Query.scss +1 -1
  42. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +2 -0
  43. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +23 -36
  44. package/dist/containers/Tenant/Query/QueryEditor/keybindings.d.ts +9 -0
  45. package/dist/containers/Tenant/Query/QueryEditor/keybindings.js +13 -0
  46. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.d.ts +1 -3
  47. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +3 -3
  48. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.d.ts +7 -6
  49. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js +55 -47
  50. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.scss +2 -32
  51. package/dist/containers/Tenant/Query/SaveQuery/i18n/en.json +13 -0
  52. package/dist/containers/Tenant/Query/SaveQuery/i18n/index.d.ts +2 -0
  53. package/dist/containers/Tenant/Query/SaveQuery/i18n/index.js +4 -0
  54. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.d.ts +1 -4
  55. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +5 -3
  56. package/dist/containers/Tenant/Query/i18n/en.json +2 -1
  57. package/dist/containers/Tenant/Query/i18n/index.d.ts +1 -1
  58. package/dist/containers/Tenant/Query/utils/useSavedQueries.d.ts +2 -0
  59. package/dist/containers/Tenant/Query/utils/useSavedQueries.js +5 -0
  60. package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js +6 -2
  61. package/dist/containers/Tenant/utils/schemaActions.d.ts +1 -1
  62. package/dist/containers/Tenant/utils/schemaActions.js +10 -4
  63. package/dist/containers/UserSettings/UserSettings.d.ts +1 -1
  64. package/dist/containers/UserSettings/UserSettings.js +1 -2
  65. package/dist/containers/UserSettings/i18n/en.json +9 -4
  66. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  67. package/dist/containers/UserSettings/settings.d.ts +7 -2
  68. package/dist/containers/UserSettings/settings.js +38 -14
  69. package/dist/containers/Versions/NodesTreeTitle/NodesTreeTitle.scss +1 -2
  70. package/dist/lib.d.ts +1 -1
  71. package/dist/lib.js +1 -1
  72. package/dist/services/settings.d.ts +2 -0
  73. package/dist/services/settings.js +4 -2
  74. package/dist/store/configureStore.d.ts +4 -14
  75. package/dist/store/defaultStore.d.ts +2 -7
  76. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +20 -20
  77. package/dist/store/reducers/index.d.ts +3 -13
  78. package/dist/store/reducers/index.js +2 -2
  79. package/dist/store/reducers/node/selectors.d.ts +1 -1
  80. package/dist/store/reducers/nodesList.d.ts +1 -1
  81. package/dist/store/reducers/queryActions/queryActions.d.ts +34 -0
  82. package/dist/store/reducers/queryActions/queryActions.js +58 -0
  83. package/dist/store/reducers/queryActions/types.d.ts +5 -0
  84. package/dist/store/reducers/queryActions/types.js +1 -0
  85. package/dist/store/reducers/storage/storage.js +1 -1
  86. package/dist/store/reducers/tablets.d.ts +5 -5
  87. package/dist/store/reducers/tabletsFilters.d.ts +1 -1
  88. package/dist/store/reducers/tenants/selectors.d.ts +9 -9
  89. package/dist/store/reducers/topic.d.ts +15 -15
  90. package/dist/styles/mixins.scss +8 -0
  91. package/dist/utils/constants.d.ts +3 -1
  92. package/dist/utils/constants.js +5 -2
  93. package/dist/utils/disks/prepareDisks.js +4 -2
  94. package/dist/utils/hooks/index.d.ts +0 -2
  95. package/dist/utils/hooks/index.js +0 -2
  96. package/package.json +1 -1
  97. package/dist/components/VirtualTable/ResizeableVirtualTable.d.ts +0 -6
  98. package/dist/components/VirtualTable/index.d.ts +0 -3
  99. package/dist/components/VirtualTable/index.js +0 -3
  100. package/dist/components/VirtualTable/shared.js +0 -2
  101. package/dist/containers/AppWithClusters/i18n/en.json +0 -4
  102. package/dist/containers/AppWithClusters/i18n/index.d.ts +0 -2
  103. package/dist/containers/AppWithClusters/i18n/index.js +0 -5
  104. package/dist/containers/AppWithClusters/i18n/ru.json +0 -4
  105. package/dist/store/reducers/saveQuery.d.ts +0 -12
  106. package/dist/store/reducers/saveQuery.js +0 -25
  107. package/dist/utils/hooks/useNodesRequestParams.d.ts +0 -15
  108. package/dist/utils/hooks/useNodesRequestParams.js +0 -23
  109. package/dist/utils/hooks/useStorageRequestParams.d.ts +0 -8
  110. package/dist/utils/hooks/useStorageRequestParams.js +0 -20
  111. /package/dist/components/{VirtualTable → PaginatedTable}/ResizeHandler.d.ts +0 -0
  112. /package/dist/components/{VirtualTable → PaginatedTable}/ResizeHandler.js +0 -0
  113. /package/dist/components/{VirtualTable → PaginatedTable}/TableChunk.d.ts +0 -0
  114. /package/dist/components/{VirtualTable → PaginatedTable}/TableChunk.js +0 -0
  115. /package/dist/components/{VirtualTable → PaginatedTable}/TableHead.d.ts +0 -0
  116. /package/dist/components/{VirtualTable → PaginatedTable}/TableHead.js +0 -0
  117. /package/dist/components/{VirtualTable → PaginatedTable}/TableRow.d.ts +0 -0
  118. /package/dist/components/{VirtualTable → PaginatedTable}/TableRow.js +0 -0
  119. /package/dist/components/{VirtualTable → PaginatedTable}/constants.d.ts +0 -0
  120. /package/dist/components/{VirtualTable → PaginatedTable}/constants.js +0 -0
  121. /package/dist/components/{VirtualTable → PaginatedTable}/i18n/en.json +0 -0
  122. /package/dist/components/{VirtualTable → PaginatedTable}/i18n/index.d.ts +0 -0
  123. /package/dist/components/{VirtualTable → PaginatedTable}/i18n/ru.json +0 -0
  124. /package/dist/components/{VirtualTable → PaginatedTable}/shared.d.ts +0 -0
  125. /package/dist/components/{VirtualTable → PaginatedTable}/types.js +0 -0
  126. /package/dist/components/{VirtualTable → PaginatedTable}/useIntersectionObserver.d.ts +0 -0
  127. /package/dist/components/{VirtualTable → PaginatedTable}/useIntersectionObserver.js +0 -0
  128. /package/dist/components/{VirtualTable → PaginatedTable}/utils.d.ts +0 -0
  129. /package/dist/components/{VirtualTable → PaginatedTable}/utils.js +0 -0
@@ -5,20 +5,22 @@ import DataTable from '@gravity-ui/react-data-table';
5
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
- import { setQueryNameToEdit } from '../../../../store/reducers/saveQuery';
8
+ import { deleteSavedQuery, setQueryNameToEdit, } from '../../../../store/reducers/queryActions/queryActions';
9
9
  import { TENANT_QUERY_TABS_ID } from '../../../../store/reducers/tenant/constants';
10
10
  import { setQueryTab } from '../../../../store/reducers/tenant/tenant';
11
11
  import { cn } from '../../../../utils/cn';
12
12
  import { useTypedDispatch } from '../../../../utils/hooks';
13
13
  import { MAX_QUERY_HEIGHT, QUERY_TABLE_SETTINGS } from '../../utils/constants';
14
14
  import i18n from '../i18n';
15
+ import { useSavedQueries } from '../utils/useSavedQueries';
15
16
  import './SavedQueries.scss';
16
17
  const b = cn('ydb-saved-queries');
17
18
  const DeleteDialog = ({ visible, queryName, onCancelClick, onConfirmClick }) => {
18
19
  return (_jsxs(Dialog, { open: visible, hasCloseButton: false, size: "s", onClose: onCancelClick, onEnterKeyDown: onConfirmClick, children: [_jsx(Dialog.Header, { caption: i18n('delete-dialog.header') }), _jsxs(Dialog.Body, { className: b('dialog-body'), children: [i18n('delete-dialog.question'), _jsx("span", { className: b('dialog-query-name'), children: ` ${queryName}?` })] }), _jsx(Dialog.Footer, { textButtonApply: i18n('delete-dialog.delete'), textButtonCancel: i18n('delete-dialog.cancel'), onClickButtonCancel: onCancelClick, onClickButtonApply: onConfirmClick })] }));
19
20
  };
20
21
  const SAVED_QUERIES_COLUMNS_WIDTH_LS_KEY = 'savedQueriesTableColumnsWidth';
21
- export const SavedQueries = ({ savedQueries, changeUserInput, onDeleteQuery }) => {
22
+ export const SavedQueries = ({ changeUserInput }) => {
23
+ const savedQueries = useSavedQueries();
22
24
  const dispatch = useTypedDispatch();
23
25
  const [isDeleteDialogVisible, setIsDeleteDialogVisible] = React.useState(false);
24
26
  const [queryNameToDelete, setQueryNameToDelete] = React.useState('');
@@ -31,7 +33,7 @@ export const SavedQueries = ({ savedQueries, changeUserInput, onDeleteQuery }) =
31
33
  };
32
34
  const onConfirmDeleteClick = () => {
33
35
  closeDeleteDialog();
34
- onDeleteQuery(queryNameToDelete);
36
+ dispatch(deleteSavedQuery(queryNameToDelete));
35
37
  setQueryNameToDelete('');
36
38
  };
37
39
  const onQueryClick = (queryText, queryName) => {
@@ -21,5 +21,6 @@
21
21
  "action.send-query": "Send query",
22
22
  "action.send-selected-query": "Send selected query",
23
23
  "action.previous-query": "Previous query in history",
24
- "action.next-query": "Next query in history"
24
+ "action.next-query": "Next query in history",
25
+ "action.save-query": "Save query"
25
26
  }
@@ -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" | "query-duration.description" | "action.send-query" | "action.send-selected-query" | "action.previous-query" | "action.next-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" | "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;
2
2
  export default _default;
@@ -0,0 +1,2 @@
1
+ import type { SavedQuery } from '../../../../types/store/query';
2
+ export declare function useSavedQueries(): SavedQuery[];
@@ -0,0 +1,5 @@
1
+ import { SAVED_QUERIES_KEY, useSetting } from '../../../../lib';
2
+ export function useSavedQueries() {
3
+ const [savedQueries] = useSetting(SAVED_QUERIES_KEY, []);
4
+ return savedQueries;
5
+ }
@@ -4,13 +4,15 @@ 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
8
  import { schemaApi } from '../../../../store/reducers/schema/schema';
8
- import { useQueryModes, useTypedDispatch } from '../../../../utils/hooks';
9
+ import { useQueryModes, useSetting, useTypedDispatch } from '../../../../utils/hooks';
9
10
  import { isChildlessPathType, mapPathTypeToNavigationTreeType } from '../../utils/schema';
10
11
  import { getActions } from '../../utils/schemaActions';
11
12
  import { getControls } from '../../utils/schemaControls';
12
13
  import { CreateDirectoryDialog } from '../CreateDirectoryDialog/CreateDirectoryDialog';
13
14
  export function SchemaTree(props) {
15
+ const [useDirectoryActions] = useSetting(USE_DIRECTORY_OPERATIONS);
14
16
  const { rootPath, rootName, rootType, currentPath, onActivePathUpdate } = props;
15
17
  const dispatch = useTypedDispatch();
16
18
  const [_, setQueryMode] = useQueryModes();
@@ -63,7 +65,9 @@ export function SchemaTree(props) {
63
65
  }, fetchPath: fetchPath, getActions: getActions(dispatch, {
64
66
  setActivePath: onActivePathUpdate,
65
67
  setQueryMode,
66
- showCreateDirectoryDialog: handleOpenCreateDirectoryDialog,
68
+ showCreateDirectoryDialog: useDirectoryActions
69
+ ? handleOpenCreateDirectoryDialog
70
+ : undefined,
67
71
  }), renderAdditionalNodeElements: getControls(dispatch, {
68
72
  setActivePath: onActivePathUpdate,
69
73
  }), activePath: currentPath, onActivePathUpdate: onActivePathUpdate, cache: false, virtualize: true }, schemaTreeKey)] }));
@@ -3,7 +3,7 @@ import type { QueryMode } from '../../../types/store/query';
3
3
  interface ActionsAdditionalEffects {
4
4
  setQueryMode: (mode: QueryMode) => void;
5
5
  setActivePath: (path: string) => void;
6
- showCreateDirectoryDialog: (path: string) => void;
6
+ showCreateDirectoryDialog?: (path: string) => void;
7
7
  }
8
8
  export declare const getActions: (dispatch: React.Dispatch<any>, additionalEffects: ActionsAdditionalEffects) => (path: string, type: NavigationTreeNodeType) => import("@gravity-ui/uikit").DropdownMenuItemMixed<any>[];
9
9
  export {};
@@ -17,9 +17,11 @@ const bindActions = (path, dispatch, additionalEffects) => {
17
17
  setActivePath(path);
18
18
  };
19
19
  return {
20
- createDirectory: () => {
21
- showCreateDirectoryDialog(path);
22
- },
20
+ createDirectory: showCreateDirectoryDialog
21
+ ? () => {
22
+ showCreateDirectoryDialog(path);
23
+ }
24
+ : undefined,
23
25
  createTable: inputQuery(createTableTemplate, 'script'),
24
26
  createColumnTable: inputQuery(createColumnTableTemplate, 'script'),
25
27
  createAsyncReplication: inputQuery(createAsyncReplicationTemplate, 'script'),
@@ -60,7 +62,6 @@ export const getActions = (dispatch, additionalEffects) => (path, type) => {
60
62
  const copyItem = { text: i18n('actions.copyPath'), action: actions.copyPath };
61
63
  const DIR_SET = [
62
64
  [copyItem],
63
- [{ text: i18n('actions.createDirectory'), action: actions.createDirectory }],
64
65
  [
65
66
  { text: i18n('actions.createTable'), action: actions.createTable },
66
67
  { text: i18n('actions.createColumnTable'), action: actions.createColumnTable },
@@ -72,6 +73,11 @@ export const getActions = (dispatch, additionalEffects) => (path, type) => {
72
73
  { text: i18n('actions.createView'), action: actions.createView },
73
74
  ],
74
75
  ];
76
+ if (actions.createDirectory) {
77
+ DIR_SET.splice(1, 0, [
78
+ { text: i18n('actions.createDirectory'), action: actions.createDirectory },
79
+ ]);
80
+ }
75
81
  const TABLE_SET = [
76
82
  [copyItem],
77
83
  [
@@ -1,6 +1,6 @@
1
1
  import type { YDBEmbeddedUISettings } from './settings';
2
2
  interface UserSettingsProps {
3
- settings?: YDBEmbeddedUISettings;
3
+ settings: YDBEmbeddedUISettings;
4
4
  }
5
5
  export declare const UserSettings: ({ settings: userSettings }: UserSettingsProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,8 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Settings } from '@gravity-ui/navigation';
3
3
  import { Setting } from './Setting';
4
- import { settings } from './settings';
5
- export const UserSettings = ({ settings: userSettings = settings }) => {
4
+ export const UserSettings = ({ settings: userSettings }) => {
6
5
  return (_jsx(Settings, { children: userSettings.map((page) => {
7
6
  const { id, title, icon, sections = [] } = page;
8
7
  return (_jsx(Settings.Page, { id: id, title: title, icon: icon, children: sections.map((section) => {
@@ -22,10 +22,15 @@
22
22
  "settings.binaryDataInPlainTextDisplay.description": "Available starting from version 24.1",
23
23
  "settings.invertedDisks.title": "Inverted disks space indicators",
24
24
  "settings.useNodesEndpoint.title": "Break the Nodes tab in Diagnostics",
25
- "settings.useNodesEndpoint.popover": "Use /viewer/json/nodes endpoint for Nodes tab in diagnostics. It could return incorrect data on versions before 24-1",
26
- "settings.useVirtualTables.title": "Use table with data load on scroll for Nodes and Storage tabs",
27
- "settings.useVirtualTables.popover": "It will increase performance, but could work unstable",
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
+ "settings.usePaginatedTables.title": "Use paginated tables",
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
28
  "settings.queryUseMultiSchema.title": "Allow queries with multiple result sets",
29
- "settings.queryUseMultiSchema.popover": "Use 'multi' schema for queries. It enables queries with multiple result sets. It returns nothing on versions 23-3 and older",
29
+ "settings.queryUseMultiSchema.description": "Use 'multi' schema for queries. It enables queries with multiple result sets. It returns nothing on versions 23-3 and older",
30
+ "settings.useSeparateDisksPages.title": "Use separate PDisk and VDisk pages",
31
+ "settings.useSeparateDisksPages.description": "Use separate pages instead of node structure tab",
32
+ "settings.useDirectoryOperations.title": "Enable operations with directories",
33
+ "settings.useClusterBalancerAsBackend.title": "Use cluster balancer as backend",
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",
30
35
  "settings.about.interfaceVersionInfoField.title": "Interface version"
31
36
  }
@@ -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.popover" | "settings.useVirtualTables.title" | "settings.useVirtualTables.popover" | "settings.queryUseMultiSchema.title" | "settings.queryUseMultiSchema.popover" | "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.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;
2
2
  export default _default;
@@ -17,8 +17,11 @@ export declare const languageSetting: SettingProps;
17
17
  export declare const binaryDataInPlainTextDisplay: SettingProps;
18
18
  export declare const invertedDisksSetting: SettingProps;
19
19
  export declare const useNodesEndpointSetting: SettingProps;
20
- export declare const useVirtualTables: SettingProps;
20
+ export declare const usePaginatedTables: SettingProps;
21
21
  export declare const queryUseMultiSchemaSetting: SettingProps;
22
+ export declare const useSeparateDisksPagesSetting: SettingProps;
23
+ export declare const useDirectoryActionsSetting: SettingProps;
24
+ export declare const useClusterBalancerAsBackendSetting: SettingProps;
22
25
  export declare const enableAutocompleteSetting: SettingProps;
23
26
  export declare const autocompleteOnEnterSetting: SettingProps;
24
27
  export declare const interfaceVersionInfoField: SettingsInfoFieldProps;
@@ -30,4 +33,6 @@ export declare const generalPage: SettingsPage;
30
33
  export declare const experimentsPage: SettingsPage;
31
34
  export declare const editorPage: SettingsPage;
32
35
  export declare const aboutPage: SettingsPage;
33
- export declare const settings: YDBEmbeddedUISettings;
36
+ export declare function getUserSettings({ singleClusterMode }: {
37
+ singleClusterMode: boolean;
38
+ }): YDBEmbeddedUISettings;
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { CircleInfo, Flask, PencilToSquare, StarFill } from '@gravity-ui/icons';
3
- import { AUTOCOMPLETE_ON_ENTER, BINARY_DATA_IN_PLAIN_TEXT_DISPLAY, ENABLE_AUTOCOMPLETE, INVERTED_DISKS_KEY, LANGUAGE_KEY, QUERY_USE_MULTI_SCHEMA_KEY, THEME_KEY, USE_BACKEND_PARAMS_FOR_TABLES_KEY, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY, } from '../../utils/constants';
3
+ import { createNextState } from '@reduxjs/toolkit';
4
+ import { AUTOCOMPLETE_ON_ENTER, BINARY_DATA_IN_PLAIN_TEXT_DISPLAY, ENABLE_AUTOCOMPLETE, INVERTED_DISKS_KEY, LANGUAGE_KEY, QUERY_USE_MULTI_SCHEMA_KEY, THEME_KEY, USE_CLUSTER_BALANCER_AS_BACKEND_KEY, USE_DIRECTORY_OPERATIONS, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY, USE_PAGINATED_TABLES_KEY, USE_SEPARATE_DISKS_PAGES_KEY, } from '../../utils/constants';
4
5
  import { Lang, defaultLang } from '../../utils/i18n';
5
6
  import { ClusterModeGuard } from '../ClusterModeGuard';
6
7
  import i18n from './i18n';
@@ -57,17 +58,31 @@ export const invertedDisksSetting = {
57
58
  export const useNodesEndpointSetting = {
58
59
  settingKey: USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY,
59
60
  title: i18n('settings.useNodesEndpoint.title'),
60
- description: i18n('settings.useNodesEndpoint.popover'),
61
+ description: i18n('settings.useNodesEndpoint.description'),
61
62
  };
62
- export const useVirtualTables = {
63
- settingKey: USE_BACKEND_PARAMS_FOR_TABLES_KEY,
64
- title: i18n('settings.useVirtualTables.title'),
65
- description: i18n('settings.useVirtualTables.popover'),
63
+ export const usePaginatedTables = {
64
+ settingKey: USE_PAGINATED_TABLES_KEY,
65
+ title: i18n('settings.usePaginatedTables.title'),
66
+ description: i18n('settings.usePaginatedTables.description'),
66
67
  };
67
68
  export const queryUseMultiSchemaSetting = {
68
69
  settingKey: QUERY_USE_MULTI_SCHEMA_KEY,
69
70
  title: i18n('settings.queryUseMultiSchema.title'),
70
- description: i18n('settings.queryUseMultiSchema.popover'),
71
+ description: i18n('settings.queryUseMultiSchema.description'),
72
+ };
73
+ export const useSeparateDisksPagesSetting = {
74
+ settingKey: USE_SEPARATE_DISKS_PAGES_KEY,
75
+ title: i18n('settings.useSeparateDisksPages.title'),
76
+ description: i18n('settings.useSeparateDisksPages.description'),
77
+ };
78
+ export const useDirectoryActionsSetting = {
79
+ settingKey: USE_DIRECTORY_OPERATIONS,
80
+ title: i18n('settings.useDirectoryOperations.title'),
81
+ };
82
+ export const useClusterBalancerAsBackendSetting = {
83
+ settingKey: USE_CLUSTER_BALANCER_AS_BACKEND_KEY,
84
+ title: i18n('settings.useClusterBalancerAsBackend.title'),
85
+ description: i18n('settings.useClusterBalancerAsBackend.description'),
71
86
  };
72
87
  export const enableAutocompleteSetting = {
73
88
  settingKey: ENABLE_AUTOCOMPLETE,
@@ -92,7 +107,13 @@ export const appearanceSection = {
92
107
  export const experimentsSection = {
93
108
  id: 'experimentsSection',
94
109
  title: i18n('section.experiments'),
95
- settings: [useNodesEndpointSetting, useVirtualTables, queryUseMultiSchemaSetting],
110
+ settings: [
111
+ useNodesEndpointSetting,
112
+ usePaginatedTables,
113
+ queryUseMultiSchemaSetting,
114
+ useSeparateDisksPagesSetting,
115
+ useDirectoryActionsSetting,
116
+ ],
96
117
  };
97
118
  export const devSettingsSection = {
98
119
  id: 'devSettingsSection',
@@ -128,9 +149,12 @@ export const aboutPage = {
128
149
  icon: { data: CircleInfo },
129
150
  sections: [aboutSettingsSection],
130
151
  };
131
- export const settings = [
132
- generalPage,
133
- editorPage,
134
- experimentsPage,
135
- aboutPage,
136
- ];
152
+ export function getUserSettings({ singleClusterMode }) {
153
+ const experiments = singleClusterMode
154
+ ? experimentsPage
155
+ : createNextState(experimentsPage, (draft) => {
156
+ draft.sections[0].settings.push(useClusterBalancerAsBackendSetting);
157
+ });
158
+ const settings = [generalPage, editorPage, experiments, aboutPage];
159
+ return settings;
160
+ }
@@ -61,10 +61,9 @@
61
61
  }
62
62
 
63
63
  &__clipboard-button {
64
- visibility: hidden;
65
-
66
64
  margin-left: 8px;
67
65
 
66
+ opacity: 0;
68
67
  color: var(--g-color-text-secondary);
69
68
  }
70
69
  }
package/dist/lib.d.ts CHANGED
@@ -5,7 +5,7 @@ export { configureStore, rootReducer } from './store';
5
5
  export { default as appRoutes } from './routes';
6
6
  export { createApi, YdbEmbeddedAPI, YdbWebVersionAPI } from './services/api';
7
7
  export { settingsManager } from './services/settings';
8
- export { settings as userSettings } from './containers/UserSettings/settings';
8
+ export { getUserSettings } from './containers/UserSettings/settings';
9
9
  export { setSettingValue, getSettingValue } from './store/reducers/settings/settings';
10
10
  export { componentsRegistry } from './components/ComponentsProvider/componentsRegistry';
11
11
  export { useSetting, useTypedSelector } from './utils/hooks';
package/dist/lib.js CHANGED
@@ -5,7 +5,7 @@ export { configureStore, rootReducer } from './store';
5
5
  export { default as appRoutes } from './routes';
6
6
  export { createApi, YdbEmbeddedAPI, YdbWebVersionAPI } from './services/api';
7
7
  export { settingsManager } from './services/settings';
8
- export { settings as userSettings } from './containers/UserSettings/settings';
8
+ export { getUserSettings } from './containers/UserSettings/settings';
9
9
  export { setSettingValue, getSettingValue } from './store/reducers/settings/settings';
10
10
  export { componentsRegistry } from './components/ComponentsProvider/componentsRegistry';
11
11
  export { useSetting, useTypedSelector } from './utils/hooks';
@@ -15,10 +15,12 @@ export declare const DEFAULT_USER_SETTINGS: {
15
15
  readonly partitionsHiddenColumns: readonly [];
16
16
  readonly useBackendParamsForTables: false;
17
17
  readonly useClusterBalancerAsBacked: true;
18
+ readonly useSeparateDisksPages: false;
18
19
  readonly enableAutocomplete: true;
19
20
  readonly autocompleteOnEnter: true;
20
21
  readonly isHotKeysHelpHidden: false;
21
22
  readonly "auto-refresh-interval": 0;
23
+ readonly useDirectoryOperations: false;
22
24
  };
23
25
  declare class SettingsManager {
24
26
  /**
@@ -1,5 +1,5 @@
1
1
  import { TENANT_PAGES_IDS } from '../store/reducers/tenant/constants';
2
- import { ASIDE_HEADER_COMPACT_KEY, AUTOCOMPLETE_ON_ENTER, AUTO_REFRESH_INTERVAL, BINARY_DATA_IN_PLAIN_TEXT_DISPLAY, ENABLE_AUTOCOMPLETE, INVERTED_DISKS_KEY, IS_HOTKEYS_HELP_HIDDEN_KEY, LANGUAGE_KEY, LAST_USED_QUERY_ACTION_KEY, PARTITIONS_HIDDEN_COLUMNS_KEY, QUERY_INITIAL_MODE_KEY, QUERY_USE_MULTI_SCHEMA_KEY, SAVED_QUERIES_KEY, TENANT_INITIAL_PAGE_KEY, THEME_KEY, USE_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, AUTO_REFRESH_INTERVAL, BINARY_DATA_IN_PLAIN_TEXT_DISPLAY, ENABLE_AUTOCOMPLETE, INVERTED_DISKS_KEY, IS_HOTKEYS_HELP_HIDDEN_KEY, LANGUAGE_KEY, LAST_USED_QUERY_ACTION_KEY, PARTITIONS_HIDDEN_COLUMNS_KEY, QUERY_INITIAL_MODE_KEY, QUERY_USE_MULTI_SCHEMA_KEY, SAVED_QUERIES_KEY, TENANT_INITIAL_PAGE_KEY, THEME_KEY, USE_CLUSTER_BALANCER_AS_BACKEND_KEY, USE_DIRECTORY_OPERATIONS, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY, USE_PAGINATED_TABLES_KEY, USE_SEPARATE_DISKS_PAGES_KEY, } from '../utils/constants';
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 */
@@ -16,12 +16,14 @@ export const DEFAULT_USER_SETTINGS = {
16
16
  [LAST_USED_QUERY_ACTION_KEY]: QUERY_ACTIONS.execute,
17
17
  [ASIDE_HEADER_COMPACT_KEY]: true,
18
18
  [PARTITIONS_HIDDEN_COLUMNS_KEY]: [],
19
- [USE_BACKEND_PARAMS_FOR_TABLES_KEY]: false,
19
+ [USE_PAGINATED_TABLES_KEY]: false,
20
20
  [USE_CLUSTER_BALANCER_AS_BACKEND_KEY]: true,
21
+ [USE_SEPARATE_DISKS_PAGES_KEY]: false,
21
22
  [ENABLE_AUTOCOMPLETE]: true,
22
23
  [AUTOCOMPLETE_ON_ENTER]: true,
23
24
  [IS_HOTKEYS_HELP_HIDDEN_KEY]: false,
24
25
  [AUTO_REFRESH_INTERVAL]: 0,
26
+ [USE_DIRECTORY_OPERATIONS]: false,
25
27
  };
26
28
  class SettingsManager {
27
29
  constructor() {
@@ -22,7 +22,7 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
22
22
  shardsWorkload: import("./reducers/shardsWorkload/types").ShardsWorkloadFilters;
23
23
  authentication: import("./reducers/authentication/types").AuthenticationState;
24
24
  header: import("./reducers/header/types").HeaderState;
25
- saveQuery: string | null;
25
+ queryActions: import("./reducers/queryActions/types").QueryActionsState;
26
26
  fullscreen: boolean;
27
27
  clusters: import("./reducers/clusters/types").ClustersFilters;
28
28
  }, UnknownAction | import("../types/store/tooltip").ITooltipAction | {
@@ -32,12 +32,7 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
32
32
  readonly type: "header/SET_HEADER_BREADCRUMBS";
33
33
  readonly page: import("./reducers/header/types").Page;
34
34
  readonly options: {} | import("./reducers/header/types").TabletsBreadcrumbsOptions | import("./reducers/header/types").TenantBreadcrumbsOptions | import("./reducers/header/types").ClusterBreadcrumbsOptions | import("./reducers/header/types").TabletBreadcrumbsOptions | import("./reducers/header/types").NodeBreadcrumbsOptions;
35
- } | ({
36
- readonly type: "SET_QUERY_NAME_TO_EDIT";
37
- readonly data: string;
38
35
  } | {
39
- readonly type: "CLEAR_QUERY_NAME_TO_EDIT";
40
- }) | {
41
36
  readonly type: "ENABLE_FULLSCREEN_MODE";
42
37
  } | {
43
38
  readonly type: "DISABLE_FULLSCREEN_MODE";
@@ -58,7 +53,7 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
58
53
  shardsWorkload: import("./reducers/shardsWorkload/types").ShardsWorkloadFilters | undefined;
59
54
  authentication: never;
60
55
  header: never;
61
- saveQuery: never;
56
+ queryActions: import("./reducers/queryActions/types").QueryActionsState | undefined;
62
57
  fullscreen: never;
63
58
  clusters: import("./reducers/clusters/types").ClustersFilters | undefined;
64
59
  }>> | undefined;
@@ -83,7 +78,7 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
83
78
  shardsWorkload: import("./reducers/shardsWorkload/types").ShardsWorkloadFilters;
84
79
  authentication: import("./reducers/authentication/types").AuthenticationState;
85
80
  header: import("./reducers/header/types").HeaderState;
86
- saveQuery: string | null;
81
+ queryActions: import("./reducers/queryActions/types").QueryActionsState;
87
82
  fullscreen: boolean;
88
83
  clusters: import("./reducers/clusters/types").ClustersFilters;
89
84
  }, UnknownAction | import("../types/store/tooltip").ITooltipAction | {
@@ -93,12 +88,7 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
93
88
  readonly type: "header/SET_HEADER_BREADCRUMBS";
94
89
  readonly page: import("./reducers/header/types").Page;
95
90
  readonly options: {} | import("./reducers/header/types").TabletsBreadcrumbsOptions | import("./reducers/header/types").TenantBreadcrumbsOptions | import("./reducers/header/types").ClusterBreadcrumbsOptions | import("./reducers/header/types").TabletBreadcrumbsOptions | import("./reducers/header/types").NodeBreadcrumbsOptions;
96
- } | ({
97
- readonly type: "SET_QUERY_NAME_TO_EDIT";
98
- readonly data: string;
99
91
  } | {
100
- readonly type: "CLEAR_QUERY_NAME_TO_EDIT";
101
- }) | {
102
92
  readonly type: "ENABLE_FULLSCREEN_MODE";
103
93
  } | {
104
94
  readonly type: "DISABLE_FULLSCREEN_MODE";
@@ -120,7 +110,7 @@ export declare function configureStore({ aRootReducer, singleClusterMode, api, }
120
110
  shardsWorkload: import("./reducers/shardsWorkload/types").ShardsWorkloadFilters;
121
111
  authentication: import("./reducers/authentication/types").AuthenticationState;
122
112
  header: import("./reducers/header/types").HeaderState;
123
- saveQuery: string | null;
113
+ queryActions: import("./reducers/queryActions/types").QueryActionsState;
124
114
  fullscreen: boolean;
125
115
  clusters: import("./reducers/clusters/types").ClustersFilters;
126
116
  }, undefined, UnknownAction>;
@@ -15,7 +15,7 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
15
15
  shardsWorkload: import("./reducers/shardsWorkload/types").ShardsWorkloadFilters;
16
16
  authentication: import("./reducers/authentication/types").AuthenticationState;
17
17
  header: import("./reducers/header/types").HeaderState;
18
- saveQuery: string | null;
18
+ queryActions: import("./reducers/queryActions/types").QueryActionsState;
19
19
  fullscreen: boolean;
20
20
  clusters: import("./reducers/clusters/types").ClustersFilters;
21
21
  }, import("redux").UnknownAction | import("../types/store/tooltip").ITooltipAction | {
@@ -25,12 +25,7 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
25
25
  readonly type: "header/SET_HEADER_BREADCRUMBS";
26
26
  readonly page: import("./reducers/header/types").Page;
27
27
  readonly options: {} | import("./reducers/header/types").TabletsBreadcrumbsOptions | import("./reducers/header/types").TenantBreadcrumbsOptions | import("./reducers/header/types").ClusterBreadcrumbsOptions | import("./reducers/header/types").TabletBreadcrumbsOptions | import("./reducers/header/types").NodeBreadcrumbsOptions;
28
- } | ({
29
- readonly type: "SET_QUERY_NAME_TO_EDIT";
30
- readonly data: string;
31
28
  } | {
32
- readonly type: "CLEAR_QUERY_NAME_TO_EDIT";
33
- }) | {
34
29
  readonly type: "ENABLE_FULLSCREEN_MODE";
35
30
  } | {
36
31
  readonly type: "DISABLE_FULLSCREEN_MODE";
@@ -52,7 +47,7 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
52
47
  shardsWorkload: import("./reducers/shardsWorkload/types").ShardsWorkloadFilters;
53
48
  authentication: import("./reducers/authentication/types").AuthenticationState;
54
49
  header: import("./reducers/header/types").HeaderState;
55
- saveQuery: string | null;
50
+ queryActions: import("./reducers/queryActions/types").QueryActionsState;
56
51
  fullscreen: boolean;
57
52
  clusters: import("./reducers/clusters/types").ClustersFilters;
58
53
  }, undefined, import("redux").UnknownAction>;