ydb-embedded-ui 6.0.1 → 6.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/CriticalActionDialog/CriticalActionDialog.scss +0 -2
- package/dist/components/DateRange/DateRange.scss +7 -0
- package/dist/components/NodeHostWrapper/NodeHostWrapper.js +1 -1
- package/dist/components/NodeHostWrapper/NodeHostWrapper.scss +0 -6
- package/dist/components/QueryResultTable/QueryResultTable.d.ts +2 -2
- package/dist/components/QueryResultTable/QueryResultTable.js +2 -1
- package/dist/components/QueryResultTable/QueryResultTable.scss +1 -0
- package/dist/components/ResizeableDataTable/ResizeableDataTable.d.ts +7 -0
- package/dist/components/ResizeableDataTable/ResizeableDataTable.js +14 -0
- package/dist/components/ResizeableDataTable/ResizeableDataTable.scss +8 -0
- package/dist/components/VirtualTable/ResizeHandler.d.ts +8 -0
- package/dist/components/VirtualTable/ResizeHandler.js +62 -0
- package/dist/components/VirtualTable/ResizeableVirtualTable.d.ts +6 -0
- package/dist/components/VirtualTable/ResizeableVirtualTable.js +16 -0
- package/dist/components/VirtualTable/TableHead.d.ts +3 -3
- package/dist/components/VirtualTable/TableHead.js +16 -31
- package/dist/components/VirtualTable/VirtualTable.d.ts +2 -4
- package/dist/components/VirtualTable/VirtualTable.scss +24 -4
- package/dist/components/VirtualTable/types.d.ts +3 -0
- package/dist/components/VirtualTable/utils.d.ts +2 -0
- package/dist/components/VirtualTable/utils.js +21 -0
- package/dist/containers/ClusterModeGuard/ClusterModeGuard.js +1 -1
- package/dist/containers/Clusters/Clusters.js +3 -2
- package/dist/containers/Clusters/Clusters.scss +5 -0
- package/dist/containers/Clusters/columns.d.ts +1 -0
- package/dist/containers/Clusters/columns.js +4 -3
- package/dist/containers/Nodes/Nodes.js +4 -4
- package/dist/containers/Nodes/Nodes.scss +0 -5
- package/dist/containers/Nodes/VirtualNodes.js +4 -6
- package/dist/containers/Nodes/getNodesColumns.d.ts +1 -0
- package/dist/containers/Nodes/getNodesColumns.js +9 -1
- package/dist/containers/PDiskPage/PDiskGroups.js +3 -3
- package/dist/containers/PDiskPage/PDiskPage.js +6 -1
- package/dist/containers/Storage/Storage.scss +0 -4
- package/dist/containers/Storage/StorageGroups/StorageGroups.js +3 -3
- package/dist/containers/Storage/StorageGroups/VirtualStorageGroups.js +3 -3
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.d.ts +3 -0
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +7 -3
- package/dist/containers/Storage/StorageNodes/StorageNodes.js +3 -3
- package/dist/containers/Storage/StorageNodes/VirtualStorageNodes.js +3 -3
- package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.d.ts +3 -0
- package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.js +2 -0
- package/dist/containers/Tablet/Tablet.scss +0 -4
- package/dist/containers/Tablet/TabletTable/TabletTable.js +5 -3
- package/dist/containers/Tenant/Acl/Acl.js +3 -2
- package/dist/containers/Tenant/Acl/Acl.scss +0 -6
- package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.js +3 -3
- package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.scss +2 -0
- package/dist/containers/Tenant/Diagnostics/Consumers/columns/columns.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Consumers/columns/columns.js +2 -0
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +5 -4
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.scss +1 -5
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +8 -4
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.scss +2 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/columns/Columns.scss +0 -8
- package/dist/containers/Tenant/Diagnostics/Partitions/columns/columns.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Partitions/columns/columns.js +11 -4
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +3 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +3 -7
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +4 -2
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +8 -11
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.scss +2 -24
- package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js +7 -0
- package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.d.ts +1 -2
- package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.js +3 -4
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.d.ts +0 -1
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +8 -10
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.scss +4 -15
- package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.js +5 -0
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +1 -1
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +0 -6
- package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +1 -21
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +4 -4
- package/dist/containers/Tenant/Query/ExplainResult/utils.d.ts +0 -3
- package/dist/containers/Tenant/Query/ExplainResult/utils.js +0 -34
- package/dist/containers/Tenant/Query/Preview/Preview.scss +6 -3
- package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +4 -2
- package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.scss +0 -1
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +2 -1
- package/dist/containers/Tenant/Query/QueryEditor/helpers.js +5 -3
- package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +4 -1
- package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.scss +0 -1
- package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.d.ts +1 -2
- package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +4 -3
- package/dist/containers/Tenant/Schema/SchemaViewer/helpers.d.ts +1 -0
- package/dist/containers/Tenant/Schema/SchemaViewer/helpers.js +4 -2
- package/dist/containers/Tenant/Tenant.js +1 -1
- package/dist/containers/Tenants/Tenants.js +8 -3
- package/dist/containers/Tenants/Tenants.scss +13 -5
- package/dist/containers/UserSettings/i18n/en.json +2 -0
- package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
- package/dist/containers/UserSettings/settings.d.ts +1 -0
- package/dist/containers/UserSettings/settings.js +7 -2
- package/dist/containers/Versions/GroupedNodesTree/GroupedNodesTree.scss +0 -2
- package/dist/containers/Versions/NodesTable/NodesTable.js +14 -9
- package/dist/services/api.d.ts +9 -1
- package/dist/services/api.js +5 -0
- package/dist/services/settings.js +2 -1
- package/dist/styles/mixins.scss +0 -47
- package/dist/types/api/autocomplete.d.ts +21 -0
- package/dist/types/api/autocomplete.js +1 -0
- package/dist/types/api/restartPDisk.d.ts +4 -0
- package/dist/types/api/restartPDisk.js +1 -0
- package/dist/utils/constants.d.ts +26 -10
- package/dist/utils/constants.js +1 -0
- package/dist/utils/hooks/useTableResize.d.ts +2 -7
- package/dist/utils/hooks/useTableResize.js +12 -24
- package/dist/utils/monaco/index.js +2 -0
- package/dist/utils/monaco/{yqlSuggestions → yql}/constants.d.ts +1 -0
- package/dist/utils/monaco/{yqlSuggestions → yql}/constants.js +1 -0
- package/dist/utils/monaco/{yqlSuggestions → yql}/generateSuggestions.d.ts +3 -3
- package/dist/utils/monaco/{yqlSuggestions → yql}/generateSuggestions.js +124 -64
- package/dist/utils/monaco/yql/registerLanguage.d.ts +1 -0
- package/dist/utils/monaco/yql/registerLanguage.js +8 -0
- package/dist/utils/monaco/{yqlSuggestions/registerCompletionItemProvider.js → yql/yql.completionItemProvider.js} +3 -2
- package/dist/utils/monaco/yql/yql.d.ts +7 -0
- package/dist/utils/monaco/yql/yql.js +180 -0
- package/dist/utils/monaco/yql/yql.keywords.d.ts +3 -0
- package/dist/utils/monaco/yql/yql.keywords.js +3 -0
- package/dist/utils/monaco/{yqlSuggestions → yql}/yqlSuggestions.js +14 -7
- package/package.json +12 -12
- package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.scss +0 -8
- /package/dist/utils/monaco/{yqlSuggestions/registerCompletionItemProvider.d.ts → yql/yql.completionItemProvider.d.ts} +0 -0
- /package/dist/utils/monaco/{yqlSuggestions → yql}/yqlSuggestions.d.ts +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import { getTopology, getYdbPlanNodeShape } from '@gravity-ui/paranoid';
|
4
4
|
import { Loader, RadioButton } from '@gravity-ui/uikit';
|
5
5
|
import JSONTree from 'react-json-inspector';
|
6
6
|
import Divider from '../../../../components/Divider/Divider';
|
@@ -14,7 +14,7 @@ import { cn } from '../../../../utils/cn';
|
|
14
14
|
import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
|
15
15
|
import { LANGUAGE_S_EXPRESSION_ID } from '../../../../utils/monaco/s-expression/constants';
|
16
16
|
import { PaneVisibilityToggleButtons } from '../../utils/paneVisibilityToggleHelpers';
|
17
|
-
import {
|
17
|
+
import { renderExplainNode } from './utils';
|
18
18
|
import './ExplainResult.scss';
|
19
19
|
import 'react-json-inspector/json-inspector.css';
|
20
20
|
const b = cn('ydb-query-explain-result');
|
@@ -46,7 +46,7 @@ function GraphRoot(props) {
|
|
46
46
|
throw new Error("Can't find element with id #graphRoot");
|
47
47
|
}
|
48
48
|
graphRoot.innerHTML = '';
|
49
|
-
paranoid.current = getTopology('graphRoot', data,
|
49
|
+
paranoid.current = getTopology('graphRoot', data, opts, shapes);
|
50
50
|
paranoid.current.render();
|
51
51
|
return () => {
|
52
52
|
paranoid.current = undefined;
|
@@ -109,7 +109,7 @@ export function ExplainResult(props) {
|
|
109
109
|
hidden: activeOption !== ExplainOptionIds.schema,
|
110
110
|
}), children: _jsx(GraphRoot, { theme: theme, data: { links, nodes }, opts: {
|
111
111
|
renderNodeTitle: renderExplainNode,
|
112
|
-
textOverflow:
|
112
|
+
textOverflow: 'normal',
|
113
113
|
initialZoomFitsCanvas: true,
|
114
114
|
}, shapes: {
|
115
115
|
node: getYdbPlanNodeShape,
|
@@ -2,37 +2,3 @@ export const renderExplainNode = (node) => {
|
|
2
2
|
const parts = node.name.split('|');
|
3
3
|
return parts.length > 1 ? parts[1] : node.name;
|
4
4
|
};
|
5
|
-
export function getColors() {
|
6
|
-
const colorsMap = {
|
7
|
-
success: '--g-color-text-positive',
|
8
|
-
error: '--g-color-text-danger',
|
9
|
-
warning: '--g-color-text-warning',
|
10
|
-
errorBackground: '--g-color-base-danger-medium',
|
11
|
-
warningBackground: '--g-color-base-warning-medium',
|
12
|
-
mute: '--g-color-line-generic',
|
13
|
-
stroke: '--g-color-text-hint',
|
14
|
-
fill: '--g-color-base-generic-ultralight',
|
15
|
-
nodeFill: '--g-color-base-float',
|
16
|
-
nodeShadow: '--g-color-sfx-shadow',
|
17
|
-
titleColor: '--g-color-text-primary',
|
18
|
-
textColor: '--g-color-text-complementary',
|
19
|
-
buttonBorderColor: '--g-color-line-generic',
|
20
|
-
// groupBorderColor: '--g-color-celestial-thunder',
|
21
|
-
// groupFill: '--g-color-celestial',
|
22
|
-
titleHoverColor: '--g-color-text-link-hover',
|
23
|
-
nodeHover: '--g-color-base-float-hover',
|
24
|
-
specialHover: '--g-color-line-focus',
|
25
|
-
};
|
26
|
-
const style = getComputedStyle(document.body);
|
27
|
-
const colors = Object.keys(colorsMap).reduce((acc, key) => {
|
28
|
-
const color = style.getPropertyValue(colorsMap[key]).replace(/ /g, '');
|
29
|
-
if (color) {
|
30
|
-
acc[key] = color;
|
31
|
-
}
|
32
|
-
return acc;
|
33
|
-
}, {});
|
34
|
-
const getCommonColor = (name) => {
|
35
|
-
return style.getPropertyValue(`--g-color-${name}`).replace(/ /g, '');
|
36
|
-
};
|
37
|
-
return Object.assign(Object.assign({}, colors), { getCommonColor });
|
38
|
-
}
|
@@ -1,8 +1,9 @@
|
|
1
|
-
@
|
1
|
+
@use '../../../../styles/mixins.scss';
|
2
2
|
|
3
3
|
.kv-preview {
|
4
4
|
height: 100%;
|
5
|
-
@include
|
5
|
+
@include mixins.flex-container();
|
6
|
+
@include mixins.query-data-table();
|
6
7
|
|
7
8
|
&__header {
|
8
9
|
position: sticky;
|
@@ -48,9 +49,11 @@
|
|
48
49
|
&__result {
|
49
50
|
overflow: auto;
|
50
51
|
|
52
|
+
width: 100%;
|
53
|
+
|
51
54
|
// This fixes last row display for ordinary preview (not fullscreen)
|
52
55
|
height: calc(100% - 40px);
|
53
|
-
padding:
|
56
|
+
padding-left: 10px;
|
54
57
|
|
55
58
|
// Fix white space footer block for fullscreen preview
|
56
59
|
.kv-fullscreen & {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import
|
2
|
+
import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
|
3
3
|
import { TruncatedQuery } from '../../../../components/TruncatedQuery/TruncatedQuery';
|
4
4
|
import { selectQueriesHistory } from '../../../../store/reducers/executeQuery';
|
5
5
|
import { TENANT_QUERY_TABS_ID } from '../../../../store/reducers/tenant/constants';
|
@@ -11,6 +11,7 @@ import { MAX_QUERY_HEIGHT, QUERY_TABLE_SETTINGS } from '../../utils/constants';
|
|
11
11
|
import i18n from '../i18n';
|
12
12
|
import './QueriesHistory.scss';
|
13
13
|
const b = cn('ydb-queries-history');
|
14
|
+
const QUERIES_HISTORY_COLUMNS_WIDTH_LS_KEY = 'queriesHistoryTableColumnsWidth';
|
14
15
|
function QueriesHistory({ changeUserInput }) {
|
15
16
|
const dispatch = useTypedDispatch();
|
16
17
|
const [queryMode, setQueryMode] = useQueryModes();
|
@@ -35,6 +36,7 @@ function QueriesHistory({ changeUserInput }) {
|
|
35
36
|
return (_jsx("div", { className: b('query'), children: _jsx(TruncatedQuery, { value: row.queryText, maxQueryHeight: MAX_QUERY_HEIGHT }) }));
|
36
37
|
},
|
37
38
|
sortable: false,
|
39
|
+
width: 600,
|
38
40
|
},
|
39
41
|
{
|
40
42
|
name: 'syntax',
|
@@ -46,6 +48,6 @@ function QueriesHistory({ changeUserInput }) {
|
|
46
48
|
width: 200,
|
47
49
|
},
|
48
50
|
];
|
49
|
-
return (_jsx("div", { className: b(), children: _jsx(
|
51
|
+
return (_jsx("div", { className: b(), children: _jsx(ResizeableDataTable, { columnsWidthLSKey: QUERIES_HISTORY_COLUMNS_WIDTH_LS_KEY, columns: columns, data: reversedHistory, settings: QUERY_TABLE_SETTINGS, emptyDataMessage: i18n('history.empty'), onRowClick: (row) => onQueryClick(row), rowClassName: () => b('table-row') }) }));
|
50
52
|
}
|
51
53
|
export default QueriesHistory;
|
@@ -10,6 +10,7 @@ import { setShowPreview } from '../../../../store/reducers/schema/schema';
|
|
10
10
|
import { cn } from '../../../../utils/cn';
|
11
11
|
import { DEFAULT_IS_QUERY_RESULT_COLLAPSED, DEFAULT_SIZE_RESULT_PANE_KEY, LAST_USED_QUERY_ACTION_KEY, QUERY_USE_MULTI_SCHEMA_KEY, SAVED_QUERIES_KEY, } from '../../../../utils/constants';
|
12
12
|
import { useQueryModes, useSetting } from '../../../../utils/hooks';
|
13
|
+
import { LANGUAGE_YQL_ID } from '../../../../utils/monaco/yql/constants';
|
13
14
|
import { QUERY_ACTIONS } from '../../../../utils/query';
|
14
15
|
import { parseJson } from '../../../../utils/utils';
|
15
16
|
import { PaneVisibilityActionTypes, paneVisibilityToggleReducerCreator, } from '../../utils/paneVisibilityToggleHelpers';
|
@@ -286,7 +287,7 @@ function QueryEditor(props) {
|
|
286
287
|
};
|
287
288
|
return (_jsx("div", { className: b(), children: _jsxs(SplitPane, { direction: "vertical", defaultSizePaneKey: DEFAULT_SIZE_RESULT_PANE_KEY, triggerCollapse: resultVisibilityState.triggerCollapse, triggerExpand: resultVisibilityState.triggerExpand, minSize: [0, 52], collapsedSizes: [100, 0], onSplitStartDragAdditional: onSplitStartDragAdditional, children: [_jsxs("div", { className: b('pane-wrapper', {
|
288
289
|
top: true,
|
289
|
-
}), children: [_jsx("div", { className: b('monaco-wrapper'), children: _jsx("div", { className: b('monaco'), children: _jsx(MonacoEditor, { language:
|
290
|
+
}), children: [_jsx("div", { className: b('monaco-wrapper'), children: _jsx("div", { className: b('monaco'), children: _jsx(MonacoEditor, { language: LANGUAGE_YQL_ID, value: executeQuery.input, options: editorOptions, onChange: onChange, editorDidMount: editorDidMount, theme: `vs-${theme}` }) }) }), renderControls()] }), _jsx("div", { className: b('pane-wrapper'), children: _jsx(Result, { executeQuery: executeQuery, explainQuery: explainQuery, resultVisibilityState: resultVisibilityState, onExpandResultHandler: onExpandResultHandler, onCollapseResultHandler: onCollapseResultHandler, type: type, handleAstQuery: handleAstQuery, theme: theme, resultType: resultType, path: path, showPreview: showPreview }) })] }) }));
|
290
291
|
}
|
291
292
|
const mapStateToProps = (state) => {
|
292
293
|
return {
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import { AUTOCOMPLETE_ON_ENTER, ENABLE_AUTOCOMPLETE } from '../../../../utils/constants';
|
3
|
+
import { useSetting } from '../../../../utils/hooks';
|
3
4
|
export const EDITOR_OPTIONS = {
|
4
5
|
automaticLayout: true,
|
5
6
|
selectOnLineNumbers: true,
|
@@ -9,9 +10,10 @@ export const EDITOR_OPTIONS = {
|
|
9
10
|
};
|
10
11
|
export function useEditorOptions() {
|
11
12
|
const [enableAutocomplete] = useSetting(ENABLE_AUTOCOMPLETE);
|
13
|
+
const [autocompleteOnEnter] = useSetting(AUTOCOMPLETE_ON_ENTER);
|
12
14
|
const options = React.useMemo(() => {
|
13
15
|
const useAutocomplete = Boolean(enableAutocomplete);
|
14
|
-
return Object.assign({ quickSuggestions: useAutocomplete, suggestOnTriggerCharacters: useAutocomplete }, EDITOR_OPTIONS);
|
15
|
-
}, [enableAutocomplete]);
|
16
|
+
return Object.assign({ quickSuggestions: useAutocomplete, suggestOnTriggerCharacters: useAutocomplete, acceptSuggestionOnEnter: autocompleteOnEnter ? 'on' : 'off' }, EDITOR_OPTIONS);
|
17
|
+
}, [enableAutocomplete, autocompleteOnEnter]);
|
16
18
|
return options;
|
17
19
|
}
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
3
3
|
import DataTable from '@gravity-ui/react-data-table';
|
4
4
|
import { Button, Dialog } from '@gravity-ui/uikit';
|
5
5
|
import { Icon } from '../../../../components/Icon';
|
6
|
+
import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
|
6
7
|
import { TruncatedQuery } from '../../../../components/TruncatedQuery/TruncatedQuery';
|
7
8
|
import { setQueryNameToEdit } from '../../../../store/reducers/saveQuery';
|
8
9
|
import { TENANT_QUERY_TABS_ID } from '../../../../store/reducers/tenant/constants';
|
@@ -16,6 +17,7 @@ const b = cn('ydb-saved-queries');
|
|
16
17
|
const DeleteDialog = ({ visible, queryName, onCancelClick, onConfirmClick }) => {
|
17
18
|
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 })] }));
|
18
19
|
};
|
20
|
+
const SAVED_QUERIES_COLUMNS_WIDTH_LS_KEY = 'savedQueriesTableColumnsWidth';
|
19
21
|
export const SavedQueries = ({ savedQueries, changeUserInput, onDeleteQuery }) => {
|
20
22
|
const dispatch = useTypedDispatch();
|
21
23
|
const [isDeleteDialogVisible, setIsDeleteDialogVisible] = React.useState(false);
|
@@ -56,9 +58,10 @@ export const SavedQueries = ({ savedQueries, changeUserInput, onDeleteQuery }) =
|
|
56
58
|
header: 'Query Text',
|
57
59
|
render: ({ row: query }) => (_jsxs("div", { className: b('query'), children: [_jsx("div", { className: b('query-body'), children: _jsx(TruncatedQuery, { value: query.body, maxQueryHeight: MAX_QUERY_HEIGHT }) }), _jsxs("span", { className: b('controls'), children: [_jsx(Button, { view: "flat-secondary", children: _jsx(Icon, { name: "pencil", viewBox: "0 0 24 24" }) }), _jsx(Button, { view: "flat-secondary", onClick: onDeleteQueryClick(query.name), children: _jsx(Icon, { name: "trash", viewBox: "0 0 24 24" }) })] })] })),
|
58
60
|
sortable: false,
|
61
|
+
resizeMinWidth: 650,
|
59
62
|
},
|
60
63
|
];
|
61
|
-
return (_jsxs(React.Fragment, { children: [_jsx("div", { className: b(), children: _jsx(
|
64
|
+
return (_jsxs(React.Fragment, { children: [_jsx("div", { className: b(), children: _jsx(ResizeableDataTable, { columnsWidthLSKey: SAVED_QUERIES_COLUMNS_WIDTH_LS_KEY, columns: columns, data: savedQueries, settings: QUERY_TABLE_SETTINGS, emptyDataMessage: i18n('saved.empty'), rowClassName: () => b('row'), onRowClick: (row) => onQueryClick(row.body, row.name), initialSortOrder: {
|
62
65
|
columnId: 'name',
|
63
66
|
order: DataTable.ASCENDING,
|
64
67
|
} }) }), _jsx(DeleteDialog, { visible: isDeleteDialogVisible, queryName: queryNameToDelete, onCancelClick: onCancelDeleteClick, onConfirmClick: onConfirmDeleteClick })] }));
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import type { EPathType } from '../../../../types/api/schema';
|
2
2
|
import './SchemaViewer.scss';
|
3
3
|
interface SchemaViewerProps {
|
4
|
-
className?: string;
|
5
4
|
type?: EPathType;
|
6
5
|
path?: string;
|
7
6
|
withFamilies?: boolean;
|
8
7
|
}
|
9
|
-
export declare const SchemaViewer: ({
|
8
|
+
export declare const SchemaViewer: ({ type, path, withFamilies }: SchemaViewerProps) => import("react/jsx-runtime").JSX.Element;
|
10
9
|
export {};
|
@@ -1,18 +1,19 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import DataTable from '@gravity-ui/react-data-table';
|
3
|
+
import { ResizeableDataTable } from '../../../../components/ResizeableDataTable/ResizeableDataTable';
|
3
4
|
import { TableSkeleton } from '../../../../components/TableSkeleton/TableSkeleton';
|
4
5
|
import { cn } from '../../../../utils/cn';
|
5
6
|
import { DEFAULT_TABLE_SETTINGS } from '../../../../utils/constants';
|
6
7
|
import { useTypedSelector } from '../../../../utils/hooks';
|
7
|
-
import { SchemaViewerColumns, prepareColumnDescriptions, prepareFamilies, prepareSchemaTableColumns, } from './helpers';
|
8
|
+
import { SCHEMA_COLUMNS_WIDTH_LS_KEY, SchemaViewerColumns, prepareColumnDescriptions, prepareFamilies, prepareSchemaTableColumns, } from './helpers';
|
8
9
|
import './SchemaViewer.scss';
|
9
10
|
const b = cn('schema-viewer');
|
10
|
-
export const SchemaViewer = ({
|
11
|
+
export const SchemaViewer = ({ type, path, withFamilies = false }) => {
|
11
12
|
const { data, loading } = useTypedSelector((state) => state.schema);
|
12
13
|
const currentObjectData = path ? data[path] : undefined;
|
13
14
|
const { columns, keyColumnIds } = prepareColumnDescriptions(type, currentObjectData);
|
14
15
|
const families = prepareFamilies(currentObjectData);
|
15
|
-
return (_jsx("div", { className: b(null
|
16
|
+
return (_jsx("div", { className: b(null), children: loading ? (_jsx(TableSkeleton, {})) : (_jsx(ResizeableDataTable, { columnsWidthLSKey: SCHEMA_COLUMNS_WIDTH_LS_KEY, data: columns, columns: prepareSchemaTableColumns({
|
16
17
|
type,
|
17
18
|
b,
|
18
19
|
families,
|
@@ -16,6 +16,7 @@ export declare function prepareColumnDescriptions(type?: EPathType, scheme?: TEv
|
|
16
16
|
keyColumnIds: number[];
|
17
17
|
};
|
18
18
|
export declare function prepareFamilies(scheme?: TEvDescribeSchemeResult): Record<number, TFamilyDescription>;
|
19
|
+
export declare const SCHEMA_COLUMNS_WIDTH_LS_KEY = "schemaTableColumnsWidth";
|
19
20
|
export declare function prepareSchemaTableColumns(options: {
|
20
21
|
type?: EPathType;
|
21
22
|
b: ClassNameFormatter;
|
@@ -69,6 +69,7 @@ export function prepareFamilies(scheme) {
|
|
69
69
|
return acc;
|
70
70
|
}, {})) !== null && _e !== void 0 ? _e : {});
|
71
71
|
}
|
72
|
+
export const SCHEMA_COLUMNS_WIDTH_LS_KEY = 'schemaTableColumnsWidth';
|
72
73
|
export function prepareSchemaTableColumns(options) {
|
73
74
|
const keyColumnsOrderValues = options.keyColumnIds.reduce((result, keyColumnId, index) => {
|
74
75
|
// Put columns with negative values, so they will be the first with ascending sort
|
@@ -79,14 +80,15 @@ export function prepareSchemaTableColumns(options) {
|
|
79
80
|
const columns = [
|
80
81
|
{
|
81
82
|
name: SchemaViewerColumns.id,
|
82
|
-
width:
|
83
|
+
width: 60,
|
83
84
|
},
|
84
85
|
];
|
85
86
|
if (!isExternalTable(options.type)) {
|
86
87
|
// External tables don't have key columns
|
87
88
|
columns.push({
|
88
89
|
name: SchemaViewerColumns.key,
|
89
|
-
width:
|
90
|
+
width: 70,
|
91
|
+
resizeMinWidth: 70,
|
90
92
|
// Table should start with key columns on sort click
|
91
93
|
defaultOrder: DataTable.ASCENDING,
|
92
94
|
// Values in keyColumnsOrderValues are always negative, so it will be 1 for not key columns
|
@@ -47,7 +47,7 @@ function Tenant(props) {
|
|
47
47
|
React.useEffect(() => {
|
48
48
|
if (tenantName && typeof tenantName === 'string' && previousTenant.current !== tenantName) {
|
49
49
|
const register = async () => {
|
50
|
-
const { registerYQLCompletionItemProvider } = await import('../../utils/monaco/
|
50
|
+
const { registerYQLCompletionItemProvider } = await import('../../utils/monaco/yql/yql.completionItemProvider');
|
51
51
|
registerYQLCompletionItemProvider(tenantName);
|
52
52
|
};
|
53
53
|
register().catch(console.error);
|
@@ -8,6 +8,7 @@ import { ResponseError } from '../../components/Errors/ResponseError';
|
|
8
8
|
import { Illustration } from '../../components/Illustration';
|
9
9
|
import { PoolsGraph } from '../../components/PoolsGraph/PoolsGraph';
|
10
10
|
import { ProblemFilter } from '../../components/ProblemFilter';
|
11
|
+
import { ResizeableDataTable } from '../../components/ResizeableDataTable/ResizeableDataTable';
|
11
12
|
import { Search } from '../../components/Search';
|
12
13
|
import { TableWithControlsLayout } from '../../components/TableWithControlsLayout/TableWithControlsLayout';
|
13
14
|
import { TabletsStatistic } from '../../components/TabletsStatistic';
|
@@ -22,6 +23,7 @@ import { useTypedDispatch, useTypedSelector } from '../../utils/hooks';
|
|
22
23
|
import { getTenantPath } from '../Tenant/TenantPages';
|
23
24
|
import './Tenants.scss';
|
24
25
|
const b = cn('tenants');
|
26
|
+
const DATABASES_COLUMNS_WIDTH_LS_KEY = 'databasesTableColumnsWidth';
|
25
27
|
export const Tenants = ({ additionalTenantsProps }) => {
|
26
28
|
const dispatch = useTypedDispatch();
|
27
29
|
const { currentData, isFetching, error } = tenantsApi.useGetTenantsInfoQuery({ clusterName }, { pollingInterval: DEFAULT_POLLING_INTERVAL });
|
@@ -75,6 +77,7 @@ export const Tenants = ({ additionalTenantsProps }) => {
|
|
75
77
|
{
|
76
78
|
name: 'Type',
|
77
79
|
width: 200,
|
80
|
+
resizeMinWidth: 150,
|
78
81
|
render: ({ row }) => {
|
79
82
|
if (row.Type !== 'Serverless') {
|
80
83
|
return row.Type;
|
@@ -138,6 +141,7 @@ export const Tenants = ({ additionalTenantsProps }) => {
|
|
138
141
|
name: 'PoolStats',
|
139
142
|
header: 'Pools',
|
140
143
|
width: 100,
|
144
|
+
resizeMinWidth: 60,
|
141
145
|
sortAccessor: ({ PoolStats = [] }) => PoolStats.reduce((acc, item) => acc + (item.Usage || 0), 0),
|
142
146
|
defaultOrder: DataTable.DESCENDING,
|
143
147
|
align: DataTable.LEFT,
|
@@ -147,7 +151,8 @@ export const Tenants = ({ additionalTenantsProps }) => {
|
|
147
151
|
name: 'Tablets',
|
148
152
|
header: 'Tablets States',
|
149
153
|
sortable: false,
|
150
|
-
width:
|
154
|
+
width: 500,
|
155
|
+
resizeMinWidth: 500,
|
151
156
|
render: ({ row }) => {
|
152
157
|
const backend = getTenantBackend(row);
|
153
158
|
return row.Tablets ? (_jsx(TabletsStatistic, { path: row.Name, tablets: row.Tablets, nodeIds: row.NodeIds || [], backend: backend })) : ('—');
|
@@ -157,10 +162,10 @@ export const Tenants = ({ additionalTenantsProps }) => {
|
|
157
162
|
if (filteredTenants.length === 0 && problemFilter !== ProblemFilterValues.ALL) {
|
158
163
|
return _jsx(Illustration, { name: "thumbsUp", width: "200" });
|
159
164
|
}
|
160
|
-
return (_jsx(
|
165
|
+
return (_jsx(ResizeableDataTable, { columnsWidthLSKey: DATABASES_COLUMNS_WIDTH_LS_KEY, data: filteredTenants, columns: columns, settings: DEFAULT_TABLE_SETTINGS, emptyDataMessage: "No such tenants" }));
|
161
166
|
};
|
162
167
|
if (error) {
|
163
168
|
return _jsx(ResponseError, { error: error });
|
164
169
|
}
|
165
|
-
return (_jsxs(TableWithControlsLayout, { children: [_jsx(TableWithControlsLayout.Controls, { children: renderControls() }), _jsx(TableWithControlsLayout.Table, { loading: loading,
|
170
|
+
return (_jsxs(TableWithControlsLayout, { children: [_jsx(TableWithControlsLayout.Controls, { children: renderControls() }), _jsx(TableWithControlsLayout.Table, { loading: loading, children: renderTable() })] }));
|
166
171
|
};
|
@@ -25,20 +25,28 @@
|
|
25
25
|
}
|
26
26
|
}
|
27
27
|
|
28
|
-
&
|
29
|
-
|
28
|
+
&__type {
|
29
|
+
display: flex;
|
30
|
+
flex-direction: row;
|
31
|
+
align-items: center;
|
32
|
+
gap: 10px;
|
30
33
|
}
|
31
34
|
|
32
35
|
&__type-value {
|
33
|
-
|
36
|
+
overflow: hidden;
|
37
|
+
|
38
|
+
width: min-content;
|
39
|
+
|
40
|
+
white-space: nowrap;
|
41
|
+
text-overflow: ellipsis;
|
34
42
|
}
|
35
43
|
|
36
44
|
&__type-button {
|
37
|
-
|
45
|
+
display: none;
|
38
46
|
}
|
39
47
|
|
40
48
|
.data-table__row:hover &__type-button {
|
41
|
-
|
49
|
+
display: block;
|
42
50
|
}
|
43
51
|
|
44
52
|
&__name-wrapper {
|
@@ -7,6 +7,8 @@
|
|
7
7
|
"section.dev-setting": "Development settings",
|
8
8
|
"settings.editor.autocomplete.title": "Enable autocomplete",
|
9
9
|
"settings.editor.autocomplete.description": "You’re always able to get suggestions by pressing Ctrl+Space.",
|
10
|
+
"settings.editor.autocomplete-on-enter.title": "Accept suggestion on Enter",
|
11
|
+
"settings.editor.autocomplete-on-enter.description": "Controls whether suggestions should be accepted on Enter, in addition to Tab. Helps to avoid ambiguity between inserting new lines or accepting suggestions.",
|
10
12
|
"settings.theme.title": "Interface theme",
|
11
13
|
"settings.theme.option-dark": "Dark",
|
12
14
|
"settings.theme.option-light": "Light",
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: (key: "page.general" | "section.appearance" | "page.experiments" | "section.experiments" | "page.editor" | "section.dev-setting" | "settings.editor.autocomplete.title" | "settings.editor.autocomplete.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", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
1
|
+
declare const _default: (key: "page.general" | "section.appearance" | "page.experiments" | "section.experiments" | "page.editor" | "section.dev-setting" | "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", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
2
2
|
export default _default;
|
@@ -20,6 +20,7 @@ export declare const useNodesEndpointSetting: SettingProps;
|
|
20
20
|
export declare const useVirtualTables: SettingProps;
|
21
21
|
export declare const queryUseMultiSchemaSetting: SettingProps;
|
22
22
|
export declare const enableAutocompleteSetting: SettingProps;
|
23
|
+
export declare const autocompleteOnEnterSetting: SettingProps;
|
23
24
|
export declare const appearanceSection: SettingsSection;
|
24
25
|
export declare const experimentsSection: SettingsSection;
|
25
26
|
export declare const devSettingsSection: SettingsSection;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { Flask, PencilToSquare, StarFill } from '@gravity-ui/icons';
|
3
|
-
import { 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 { 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';
|
4
4
|
import { Lang, defaultLang } from '../../utils/i18n';
|
5
5
|
import { ClusterModeGuard } from '../ClusterModeGuard';
|
6
6
|
import i18n from './i18n';
|
@@ -73,6 +73,11 @@ export const enableAutocompleteSetting = {
|
|
73
73
|
title: i18n('settings.editor.autocomplete.title'),
|
74
74
|
description: i18n('settings.editor.autocomplete.description'),
|
75
75
|
};
|
76
|
+
export const autocompleteOnEnterSetting = {
|
77
|
+
settingKey: AUTOCOMPLETE_ON_ENTER,
|
78
|
+
title: i18n('settings.editor.autocomplete-on-enter.title'),
|
79
|
+
description: i18n('settings.editor.autocomplete-on-enter.description'),
|
80
|
+
};
|
76
81
|
export const appearanceSection = {
|
77
82
|
id: 'appearanceSection',
|
78
83
|
title: i18n('section.appearance'),
|
@@ -86,7 +91,7 @@ export const experimentsSection = {
|
|
86
91
|
export const devSettingsSection = {
|
87
92
|
id: 'devSettingsSection',
|
88
93
|
title: i18n('section.dev-setting'),
|
89
|
-
settings: [enableAutocompleteSetting],
|
94
|
+
settings: [enableAutocompleteSetting, autocompleteOnEnterSetting],
|
90
95
|
};
|
91
96
|
export const generalPage = {
|
92
97
|
id: 'generalPage',
|
@@ -3,15 +3,18 @@ import DataTable from '@gravity-ui/react-data-table';
|
|
3
3
|
import { EntityStatus } from '../../../components/EntityStatus/EntityStatus';
|
4
4
|
import { PoolsGraph } from '../../../components/PoolsGraph/PoolsGraph';
|
5
5
|
import { ProgressViewer } from '../../../components/ProgressViewer/ProgressViewer';
|
6
|
+
import { ResizeableDataTable } from '../../../components/ResizeableDataTable/ResizeableDataTable';
|
6
7
|
import { DEFAULT_TABLE_SETTINGS } from '../../../utils/constants';
|
7
8
|
import { formatBytes } from '../../../utils/dataFormatters/dataFormatters';
|
8
9
|
import { isUnavailableNode } from '../../../utils/nodes';
|
9
10
|
import { getDefaultNodePath } from '../../Node/NodePages';
|
11
|
+
const VERSIONS_COLUMNS_WIDTH_LS_KEY = 'versionsTableColumnsWidth';
|
10
12
|
const columns = [
|
11
13
|
{
|
12
14
|
name: 'NodeId',
|
13
15
|
header: '#',
|
14
|
-
width:
|
16
|
+
width: 80,
|
17
|
+
resizeMinWidth: 80,
|
15
18
|
align: DataTable.LEFT,
|
16
19
|
render: ({ row }) => row.NodeId,
|
17
20
|
},
|
@@ -25,7 +28,7 @@ const columns = [
|
|
25
28
|
const nodePath = !isUnavailableNode(row) && row.NodeId ? getDefaultNodePath(row.NodeId) : undefined;
|
26
29
|
return (_jsx(EntityStatus, { name: title, path: nodePath, hasClipboardButton: true, showStatus: false }));
|
27
30
|
},
|
28
|
-
width:
|
31
|
+
width: 400,
|
29
32
|
align: DataTable.LEFT,
|
30
33
|
},
|
31
34
|
{
|
@@ -34,14 +37,14 @@ const columns = [
|
|
34
37
|
render: ({ row }) => row.Endpoints
|
35
38
|
? row.Endpoints.map(({ Name, Address }) => `${Name} ${Address}`).join(', ')
|
36
39
|
: '-',
|
37
|
-
width:
|
40
|
+
width: 300,
|
38
41
|
align: DataTable.LEFT,
|
39
42
|
},
|
40
43
|
{
|
41
44
|
name: 'uptime',
|
42
45
|
header: 'Uptime',
|
43
46
|
sortAccessor: ({ StartTime }) => StartTime && -StartTime,
|
44
|
-
width:
|
47
|
+
width: 120,
|
45
48
|
align: DataTable.LEFT,
|
46
49
|
render: ({ row }) => row.uptime,
|
47
50
|
},
|
@@ -51,7 +54,7 @@ const columns = [
|
|
51
54
|
sortAccessor: ({ MemoryUsed = 0 }) => Number(MemoryUsed),
|
52
55
|
defaultOrder: DataTable.DESCENDING,
|
53
56
|
render: ({ row }) => (row.MemoryUsed ? formatBytes(row.MemoryUsed) : '—'),
|
54
|
-
width:
|
57
|
+
width: 120,
|
55
58
|
align: DataTable.RIGHT,
|
56
59
|
},
|
57
60
|
{
|
@@ -60,7 +63,7 @@ const columns = [
|
|
60
63
|
sortAccessor: ({ MemoryLimit = 0 }) => Number(MemoryLimit),
|
61
64
|
defaultOrder: DataTable.DESCENDING,
|
62
65
|
render: ({ row }) => (row.MemoryLimit ? formatBytes(row.MemoryLimit) : '—'),
|
63
|
-
width:
|
66
|
+
width: 120,
|
64
67
|
align: DataTable.RIGHT,
|
65
68
|
},
|
66
69
|
{
|
@@ -68,7 +71,8 @@ const columns = [
|
|
68
71
|
header: 'Pools',
|
69
72
|
sortAccessor: ({ PoolStats = [] }) => PoolStats.reduce((acc, item) => acc + (item.Usage || 0), 0),
|
70
73
|
defaultOrder: DataTable.DESCENDING,
|
71
|
-
width:
|
74
|
+
width: 80,
|
75
|
+
resizeMinWidth: 60,
|
72
76
|
render: ({ row }) => (row.PoolStats ? _jsx(PoolsGraph, { pools: row.PoolStats }) : '—'),
|
73
77
|
align: DataTable.LEFT,
|
74
78
|
},
|
@@ -77,11 +81,12 @@ const columns = [
|
|
77
81
|
header: 'Load average',
|
78
82
|
sortAccessor: ({ LoadAverage = [] }) => LoadAverage.slice(0, 1).reduce((acc, item) => acc + item, 0),
|
79
83
|
defaultOrder: DataTable.DESCENDING,
|
80
|
-
width:
|
84
|
+
width: 140,
|
85
|
+
resizeMinWidth: 140,
|
81
86
|
render: ({ row }) => row.LoadAverage && row.LoadAverage.length > 0 ? (_jsx(ProgressViewer, { value: row.LoadAverage[0], percents: true, capacity: 100, colorizeProgress: true })) : ('—'),
|
82
87
|
align: DataTable.LEFT,
|
83
88
|
},
|
84
89
|
];
|
85
90
|
export const NodesTable = ({ nodes }) => {
|
86
|
-
return (_jsx(
|
91
|
+
return (_jsx(ResizeableDataTable, { columnsWidthLSKey: VERSIONS_COLUMNS_WIDTH_LS_KEY, data: nodes, columns: columns, settings: DEFAULT_TABLE_SETTINGS }));
|
87
92
|
};
|
package/dist/services/api.d.ts
CHANGED
@@ -2,6 +2,7 @@ import AxiosWrapper from '@gravity-ui/axios-wrapper';
|
|
2
2
|
import type { ComputeApiRequestParams, NodesApiRequestParams } from '../store/reducers/nodes/types';
|
3
3
|
import type { StorageApiRequestParams } from '../store/reducers/storage/types';
|
4
4
|
import type { TMetaInfo } from '../types/api/acl';
|
5
|
+
import type { TQueryAutocomplete } from '../types/api/autocomplete';
|
5
6
|
import type { TClusterInfo } from '../types/api/cluster';
|
6
7
|
import type { TComputeInfo } from '../types/api/compute';
|
7
8
|
import type { DescribeConsumerResult } from '../types/api/consumer';
|
@@ -14,6 +15,7 @@ import type { TEvNodesInfo } from '../types/api/nodesList';
|
|
14
15
|
import type { TEvPDiskStateResponse } from '../types/api/pdisk';
|
15
16
|
import type { Actions, ExplainActions, ExplainResponse, QueryAPIResponse, Schemas } from '../types/api/query';
|
16
17
|
import type { JsonRenderRequestParams, JsonRenderResponse } from '../types/api/render';
|
18
|
+
import type { RestartPDiskResponse } from '../types/api/restartPDisk';
|
17
19
|
import type { TEvDescribeSchemeResult } from '../types/api/schema';
|
18
20
|
import type { TStorageInfo } from '../types/api/storage';
|
19
21
|
import type { TEvSystemStateResponse } from '../types/api/systemState';
|
@@ -104,7 +106,7 @@ export declare class YdbEmbeddedAPI extends AxiosWrapper {
|
|
104
106
|
failDomainIdx: string | number;
|
105
107
|
vDiskIdx: string | number;
|
106
108
|
}): Promise<any>;
|
107
|
-
restartPDisk(nodeId: number | string, pDiskId: number | string): Promise<
|
109
|
+
restartPDisk(nodeId: number | string, pDiskId: number | string): Promise<RestartPDiskResponse>;
|
108
110
|
killTablet(id?: string): Promise<string>;
|
109
111
|
stopTablet(id?: string, hiveId?: string): Promise<string>;
|
110
112
|
resumeTablet(id?: string, hiveId?: string): Promise<string>;
|
@@ -115,6 +117,12 @@ export declare class YdbEmbeddedAPI extends AxiosWrapper {
|
|
115
117
|
authenticate(user: string, password: string): Promise<any>;
|
116
118
|
logout(): Promise<any>;
|
117
119
|
whoami(): Promise<TUserToken>;
|
120
|
+
autocomplete(params: {
|
121
|
+
database: string;
|
122
|
+
prefix?: string;
|
123
|
+
limit?: number;
|
124
|
+
table?: string[];
|
125
|
+
}): Promise<TQueryAutocomplete>;
|
118
126
|
getClustersList(_?: never, { signal }?: {
|
119
127
|
signal?: AbortSignal;
|
120
128
|
}): Promise<MetaClusters>;
|
package/dist/services/api.js
CHANGED
@@ -302,6 +302,11 @@ export class YdbEmbeddedAPI extends AxiosWrapper {
|
|
302
302
|
whoami() {
|
303
303
|
return this.get(this.getPath('/viewer/json/whoami'), {});
|
304
304
|
}
|
305
|
+
autocomplete(params) {
|
306
|
+
const { table } = params, rest = __rest(params, ["table"]);
|
307
|
+
const tablesParam = table === null || table === void 0 ? void 0 : table.join(',');
|
308
|
+
return this.get(this.getPath('/viewer/json/autocomplete'), Object.assign(Object.assign({}, rest), { table: tablesParam }), { concurrentId: 'sql-autocomplete' });
|
309
|
+
}
|
305
310
|
// used if not single cluster mode
|
306
311
|
getClustersList(_, { signal } = {}) {
|
307
312
|
return this.get(`${META_BACKEND || ''}/meta/clusters`, null, {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TENANT_PAGES_IDS } from '../store/reducers/tenant/constants';
|
2
|
-
import { ASIDE_HEADER_COMPACT_KEY, BINARY_DATA_IN_PLAIN_TEXT_DISPLAY, ENABLE_AUTOCOMPLETE, INVERTED_DISKS_KEY, LANGUAGE_KEY, LAST_USED_QUERY_ACTION_KEY, PARTITIONS_HIDDEN_COLUMNS_KEY, QUERY_INITIAL_MODE_KEY, QUERY_USE_MULTI_SCHEMA_KEY, SAVED_QUERIES_KEY, TENANT_INITIAL_PAGE_KEY, THEME_KEY, USE_BACKEND_PARAMS_FOR_TABLES_KEY, USE_CLUSTER_BALANCER_AS_BACKEND_KEY, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY, } from '../utils/constants';
|
2
|
+
import { ASIDE_HEADER_COMPACT_KEY, AUTOCOMPLETE_ON_ENTER, BINARY_DATA_IN_PLAIN_TEXT_DISPLAY, ENABLE_AUTOCOMPLETE, INVERTED_DISKS_KEY, LANGUAGE_KEY, LAST_USED_QUERY_ACTION_KEY, PARTITIONS_HIDDEN_COLUMNS_KEY, QUERY_INITIAL_MODE_KEY, QUERY_USE_MULTI_SCHEMA_KEY, SAVED_QUERIES_KEY, TENANT_INITIAL_PAGE_KEY, THEME_KEY, USE_BACKEND_PARAMS_FOR_TABLES_KEY, USE_CLUSTER_BALANCER_AS_BACKEND_KEY, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY, } from '../utils/constants';
|
3
3
|
import { QUERY_ACTIONS, QUERY_MODES } from '../utils/query';
|
4
4
|
import { parseJson } from '../utils/utils';
|
5
5
|
/** User settings keys and their default values */
|
@@ -19,6 +19,7 @@ export const DEFAULT_USER_SETTINGS = {
|
|
19
19
|
[USE_BACKEND_PARAMS_FOR_TABLES_KEY]: false,
|
20
20
|
[USE_CLUSTER_BALANCER_AS_BACKEND_KEY]: true,
|
21
21
|
[ENABLE_AUTOCOMPLETE]: false,
|
22
|
+
[AUTOCOMPLETE_ON_ENTER]: true,
|
22
23
|
};
|
23
24
|
class SettingsManager {
|
24
25
|
constructor() {
|