<th>Booked by</th>
<th>Booked until</th>
<th>Purpose</th>
+ <th>Utilization</th>
<th>Status</th>
<th></th>
+ <th></th>
</tr>
</thead>
<tbody>
- {% for pod, booking in dev_pods %}
+ {% for pod, booking, utilization in dev_pods %}
<tr>
- <th>
- <a target='_blank' href={{ pod.url }}>{{ pod.name }}</a>
- </th>
- <th>
+ <td>
+ <a href={% url 'dashboard:resource' resource_id=pod.id %}>{{ pod.name }}</a>
+ </td>
+ <td>
<a target='_blank' href={{ pod.slave.url }}>{{ pod.slave.name }}</a>
- </th>
- <th>
+ </td>
+ <td>
{{ booking.user.username }}
- </th>
- <th>
+ </td>
+ <td>
{{ booking.end }}
- </th>
- <th>
+ </td>
+ <td>
{{ booking.purpose }}
- </th>
- <th style="background-color:{{ pod.slave.status | jenkins_status_color }}">
+ </td>
+ <td>
+ {{ utilization }}
+ </td>
+ <td style="background-color:{{ pod.slave.status | jenkins_status_color }}">
{{ pod.slave.status }}
- </th>
- <th>
+ </td>
+ <td>
<a href="{% url 'booking:create' resource_id=pod.id %}" class="btn btn-primary">
Book
</a>
- </th>
+ </td>
+ <td>
+ <a href="{% url 'dashboard:resource' resource_id=pod.id %}" class="btn btn-primary">
+ Info
+ </a>
+ </td>
</tr>
{% endfor %}
</tbody>
$(document).ready(function () {
$('#table').DataTable({
columnDefs: [
- {type: 'status', targets: 5}
+ {type: 'status', targets: 6}
],
- "order": [[5, "asc"]]
+ "order": [[6, "asc"]]
});
});
</script>