diff --git a/public/pages/workflow_detail/workflow_detail.test.tsx b/public/pages/workflow_detail/workflow_detail.test.tsx
index 392ae963..679c3dbb 100644
--- a/public/pages/workflow_detail/workflow_detail.test.tsx
+++ b/public/pages/workflow_detail/workflow_detail.test.tsx
@@ -78,11 +78,6 @@ describe('WorkflowDetail Page with create ingestion option', () => {
} = renderWithRouter(workflowId, workflowName, type);
expect(getAllByText(workflowName).length).toBeGreaterThan(0);
- expect(getAllByText('Create an ingest pipeline').length).toBeGreaterThan(
- 0
- );
- expect(getAllByText('Skip ingestion pipeline').length).toBeGreaterThan(0);
- expect(getAllByText('Define ingest pipeline').length).toBeGreaterThan(0);
expect(getAllByText('Inspector').length).toBeGreaterThan(0);
expect(getAllByText('Preview').length).toBeGreaterThan(0);
expect(
@@ -188,27 +183,19 @@ describe('WorkflowDetail Page with skip ingestion option (Hybrid Search Workflow
jest.clearAllMocks();
});
test(`renders the WorkflowDetail page with skip ingestion option`, async () => {
- const {
- container,
- getByTestId,
- getAllByText,
- getAllByTestId,
- } = renderWithRouter(workflowId, workflowName, WORKFLOW_TYPE.HYBRID_SEARCH);
-
- // "Create an ingest pipeline" option should be selected by default
- const createIngestRadio = container.querySelector('#create');
- expect(createIngestRadio).toBeChecked();
+ const { getByTestId, getAllByText, getAllByTestId } = renderWithRouter(
+ workflowId,
+ workflowName,
+ WORKFLOW_TYPE.HYBRID_SEARCH
+ );
- // "Skip ingestion pipeline" option should be unselected by default
- const skipIngestRadio = container.querySelector('#skip');
- expect(skipIngestRadio).not.toBeChecked();
+ // Defining a new ingest pipeline & index is enabled by default
+ const enabledCheckbox = getByTestId('checkbox-ingest.enabled');
+ expect(enabledCheckbox).toBeChecked();
- // Selected "Skip ingestion pipeline"
- userEvent.click(skipIngestRadio!);
- await waitFor(() => {
- expect(createIngestRadio).not.toBeChecked();
- });
- expect(skipIngestRadio).toBeChecked();
+ // Skipping ingest pipeline and navigating to search
+ userEvent.click(enabledCheckbox);
+ await waitFor(() => {});
const searchPipelineButton = getByTestId('searchPipelineButton');
userEvent.click(searchPipelineButton);
@@ -255,7 +242,7 @@ describe('WorkflowDetail Page with skip ingestion option (Hybrid Search Workflow
userEvent.click(searchPipelineBackButton);
await waitFor(() => {
- expect(skipIngestRadio).toBeChecked();
+ expect(enabledCheckbox).not.toBeChecked();
});
});
});
diff --git a/public/pages/workflow_detail/workflow_inputs/config_field_list.tsx b/public/pages/workflow_detail/workflow_inputs/config_field_list.tsx
index fd018f74..7065621b 100644
--- a/public/pages/workflow_detail/workflow_inputs/config_field_list.tsx
+++ b/public/pages/workflow_detail/workflow_inputs/config_field_list.tsx
@@ -63,15 +63,6 @@ export function ConfigFieldList(props: ConfigFieldListProps) {
diff --git a/public/pages/workflow_detail/workflow_inputs/input_fields/boolean_field.tsx b/public/pages/workflow_detail/workflow_inputs/input_fields/boolean_field.tsx
index ba7852f6..63521d28 100644
--- a/public/pages/workflow_detail/workflow_inputs/input_fields/boolean_field.tsx
+++ b/public/pages/workflow_detail/workflow_inputs/input_fields/boolean_field.tsx
@@ -6,22 +6,17 @@
import React from 'react';
import { Field, FieldProps } from 'formik';
import {
- EuiCompressedFormRow,
- EuiCompressedRadioGroup,
- EuiLink,
- EuiRadioGroupOption,
+ EuiCompressedCheckbox,
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiIconTip,
EuiText,
} from '@elastic/eui';
-import { camelCaseToTitleString } from '../../../../utils';
interface BooleanFieldProps {
fieldPath: string; // the full path in string-form to the field (e.g., 'ingest.enrich.processors.text_embedding_processor.inputField')
- enabledOption: EuiRadioGroupOption;
- disabledOption: EuiRadioGroupOption;
- label?: string;
- helpLink?: string;
+ label: string;
helpText?: string;
- showLabel?: boolean;
}
/**
@@ -32,37 +27,32 @@ export function BooleanField(props: BooleanFieldProps) {
{({ field, form }: FieldProps) => {
return (
-
+
+
+ {props.label}
+
+ {props.helpText && (
+
+
+
+ )}
+
+ >
}
- labelAppend={
- props.helpLink ? (
-
-
- Learn more
-
-
- ) : undefined
- }
- helpText={props.helpText || undefined}
- isInvalid={false}
- >
- {
- form.setFieldValue(field.name, !field.value);
- form.setFieldTouched(field.name, true);
- }}
- />
-
+ checked={field.value === undefined || field.value === true}
+ onChange={() => {
+ form.setFieldValue(field.name, !field.value);
+ form.setFieldTouched(field.name, true);
+ }}
+ />
);
}}
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 01342c89..b595f2a1 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
@@ -29,6 +29,7 @@ import {
EuiIconTip,
EuiCompressedSwitch,
EuiCallOut,
+ EuiAccordion,
} from '@elastic/eui';
import {
IConfigField,
@@ -37,7 +38,6 @@ import {
InputTransformFormValues,
InputTransformSchema,
JSONPATH_ROOT_SELECTOR,
- ML_INFERENCE_RESPONSE_DOCS_LINK,
MapArrayFormValue,
ModelInterface,
PROCESSOR_CONTEXT,
@@ -331,16 +331,6 @@ export function InputTransformModal(props: InputTransformModalProps) {
);
@@ -544,6 +534,21 @@ export function InputTransformModal(props: InputTransformModalProps) {
{InputMap}
+ {props.context === PROCESSOR_CONTEXT.SEARCH_RESPONSE && (
+ <>
+
+
+
+
+ {OneToOneConfig}
+
+
+ >
+ )}
>
@@ -573,12 +578,6 @@ export function InputTransformModal(props: InputTransformModalProps) {
>
)}
- {props.context === PROCESSOR_CONTEXT.SEARCH_RESPONSE && (
- <>
- {OneToOneConfig}
-
- >
- )}
{FetchButton}
>
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 a7afe605..558e3162 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
@@ -27,14 +27,13 @@ import {
EuiCodeBlock,
EuiCallOut,
EuiIconTip,
+ EuiAccordion,
} from '@elastic/eui';
import {
IConfigField,
IProcessorConfig,
IngestPipelineConfig,
JSONPATH_ROOT_SELECTOR,
- ML_INFERENCE_DOCS_LINK,
- ML_INFERENCE_RESPONSE_DOCS_LINK,
MapArrayFormValue,
ModelInterface,
OutputTransformFormValues,
@@ -254,22 +253,8 @@ root object selector "${JSONPATH_ROOT_SELECTOR}"`}
const FullResponsePathConfig = (
);
@@ -474,6 +459,22 @@ root object selector "${JSONPATH_ROOT_SELECTOR}"`}
{OutputMap}
+ {(props.context === PROCESSOR_CONTEXT.INGEST ||
+ props.context === PROCESSOR_CONTEXT.SEARCH_RESPONSE) && (
+ <>
+
+
+
+
+ {FullResponsePathConfig}
+
+
+ >
+ )}
>
@@ -508,14 +509,6 @@ root object selector "${JSONPATH_ROOT_SELECTOR}"`}
>
)}
- {(props.context === PROCESSOR_CONTEXT.INGEST ||
- props.context ===
- PROCESSOR_CONTEXT.SEARCH_RESPONSE) && (
- <>
- {FullResponsePathConfig}
-
- >
- )}
{FetchButton}
>
diff --git a/public/pages/workflow_detail/workflow_inputs/workflow_inputs.tsx b/public/pages/workflow_detail/workflow_inputs/workflow_inputs.tsx
index 0923ef59..7f50395c 100644
--- a/public/pages/workflow_detail/workflow_inputs/workflow_inputs.tsx
+++ b/public/pages/workflow_detail/workflow_inputs/workflow_inputs.tsx
@@ -82,11 +82,6 @@ interface WorkflowInputsProps {
setUnsavedSearchProcessors: (unsavedSearchProcessors: boolean) => void;
}
-enum INGEST_OPTION {
- CREATE = 'create',
- SKIP = 'skip',
-}
-
/**
* The workflow inputs component containing the multi-step flow to create ingest
* and search flows for a particular workflow.
@@ -692,33 +687,8 @@ export function WorkflowInputs(props: WorkflowInputsProps) {
<>
-
- Create an ingest pipeline
-
-
- Configure and ingest data into an index.
-
-
- ),
- }}
- disabledOption={{
- id: INGEST_OPTION.SKIP,
- label: (
-
-
- Skip ingestion pipeline
-
-
- Use an existing index with data ingested.
-
-
- ),
- }}
- showLabel={false}
+ label="Enabled"
+ helpText="Create a new ingest pipeline and index"
/>
>
)}