Skip to content

Commit

Permalink
Reset state of pipeline flyout on close or completion
Browse files Browse the repository at this point in the history
  • Loading branch information
seanstory committed Apr 25, 2023
1 parent 672e992 commit 0acf51a
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import {
sortModels,
sortSourceFields,
} from '../../../shared/ml_inference/utils';
import { PipelinesLogic } from '../pipelines_logic';

import {
AddInferencePipelineFormErrors,
Expand Down Expand Up @@ -227,6 +228,8 @@ export const MLInferenceLogic = kea<
'apiSuccess as attachApiSuccess',
'makeRequest as makeAttachPipelineRequest',
],
PipelinesLogic,
['closeAddMlInferencePipelineModal as closeAddMlInferencePipelineModal'],
],
values: [
CachedFetchIndexApiLogic,
Expand Down Expand Up @@ -348,6 +351,20 @@ export const MLInferenceLogic = kea<
selectedSourceFields: [],
};
},
closeAddMlInferencePipelineModal: () => ({
configuration: {
...EMPTY_PIPELINE_CONFIGURATION,
},
indexName: '',
step: AddInferencePipelineSteps.Configuration,
}),
createApiSuccess: () => ({
configuration: {
...EMPTY_PIPELINE_CONFIGURATION,
},
indexName: '',
step: AddInferencePipelineSteps.Configuration,
}),
removeFieldFromMapping: (modal, { fieldName }) => {
const {
configuration: { fieldMappings },
Expand Down

0 comments on commit 0acf51a

Please sign in to comment.