diff --git a/app/controllers/resque_web/failures_controller.rb b/app/controllers/resque_web/failures_controller.rb index 00a7696..e25481c 100644 --- a/app/controllers/resque_web/failures_controller.rb +++ b/app/controllers/resque_web/failures_controller.rb @@ -12,7 +12,7 @@ def index # remove an individual job from the failure queue def destroy Resque::Failure.remove(params[:id]) - redirect_to failures_path(redirect_params) + render json: {:success => true}, status: 200 end # destroy all jobs from the failure queue diff --git a/app/views/resque_web/failures/_failed_job.html.erb b/app/views/resque_web/failures/_failed_job.html.erb index 7ea5073..8d59c8d 100644 --- a/app/views/resque_web/failures/_failed_job.html.erb +++ b/app/views/resque_web/failures/_failed_job.html.erb @@ -1,4 +1,4 @@ -
  • +
  • <% if job.nil? %>
    Error
    @@ -17,9 +17,9 @@ <% else %>
    - <%= link_to "Retry", retry_failure_path(:queue=>failure_queue,:id=>id), :method => :put %> + <%= link_to "Retry", retry_failure_path(:queue=>failure_queue,:id=>id), :data => {'job-id' => id }, :method => :put, :class => 'retry' %> or - <%= link_to "Remove", failure_path(:queue=>failure_queue,:id=>id), :method => :delete %> + <%= link_to "Remove", failure_path(:queue=>failure_queue,:id=>id), :data => {'job-id' => id }, :method => :delete, :class => 'remove' %>
    <% end %> diff --git a/app/views/resque_web/failures/index.html.erb b/app/views/resque_web/failures/index.html.erb index 0217a96..982f5e3 100644 --- a/app/views/resque_web/failures/index.html.erb +++ b/app/views/resque_web/failures/index.html.erb @@ -3,7 +3,6 @@ <% else %>

    Failed Jobs <%= "on '#{params[:queue]}'" if params[:queue] %> <%= "with class '#{params[:class]}'" if params[:class] %>

    <% end %> - <% unless failure_size.zero? %> <%= form_tag(destroy_all_failures_path(queue: params[:queue]), method: :delete) do %> <%= submit_tag "Clear #{failure_queue_name} Jobs", class: 'btn btn-danger', data: { confirm: "Are you sure you want to clear ALL #{failure_queue_name.downcase} jobs?" } %> @@ -21,7 +20,6 @@ <%= render partial: 'overview' %> <% else %>

    Showing <%= failure_start_at %> to <%= failure_end_at %> of <%= failure_size %> jobs

    -