Skip to content

Commit 1b2fbe8

Browse files
committed
suggestions updated
1 parent 89d5aa7 commit 1b2fbe8

File tree

2 files changed

+4
-52
lines changed

2 files changed

+4
-52
lines changed

src/constants/editor.ts

+1-52
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CodeEditorSuggestionItem, CodeEditorSuggestionItemKind } from '@grafana/ui';
1+
import { CodeEditorSuggestionItem } from '@grafana/ui';
22

33
import { codeParameters, visualCodeParameters } from '../utils';
44

@@ -55,57 +55,6 @@ export const FORMAT_OPTIONS = [
5555
* Suggestions
5656
*/
5757
export const CODE_EDITOR_SUGGESTIONS: CodeEditorSuggestionItem[] = [
58-
{
59-
label: 'data',
60-
kind: CodeEditorSuggestionItemKind.Property,
61-
detail: 'Result set of panel queries.',
62-
},
63-
{
64-
label: 'theme',
65-
kind: CodeEditorSuggestionItemKind.Property,
66-
detail: 'Theme object.',
67-
},
68-
{
69-
label: 'echartsInstance',
70-
kind: CodeEditorSuggestionItemKind.Property,
71-
detail: 'Instance of the ECharts.',
72-
},
73-
{
74-
label: 'echarts',
75-
kind: CodeEditorSuggestionItemKind.Property,
76-
detail: 'ECharts library.',
77-
},
78-
{
79-
label: 'ecStat',
80-
kind: CodeEditorSuggestionItemKind.Property,
81-
detail: 'A statistical and data mining tool.',
82-
},
83-
{
84-
label: 'locationService',
85-
kind: CodeEditorSuggestionItemKind.Property,
86-
detail: 'Browser location and history.',
87-
},
88-
{
89-
label: 'eventBus',
90-
kind: CodeEditorSuggestionItemKind.Property,
91-
detail: 'Event bus for application events.',
92-
},
93-
{
94-
label: 'replaceVariables',
95-
kind: CodeEditorSuggestionItemKind.Method,
96-
detail: 'Interpolate variables.',
97-
},
98-
{
99-
label: 'notifySuccess',
100-
kind: CodeEditorSuggestionItemKind.Method,
101-
detail: 'Display successful notification.',
102-
},
103-
{
104-
label: 'notifyError',
105-
kind: CodeEditorSuggestionItemKind.Method,
106-
detail: 'Display error notification.',
107-
},
108-
10958
/**
11059
* Context
11160
*/

src/utils/code-parameters.ts

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { LocationService } from '@grafana/runtime';
33
import { CodeEditorSuggestionItemKind } from '@grafana/ui';
44
import { CodeParameterItem, CodeParametersBuilder } from '@volkovlabs/components';
55
import { ECharts } from 'echarts';
6+
import echartsStat from 'echarts-stat';
67

78
import { SeriesItem } from '../types';
89

@@ -40,6 +41,8 @@ const baseParametersConfig = {
4041
refresh: new CodeParameterItem<() => void>('Refresh dashboard.', CodeEditorSuggestionItemKind.Method),
4142
},
4243
},
44+
echarts: new CodeParameterItem<typeof echarts>('ECharts library.'),
45+
ecStat: new CodeParameterItem<typeof echartsStat>('ECharts statistical.'),
4346
},
4447
};
4548

0 commit comments

Comments
 (0)