Development Override Compose File
[laas.git] / src / templates / dashboard / dev_pods.html
1 {% extends "dashboard/table.html" %}
2 {% load staticfiles %}
3 {% load jenkins_filters %}
4
5 {% block table %}
6     <thead>
7     <tr>
8         <th>Name</th>
9         <th>Slave Name</th>
10         <th>Booked by</th>
11         <th>Booked until</th>
12         <th>Purpose</th>
13         <th>Utilization</th>
14         <th>Status</th>
15         <th></th>
16         <th></th>
17     </tr>
18     </thead>
19     <tbody>
20     {% for pod, booking, utilization in dev_pods %}
21         <tr>
22             <td>
23                 <a href={% url 'dashboard:resource' resource_id=pod.id %}>{{ pod.name }}</a>
24             </td>
25             <td>
26                 <a target='_blank' href={{ pod.slave.url }}>{{ pod.slave.name }}</a>
27             </td>
28             <td>
29                 {{ booking.user.username }}
30             </td>
31             <td>
32                 {{ booking.end }}
33             </td>
34             <td>
35                 {{ booking.purpose }}
36             </td>
37             <td>
38                 {{ utilization }}
39             </td>
40             <td style="background-color:{{ pod.slave.status | jenkins_status_color }}">
41                 {{ pod.slave.status }}
42             </td>
43             <td>
44                 <a href="{% url 'booking:create' resource_id=pod.id %}" class="btn btn-primary">
45                     Book
46                 </a>
47             </td>
48             <td>
49                 <a href="{% url 'dashboard:resource' resource_id=pod.id %}" class="btn btn-primary">
50                     Info
51                 </a>
52             </td>
53         </tr>
54     {% endfor %}
55     </tbody>
56 {% endblock table %}
57
58 {% block tablejs %}
59     <script type="text/javascript">
60         $(document).ready(function () {
61             $('#table').DataTable({
62                 scrollX: true,
63                 columnDefs: [
64                     {type: 'status', targets: 6}
65                 ],
66                 "order": [[6, "asc"]]
67             });
68         });
69     </script>
70 {% endblock tablejs %}