added delayed job listing
This commit is contained in:
5
app/controllers/delayed_jobs_controller.rb
Normal file
5
app/controllers/delayed_jobs_controller.rb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
class DelayedJobsController < ApplicationController
|
||||||
|
def index
|
||||||
|
@delayed_jobs = Delayed::Job.order("created_at desc").paginate(params[:page])
|
||||||
|
end
|
||||||
|
end
|
||||||
28
app/views/delayed_jobs/index.html.erb
Normal file
28
app/views/delayed_jobs/index.html.erb
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<h1>Delayed Jobs</h1>
|
||||||
|
|
||||||
|
<table class="striped" width="100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Handler</th>
|
||||||
|
<th>Attempts</th>
|
||||||
|
<th>Priority</th>
|
||||||
|
<th>Last error</th>
|
||||||
|
<th>Run at</th>
|
||||||
|
<th>Failed at</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @delayed_jobs.each do |job| %>
|
||||||
|
<tr>
|
||||||
|
<td><%= job.handler %></td>
|
||||||
|
<td><%= job.attempts %></td>
|
||||||
|
<td><%= job.priority %></td>
|
||||||
|
<td><%= job.last_error %></td>
|
||||||
|
<td><%= job.run_at %></td>
|
||||||
|
<td><%= job.failed_at %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<%= numbered_paginator(@delayed_jobs) %>
|
||||||
@@ -92,6 +92,8 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><h1>Admin</h1></li>
|
<li><h1>Admin</h1></li>
|
||||||
<li><%= link_to("Mod Actions", mod_actions_path) %></li>
|
<li><%= link_to("Mod Actions", mod_actions_path) %></li>
|
||||||
|
<li><%= link_to("Jobs", delayed_jobs_path) %></li>
|
||||||
|
|
||||||
<% if CurrentUser.is_admin? %>
|
<% if CurrentUser.is_admin? %>
|
||||||
<li><%= link_to("Janitor Trials", janitor_trials_path) %></li>
|
<li><%= link_to("Janitor Trials", janitor_trials_path) %></li>
|
||||||
<li><%= link_to("IP Bans", ip_bans_path) %></li>
|
<li><%= link_to("IP Bans", ip_bans_path) %></li>
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ Danbooru::Application.routes.draw do
|
|||||||
get :search
|
get :search
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
resources :delayed_jobs, :only => [:index]
|
||||||
resources :dmails do
|
resources :dmails do
|
||||||
collection do
|
collection do
|
||||||
get :search
|
get :search
|
||||||
|
|||||||
Reference in New Issue
Block a user