Skip to content

Commit

Permalink
Added a javascript confirmation to clear all and retry all on failed.erb
Browse files Browse the repository at this point in the history
  • Loading branch information
vrinek authored and steveklabnik committed Sep 23, 2012
1 parent c469f51 commit 89d6532
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion lib/resque/server/public/ranger.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -75,5 +75,11 @@ $(function() {
return false; 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?');
})
})
4 changes: 2 additions & 2 deletions lib/resque/server/views/failed.erb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<h1>Failed Jobs</h1> <h1>Failed Jobs</h1>
<%unless failed.empty?%> <%unless failed.empty?%>
<form method="POST" action="<%=u 'failed/clear'%>"> <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>
<form method="POST" action="<%=u 'failed/requeue/all'%>"> <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> </form>
<%end%> <%end%>
Expand Down

0 comments on commit 89d6532

Please sign in to comment.