ydb-embedded-ui 5.3.0 → 5.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/DiskPageTitle/DiskPageTitle.d.ts +11 -0
- package/dist/components/DiskPageTitle/DiskPageTitle.js +8 -0
- package/dist/components/DiskPageTitle/DiskPageTitle.scss +17 -0
- package/dist/{containers/Storage → components}/DiskStateProgressBar/DiskStateProgressBar.js +3 -3
- package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/dist/components/GroupInfo/GroupInfo.d.ts +8 -0
- package/dist/components/GroupInfo/GroupInfo.js +28 -0
- package/dist/components/GroupInfo/i18n/en.json +6 -0
- package/dist/components/GroupInfo/i18n/index.d.ts +1 -0
- package/dist/components/GroupInfo/i18n/index.js +4 -0
- package/dist/components/MetricChart/MetricChart.js +12 -5
- package/dist/components/MetricChart/colors.d.ts +2 -0
- package/dist/components/MetricChart/colors.js +21 -0
- package/dist/components/MetricChart/getDefaultDataFormatter.js +9 -0
- package/dist/components/MetricChart/types.d.ts +11 -2
- package/dist/components/MonacoEditor/MonacoEditor.d.ts +2 -0
- package/dist/components/MonacoEditor/MonacoEditor.js +7 -0
- package/dist/{containers/Storage → components}/PDiskPopup/PDiskPopup.d.ts +3 -3
- package/dist/{containers/Storage → components}/PDiskPopup/PDiskPopup.js +6 -5
- package/dist/components/PageMeta/PageMeta.d.ts +2 -1
- package/dist/components/PageMeta/PageMeta.js +9 -2
- package/dist/components/PageMeta/PageMeta.scss +9 -0
- package/dist/components/Stack/Stack.scss +2 -0
- package/dist/{containers/Storage → components}/VDisk/VDisk.d.ts +2 -2
- package/dist/{containers/Storage → components}/VDisk/VDisk.js +8 -8
- package/dist/{containers/Storage → components}/VDisk/VDisk.scss +1 -1
- package/dist/components/VDisk/VDiskWithDonorsStack.d.ts +12 -0
- package/dist/components/VDisk/VDiskWithDonorsStack.js +14 -0
- package/dist/components/VDiskInfo/VDiskInfo.d.ts +10 -0
- package/dist/components/VDiskInfo/VDiskInfo.js +113 -0
- package/dist/components/VDiskInfo/VDiskInfo.scss +8 -0
- package/dist/components/VDiskInfo/i18n/en.json +23 -0
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -0
- package/dist/components/VDiskInfo/i18n/index.js +4 -0
- package/dist/{containers/Storage → components}/VDiskPopup/VDiskPopup.d.ts +3 -3
- package/dist/{containers/Storage → components}/VDiskPopup/VDiskPopup.js +8 -7
- package/dist/components/VirtualTable/TableHead.d.ts +2 -1
- package/dist/components/VirtualTable/TableHead.js +6 -6
- package/dist/components/VirtualTable/constants.d.ts +1 -0
- package/dist/components/VirtualTable/constants.js +1 -0
- package/dist/containers/App/App.js +0 -2
- package/dist/containers/App/App.scss +3 -0
- package/dist/containers/App/Content.js +19 -5
- package/dist/containers/App/appSlots.d.ts +9 -3
- package/dist/containers/App/appSlots.js +2 -1
- package/dist/containers/Header/breadcrumbs.js +12 -0
- package/dist/containers/Header/i18n/en.json +1 -0
- package/dist/containers/Header/i18n/index.d.ts +1 -1
- package/dist/containers/Heatmap/HeatmapCanvas/HeatmapCanvas.js +2 -2
- package/dist/containers/Node/NodeStructure/NodeStructure.js +1 -1
- package/dist/containers/Node/NodeStructure/Pdisk.js +2 -2
- package/dist/containers/Node/NodeStructure/Vdisk.d.ts +6 -2
- package/dist/containers/Node/NodeStructure/Vdisk.js +5 -78
- package/dist/containers/Nodes/getNodesColumns.js +0 -1
- package/dist/containers/PDiskPage/PDiskPage.d.ts +3 -0
- package/dist/containers/{PDisk/PDisk.js → PDiskPage/PDiskPage.js} +30 -14
- package/dist/containers/{PDisk/PDisk.scss → PDiskPage/PDiskPage.scss} +1 -14
- package/dist/containers/PDiskPage/i18n/en.json +8 -0
- package/dist/containers/PDiskPage/i18n/index.d.ts +1 -0
- package/dist/containers/Storage/PDisk/PDisk.js +4 -10
- package/dist/containers/Storage/PDisk/PDisk.scss +0 -2
- package/dist/containers/Storage/Storage.js +1 -2
- package/dist/containers/Storage/StorageGroups/StorageGroups.scss +1 -7
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.d.ts +1 -1
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +9 -17
- package/dist/containers/Storage/VirtualStorage.js +3 -7
- package/dist/containers/Tablet/TabletControls/TabletControls.js +2 -1
- package/dist/containers/TabletsFilters/TabletsFilters.d.ts +2 -2
- package/dist/containers/TabletsFilters/TabletsFilters.js +7 -6
- package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.js +1 -1
- package/dist/containers/Tenant/Diagnostics/Network/Network.js +2 -2
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +1 -2
- package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/cpuDashboardConfig.js +14 -5
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +1 -1
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +5 -3
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +6 -4
- package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js +2 -2
- package/dist/containers/Tenant/Tenant.js +10 -5
- package/dist/containers/Tenants/Tenants.js +3 -2
- package/dist/containers/VDiskPage/VDiskPage.d.ts +3 -0
- package/dist/containers/VDiskPage/VDiskPage.js +109 -0
- package/dist/containers/VDiskPage/VDiskPage.scss +32 -0
- package/dist/containers/VDiskPage/i18n/en.json +9 -0
- package/dist/containers/VDiskPage/i18n/index.d.ts +1 -0
- package/dist/containers/VDiskPage/i18n/index.js +4 -0
- package/dist/containers/Versions/groupNodes.js +1 -1
- package/dist/routes.d.ts +3 -0
- package/dist/routes.js +5 -0
- package/dist/services/api.d.ts +12 -4
- package/dist/services/api.js +39 -4
- package/dist/store/configureStore.d.ts +4 -0
- package/dist/store/defaultStore.d.ts +2 -0
- package/dist/store/reducers/authentication/authentication.d.ts +3 -0
- package/dist/store/reducers/cluster/cluster.d.ts +1 -0
- package/dist/store/reducers/clusterNodes/clusterNodes.d.ts +1 -0
- package/dist/store/reducers/clusters/clusters.d.ts +1 -0
- package/dist/store/reducers/clusters/selectors.js +1 -1
- package/dist/store/reducers/describe.d.ts +2 -0
- package/dist/store/reducers/executeQuery.d.ts +1 -0
- package/dist/store/reducers/explainQuery.d.ts +2 -0
- package/dist/store/reducers/header/types.d.ts +4 -1
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +1 -0
- package/dist/store/reducers/heatmap.d.ts +1 -0
- package/dist/store/reducers/host.d.ts +1 -0
- package/dist/store/reducers/index.d.ts +3 -0
- package/dist/store/reducers/index.js +2 -0
- package/dist/store/reducers/network/network.d.ts +1 -0
- package/dist/store/reducers/node/node.d.ts +2 -0
- package/dist/store/reducers/node/selectors.js +1 -1
- package/dist/store/reducers/nodes/nodes.d.ts +2 -0
- package/dist/store/reducers/nodesList.d.ts +1 -0
- package/dist/store/reducers/olapStats.d.ts +1 -0
- package/dist/store/reducers/overview/overview.d.ts +2 -0
- package/dist/store/reducers/partitions/partitions.d.ts +1 -0
- package/dist/store/reducers/pdisk/pdisk.d.ts +2 -0
- package/dist/store/reducers/pdisk/utils.js +1 -1
- package/dist/store/reducers/preview.d.ts +1 -0
- package/dist/store/reducers/schema/schema.d.ts +1 -0
- package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +1 -0
- package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +1 -0
- package/dist/store/reducers/storage/storage.d.ts +2 -0
- package/dist/store/reducers/storage/types.d.ts +3 -1
- package/dist/store/reducers/storage/utils.d.ts +1 -1
- package/dist/store/reducers/storage/utils.js +8 -9
- package/dist/store/reducers/tablet.d.ts +2 -0
- package/dist/store/reducers/tablets.d.ts +1 -0
- package/dist/store/reducers/tabletsFilters.d.ts +1 -0
- package/dist/store/reducers/tenant/tenant.d.ts +1 -0
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +1 -0
- package/dist/store/reducers/tenantOverview/topNodesByCpu/topNodesByCpu.d.ts +1 -0
- package/dist/store/reducers/tenantOverview/topNodesByLoad/topNodesByLoad.d.ts +1 -0
- package/dist/store/reducers/tenantOverview/topNodesByMemory/topNodesByMemory.d.ts +1 -0
- package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.d.ts +1 -0
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +1 -0
- package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.d.ts +1 -0
- package/dist/store/reducers/tenants/selectors.js +1 -1
- package/dist/store/reducers/tenants/tenants.d.ts +1 -0
- package/dist/store/reducers/topic.d.ts +1 -0
- package/dist/store/reducers/vdisk/types.d.ts +25 -0
- package/dist/store/reducers/vdisk/utils.d.ts +11 -0
- package/dist/store/reducers/vdisk/utils.js +33 -0
- package/dist/store/reducers/vdisk/vdisk.d.ts +100 -0
- package/dist/store/reducers/vdisk/vdisk.js +64 -0
- package/dist/store/state-url-mapping.js +6 -4
- package/dist/types/api/storage.d.ts +2 -0
- package/dist/utils/bytesParsers/__test__/formatBytes.test.js +7 -7
- package/dist/utils/clusterVersionColors.js +1 -1
- package/dist/utils/dataFormatters/dataFormatters.js +1 -0
- package/dist/utils/disks/constants.js +2 -2
- package/dist/utils/disks/types.d.ts +5 -1
- package/dist/utils/filters.js +1 -1
- package/dist/utils/hooks/useTableResize.d.ts +1 -1
- package/dist/utils/hooks/useTableResize.js +5 -3
- package/dist/utils/lazyComponent.d.ts +4 -0
- package/dist/utils/lazyComponent.js +25 -0
- package/dist/utils/monaco/index.d.ts +1 -0
- package/dist/utils/monaco/index.js +4 -0
- package/dist/utils/monaco/s-expression/constants.d.ts +1 -0
- package/dist/utils/monaco/s-expression/constants.js +1 -0
- package/dist/utils/monaco/s-expression/registerLanguage.d.ts +1 -0
- package/dist/utils/{monaco.js → monaco/s-expression/registerLanguage.js} +2 -19
- package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/generateSuggestions.d.ts +2 -2
- package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/generateSuggestions.js +40 -11
- package/dist/utils/monaco/yqlSuggestions/registerCompletionItemProvider.d.ts +1 -0
- package/dist/utils/monaco/yqlSuggestions/registerCompletionItemProvider.js +15 -0
- package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/yqlSuggestions.js +1 -1
- package/dist/utils/numeral.js +7 -1
- package/dist/utils/storage.d.ts +1 -0
- package/dist/utils/storage.js +1 -0
- package/dist/utils/timeParsers/parsers.js +1 -1
- package/package.json +5 -2
- package/dist/containers/PDisk/PDisk.d.ts +0 -3
- package/dist/containers/PDisk/i18n/en.json +0 -6
- package/dist/containers/PDisk/i18n/index.d.ts +0 -1
- package/dist/containers/Storage/DiskStateProgressBar/index.d.ts +0 -1
- package/dist/containers/Storage/DiskStateProgressBar/index.js +0 -1
- package/dist/containers/Storage/PDiskPopup/index.d.ts +0 -1
- package/dist/containers/Storage/PDiskPopup/index.js +0 -1
- package/dist/containers/Storage/VDisk/index.d.ts +0 -1
- package/dist/containers/Storage/VDisk/index.js +0 -1
- package/dist/containers/Storage/VDiskPopup/index.d.ts +0 -1
- package/dist/containers/Storage/VDiskPopup/index.js +0 -1
- package/dist/containers/Storage/utils/types.d.ts +0 -5
- package/dist/utils/monaco.d.ts +0 -3
- /package/dist/{containers/Storage → components}/DiskStateProgressBar/DiskStateProgressBar.d.ts +0 -0
- /package/dist/{containers/Storage → components}/DiskStateProgressBar/DiskStateProgressBar.scss +0 -0
- /package/dist/{containers/Storage → components}/PDiskPopup/PDiskPopup.scss +0 -0
- /package/dist/{containers/Storage → components}/VDiskPopup/VDiskPopup.scss +0 -0
- /package/dist/containers/{PDisk → PDiskPage}/PDiskGroups.d.ts +0 -0
- /package/dist/containers/{PDisk → PDiskPage}/PDiskGroups.js +0 -0
- /package/dist/containers/{PDisk → PDiskPage}/i18n/index.js +0 -0
- /package/dist/containers/{PDisk → PDiskPage}/shared.d.ts +0 -0
- /package/dist/containers/{PDisk → PDiskPage}/shared.js +0 -0
- /package/dist/{containers/Storage/utils → store/reducers/vdisk}/types.js +0 -0
- /package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/constants.d.ts +0 -0
- /package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/constants.js +0 -0
- /package/dist/utils/{yqlSuggestions → monaco/yqlSuggestions}/yqlSuggestions.d.ts +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
export declare const LANGUAGE_S_EXPRESSION_ID = "s-expression";
|
@@ -0,0 +1 @@
|
|
1
|
+
export const LANGUAGE_S_EXPRESSION_ID = 's-expression';
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function registerSExpressionLanguage(): void;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import * as monaco from 'monaco-editor';
|
2
|
-
import {
|
3
|
-
export
|
4
|
-
function registerSExpressionLanguage() {
|
2
|
+
import { LANGUAGE_S_EXPRESSION_ID } from './constants';
|
3
|
+
export function registerSExpressionLanguage() {
|
5
4
|
monaco.languages.register({ id: LANGUAGE_S_EXPRESSION_ID });
|
6
5
|
monaco.languages.setMonarchTokensProvider(LANGUAGE_S_EXPRESSION_ID, {
|
7
6
|
defaultToken: 'text',
|
@@ -58,19 +57,3 @@ function registerSExpressionLanguage() {
|
|
58
57
|
},
|
59
58
|
});
|
60
59
|
}
|
61
|
-
let completionProvider;
|
62
|
-
function disableCodeSuggestions() {
|
63
|
-
if (completionProvider) {
|
64
|
-
completionProvider.dispose();
|
65
|
-
}
|
66
|
-
}
|
67
|
-
export function registerYQLCompletionItemProvider(database) {
|
68
|
-
disableCodeSuggestions();
|
69
|
-
completionProvider = monaco.languages.registerCompletionItemProvider('sql', {
|
70
|
-
triggerCharacters: [' ', '\n', '', ',', '.', '`', '('],
|
71
|
-
provideCompletionItems: createProvideSuggestionsFunction(database),
|
72
|
-
});
|
73
|
-
}
|
74
|
-
export function registerLanguages() {
|
75
|
-
registerSExpressionLanguage();
|
76
|
-
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
2
|
-
import { ColumnAliasSuggestion, KeywordSuggestion, YqlAutocompleteResult } from '@gravity-ui/websql-autocomplete';
|
1
|
+
import type * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
2
|
+
import type { ColumnAliasSuggestion, KeywordSuggestion, YqlAutocompleteResult } from '@gravity-ui/websql-autocomplete';
|
3
3
|
export declare function generateColumnsSuggestion(rangeToInsertSuggestion: monaco.IRange, suggestColumns: YqlAutocompleteResult['suggestColumns'] | undefined, database: string): Promise<monaco.languages.CompletionItem[]>;
|
4
4
|
export declare function generateColumnAliasesSuggestion(rangeToInsertSuggestion: monaco.IRange, suggestColumnAliases?: ColumnAliasSuggestion[]): {
|
5
5
|
label: string;
|
@@ -1,5 +1,34 @@
|
|
1
|
-
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
2
1
|
import { AggregateFunctions, Pragmas, SimpleFunctions, SimpleTypes, TableFunction, Udfs, WindowFunctions, } from './constants';
|
2
|
+
const CompletionItemKind = {
|
3
|
+
Method: 0,
|
4
|
+
Function: 1,
|
5
|
+
Constructor: 2,
|
6
|
+
Field: 3,
|
7
|
+
Variable: 4,
|
8
|
+
Class: 5,
|
9
|
+
Struct: 6,
|
10
|
+
Interface: 7,
|
11
|
+
Module: 8,
|
12
|
+
Property: 9,
|
13
|
+
Event: 10,
|
14
|
+
Operator: 11,
|
15
|
+
Unit: 12,
|
16
|
+
Value: 13,
|
17
|
+
Constant: 14,
|
18
|
+
Enum: 15,
|
19
|
+
EnumMember: 16,
|
20
|
+
Keyword: 17,
|
21
|
+
Text: 18,
|
22
|
+
Color: 19,
|
23
|
+
File: 20,
|
24
|
+
Reference: 21,
|
25
|
+
Customcolor: 22,
|
26
|
+
Folder: 23,
|
27
|
+
TypeParameter: 24,
|
28
|
+
User: 25,
|
29
|
+
Issue: 26,
|
30
|
+
Snippet: 27,
|
31
|
+
};
|
3
32
|
const re = /[\s'"-/@]/;
|
4
33
|
function wrapStringToBackticks(value) {
|
5
34
|
let result = value;
|
@@ -124,7 +153,7 @@ export async function generateColumnsSuggestion(rangeToInsertSuggestion, suggest
|
|
124
153
|
suggestions.push({
|
125
154
|
label: columnNameSuggestion,
|
126
155
|
insertText: columnNameSuggestion,
|
127
|
-
kind:
|
156
|
+
kind: CompletionItemKind.Field,
|
128
157
|
detail: 'Column',
|
129
158
|
range: rangeToInsertSuggestion,
|
130
159
|
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestColumns')),
|
@@ -140,7 +169,7 @@ export function generateColumnAliasesSuggestion(rangeToInsertSuggestion, suggest
|
|
140
169
|
return suggestColumnAliases === null || suggestColumnAliases === void 0 ? void 0 : suggestColumnAliases.map((columnAliasSuggestion) => ({
|
141
170
|
label: columnAliasSuggestion.name,
|
142
171
|
insertText: columnAliasSuggestion.name,
|
143
|
-
kind:
|
172
|
+
kind: CompletionItemKind.Field,
|
144
173
|
detail: 'Column alias',
|
145
174
|
range: rangeToInsertSuggestion,
|
146
175
|
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestColumnAliases')),
|
@@ -153,7 +182,7 @@ export function generateKeywordsSuggestion(rangeToInsertSuggestion, suggestKeywo
|
|
153
182
|
return suggestKeywords === null || suggestKeywords === void 0 ? void 0 : suggestKeywords.map((keywordSuggestion) => ({
|
154
183
|
label: keywordSuggestion.value,
|
155
184
|
insertText: keywordSuggestion.value,
|
156
|
-
kind:
|
185
|
+
kind: CompletionItemKind.Keyword,
|
157
186
|
detail: 'Keyword',
|
158
187
|
range: rangeToInsertSuggestion,
|
159
188
|
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestKeywords')),
|
@@ -167,7 +196,7 @@ export async function generateSimpleFunctionsSuggestion(rangeToInsertSuggestion)
|
|
167
196
|
return functions.map((el) => ({
|
168
197
|
label: el,
|
169
198
|
insertText: el,
|
170
|
-
kind:
|
199
|
+
kind: CompletionItemKind.Function,
|
171
200
|
detail: 'Function',
|
172
201
|
range: rangeToInsertSuggestion,
|
173
202
|
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestFunctions')),
|
@@ -178,7 +207,7 @@ export async function generateSimpleTypesSuggestion(rangeToInsertSuggestion) {
|
|
178
207
|
return simpleTypes.map((el) => ({
|
179
208
|
label: el,
|
180
209
|
insertText: el,
|
181
|
-
kind:
|
210
|
+
kind: CompletionItemKind.TypeParameter,
|
182
211
|
detail: 'Type',
|
183
212
|
range: rangeToInsertSuggestion,
|
184
213
|
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestSimpleTypes')),
|
@@ -189,7 +218,7 @@ export async function generateUdfSuggestion(rangeToInsertSuggestion) {
|
|
189
218
|
return udfs.map((el) => ({
|
190
219
|
label: el,
|
191
220
|
insertText: el,
|
192
|
-
kind:
|
221
|
+
kind: CompletionItemKind.Function,
|
193
222
|
detail: 'UDF',
|
194
223
|
range: rangeToInsertSuggestion,
|
195
224
|
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestUdfs')),
|
@@ -200,7 +229,7 @@ export async function generateWindowFunctionsSuggestion(rangeToInsertSuggestion)
|
|
200
229
|
return windowFunctions.map((el) => ({
|
201
230
|
label: el,
|
202
231
|
insertText: el,
|
203
|
-
kind:
|
232
|
+
kind: CompletionItemKind.Function,
|
204
233
|
detail: 'Window function',
|
205
234
|
range: rangeToInsertSuggestion,
|
206
235
|
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestWindowFunctions')),
|
@@ -211,7 +240,7 @@ export async function generateTableFunctionsSuggestion(rangeToInsertSuggestion)
|
|
211
240
|
return tableFunctions.map((el) => ({
|
212
241
|
label: el,
|
213
242
|
insertText: el,
|
214
|
-
kind:
|
243
|
+
kind: CompletionItemKind.Function,
|
215
244
|
detail: 'Table function',
|
216
245
|
range: rangeToInsertSuggestion,
|
217
246
|
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestTableFunctions')),
|
@@ -222,7 +251,7 @@ export async function generateAggregateFunctionsSuggestion(rangeToInsertSuggesti
|
|
222
251
|
return aggreagteFunctions.map((el) => ({
|
223
252
|
label: el,
|
224
253
|
insertText: el,
|
225
|
-
kind:
|
254
|
+
kind: CompletionItemKind.Function,
|
226
255
|
detail: 'Aggregate function',
|
227
256
|
range: rangeToInsertSuggestion,
|
228
257
|
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestAggregateFunctions')),
|
@@ -233,7 +262,7 @@ export async function generatePragmasSuggestion(rangeToInsertSuggestion) {
|
|
233
262
|
return pragmas.map((el) => ({
|
234
263
|
label: el,
|
235
264
|
insertText: el,
|
236
|
-
kind:
|
265
|
+
kind: CompletionItemKind.Module,
|
237
266
|
detail: 'Pragma',
|
238
267
|
range: rangeToInsertSuggestion,
|
239
268
|
sortText: suggestionIndexToWeight(getSuggestionIndex('suggestPragmas')),
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function registerYQLCompletionItemProvider(database: string): void;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import * as monaco from 'monaco-editor';
|
2
|
+
import { createProvideSuggestionsFunction } from './yqlSuggestions';
|
3
|
+
let completionProvider;
|
4
|
+
function disableCodeSuggestions() {
|
5
|
+
if (completionProvider) {
|
6
|
+
completionProvider.dispose();
|
7
|
+
}
|
8
|
+
}
|
9
|
+
export function registerYQLCompletionItemProvider(database) {
|
10
|
+
disableCodeSuggestions();
|
11
|
+
completionProvider = monaco.languages.registerCompletionItemProvider('sql', {
|
12
|
+
triggerCharacters: [' ', '\n', '', ',', '.', '`', '('],
|
13
|
+
provideCompletionItems: createProvideSuggestionsFunction(database),
|
14
|
+
});
|
15
|
+
}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { parseYqlQuery } from '@gravity-ui/websql-autocomplete';
|
2
1
|
import { generateAggregateFunctionsSuggestion, generateColumnAliasesSuggestion, generateColumnsSuggestion, generateEntitiesSuggestion, generateKeywordsSuggestion, generatePragmasSuggestion, generateSimpleFunctionsSuggestion, generateSimpleTypesSuggestion, generateTableFunctionsSuggestion, generateUdfSuggestion, generateWindowFunctionsSuggestion, } from './generateSuggestions';
|
3
2
|
export function createProvideSuggestionsFunction(database) {
|
4
3
|
return async (model, monacoCursorPosition, _context, _token) => {
|
@@ -12,6 +11,7 @@ export function createProvideSuggestionsFunction(database) {
|
|
12
11
|
};
|
13
12
|
}
|
14
13
|
async function getSuggestions(model, cursorPosition, rangeToInsertSuggestion, database) {
|
14
|
+
const { parseYqlQuery } = await import('@gravity-ui/websql-autocomplete');
|
15
15
|
const parseResult = parseYqlQuery(model.getValue(), cursorPosition);
|
16
16
|
let entitiesSuggestions = [];
|
17
17
|
let functionsSuggestions = [];
|
package/dist/utils/numeral.js
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
import numeral from 'numeral';
|
2
2
|
import 'numeral/locales'; // Without this numeral will throw an error when using not 'en' locale
|
3
|
-
import { i18n } from './i18n';
|
3
|
+
import { Lang, i18n } from './i18n';
|
4
|
+
// Set space delimiter for all locales possible in project
|
5
|
+
Object.values(Lang).forEach((value) => {
|
6
|
+
if (numeral.locales[value]) {
|
7
|
+
numeral.locales[value].delimiters.thousands = ' ';
|
8
|
+
}
|
9
|
+
});
|
4
10
|
numeral.locale(i18n.lang);
|
5
11
|
export const configuredNumeral = numeral;
|
package/dist/utils/storage.d.ts
CHANGED
@@ -12,6 +12,7 @@ export declare const getUsage: <T extends EntityWithUsage>(data: T, step?: numbe
|
|
12
12
|
export declare const STORAGE_SORT_VALUES: {
|
13
13
|
readonly PoolName: "PoolName";
|
14
14
|
readonly Kind: "Kind";
|
15
|
+
readonly MediaType: "MediaType";
|
15
16
|
readonly Erasure: "Erasure";
|
16
17
|
readonly Degraded: "Degraded";
|
17
18
|
readonly Usage: "Usage";
|
package/dist/utils/storage.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { isNumeric } from '../utils';
|
2
|
-
import { parseProtobufDurationToMs, parseProtobufTimestampToMs } from '
|
2
|
+
import { parseProtobufDurationToMs, parseProtobufTimestampToMs } from './protobufParsers';
|
3
3
|
export const parseLag = (value) => value ? parseProtobufDurationToMs(value) : 0;
|
4
4
|
export const parseTimestampToIdleTime = (value) => {
|
5
5
|
if (!value) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ydb-embedded-ui",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.5.0",
|
4
4
|
"files": [
|
5
5
|
"dist"
|
6
6
|
],
|
@@ -11,7 +11,7 @@
|
|
11
11
|
},
|
12
12
|
"dependencies": {
|
13
13
|
"@gravity-ui/axios-wrapper": "^1.4.1",
|
14
|
-
"@gravity-ui/chartkit": "^4.
|
14
|
+
"@gravity-ui/chartkit": "^4.23.0",
|
15
15
|
"@gravity-ui/components": "^2.12.0",
|
16
16
|
"@gravity-ui/date-utils": "^1.4.2",
|
17
17
|
"@gravity-ui/i18n": "^1.2.0",
|
@@ -24,6 +24,7 @@
|
|
24
24
|
"@reduxjs/toolkit": "^2.2.1",
|
25
25
|
"axios": "^1.6.7",
|
26
26
|
"bem-cn-lite": "^4.1.0",
|
27
|
+
"colord": "^2.9.3",
|
27
28
|
"copy-to-clipboard": "^3.3.3",
|
28
29
|
"crc-32": "^1.2.2",
|
29
30
|
"history": "^4.10.1",
|
@@ -50,6 +51,7 @@
|
|
50
51
|
"ydb-ui-components": "^3.6.0"
|
51
52
|
},
|
52
53
|
"scripts": {
|
54
|
+
"analyze": "source-map-explorer 'build/static/js/*.js'",
|
53
55
|
"start": "react-app-rewired start",
|
54
56
|
"dev": "DISABLE_ESLINT_PLUGIN=true TSC_COMPILE_ON_ERROR=true REACT_APP_BACKEND=http://localhost:8765 REACT_APP_META_BACKEND=undefined npm start",
|
55
57
|
"build": "rm -rf build && DISABLE_ESLINT_PLUGIN=true react-app-rewired build",
|
@@ -149,6 +151,7 @@
|
|
149
151
|
"react-dom": "^17.0.2",
|
150
152
|
"react-scripts": "^5.0.1",
|
151
153
|
"sass": "^1.32.8",
|
154
|
+
"source-map-explorer": "^2.5.3",
|
152
155
|
"stylelint": "^14.3.0",
|
153
156
|
"ts-jest": "^28.0.7",
|
154
157
|
"typescript": "^4.5.5"
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const pDiskPageKeyset: (key: "groups" | "node" | "pdisk" | "fqdn", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './DiskStateProgressBar';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './DiskStateProgressBar';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './PDiskPopup';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './PDiskPopup';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './VDisk';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './VDisk';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './VDiskPopup';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './VDiskPopup';
|
package/dist/utils/monaco.d.ts
DELETED
/package/dist/{containers/Storage → components}/DiskStateProgressBar/DiskStateProgressBar.d.ts
RENAMED
File without changes
|
/package/dist/{containers/Storage → components}/DiskStateProgressBar/DiskStateProgressBar.scss
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|