From 458bced826627d9a6d340a8f196202fd3cda4644 Mon Sep 17 00:00:00 2001 From: Olof Bourghardt Date: Fri, 27 Aug 2021 10:36:18 +0200 Subject: [PATCH] Jaeger: fix bug where query is executed twice (#38550) * Jaeger: add empty callback to QueryField onBlur to stop query from being run twice * Jaeger: add wait call on 500ms to accomodate for debouncing by the QueryField component --- e2e/suite1/specs/trace-view-scrolling.spec.ts | 4 +++- .../app/plugins/datasource/jaeger/components/QueryEditor.tsx | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/e2e/suite1/specs/trace-view-scrolling.spec.ts b/e2e/suite1/specs/trace-view-scrolling.spec.ts index ea438bdaea6..2fca9a7e7c2 100644 --- a/e2e/suite1/specs/trace-view-scrolling.spec.ts +++ b/e2e/suite1/specs/trace-view-scrolling.spec.ts @@ -21,7 +21,9 @@ describe('Trace view', () => { e2e.components.QueryField.container().should('be.visible').type('long-trace'); - e2e.components.RefreshPicker.runButton().should('be.visible').focus(); + e2e().wait(500); + + e2e.components.RefreshPicker.runButton().should('be.visible').click(); e2e().wait('@longTrace'); diff --git a/public/app/plugins/datasource/jaeger/components/QueryEditor.tsx b/public/app/plugins/datasource/jaeger/components/QueryEditor.tsx index a440a25483d..cf8ce3b3b57 100644 --- a/public/app/plugins/datasource/jaeger/components/QueryEditor.tsx +++ b/public/app/plugins/datasource/jaeger/components/QueryEditor.tsx @@ -40,6 +40,7 @@ export function QueryEditor({ datasource, query, onChange, onRunQuery }: Props) query={query.query} onChange={onChangeQuery} onRunQuery={onRunQuery} + onBlur={() => {}} placeholder={'Enter a Trace ID (run with Shift+Enter)'} portalOrigin="jaeger" />