From e225d46d1e952a9f073016a363592f5430cafd0d Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Mon, 4 Nov 2024 09:20:17 -0800 Subject: [PATCH] Add consistency in form modal footer btns Signed-off-by: Tyler Ohlsen --- .../ingest_inputs/source_data_modal.tsx | 8 ++-- .../modals/input_transform_modal.tsx | 2 +- .../modals/output_transform_modal.tsx | 48 ++++++++++--------- .../search_inputs/edit_query_modal.tsx | 8 ++-- 4 files changed, 34 insertions(+), 32 deletions(-) diff --git a/public/pages/workflow_detail/workflow_inputs/ingest_inputs/source_data_modal.tsx b/public/pages/workflow_detail/workflow_inputs/ingest_inputs/source_data_modal.tsx index ec700b7d..2f74402e 100644 --- a/public/pages/workflow_detail/workflow_inputs/ingest_inputs/source_data_modal.tsx +++ b/public/pages/workflow_detail/workflow_inputs/ingest_inputs/source_data_modal.tsx @@ -22,6 +22,7 @@ import { EuiSmallFilterButton, EuiSuperSelectOption, EuiCompressedSuperSelect, + EuiSmallButtonEmpty, } from '@elastic/eui'; import { JsonField } from '../input_fields'; import { @@ -297,14 +298,13 @@ export function SourceDataModal(props: SourceDataProps) { - onClose()} - fill={false} color="primary" data-testid="closeSourceDataButton" > Cancel - + onUpdate()} isLoading={isUpdating} @@ -313,7 +313,7 @@ export function SourceDataModal(props: SourceDataProps) { color="primary" data-testid="updateSourceDataButton" > - Update + Save diff --git a/public/pages/workflow_detail/workflow_inputs/processor_inputs/modals/input_transform_modal.tsx b/public/pages/workflow_detail/workflow_inputs/processor_inputs/modals/input_transform_modal.tsx index 33b8ee75..53d1ed47 100644 --- a/public/pages/workflow_detail/workflow_inputs/processor_inputs/modals/input_transform_modal.tsx +++ b/public/pages/workflow_detail/workflow_inputs/processor_inputs/modals/input_transform_modal.tsx @@ -569,9 +569,9 @@ export function InputTransformModal(props: InputTransformModalProps) { } color="warning" /> + )} - {props.context === PROCESSOR_CONTEXT.SEARCH_RESPONSE && ( <> {OneToOneConfig} diff --git a/public/pages/workflow_detail/workflow_inputs/processor_inputs/modals/output_transform_modal.tsx b/public/pages/workflow_detail/workflow_inputs/processor_inputs/modals/output_transform_modal.tsx index ea4898f4..50b5d37c 100644 --- a/public/pages/workflow_detail/workflow_inputs/processor_inputs/modals/output_transform_modal.tsx +++ b/public/pages/workflow_detail/workflow_inputs/processor_inputs/modals/output_transform_modal.tsx @@ -492,29 +492,31 @@ root object selector "${JSONPATH_ROOT_SELECTOR}"`} - {(onIngestAndNoDocs || onSearchAndNoQuery) && ( - <> - - - {(props.context === PROCESSOR_CONTEXT.INGEST || - props.context === - PROCESSOR_CONTEXT.SEARCH_RESPONSE) && ( - <> - {FullResponsePathConfig} - - - )} - {FetchButton} - - )} + <> + {(onIngestAndNoDocs || onSearchAndNoQuery) && ( + <> + + + + )} + {(props.context === PROCESSOR_CONTEXT.INGEST || + props.context === + PROCESSOR_CONTEXT.SEARCH_RESPONSE) && ( + <> + {FullResponsePathConfig} + + + )} + {FetchButton} + diff --git a/public/pages/workflow_detail/workflow_inputs/search_inputs/edit_query_modal.tsx b/public/pages/workflow_detail/workflow_inputs/search_inputs/edit_query_modal.tsx index eca28d3c..444f8c97 100644 --- a/public/pages/workflow_detail/workflow_inputs/search_inputs/edit_query_modal.tsx +++ b/public/pages/workflow_detail/workflow_inputs/search_inputs/edit_query_modal.tsx @@ -17,6 +17,7 @@ import { EuiModalHeaderTitle, EuiPopover, EuiSpacer, + EuiSmallButtonEmpty, } from '@elastic/eui'; import { JsonField } from '../input_fields'; import { @@ -139,14 +140,13 @@ export function EditQueryModal(props: EditQueryModalProps) { /> - props.setModalOpen(false)} - fill={false} color="primary" data-testid="cancelSearchQueryButton" > Cancel - + { setFieldValue(props.queryFieldPath, tempRequest); @@ -158,7 +158,7 @@ export function EditQueryModal(props: EditQueryModalProps) { color="primary" data-testid="updateSearchQueryButton" > - Update + Save