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

#2254 setPipelineFlow cannot work when only primary_pipeline changed #2255

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
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 @@ -1737,7 +1737,7 @@ export default class CanvasController {
this.editActionHandler(data);
}

// Returns the supernode speified in the bradcrumb provided.
// Returns the supernode speified in the breadcrumb provided.
getSupernodeFromBreadcrumb(breadcrumb) {
if (breadcrumb.supernodeParentPipelineId) {
const apiPipeline = this.objectModel.getAPIPipeline(breadcrumb.supernodeParentPipelineId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,8 @@ export default class ObjectModel {
this.executeWithSelectionChange(this.store.dispatch, {
type: "SET_CANVAS_INFO",
canvasInfo: canvasInfo,
canvasInfoIdChanged: this.hasCanvasInfoIdChanged(canvasInfo)
canvasInfoIdChanged: this.hasCanvasInfoIdChanged(canvasInfo),
primaryPipelineIdChanged: this.hasPrimaryPipelineIdChanged(canvasInfo)
});
}

Expand Down Expand Up @@ -1047,6 +1048,10 @@ export default class ObjectModel {
return canvasInfo.id !== this.getCanvasInfo().id;
}

hasPrimaryPipelineIdChanged(canvasInfo) {
return canvasInfo.primary_pipeline !== this.getCanvasInfo().primary_pipeline;
}

setSubdueStyle(newStyle) {
this.store.dispatch({ type: "SET_SUBDUE_STYLE", data: { subdueStyle: newStyle } });
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2023 Elyra Authors
* Copyright 2017-2024 Elyra Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,10 +19,11 @@ export default (state = [], action) => {
case "SET_CANVAS_INFO": {
// In some instances, with an external object model, the same canvas may
// be set multiple times. Consequently, we only reset the breadcrumbs if
// we're given a completely new canvas or the current breadcrumb does not
// reference a pipeline Id in the incoming pipelineFlow, which might happen
// if the pipeline has been removed.
// we're given a completely new canvas OR the primary pipeline ID has changed
// OR the current breadcrumb does not reference a pipeline Id in the incoming
// pipelineFlow, which might happen if the pipeline has been removed.
if (action.canvasInfoIdChanged ||
action.primaryPipelineIdChanged ||
!isCurrentBreadcrumbInPipelineFlow(state, action.canvasInfo)) {
return [{ pipelineId: action.canvasInfo.primary_pipeline, pipelineFlowId: action.canvasInfo.id }];
}
Expand Down
Loading