mirror of
https://github.com/plashchynski/crono.git
synced 2026-05-19 14:36:58 +02:00
Use Rails plugin generator and adapt
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<header>
|
||||
<h4>Running Jobs</h4>
|
||||
</header>
|
||||
|
||||
<div class="responsive-overflow">
|
||||
<table id="job_list">
|
||||
<tr>
|
||||
<th>Job</th>
|
||||
<th>Last performed at</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<% @jobs.each do |job| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= job.job_id %>
|
||||
</td>
|
||||
<td>
|
||||
<%= job.last_performed_at || 'Never performed yet' %>
|
||||
</td>
|
||||
<td>
|
||||
<% if job.last_performed_at.nil? %>
|
||||
<span class="grey-text darken-3" title="This job has never been performed yet.">
|
||||
<i class="mdi-device-access-time"></i>
|
||||
Pending
|
||||
</span>
|
||||
<% elsif job.healthy %>
|
||||
<a href="<%= job_path(job) %>">
|
||||
<span class="green-text darken-3" title="This job was performed successfully.">
|
||||
<i class="mdi-action-done"></i>
|
||||
Success
|
||||
</span>
|
||||
</a>
|
||||
<% else %>
|
||||
<a href="<%= job_path(job) %>">
|
||||
<span class="red-text" title="There were problems with this job. Follow the link to check the log.">
|
||||
<i class="mdi-alert-warning"></i>
|
||||
Error
|
||||
</span>
|
||||
</a>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<% if job.last_performed_at %>
|
||||
<a href="<%= job_path(job) %>" class="right">
|
||||
Log
|
||||
<i class="mdi-navigation-chevron-right"></i>
|
||||
</a>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
<header class="blue-grey lighten-4 grey-text text-darken-4">
|
||||
<a href="<%= root_url %>">
|
||||
<i class="mdi-navigation-chevron-left"></i>
|
||||
‹ Back to Home
|
||||
</a>
|
||||
<h4>Last log of <i><%= @job.job_id %></i>:</h4>
|
||||
</header>
|
||||
<% if @job.healthy == false %>
|
||||
<div class="row red-text">
|
||||
<div class="s12 center-align">
|
||||
<i class="mdi-alert-warning"></i>
|
||||
An error occurs during the last execution of this job.
|
||||
Check the log below for details.
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<pre class="responsive-overflow"><%= @job.log %></pre>
|
||||
Reference in New Issue
Block a user