<% @jobs.each do |job| %> <% end %>
Status Agent Created Next Run Attempts Last Error
<%= status(job) %> <% case agent = agent_from_job(job) when Agent %><%= link_to(agent.name, agent_path(agent)) %><% when false %>(system)<% when nil %>(deleted)<% else %>(unknown)<% end %> <%= time_ago_in_words job.created_at %> ago<% if user = agent.try(:user) %> for <%= user.username %><% end %> <% if !job.failed_at %> <%= relative_distance_of_time_in_words job.run_at %> <% end %> <%= job.attempts %> <%= truncate job.last_error, :length => 90, :omission => "", :separator => "\n" %> <% if (!job.locked_at && !job.locked_by) || job.failed_at.present? %>
<% if (job.run_at > Time.now) || job.failed_at.present? %> <%= link_to 'Run now', run_job_path(job), class: "btn btn-default", method: :put %> <% end %> <%= link_to 'Delete', job_path(job), class: "btn btn-danger", method: :delete, data: { confirm: 'Really delete this job?' } %>
<% end %>
<%= paginate @jobs, :theme => 'twitter-bootstrap-3' %>
<%= link_to destroy_failed_jobs_path, class: "btn btn-default", method: :delete do %> Remove failed jobs <% end %> <%= link_to destroy_all_jobs_path, class: "btn btn-default", method: :delete, data: { confirm: "Are you sure you want to delete ALL pending jobs for all Huginn users?" } do %> Remove all jobs <% end %>