Needed to add the 'autocomplete' jQuery UI component because it can do minLength=0 properly. Used the smoothness UI theme. Added typeahead AJAX calls to support the topology searching. Added new plugin and template for the topology editing page.
		
			
				
	
	
		
			45 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| <table class="table-bordered table-condensed table-striped">
 | |
|   <thead>
 | |
|     <tr>
 | |
|       <th class="center_cell">Device Name</th>
 | |
|       <th class="center_cell">Device IP</th>
 | |
|       <th class="center_cell">Number of Ports</th>
 | |
|       <th class="center_cell">Action</th>
 | |
|     </tr>
 | |
|   </thead>
 | |
|   </tbody>
 | |
|     <tr>
 | |
|       <form name="add">
 | |
|       <td class="center_cell"><input name="dns" type="text"></td>
 | |
|       <td class="center_cell"><input name="ip" type="text"></td>
 | |
|       <td class="center_cell"><input name="ports" type="number"></td>
 | |
|       <td class="center_cell">
 | |
|         <button class="btn btn-small" name="add" type="submit"><i class="icon-plus-sign"></i> Add</button>
 | |
|       </td>
 | |
|       </form>
 | |
|     </tr>
 | |
|     [% WHILE (row = results.next) %]
 | |
|     <tr>
 | |
|       <form name="update">
 | |
|       <td class="center_cell"><a class="nd_linkcell"
 | |
|         href="[% device_ports %]&q=[% row.dns | uri %]">[% row.dns | html_entity %]</a></td>
 | |
|       <td class="center_cell">[% row.ip | html_entity %]</td>
 | |
|       <td class="center_cell"><input name="ports" type="number" value="[% row.port_count | html_entity %]"></td>
 | |
|       <td class="center_cell">
 | |
|         <input name="dns" type="hidden" value="[% row.dns | html_entity %]">
 | |
|         <input name="ip" type="hidden" value="[% row.ip | html_entity %]">
 | |
|         <button class="btn" name="update" type="submit"><i class="icon-save text-warning"></i></button>
 | |
|       </form>
 | |
|       <form name="del" class="nd_inline_form">
 | |
|         <input name="dns" type="hidden" value="[% row.dns | html_entity %]">
 | |
|         <input name="ip" type="hidden" value="[% row.ip | html_entity %]">
 | |
|         <input name="ports" type="hidden" value="[% row.port_count | html_entity %]">
 | |
|         <button class="btn" name="del" type="submit"><i class="icon-trash text-error"></i></button>
 | |
|       </form>
 | |
|       </td>
 | |
|     </tr>
 | |
|     [% END %]
 | |
|   </tbody>
 | |
| </table>
 | |
| 
 |