diff options
author | Christopher Baines <mail@cbaines.net> | 2018-07-05 14:08:28 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-07-05 14:08:28 +0100 |
commit | b67f953c9ad4ebc108aa5a6431ffbd6575c1e6f2 (patch) | |
tree | 4fa27cad1eb6e44d6c6a468af28edf9c4e246d5e /app | |
parent | 32815fa5e3199a253cc8961396860a63de6b91f4 (diff) | |
download | govuk-mini-environment-admin-b67f953c9ad4ebc108aa5a6431ffbd6575c1e6f2.tar govuk-mini-environment-admin-b67f953c9ad4ebc108aa5a6431ffbd6575c1e6f2.tar.gz |
More jobs partial improvements
Change the padding and margins to make the panel headings
smaller. Also support the running state better.
Diffstat (limited to 'app')
-rw-r--r-- | app/views/shared/_jobs.html.erb | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/app/views/shared/_jobs.html.erb b/app/views/shared/_jobs.html.erb index f2439c1..620bc2a 100644 --- a/app/views/shared/_jobs.html.erb +++ b/app/views/shared/_jobs.html.erb @@ -13,6 +13,8 @@ 'success' elsif job.expired_at 'warning' + elsif job_state + 'info' else 'danger' end @@ -20,13 +22,13 @@ <div class="panel panel-default"> <div class="panel-heading" - style="display: flex;" + style="display: flex; padding: 0px;" role="tab" id="jobHeading<%= job.id %>" > <a role="button" class="panel-title" - style="display: inline-block; width: 70%;" + style="display: inline-block; width: 70%; padding: 10px;" data-toggle="collapse" data-parent="#jobs" title="Job id: <%= job.id %>" @@ -38,7 +40,7 @@ <span class="caret"></span> </a> <div class="alert alert-<%= alert_class_suffix %> text-center" - style="width: 30%; margin-left: auto; margin-bottom: 0px;" + style="width: 30%; padding: 6px; margin: 5px;" > <% if job.finished_at %> <span title="<%= job.finished_at %>"> @@ -54,6 +56,14 @@ job.expired_at, include_seconds: true ) %> ago </span> + <% elsif job_state %> + <div class="progress" style="margin-bottom: 0px;"> + <div class="progress-bar progress-bar-striped active" + role="progressbar" + style="width: 100%;"> + Running now + </div> + </div> <% else %> <% if job['error_count'] != 0 %> <%= pluralize(job['error_count'], 'failure') %>, @@ -69,7 +79,6 @@ job.run_at, include_seconds: true ) %> <% end %> - </span> </div> </div> <div id="job_<%= job.id %>" @@ -81,13 +90,6 @@ <div class="row"> <% if job_state %> <div class="col-md-10"> - <div class="progress"> - <div class="progress-bar progress-bar-striped active" - role="progressbar" - style="width: 100%"> - Running now - </div> - </div> </div> <div class="col-md-2"> PID: <%= job_state[:ruby_pid] %> |