1[% IF results.count == 0 %]
2<div class="span3 alert alert-info">The aren't enough jobs to report.</div>
3[% ELSE %]
4<table id="app-data-table" class="table table-bordered table-condensed table-hover" width="100%" cellspacing="0">
5  <thead>
6    <tr>
7      <th class="nd_center-cell">Action</th>
8      <th class="nd_center-cell">Number of Devices</th>
9      <th class="nd_center-cell">Queued At</th>
10      <th class="nd_center-cell">Started</th>
11      <th class="nd_center-cell">Finished</th>
12      <th class="nd_center-cell">Time Elapsed</th>
13    </tr>
14  </thead>
15  <tbody>
16    [% WHILE (row = results.next) %]
17    <tr
18      [% IF NOT mac AND row.action == 'macsuck' %]
19        class="info"
20        [% SET mac = 1 %]
21      [% ELSIF NOT arp AND row.action == 'arpnip' %]
22        class="info"
23        [% SET arp = 1 %]
24      [% ELSIF NOT dis AND row.action == 'discover' %]
25        class="info"
26        [% SET dis = 1 %]
27      [% ELSIF NOT nbt AND row.action == 'nbtstat' %]
28        class="info"
29        [% SET nbt = 1 %]
30      [% END %]
31    >
32      <td class="nd_center-cell">[% row.action.ucfirst | html_entity %]</td>
33      <td class="nd_center-cell">[% row.number  | html_entity %]</td>
34      <td class="nd_center-cell">[% row.entered_stamp | html_entity %]</td>
35      <td class="nd_center-cell">[% row.start   | html_entity %]</td>
36      <td class="nd_center-cell">[% row.end     | html_entity %]</td>
37      <td class="nd_center-cell">[% row.elapsed | html_entity %]</td>
38    </tr>
39    [% END %]
40  </tbody>
41</table>
42[% END %]
43
44<script>
45$(document).ready(function() {
46    $('#app-data-table').dataTable({
47        "paging":   false,
48        "searching": false,
49        "info":     false,
50        "order": [[ 2, 'desc' ], [ 5, 'desc' ]],
51        "pageLength": 50
52    } );
53} );
54</script>
55
56