-
- {
- setPopover(!isPopoverOpen);
- }}
- data-testid="addProcessorButton"
- >
- {processors.length > 0
- ? 'Add another processor'
- : 'Add processor'}
-
- }
- isOpen={isPopoverOpen}
- closePopover={closePopover}
- panelPaddingSize="none"
- anchorPosition="downLeft"
+
+
+
+
- {
- closePopover();
- addProcessor(new MLIngestProcessor().toObj());
- },
- },
- {
- name: 'Split Processor',
- onClick: () => {
- closePopover();
- addProcessor(new SplitIngestProcessor().toObj());
- },
- },
- {
- name: 'Sort Processor',
- onClick: () => {
- closePopover();
- addProcessor(new SortIngestProcessor().toObj());
- },
- },
- {
- name: 'Text Chunking Processor',
- onClick: () => {
- closePopover();
- addProcessor(
- new TextChunkingIngestProcessor().toObj()
- );
- },
- },
- ]
- : props.context === PROCESSOR_CONTEXT.SEARCH_REQUEST
- ? [
- {
- name: 'ML Inference Processor',
- onClick: () => {
- closePopover();
- addProcessor(
- new MLSearchRequestProcessor().toObj()
- );
- },
- },
- ]
- : [
- {
- name: 'ML Inference Processor',
- onClick: () => {
- closePopover();
- addProcessor(
- new MLSearchResponseProcessor().toObj()
- );
- },
- },
- {
- name: 'Split Processor',
- onClick: () => {
- closePopover();
- addProcessor(
- new SplitSearchResponseProcessor().toObj()
- );
- },
- },
- {
- name: 'Sort Processor',
- onClick: () => {
- closePopover();
- addProcessor(
- new SortSearchResponseProcessor().toObj()
- );
- },
- },
- {
- name: 'Normalization Processor',
- onClick: () => {
- closePopover();
- addProcessor(
- new NormalizationProcessor().toObj()
- );
- },
- },
- {
- name: 'Collapse Processor',
- onClick: () => {
- closePopover();
- addProcessor(new CollapseProcessor().toObj());
- },
- },
- ],
- },
- ]}
- />
-
-
+
+ {
+ setPopover(!isPopoverOpen);
+ }}
+ data-testid="addProcessorButton"
+ >
+ {`Add processor`}
+
+ }
+ isOpen={isPopoverOpen}
+ closePopover={closePopover}
+ panelPaddingSize="none"
+ anchorPosition="downLeft"
+ >
+ {
+ closePopover();
+ addProcessor(new MLIngestProcessor().toObj());
+ },
+ },
+ {
+ name: 'Split Processor',
+ onClick: () => {
+ closePopover();
+ addProcessor(
+ new SplitIngestProcessor().toObj()
+ );
+ },
+ },
+ {
+ name: 'Sort Processor',
+ onClick: () => {
+ closePopover();
+ addProcessor(
+ new SortIngestProcessor().toObj()
+ );
+ },
+ },
+ {
+ name: 'Text Chunking Processor',
+ onClick: () => {
+ closePopover();
+ addProcessor(
+ new TextChunkingIngestProcessor().toObj()
+ );
+ },
+ },
+ ]
+ : props.context === PROCESSOR_CONTEXT.SEARCH_REQUEST
+ ? [
+ {
+ name: 'ML Inference Processor',
+ onClick: () => {
+ closePopover();
+ addProcessor(
+ new MLSearchRequestProcessor().toObj()
+ );
+ },
+ },
+ ]
+ : [
+ {
+ name: 'ML Inference Processor',
+ onClick: () => {
+ closePopover();
+ addProcessor(
+ new MLSearchResponseProcessor().toObj()
+ );
+ },
+ },
+ {
+ name: 'Split Processor',
+ onClick: () => {
+ closePopover();
+ addProcessor(
+ new SplitSearchResponseProcessor().toObj()
+ );
+ },
+ },
+ {
+ name: 'Sort Processor',
+ onClick: () => {
+ closePopover();
+ addProcessor(
+ new SortSearchResponseProcessor().toObj()
+ );
+ },
+ },
+ {
+ name: 'Normalization Processor',
+ onClick: () => {
+ closePopover();
+ addProcessor(
+ new NormalizationProcessor().toObj()
+ );
+ },
+ },
+ {
+ name: 'Collapse Processor',
+ onClick: () => {
+ closePopover();
+ addProcessor(new CollapseProcessor().toObj());
+ },
+ },
+ ],
+ },
+ ]}
+ />
+
+
+