l4d.tools/app/views/job_logs/index.html.slim
2026-01-18 19:07:38 +01:00

45 lines
1.2 KiB
Text

h1 Job Logs
- if @server
p
= link_to "← Back to Server", server_path(@server), class: "btn btn--secondary"
p.text-muted Showing all job logs for your servers
- if @job_logs.any?
table.table
thead
tr
th Job Class
th Server
th Status
th Started
th Duration
th Actions
tbody
- @job_logs.each do |job_log|
tr class="job-status-#{job_log.status}"
td= job_log.job_class
td
- if job_log.server
= link_to job_log.server.name, server_path(job_log.server)
- else
span.text-muted System
td
span class="badge badge--#{job_log.status}"
= job_log.status.titleize
td
- if job_log.started_at
= job_log.started_at.strftime("%Y-%m-%d %H:%M:%S")
- else
span.text-muted Pending
td
- if job_log.duration
= "#{job_log.duration.round(2)}s"
- elsif job_log.running?
span.text-muted Running...
- else
span.text-muted -
td
= link_to "View Log", job_log_path(job_log), class: "btn btn--small"
- else
p.text-muted No job logs found.