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

ui: add item to actions popup to allow stopping workflow #332

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

mdonadoni
Copy link
Member

menuItems.push({
key: "stop",
content: "Stop workflow",
icon: "stop",
Copy link
Member Author

Choose a reason for hiding this comment

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

I have used the stop icon in the actions popup, but we are already using the pause icon when showing stopped workflows in the UI:

Is this ok, or should pause be used here instead of stop (or viceversa)?

Copy link
Member

Choose a reason for hiding this comment

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

I like the stop icon in the actions popup, because pause usually refers to something that can be resumed later, and that's not the case here.
For this reason I would also prefer changing the pause icon in the workflow list to something else. Using stop circle outline would work, with the small downside that in general the stop icon is used only as an action icon, rather than as a status icon. However, IMHO it's better than conveying the information that a stopped workflow can be resumed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated to use the stop icon also in the workflow list

@mdonadoni
Copy link
Member Author

Comment regarding this PR: the changes in this PR are similar to what is done to implement the Delete workflow action, so there is a bit of duplicated code. I think we can keep this for the time being, and improve this later when we will add more actions to the UI. What do you think?

Copy link
Member

@giuseppe-steduto giuseppe-steduto left a comment

Choose a reason for hiding this comment

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

Works well! I just left a minor comment about the stop / pause icon.
This PR does indeed introduce some code duplication, but I agree on it being okay for now. Removing this duplication would involve quite a bit of refactoring, and we will probably have a better idea on what to group under common components / functions when we add another entry to the actions popup, since the "delete" and "stop" actions are very similar.

Another note, not directly related to this PR, but rather to the way in which stopped workflows are displayed. The timer that usually says for how long a workflow has been running doesn't stop when the workflow is stopped. This results in the "stopped after X minutes Y seconds" phrase with X and Y constantly increasing as time passes. Also, opening the "job logs" tab of a stopped workflow, the different jobs are still in running status, with the timer that is still ongoing and constantly increasing.
This behavior persists even after the stopped workflow is deleted.

@mdonadoni
Copy link
Member Author

Another note, not directly related to this PR, but rather to the way in which stopped workflows are displayed. The timer that usually says for how long a workflow has been running doesn't stop when the workflow is stopped. This results in the "stopped after X minutes Y seconds" phrase with X and Y constantly increasing as time passes. Also, opening the "job logs" tab of a stopped workflow, the different jobs are still in running status, with the timer that is still ongoing and constantly increasing. This behavior persists even after the stopped workflow is deleted.

Could you please open an issue? Thanks!

Copy link
Member

@giuseppe-steduto giuseppe-steduto left a comment

Choose a reason for hiding this comment

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

LGTM!

@mdonadoni mdonadoni merged commit da6d2b7 into reanahub:master Jul 18, 2023
7 checks passed
@mdonadoni mdonadoni deleted the stop-workflow branch July 18, 2023 12:36
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.

Add cancel or force to stop button to UI
2 participants