fix ports links for new path

This commit is contained in:
Oliver Gorwits
2014-11-01 12:36:33 +00:00
parent a1b5b301db
commit 8277763c80
2 changed files with 5 additions and 5 deletions

View File

@@ -394,7 +394,7 @@ template safely if the base of the app is relocated:
Available in the Device tabs, use this if you need to refer back to the Available in the Device tabs, use this if you need to refer back to the
current page with some additional parameters, for example: current page with some additional parameters, for example:
<a href="[% uri_for('/device', self_options) %]&foo=bar" ...> <a href="[% uri_for('/device/ports', self_options) %]&foo=bar" ...>
=back =back

View File

@@ -117,7 +117,7 @@ $(document).ready(function() {
[% ELSE %] [% ELSE %]
cell_str += ''; cell_str += '';
[% END %] [% END %]
cell_str += '<a class="nd_this-port-only nd_port-only-first" href="[% uri_for('/device',self_options) %]&q=[% params.q | uri %]&f=' cell_str += '<a class="nd_this-port-only nd_port-only-first" href="[% uri_for('/device/ports',self_options) %]&q=[% params.q | uri %]&f='
+ encodeURIComponent(row.port) + '&prefer=port">'; + encodeURIComponent(row.port) + '&prefer=port">';
if (row.is_master) { if (row.is_master) {
cell_str += '<small><i class="icon-group muted"></i></small>&nbsp;'; cell_str += '<small><i class="icon-group muted"></i></small>&nbsp;';
@@ -125,7 +125,7 @@ $(document).ready(function() {
cell_str += he.encode(row.port) + '</a>'; cell_str += he.encode(row.port) + '</a>';
if (row.slave_of) { if (row.slave_of) {
cell_str += '<br/>' cell_str += '<br/>'
+ '<a class="nd_this-port-only" href="[% uri_for('/device', self_options) %]&q=[% params.q | uri %]&f=' + '<a class="nd_this-port-only" href="[% uri_for('/device/ports', self_options) %]&q=[% params.q | uri %]&f='
+ encodeURIComponent(row.slave_of) + '&prefer=port">' + encodeURIComponent(row.slave_of) + '&prefer=port">'
+ he.encode(row.slave_of) + '</a>'; + he.encode(row.slave_of) + '</a>';
} }
@@ -384,13 +384,13 @@ $(document).ready(function() {
else if (row.remote_type && row.remote_type.match(/(cisco\s+AIR-[L|C]?AP|-K9W8-|^AP:\s)/)) { else if (row.remote_type && row.remote_type.match(/(cisco\s+AIR-[L|C]?AP|-K9W8-|^AP:\s)/)) {
cell_str += '<i class="icon-signal"></i>&nbsp;'; cell_str += '<i class="icon-signal"></i>&nbsp;';
} }
cell_str += '<a href="[% uri_for('/device', self_options) %]&q=' cell_str += '<a href="[% uri_for('/device/ports', self_options) %]&q='
+ encodeURIComponent(row.neighbor_alias_ip) + '">'; + encodeURIComponent(row.neighbor_alias_ip) + '">';
var n_dns = row.neighbor_alias_dns ? row.neighbor_alias_dns.replace(d_suffix, '') : ''; var n_dns = row.neighbor_alias_dns ? row.neighbor_alias_dns.replace(d_suffix, '') : '';
cell_str += he.encode(n_dns || row.neighbor_alias_ip) + '</a>'; cell_str += he.encode(n_dns || row.neighbor_alias_ip) + '</a>';
if (row.remote_port) { if (row.remote_port) {
cell_str += ' - ' cell_str += ' - '
+ '<a href="[% uri_for('/device', self_options) %]&q=' + '<a href="[% uri_for('/device/ports', self_options) %]&q='
+ encodeURIComponent(row.neighbor_alias_ip) + encodeURIComponent(row.neighbor_alias_ip)
+ '&f=' + encodeURIComponent(row.remote_port) + '&f=' + encodeURIComponent(row.remote_port)
+ '&prefer=port">' + he.encode(row.remote_port || '') + '</a>'; + '&prefer=port">' + he.encode(row.remote_port || '') + '</a>';