]> git.ipfire.org Git - pbs.git/blob - src/templates/modules/jobs-table.html
bootstrap 4: make jobs-table responsive
[pbs.git] / src / templates / modules / jobs-table.html
1 <!--
2 The documentation says <table class="table table-striped table-hover table-responsive">
3 but we have to use a div class instead to get the table width enough
4 -->
5 <div class="table-responsive">
6 <table class="table table-striped table-hover">
7 <thead>
8 <tr>
9 <th scope="col">{{ _("Arch") }}</th>
10 <th scope="col">{{ _("State") }}</th>
11 <th scope="col">{{ _("Host") }}</th>
12 <th scope="col">{{ _("Duration") }}</th>
13 </tr>
14 </thead>
15 <tbody>
16 {% if jobs %}
17 {% for job in jobs %}
18 <tr>
19 <td>
20 <a href="/job/{{ job.uuid }}">{{ job.arch }}</a>
21 </td>
22 <td>
23 {% if job.state == "pending" %}
24 {{ _("Pending") }}
25 {% elif job.state == "failed" %}
26 {{ _("Failed") }}
27 {% elif job.state == "dispatching" %}
28 {{ _("Dispatching") }}
29 {% elif job.state == "finished" %}
30 {{ _("Finished") }}
31 {% elif job.state == "running" %}
32 {{ _("Running") }}
33 {% elif job.state == "aborted" %}
34 {{ _("Aborted") }}
35 {% else %}
36 {{ job.state }}
37 {% end %}
38 </td>
39 <td>
40 {% if job.builder %}
41 <a href="/builder/{{ job.builder.name }}">{{ job.builder.name }}</a>
42 {% else %}
43 {{ _("N/A") }}
44 {% end %}
45 </td>
46 <td>
47 {% if job.state == "running" %}
48 {{ _("Running since %s") % friendly_time(job.duration) }}
49 {% elif job.duration %}
50 {{ friendly_time(job.duration) }}
51 {% else %}
52 {{ _("Not finished, yet.") }}
53 {% end %}
54 </td>
55 </tr>
56 {% end %}
57
58 {% if not build.supported_arches == "all" %}
59 <tr>
60 <td colspan="4">
61 {{ _("This package only supports %s.") % locale.list(build.supported_arches.split()) }}
62 </td>
63 </tr>
64 {% end %}
65 {% else %}
66 <tr>
67 <td colspan="4">{{ _("No jobs, yet.") }}</td>
68 </tr>
69 {% end %}
70 </tbody>
71 </table>
72 </div>