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>