From 2195ea90ef12ff01fd71ea87e19b818eadbfbb63 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Wed, 11 Sep 2024 13:42:22 -0700 Subject: [PATCH] handle edge case of default search pipeline on search resp w/ no search req Signed-off-by: Tyler Ohlsen --- public/pages/workflow_detail/tools/tools.tsx | 2 +- public/pages/workflow_detail/workflow_detail.test.tsx | 2 +- .../workflow_inputs/processor_inputs/input_transform_modal.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/pages/workflow_detail/tools/tools.tsx b/public/pages/workflow_detail/tools/tools.tsx index f861b93f..c11f2be0 100644 --- a/public/pages/workflow_detail/tools/tools.tsx +++ b/public/pages/workflow_detail/tools/tools.tsx @@ -42,7 +42,7 @@ const inputTabs = [ }, { id: TAB_ID.QUERY, - name: 'Run queries', + name: 'Run query', disabled: false, }, { diff --git a/public/pages/workflow_detail/workflow_detail.test.tsx b/public/pages/workflow_detail/workflow_detail.test.tsx index 2d22781a..7b07315c 100644 --- a/public/pages/workflow_detail/workflow_detail.test.tsx +++ b/public/pages/workflow_detail/workflow_detail.test.tsx @@ -79,7 +79,7 @@ describe('WorkflowDetail', () => { expect(getByText('Visual')).toBeInTheDocument(); expect(getByText('JSON')).toBeInTheDocument(); expect(getByRole('tab', { name: 'Run ingestion' })).toBeInTheDocument(); - expect(getByRole('tab', { name: 'Run queries' })).toBeInTheDocument(); + expect(getByRole('tab', { name: 'Run query' })).toBeInTheDocument(); expect(getByRole('tab', { name: 'Errors' })).toBeInTheDocument(); expect(getByRole('tab', { name: 'Resources' })).toBeInTheDocument(); }); diff --git a/public/pages/workflow_detail/workflow_inputs/processor_inputs/input_transform_modal.tsx b/public/pages/workflow_detail/workflow_inputs/processor_inputs/input_transform_modal.tsx index 2aac3a98..2da16980 100644 --- a/public/pages/workflow_detail/workflow_inputs/processor_inputs/input_transform_modal.tsx +++ b/public/pages/workflow_detail/workflow_inputs/processor_inputs/input_transform_modal.tsx @@ -249,7 +249,7 @@ export function InputTransformModal(props: InputTransformModalProps) { index: values.search.index.name, body: JSON.stringify({ ...JSON.parse(values.search.request as string), - search_pipeline: curSearchPipeline, + search_pipeline: curSearchPipeline || {}, }), }, dataSourceId,