Skip to content
Browse files

Added a javascript confirmation to clear all and retry all on failed.erb

  • Loading branch information...
1 parent c469f51 commit 89d653264b18d9612fa542d94eb471a7575aee6c @vrinek vrinek committed with steveklabnik Jun 1, 2012
Showing with 9 additions and 3 deletions.
  1. +7 −1 lib/resque/server/public/ranger.js
  2. +2 −2 lib/resque/server/views/failed.erb
View
8 lib/resque/server/public/ranger.js
@@ -75,5 +75,11 @@ $(function() {
return false;
})
+ $('#clear-failed-jobs').click(function(){
+ return confirm('Are you sure you want to clear ALL failed jobs?');
+ })
-})
+ $('#retry-failed-jobs').click(function(){
+ return confirm('Are you sure you want to retry ALL failed jobs?');
+ })
+})
View
4 lib/resque/server/views/failed.erb
@@ -6,10 +6,10 @@
<h1>Failed Jobs</h1>
<%unless failed.empty?%>
<form method="POST" action="<%=u 'failed/clear'%>">
- <input type='submit' name='' value='Clear Failed Jobs' />
+ <input type='submit' name='' value='Clear Failed Jobs' id="clear-failed-jobs" />
</form>
<form method="POST" action="<%=u 'failed/requeue/all'%>">
- <input type='submit' name='' value='Retry Failed Jobs' />
+ <input type='submit' name='' value='Retry Failed Jobs' id="retry-failed-jobs" />
</form>
<%end%>

0 comments on commit 89d6532

Please sign in to comment.
Something went wrong with that request. Please try again.