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