mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 09:33:34 -06:00
Loki: Fix duplicated rendering of resolution (#71670)
This commit is contained in:
parent
72a332685a
commit
b346c9b283
@ -94,10 +94,11 @@ describe('LokiQueryBuilderOptions', () => {
|
||||
});
|
||||
|
||||
it('shows correct options for metric query', async () => {
|
||||
setup({ expr: 'rate({foo="bar"}[5m]', step: '1m' });
|
||||
setup({ expr: 'rate({foo="bar"}[5m]', step: '1m', resolution: 2 });
|
||||
expect(screen.queryByText('Line limit: 20')).not.toBeInTheDocument();
|
||||
expect(screen.getByText('Type: Range')).toBeInTheDocument();
|
||||
expect(screen.getByText('Step: 1m')).toBeInTheDocument();
|
||||
expect(screen.getByText('Resolution: 1/2')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('does not shows resolution field if resolution is not set', async () => {
|
||||
|
@ -186,10 +186,6 @@ function getCollapsedInfo(
|
||||
items.push(`Legend: ${query.legendFormat}`);
|
||||
}
|
||||
|
||||
if (query.resolution) {
|
||||
items.push(`Resolution: ${resolutionLabel?.label}`);
|
||||
}
|
||||
|
||||
items.push(`Type: ${queryTypeLabel?.label}`);
|
||||
|
||||
if (isLogQuery) {
|
||||
|
Loading…
Reference in New Issue
Block a user