1<table id="ds-data-table" class="table table-striped table-bordered" width="100%" cellspacing="0"> 2 <thead> 3 <tr> 4 <th>Device</th> 5 <th>Location</th> 6 <th>System Name</th> 7 <th>Model</th> 8 <th>OS Version</th> 9 <th>Management IP</th> 10 <th>Serial</th> 11 <th>First Seen</th> 12 <th>Last Discovered</th> 13 </tr> 14 </thead> 15</table> 16 17<script type="text/javascript"> 18$(document).ready(function() { 19 var table = $('#ds-data-table').dataTable({ 20 "deferRender": true, 21 "data": [% results | none %], 22 "columns": [{ 23 "data": 'ip', 24 "render": function(data, type, row, meta) { 25 return '<a href="[% uri_for('/device') | none %]?q=' + encodeURIComponent(data) + '">' + he.encode(row.dns || row.name || row.ip) + '</a>'; 26 } 27 }, { 28 "data": 'location', 29 "render": function(data, type, row, meta) { 30 return he.encode(data || ''); 31 } 32 }, { 33 "data": 'name', 34 "render": function(data, type, row, meta) { 35 return he.encode(data || ''); 36 } 37 }, { 38 "data": 'model', 39 "render": function(data, type, row, meta) { 40 return he.encode(data || ''); 41 } 42 }, { 43 "data": 'os_ver', 44 "type": 'versionsort', 45 "render": function(data, type, row, meta) { 46 return he.encode(data || ''); 47 } 48 }, { 49 "data": 'ip', 50 "render": function(data, type, row, meta) { 51 return he.encode(data || ''); 52 } 53 }, { 54 "data": 'serial', 55 "render": function(data, type, row, meta) { 56 return he.encode(data || ''); 57 } 58 }, { 59 "data": 'first_seen_stamp', 60 "render": function(data, type, row, meta) { 61 return he.encode(data || ''); 62 } 63 }, { 64 "data": 'last_discover_stamp', 65 "render": function(data, type, row, meta) { 66 return he.encode(data || ''); 67 } 68 } 69 ], 70[% INCLUDE 'ajax/datatabledefaults.tt' -%] 71 }); 72});</script> 73