implement ports list filtering

This commit is contained in:
Oliver Gorwits
2012-01-12 22:19:17 +00:00
parent e817220856
commit f1eb6eb201
5 changed files with 48 additions and 7 deletions

View File

@@ -9,10 +9,7 @@
</tr>
</thead>
</tbody>
[% SET rownum = 0 %]
[% FOREACH row in results %]
[% NEXT IF params.free AND NOT row.is_free(params.age_num, params.age_unit) %]
[% SET rownum = rownum + 1 %]
<tr>
<td>
[% IF row.up_admin == 'down' %]
@@ -77,7 +74,7 @@
[% SET count = count + 1 %]
[% END %]
[% IF count > 10 %]
[% SET output = '<div style="float: right">(' _ count _ ')</div><a href="#" class="nd_linkcell nd_collapse_vlans">'
[% SET output = '<div class="vlan_total">(' _ count _ ')</div><a href="#" class="nd_linkcell nd_collapse_vlans">'
_ 'Show VLANs</a><div class="nd_collapse_pre_hidden">' _ output %]
[% SET output = output _ '</div>' %]
[% END %]

View File

@@ -4,7 +4,7 @@
<input name="ip" value="[% params.ip %]" type="hidden"/>
<div class="clearfix">
<input class="nd_port_query span3" placeholder="Port, Name or VLAN"
name="q" value="[% params.port || params.vlan %]" type="text"
name="q" value="[% params.q %]" type="text"
rel="twipsy" data-placement="right" data-offset="5" title="Filter by Port, Name or VLAN"/>
</div>
<div class="clearfix">