-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add Discard action to scheduled jobs #73
Add Discard action to scheduled jobs #73
Conversation
I'll add tests if this covers what you expected. Also, we can add a button to |
@JuanVqz awesome! Thanks a lot! This is perfect.
Yes, good idea! 👍🏻 |
This is adding the ability to discard a scheduled job. This is useful when a job is no longer needed and you want to remove it from the queue. Closes https://github.com/basecamp/mission_control-jobs/issues/58
b6d8a4b
to
950b118
Compare
Hey @rosa thanks for the quick response, I'll do the I already added an assertion for the discard button, making this ready to be reviewed 👍 |
@@ -20,7 +20,7 @@ def attribute_names_for_job_status(status) | |||
when "failed" then [ "Error", "" ] | |||
when "blocked" then [ "Queue", "Blocked by", "Block expiry" ] | |||
when "finished" then [ "Queue", "Finished" ] | |||
when "scheduled" then [ "Queue", "Scheduled" ] | |||
when "scheduled" then [ "Queue", "Scheduled", ""] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a space missing here:
when "scheduled" then [ "Queue", "Scheduled", ""] | |
when "scheduled" then [ "Queue", "Scheduled", "" ] |
I think Rubocop is complaining about that as well.
<div class="buttons is-right"> | ||
<%= button_to "Discard", application_job_discard_path(@application, job.job_id), class: "button is-danger is-light mr-0", | ||
form: { data: { turbo_confirm: "This will delete the job and can't be undone. Are you sure?" } } %> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing newline at the end of this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @JuanVqz, there are just two small style details around whitespace to fix before merging this one 🙏
Fixed, would you be interested in adding overcommit to ensure everybody runs Rubocop before pushing to the repo? |
I think it's ok, we run it here via GitHub actions like this. In fact this one is still failing. I think you might not have pushed your changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the last changes haven't been pushed 😕
Co-authored-by: Rosa Gutierrez <rosa@hey.com>
I pushed but it never went out off my cable, now it should be good, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Sorry for the delay. This is good to go 🙌
This is adding the ability to discard a scheduled job. This is useful when a job is no longer needed and you want to remove it from the queue.
Closes https://github.com/basecamp/mission_control-jobs/issues/58