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

fix(orchestrator): Add retrigger option to UI using v2 API #300

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

LiorSoffer
Copy link
Contributor

resolve FLPATH-1684

Screencast.from.2025-01-19.17-23-20.mp4

Lior Soffer added 3 commits January 19, 2025 16:39
Signed-off-by: Lior Soffer <[email protected]>
Signed-off-by: Lior Soffer <[email protected]>
@rhdh-gh-app
Copy link

rhdh-gh-app bot commented Jan 19, 2025

Missing Changesets

The following package(s) are changed by this PR but do not have a changeset:

  • @red-hat-developer-hub/backstage-plugin-orchestrator

See CONTRIBUTING.md for more information about how to add changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-orchestrator-backend workspaces/orchestrator/plugins/orchestrator-backend patch v5.1.1
@red-hat-developer-hub/backstage-plugin-orchestrator workspaces/orchestrator/plugins/orchestrator none v2.5.1

@@ -148,6 +149,7 @@ export class SonataFlowService {

if (!response.ok) {
const json = await response.json();
json.details = `failedNodeId:${json?.failedNodeId}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please correct me, is that augmentation for the generic error handler to include that in the user-facing message?

If so, we can use it but please make sure we do not loose the details which might be potentially sent by the server.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it is the purpose. do you think is needed to provide the user the failing node?

setAnchorEl(event.currentTarget);
};

const handleCloseMenue = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const handleCloseMenue = () => {
const handleCloseMenu = () => {

anchorEl={anchorEl}
open={Boolean(anchorEl)}
onClose={handleCloseMenue}
getContentAnchorEl={null}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that property needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getContentAnchorEl determines how the menu is positioned relative to the button

}
};

const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Storing HTML elements in React state is gross. Can we use useRef instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree

Signed-off-by: Lior Soffer <[email protected]>
Copy link

@LiorSoffer LiorSoffer requested a review from mareklibra January 20, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants