1
0
Fork 0
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:
Peter Harris 2022-11-06 17:50:45 -05:00 committed by GitHub
parent 8e75afc0dc
commit 053303f405
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -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

View file

@ -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>