Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset state of pipeline flyout on close or completion #155760

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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