select MAC Address display format on Node and Device Port search

This commit is contained in:
Oliver Gorwits
2013-04-24 22:18:04 +01:00
parent 558184d8ac
commit 8dca426e92
10 changed files with 65 additions and 5 deletions

View File

@@ -196,7 +196,8 @@
[% FOREACH node IN row.$nodes %]
[% '<br/>' IF row.remote_ip OR NOT loop.first %]
[% '<span class="label label-warning">A</span> &nbsp;' IF NOT node.active %]
<a href="[% search_node %]&q=[% node.mac | uri %]">[% node.mac | html_entity %]</a>
<a href="[% search_node %]&q=[% node.net_mac.$mac_format_call | uri %]">
[% node.net_mac.$mac_format_call | html_entity %]</a>
[% ' (' _ node.time_last_age _ ')' IF params.n_age %]
[% IF params.n_ip %]
[% FOREACH ip IN node.ips %]

View File

@@ -17,7 +17,8 @@
[% WHILE (row = macs.next) %]
<tr>
<td><a class="nd_linkcell"
href="[% search_node %]&q=[% row.mac | uri %]">[% row.mac | html_entity %]</a></td>
href="[% search_node %]&q=[% row.net_mac.$mac_format_call | uri %]">
[% row.net_mac.$mac_format_call | html_entity %]</a></td>
[% IF params.vendor %]
<td>[% row.oui.company | html_entity %]</td>
[% END %]

View File

@@ -20,7 +20,8 @@
<td>
[% IF first_row %]
<a class="nd_linkcell"
href="[% search_node %]&q=[% row.mac | uri %]">[% row.mac | html_entity %]</a>
href="[% search_node %]&q=[% row.net_mac.$mac_format_call | uri %]">
[% row.net_mac.$mac_format_call | html_entity %]</a>
[% ELSE %]
&nbsp;
[% END %]
@@ -51,7 +52,8 @@
<td>
[% IF first_row %]
<a class="nd_linkcell"
href="[% search_node %]&q=[% node.mac | uri %]">[% node.mac | html_entity %]</a>
href="[% search_node %]&q=[% node.net_mac.$mac_format_call | uri %]">
[% node.net_mac.$mac_format_call | html_entity %]</a>
[% ELSE %]
&nbsp;
[% END %]

View File

@@ -76,7 +76,7 @@
<div id="nd_portprops" class="collapse">
<ul class="inputs-list unstyled">
<li>
Mark as Free if Down for:<br/>
<em>Mark as Free if Down for:</em><br/>
<select id="nd_days_select" name="age_num">
[% FOREACH count IN [1..32] %]
<option[% ' selected="selected"' IF params.age_num == count %]>[% count %]</option>
@@ -105,6 +105,14 @@
</label></span>
<div id="nd_nodeprops" class="collapse">
<ul class="inputs-list unstyled">
<li>
<em>MAC address format:</em><br/>
<select id="nd_mac_format" name="mac_format">
[% FOREACH format IN [ 'IEEE', 'Cisco', 'Microsoft', 'Sun' ] %]
<option[% ' selected="selected"' IF params.mac_format == format %]>[% format %]</option>
[% END %]
</select>
</li>
[% FOREACH item IN vars.connected_properties %]
<li>
<label class="checkbox">

View File

@@ -38,4 +38,12 @@
<span class="nd_searchcheckbox uneditable-input">Partial Name</span>
</label>
</div>
<div class="clearfix">
<em>MAC address format:</em><br/>
<select id="nd_node_mac_format" name="mac_format">
[% FOREACH format IN [ 'IEEE', 'Cisco', 'Microsoft', 'Sun' ] %]
<option[% ' selected="selected"' IF params.mac_format == format %]>[% format %]</option>
[% END %]
</select>
</div>
<button id="[% tab.id %]_submit" type="submit" class="btn btn-info">Search Again</button>