mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Adds a hook into job info output to allow custom rows, like links to external logs (#5624)
This commit is contained in:
parent
8e75afc0dc
commit
053303f405
2 changed files with 12 additions and 0 deletions
|
@ -48,6 +48,10 @@ module Sidekiq
|
|||
end
|
||||
alias_method :tabs, :custom_tabs
|
||||
|
||||
def custom_job_info_rows
|
||||
@custom_job_info_rows ||= []
|
||||
end
|
||||
|
||||
def locales
|
||||
@locales ||= LOCALES
|
||||
end
|
||||
|
|
|
@ -92,6 +92,14 @@
|
|||
<td><%= relative_time(job.at) if job['retry_count'] %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% Sidekiq::Web.custom_job_info_rows.each do |processor| %>
|
||||
<% if processor.show_row(job) %>
|
||||
<tr>
|
||||
<th><%= processor.row_name %></th>
|
||||
<td><%= processor.row_contents(job) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue