AzureMonitor: Fix Kusto editor schema (#47576)

This commit is contained in:
Andres Martinez Gotor 2022-04-12 07:42:33 -07:00 committed by GitHub
parent 3e030d137f
commit 35f52aee55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 8 deletions

View File

@ -257,7 +257,7 @@
"@grafana/slate-react": "0.22.10-grafana",
"@grafana/ui": "workspace:*",
"@jaegertracing/jaeger-ui-components": "workspace:*",
"@kusto/monaco-kusto": "4.1.6",
"@kusto/monaco-kusto": "5.0.0",
"@lezer/common": "0.15.12",
"@lezer/lr": "0.15.8",
"@lingui/core": "3.13.2",

View File

@ -1,5 +1,6 @@
import { concat, find, flattenDeep, forEach, get, map } from 'lodash';
import { AnnotationEvent, dateTime, TimeSeries } from '@grafana/data';
import { concat, find, flattenDeep, forEach, get, map } from 'lodash';
import { AzureLogsTableData, AzureLogsVariable } from '../types';
import { AzureLogAnalyticsMetadata } from '../types/logAnalyticsMetadata';
@ -221,6 +222,26 @@ export function transformMetadataToKustoSchema(sourceSchema: AzureLogAnalyticsMe
minorVersion: 0,
};
// TODO: We should define macros here as functions so they are interpreted as valid
// But we cannot do so for the issues listed here: https://github.com/Azure/monaco-kusto/issues/189
// For example:
// database.functions.push(
// {
// name: '$__timeFilter',
// body: '',
// inputParameters: [
// {
// name: 'timeColumn',
// type: 'System.String',
// cslType: 'string',
// cslDefaultValue: 'Timestamp',
// },
// ],
// docString: 'Filter by a time column',
// functionKind: 'Unknown',
// },
// );
return {
clusterType: 'Engine',
cluster: {

View File

@ -5180,15 +5180,15 @@ __metadata:
languageName: node
linkType: hard
"@kusto/monaco-kusto@npm:4.1.6":
version: 4.1.6
resolution: "@kusto/monaco-kusto@npm:4.1.6"
"@kusto/monaco-kusto@npm:5.0.0":
version: 5.0.0
resolution: "@kusto/monaco-kusto@npm:5.0.0"
dependencies:
"@kusto/language-service": 2.0.0-beta.0
"@kusto/language-service-next": 0.0.54
peerDependencies:
monaco-editor: ^0.24.0
checksum: c01440cc8a8511e3afdf6c63e99e23cac976237f423d083384e3ee0605935fba5b69cc20627d45bc56bac82ce42ec6f613282d24b12b3dc0a3456ab5ff631238
monaco-editor: 0.33.0
checksum: 961bcae8a84562ad0d1aa199bdacbe5adfffafb01e98a2cf927883331d45ad8fcdf7385f9bde00eed16f74a33e0dea41f9eb80127e2e5a341ea3b8a2aa9fb2d8
languageName: node
linkType: hard
@ -20427,7 +20427,7 @@ __metadata:
"@grafana/tsconfig": ^1.2.0-rc1
"@grafana/ui": "workspace:*"
"@jaegertracing/jaeger-ui-components": "workspace:*"
"@kusto/monaco-kusto": 4.1.6
"@kusto/monaco-kusto": 5.0.0
"@lezer/common": 0.15.12
"@lezer/lr": 0.15.8
"@lingui/cli": 3.13.2