mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(loki-completions): remove rate_interval
Not supported
This commit is contained in:
parent
dea9dc2f0f
commit
3ae2769343
@ -160,7 +160,16 @@ describe('getCompletions', () => {
|
||||
const situation: Situation = { type: 'IN_DURATION' };
|
||||
const completions = await getCompletions(situation, completionProvider);
|
||||
|
||||
expect(completions).toHaveLength(9);
|
||||
expect(completions).toEqual([
|
||||
{ insertText: '$__interval', label: '$__interval', type: 'DURATION' },
|
||||
{ insertText: '$__range', label: '$__range', type: 'DURATION' },
|
||||
{ insertText: '1m', label: '1m', type: 'DURATION' },
|
||||
{ insertText: '5m', label: '5m', type: 'DURATION' },
|
||||
{ insertText: '10m', label: '10m', type: 'DURATION' },
|
||||
{ insertText: '30m', label: '30m', type: 'DURATION' },
|
||||
{ insertText: '1h', label: '1h', type: 'DURATION' },
|
||||
{ insertText: '1d', label: '1d', type: 'DURATION' },
|
||||
]);
|
||||
});
|
||||
|
||||
test('Returns completion options when the situation is IN_GROUPING', async () => {
|
||||
|
@ -55,21 +55,13 @@ const FUNCTION_COMPLETIONS: Completion[] = RANGE_VEC_FUNCTIONS.map((f) => ({
|
||||
documentation: f.documentation,
|
||||
}));
|
||||
|
||||
const DURATION_COMPLETIONS: Completion[] = [
|
||||
'$__interval',
|
||||
'$__range',
|
||||
'$__rate_interval',
|
||||
'1m',
|
||||
'5m',
|
||||
'10m',
|
||||
'30m',
|
||||
'1h',
|
||||
'1d',
|
||||
].map((text) => ({
|
||||
const DURATION_COMPLETIONS: Completion[] = ['$__interval', '$__range', '1m', '5m', '10m', '30m', '1h', '1d'].map(
|
||||
(text) => ({
|
||||
type: 'DURATION',
|
||||
label: text,
|
||||
insertText: text,
|
||||
}));
|
||||
})
|
||||
);
|
||||
|
||||
const LINE_FILTER_COMPLETIONS: Completion[] = ['|=', '!=', '|~', '!~'].map((item) => ({
|
||||
type: 'LINE_FILTER',
|
||||
|
Loading…
Reference in New Issue
Block a user