Loki: Fix duplicated rendering of resolution (#71670)

This commit is contained in:
Ivana Huckova 2023-07-15 11:13:12 +02:00 committed by GitHub
parent 72a332685a
commit b346c9b283
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -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 () => {

View File

@ -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) {