47 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
 | 
						|
  <thead>
 | 
						|
    <tr>
 | 
						|
      <th class="nd_center-cell">Device</th>
 | 
						|
      <th class="nd_center-cell">Address</th>
 | 
						|
      <th class="nd_center-cell">Contact</th>
 | 
						|
      <th class="nd_center-cell">Location</th>
 | 
						|
    </tr>
 | 
						|
  </thead>
 | 
						|
</table>
 | 
						|
 | 
						|
<script type="text/javascript">
 | 
						|
$(document).ready(function() {
 | 
						|
  var table = $('#data-table').dataTable({
 | 
						|
    "processing": true,
 | 
						|
    "stateSave": true,
 | 
						|
    "pageLength": 25,
 | 
						|
    "language": {
 | 
						|
      "search": 'Filter records: '
 | 
						|
    },
 | 
						|
    "deferRender": true,
 | 
						|
    "data": [% results %],
 | 
						|
    "columns": [{
 | 
						|
        "data": 'ip',
 | 
						|
        "render": function(data, type, row, meta) {
 | 
						|
          return '<a href="[% search_device %]&q=' + encodeURIComponent(data) + '">' + he.encode(row.dns || row.name || row.ip) + '</a>';
 | 
						|
        }
 | 
						|
      }, {
 | 
						|
        "data": 'alias',
 | 
						|
        "render": function(data, type, row, meta) {
 | 
						|
          return he.encode(data || '');
 | 
						|
        }
 | 
						|
      }, {
 | 
						|
        "data": 'contact',
 | 
						|
        "render": function(data, type, row, meta) {
 | 
						|
          return he.encode(data || '');
 | 
						|
        }
 | 
						|
      }, {
 | 
						|
        "data": 'location',
 | 
						|
        "render": function(data, type, row, meta) {
 | 
						|
          return he.encode(data || '');
 | 
						|
        }
 | 
						|
      }
 | 
						|
    ]
 | 
						|
  });
 | 
						|
});</script>
 |