Skip to content

Commit

Permalink
Merge pull request #114 from eagletmt/confirm-force-cancel
Browse files Browse the repository at this point in the history
Confirm force-cancel
  • Loading branch information
eagletmt authored May 11, 2018
2 parents 8c98e00 + 187b3ff commit 877348f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/assets/javascripts/kuroko2/job_instances.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ jQuery(function ($) {
if ($('#execution_logs').size() > 0) {
startGetExecutionLog();
}

$('#force-cancel-button').click(function(evt) {
if (confirm("Force-cancel is STRONGLY DISCOURAGED because it breaks invariants of Kuroko2's internal state.\nAre you sure to cancel this job instance forcibly?") && confirm('Are you really sure?') && confirm('Do you understand EXACTLY what happens?')) {
// run default
} else {
evt.preventDefault();
evt.stopPropagation();
}
});
});

jQuery(function ($) {
Expand Down

0 comments on commit 877348f

Please sign in to comment.