Add Nodes discovered through LLDP/CDP report
This commit is contained in:
		
							
								
								
									
										63
									
								
								Netdisco/share/views/ajax/report/nodesdiscovered.tt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								Netdisco/share/views/ajax/report/nodesdiscovered.tt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,63 @@ | ||||
| <table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0"> | ||||
|   <thead> | ||||
|     <tr> | ||||
|       <th>Device</th> | ||||
|       <th>Port</th> | ||||
|       <th>Remote ID</th> | ||||
|       <th>Remote IP</th> | ||||
|       <th>Remote Port</th> | ||||
|       <th>Remote Type</th> | ||||
|     </tr> | ||||
|   </thead> | ||||
| </table> | ||||
|  | ||||
| <script type="text/javascript"> | ||||
| $(document).ready(function() { | ||||
|   var table = $('#data-table').dataTable({ | ||||
|     "processing": true, | ||||
|     "stateSave": true, | ||||
|     "pageLength": [% settings.table_pagesize %], | ||||
|     "language": { | ||||
|       "search": 'Filter records: ' | ||||
|     }, | ||||
|     "deferRender": true, | ||||
|     "data": [% results %], | ||||
|     "columns": [ | ||||
|       { | ||||
|         "data": 'ip', | ||||
|         "render": function(data, type, row, meta) { | ||||
|           return he.encode(row.dns || row.name || data); | ||||
|         } | ||||
|       }, { | ||||
|         "data": 'port', | ||||
|         "type": 'portsort', | ||||
|         "render": function(data, type, row, meta) { | ||||
|           return type === 'display' ? | ||||
|             '<a href="[% device_ports %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(data) + '">' + he.encode(data) + '</a>' : | ||||
|             data; | ||||
|         } | ||||
|       }, { | ||||
|         "data": 'remote_id', | ||||
|         "render": function(data, type, row, meta) { | ||||
|           return he.encode(data || ''); | ||||
|         } | ||||
|       }, { | ||||
|         "data": 'remote_ip', | ||||
|         "render": function(data, type, row, meta) { | ||||
|           return '<a href="[% search_node %]&q=' + encodeURIComponent(data) + '">' + he.encode(data) + '</a>'; | ||||
|         } | ||||
|       }, { | ||||
|         "data": 'remote_port', | ||||
|         "render": function(data, type, row, meta) { | ||||
|           return he.encode(data || ''); | ||||
|         } | ||||
|       }, { | ||||
|         "data": 'remote_type', | ||||
|         "render": function(data, type, row, meta) { | ||||
|           return he.encode(data || ''); | ||||
|         } | ||||
|       } | ||||
|     ] | ||||
|   }); | ||||
| }); | ||||
| </script> | ||||
		Reference in New Issue
	
	Block a user