Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
[7.x] [Ingest pipelines] Fix bug when deleting pipeline from details …
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth committed May 5, 2020
1 parent cd23f6d commit 1fed9f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ export const PipelineDetailsFlyout: FunctionComponent<Props> = ({
defaultMessage: 'Delete',
}),
icon: <EuiIcon type="trash" />,
onClick: () => onDeleteClick([pipeline.name]),
onClick: () => {
setShowPopover(false);
onDeleteClick([pipeline.name]);
},
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,7 @@ export const PipelinesList: React.FunctionComponent<RouteComponentProps> = ({
} else {
// Somehow we triggered show pipeline details, but do not have a pipeline.
// We assume not found.
return (
<PipelineNotFoundFlyout
onClose={() => {
goHome();
}}
pipelineName={pipelineNameFromLocation}
/>
);
return <PipelineNotFoundFlyout onClose={goHome} pipelineName={pipelineNameFromLocation} />;
}
};

Expand Down Expand Up @@ -195,9 +188,10 @@ export const PipelinesList: React.FunctionComponent<RouteComponentProps> = ({
if (deleteResponse?.hasDeletedPipelines) {
// reload pipelines list
sendRequest();
setSelectedPipeline(undefined);
goHome();
}
setPipelinesToDelete([]);
setSelectedPipeline(undefined);
}}
pipelinesToDelete={pipelinesToDelete}
/>
Expand Down

0 comments on commit 1fed9f0

Please sign in to comment.