2d011b468988bab682ea80fda05bb178ef91a27f
[pharos-tools.git] / pharos-dashboard / templates / dashboard / jenkins_slaves.html
1 {% extends "dashboard/table.html" %}
2 {% load staticfiles %}
3
4 {% block table %}
5     <thead>
6     <tr>
7         <th>Slave name</th>
8         <th>Status</th>
9         <th>Job</th>
10     </tr>
11     </thead>
12     <tbody>
13     {% for slave in slaves %}
14         <tr>
15             <th><a target='_blank'
16                    href={{ slave.slaveurl }}>{{ slave.displayName }}</a>
17             </th>
18             <th style="background-color:{{ slave.status_color }}">
19                 {{ slave.status }}
20             </th>
21             <th><a {{ slave.last_job.blink }} style="color:{{ slave.last_job.color }}"
22                                               target="_blank" href={{ slave.last_job.url }}>
23                 {{ slave.last_job.name }}</a>
24             </th>
25         </tr>
26     {% endfor %}
27     </tbody>
28 {% endblock table %}
29
30
31 {% block tablejs %}
32     <script type="text/javascript">
33         $(document).ready(function () {
34             $('#table').DataTable({
35                 columnDefs: [
36                     {type: 'status', targets: 1}
37                 ],
38                 "order": [[1, "asc"]]
39             });
40         });
41     </script>
42 {% endblock tablejs %}