mirror of
https://github.com/plashchynski/crono.git
synced 2026-04-25 10:18:49 +02:00
Do not show link to log if a job has never performed yet
This commit is contained in:
@@ -8,24 +8,25 @@
|
|||||||
- @jobs.each do |job|
|
- @jobs.each do |job|
|
||||||
%tr
|
%tr
|
||||||
%td= job.job_id
|
%td= job.job_id
|
||||||
%td= job.last_performed_at || '-'
|
%td= job.last_performed_at || 'Never performed yet'
|
||||||
%td
|
%td
|
||||||
- if job.healthy == false
|
- if job.last_performed_at.nil?
|
||||||
%a{ href: url("/job/#{job.id}") }
|
%span.grey-text.darken-3{ title: 'This job has never been performed yet.' }
|
||||||
%span.red-text{ title: 'There were problems with this job. Follow the link to check the log.' }
|
%i.mdi-device-access-time
|
||||||
%i.mdi-alert-warning
|
Pending
|
||||||
Error
|
- elsif job.healthy
|
||||||
- elsif job.healthy == true
|
|
||||||
%a{ href: url("/job/#{job.id}") }
|
%a{ href: url("/job/#{job.id}") }
|
||||||
%span.green-text.darken-3{ title: 'This job was performed successfully.' }
|
%span.green-text.darken-3{ title: 'This job was performed successfully.' }
|
||||||
%i.mdi-action-done
|
%i.mdi-action-done
|
||||||
Success
|
Success
|
||||||
- else
|
- else
|
||||||
%a{ href: url("/job/#{job.id}") }
|
%a{ href: url("/job/#{job.id}") }
|
||||||
%span.grey-text.darken-3{ title: 'This job has never been performed yet.' }
|
%span.red-text{ title: 'There were problems with this job. Follow the link to check the log.' }
|
||||||
%i.mdi-device-access-time
|
%i.mdi-alert-warning
|
||||||
Pending
|
Error
|
||||||
|
|
||||||
%td
|
%td
|
||||||
%a{ href: url("/job/#{job.id}") }
|
- if job.last_performed_at
|
||||||
Log
|
%a{ href: url("/job/#{job.id}") }
|
||||||
%span.glyphicon.glyphicon-menu-right
|
Log
|
||||||
|
%i.mdi-navigation-chevron-right
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
%a{ href: url('/') } << Back to Home
|
%a{ href: url('/') }
|
||||||
|
%i.mdi-navigation-chevron-left
|
||||||
|
Back to Home
|
||||||
|
|
||||||
%h4 "#{@job.job_id}" Log:
|
%h4 "#{@job.job_id}" Log:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user