mirror of
https://github.com/grafana/grafana.git
synced 2025-09-27 20:14:41 +08:00

* Create a "monarch" folder with everything you need to do syntax highlighting and autocompletion. * Use this new monarch folder with existing cloudwatch sql. * Add metric math syntax highlighting and autocomplete. * Make autocomplete "smarter": - search always inserts a string as first arg - strings can't contain predefined functions - operators follow the last closing ) * Add some tests for Metric Math's CompletionItemProvider. * Fixes After CR: - refactor CompletionItemProvider, so that it only requires args that are dynamic or outside of it's responsibility - Update and add tests with mocked monaco - Add more autocomplete suggestions for SEARCH expression functions - sort keywords and give different priority from function to make more visually distinctive. * Change QueryEditor to auto-resize and look more like the one in Prometheus. * Add autocomplete for time periods for the third arg of Search. * More CR fixes: - fix missing break - add unit tests for statementPosition - fix broken time period - sort time periods * Bug fix
11 lines
343 B
TypeScript
11 lines
343 B
TypeScript
import { LanguageDefinition } from '../monarch/register';
|
|
|
|
const cloudWatchSqlLanguageDefinition: LanguageDefinition = {
|
|
id: 'cloudwatch-sql',
|
|
extensions: ['.cloudwatchSql'],
|
|
aliases: ['CloudWatch', 'cloudwatch', 'CloudWatchSQL'],
|
|
mimetypes: [],
|
|
loader: () => import('./language'),
|
|
};
|
|
export default cloudWatchSqlLanguageDefinition;
|