1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Added job_owner and 'description' to delayed_job to show on the tournament show page

This commit is contained in:
2019-11-26 23:40:01 -05:00
parent 2f4ea5e42f
commit 661c56d04e
7 changed files with 91 additions and 39 deletions

View File

@@ -1,30 +1,23 @@
<h3>
Info
</h3>
<p>
<strong>Address:</strong>
<%= @tournament.address %>
</p>
<p>
<strong>Director:</strong>
<%= @tournament.director %>
</p>
<p>
<strong>Director email:</strong>
<%= @tournament.director_email %>
</p>
<p>
<strong>Tournament Type:</strong>
<%= @tournament.tournament_type %>
</p>
<br>
<br>
<h3>Schools</h3>
<p>(Click to see lineups, score breakdowns, and stats)</p>
<br>
@@ -35,8 +28,6 @@
<% if can? :manage, @tournament %><th><%= link_to " New School" , "/schools/new?tournament=#{@tournament.id}", :class=>"fas fa-plus" %></th><% end %>
</tr>
</thead>
<tbody>
<% @schools.each do |school| %>
<tr>
@@ -55,9 +46,6 @@
</tbody>
</table>
<br>
<br>
<h3>Weight Class Seeds</h3>
<br>
<table class="table table-hover table-condensed">
@@ -84,7 +72,6 @@
<% end %>
</tbody>
</table>
<% if can? :manage, @tournament %>
<br>
<br>
@@ -96,7 +83,6 @@
<th><%= link_to " New Mat" , "/mats/new?tournament=#{@tournament.id}", :class=>"fas fa-plus" %></th>
</tr>
</thead>
<tbody>
<% @mats.each do |mat| %>
<tr>
@@ -111,7 +97,35 @@
</tbody>
</table>
<% end %>
<br>
<h3>Background Jobs</h3>
<p>This is a list of queued or running background jobs. Match generation, bracket advancement, team score calculation, etc.</p>
<table class="table table-hover table-condensed">
<thead>
<tr>
<th>Name of Job</th>
<th>Job Status</th>
</tr>
</thead>
<tbody>
<% @tournament.deferred_jobs.each do |job| %>
<tr>
<td><%= job.job_owner_type %></td>
<td>
<% if job.locked_at %>
Running
<% elsif job.last_error %>
Error
<% elsif job.attempts == 0 and !job.locked_at %>
Pending
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<br>
<br>
<%= render 'import_form' %>