File tree 4 files changed +30
-3
lines changed
workflow_detail/workflow_inputs/processor_inputs/ml_processor_inputs/modals
4 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ import {
53
53
injectParameters ,
54
54
prepareDocsForSimulate ,
55
55
unwrapTransformedDocs ,
56
+ useDataSourceVersion ,
57
+ useMissingDataSourceVersion ,
56
58
} from '../../../../../../utils' ;
57
59
import { TextField } from '../../../input_fields' ;
58
60
import {
@@ -94,6 +96,11 @@ const MAX_INPUT_DOCS = 10;
94
96
export function ConfigureExpressionModal ( props : ConfigureExpressionModalProps ) {
95
97
const dispatch = useAppDispatch ( ) ;
96
98
const dataSourceId = getDataSourceId ( ) ;
99
+ const dataSourceVersion = useDataSourceVersion ( dataSourceId ) ;
100
+ const missingDataSourceVersion = useMissingDataSourceVersion (
101
+ dataSourceId ,
102
+ dataSourceVersion
103
+ ) ;
97
104
const { values, setFieldValue, setFieldTouched } = useFormikContext <
98
105
WorkflowFormValues
99
106
> ( ) ;
@@ -407,6 +414,8 @@ export function ConfigureExpressionModal(props: ConfigureExpressionModalProps) {
407
414
style = { { width : '100px' } }
408
415
isLoading = { isFetching }
409
416
disabled = {
417
+ ( props . context === PROCESSOR_CONTEXT . INGEST &&
418
+ missingDataSourceVersion ) ||
410
419
onIngestAndNoDocs ||
411
420
onSearchAndNoQuery ||
412
421
! props . isDataFetchingAvailable ||
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ import {
51
51
injectParameters ,
52
52
prepareDocsForSimulate ,
53
53
unwrapTransformedDocs ,
54
+ useDataSourceVersion ,
55
+ useMissingDataSourceVersion ,
54
56
} from '../../../../../../utils' ;
55
57
import { TextField } from '../../../input_fields' ;
56
58
import {
@@ -91,6 +93,11 @@ export function ConfigureMultiExpressionModal(
91
93
) {
92
94
const dispatch = useAppDispatch ( ) ;
93
95
const dataSourceId = getDataSourceId ( ) ;
96
+ const dataSourceVersion = useDataSourceVersion ( dataSourceId ) ;
97
+ const missingDataSourceVersion = useMissingDataSourceVersion (
98
+ dataSourceId ,
99
+ dataSourceVersion
100
+ ) ;
94
101
const { values, setFieldValue, setFieldTouched } = useFormikContext <
95
102
WorkflowFormValues
96
103
> ( ) ;
@@ -433,6 +440,8 @@ export function ConfigureMultiExpressionModal(
433
440
style = { { width : '100px' } }
434
441
isLoading = { isFetching }
435
442
disabled = {
443
+ ( props . context === PROCESSOR_CONTEXT . INGEST &&
444
+ missingDataSourceVersion ) ||
436
445
onIngestAndNoDocs ||
437
446
onSearchAndNoQuery ||
438
447
! props . isDataFetchingAvailable ||
Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ import {
57
57
injectParameters ,
58
58
prepareDocsForSimulate ,
59
59
unwrapTransformedDocs ,
60
+ useDataSourceVersion ,
61
+ useMissingDataSourceVersion ,
60
62
} from '../../../../../../utils' ;
61
63
import { TextField } from '../../../input_fields' ;
62
64
import {
@@ -102,6 +104,11 @@ const PROMPT_EDITOR_ID = 'promptEditor';
102
104
export function ConfigureTemplateModal ( props : ConfigureTemplateModalProps ) {
103
105
const dispatch = useAppDispatch ( ) ;
104
106
const dataSourceId = getDataSourceId ( ) ;
107
+ const dataSourceVersion = useDataSourceVersion ( dataSourceId ) ;
108
+ const missingDataSourceVersion = useMissingDataSourceVersion (
109
+ dataSourceId ,
110
+ dataSourceVersion
111
+ ) ;
105
112
const { values, setFieldValue, setFieldTouched } = useFormikContext <
106
113
WorkflowFormValues
107
114
> ( ) ;
@@ -638,6 +645,8 @@ export function ConfigureTemplateModal(props: ConfigureTemplateModalProps) {
638
645
style = { { width : '100px' } }
639
646
isLoading = { isFetching }
640
647
disabled = {
648
+ ( props . context === PROCESSOR_CONTEXT . INGEST &&
649
+ missingDataSourceVersion ) ||
641
650
onIngestAndNoDocs ||
642
651
onSearchAndNoQuery ||
643
652
! props . isDataFetchingAvailable ||
Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ export function QuickConfigureModal(props: QuickConfigureModalProps) {
260
260
< EuiFlexGroup direction = "column" gutterSize = "s" >
261
261
< EuiFlexItem >
262
262
< TextField
263
- label = "Name - required "
263
+ label = "Name"
264
264
fullWidth = { true }
265
265
fieldPath = { `name` }
266
266
showError = { true }
@@ -308,7 +308,7 @@ export function QuickConfigureModal(props: QuickConfigureModalProps) {
308
308
modelCategory = { MODEL_CATEGORY . LLM }
309
309
fieldPath = "llm"
310
310
showMissingInterfaceCallout = { false }
311
- label = "Large language model - required "
311
+ label = "Large language model"
312
312
helpText = "The large language model to generate user-friendly responses."
313
313
fullWidth = { true }
314
314
showError = { true }
@@ -340,7 +340,7 @@ export function QuickConfigureModal(props: QuickConfigureModalProps) {
340
340
modelCategory = { MODEL_CATEGORY . EMBEDDING }
341
341
fieldPath = "embeddingModel"
342
342
showMissingInterfaceCallout = { false }
343
- label = "Embedding model - required "
343
+ label = "Embedding model"
344
344
helpText = "The model to generate embeddings."
345
345
fullWidth = { true }
346
346
showError = { true }
You can’t perform that action at this time.
0 commit comments