-
Notifications
You must be signed in to change notification settings - Fork 117
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
Pm job management #3899
Merged
Merged
Pm job management #3899
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
12ac653
add buttons to the top and bottom of job info
ashton22305 ae7d979
working delete button
ashton22305 8dcbb56
redirect after delete and only enable delete button for completed jobs
ashton22305 dc09e18
better delete button formatting
ashton22305 866909a
button formatting and create routes to hold and stop jobs
ashton22305 90acf35
remove hold buttons for now and make stop button functional
ashton22305 ef811af
handle case where job is already completed but not updated on page
ashton22305 77f4355
change PATCH to POST
ashton22305 6a3cb34
add flash message and render instead of redirecting
ashton22305 815fbb9
pass project instead of using safe navigation
ashton22305 8ed04a7
add notices and alerts when stopping or deleting jobs
ashton22305 bee998d
remove_logged_job returns boolean
ashton22305 152333a
add data confirm to destructive buttons
ashton22305 1797a92
Merge branch 'master' into pm-job-management
ashton22305 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
apps/dashboard/app/views/projects/buttons/_completed_buttons.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<%= button_to( | ||
'Delete', | ||
project_delete_job_path(project_id: project_id, cluster: cluster, jobid: id), | ||
method: :delete, | ||
class: 'btn btn-danger' | ||
) %> |
6 changes: 6 additions & 0 deletions
6
apps/dashboard/app/views/projects/buttons/_queued_buttons.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<%= button_to( | ||
'Stop', | ||
project_stop_job_path(project_id: project_id, cluster: cluster, jobid: id), | ||
method: :post, | ||
class: 'btn btn-danger' | ||
) %> |
6 changes: 6 additions & 0 deletions
6
apps/dashboard/app/views/projects/buttons/_running_buttons.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<%= button_to( | ||
'Stop', | ||
project_stop_job_path(project_id: project_id, cluster: cluster, jobid: id), | ||
method: :post, | ||
class: 'btn btn-danger' | ||
) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
All of these destructive buttons need an alert confirmation.
All you need to do is add a data-confirm attribute with some string. Here I just pulled a random confirm localized string. You could make a new one or use this, I'm sort of ambivalent on that.