diff --git a/assets/job/index.scss b/assets/job/index.scss index 14c81f0..f9b3c4a 100644 --- a/assets/job/index.scss +++ b/assets/job/index.scss @@ -1,2 +1,9 @@ @import "~bootstrap/dist/css/bootstrap.css"; -@import "~font-awesome"; \ No newline at end of file +@import "~font-awesome"; + +tr.norun td { + background-color: #ff8888; +} +tr.running td { + background-color: #88ff88; +} \ No newline at end of file diff --git a/src/Repository/Job.php b/src/Repository/Job.php index f2cf31e..1565fc8 100644 --- a/src/Repository/Job.php +++ b/src/Repository/Job.php @@ -23,6 +23,8 @@ class Job extends Repository $job['host-displayname'] = $job['data']['host']; $job['host'] = $job['data']['host']; $job['service'] = $job['data']['service'] ?? ''; + $job['norun'] = isset($job['lastrun']) && $job['nextrun'] > $job['lastrun']; + $job['running'] = $job['running'] != 0; if(!empty($job['data']['containertype']) && $job['data']['containertype'] != 'none') { $job['host-displayname'] = $job['data']['service'] . ' on ' . $job['data']['host']; } diff --git a/templates/job/index.html.twig b/templates/job/index.html.twig index da446d2..0a5ff25 100644 --- a/templates/job/index.html.twig +++ b/templates/job/index.html.twig @@ -15,16 +15,16 @@ {% for job in jobs %} - + {{ job.name }} {{ attribute(job, 'host-displayname') }} {{ job.interval | interval }} {{ job.nextrun | date("d/m/Y H:i:s") }} - - - - + + + + {% endfor %}