refactor device ports sidebar params handling
This commit is contained in:
@@ -96,15 +96,13 @@
|
||||
</span>
|
||||
[% END %]
|
||||
[% END %]
|
||||
<a class="nd_this-port-only nd_port-only-first" href="[% uri_for('/device',
|
||||
self_options) %]&q=[% params.q | uri %]&f=[% row.port | uri %]&prefer=port">
|
||||
<a class="nd_this-port-only nd_port-only-first" href="[% device_ports %]&q=[% params.q | uri %]&f=[% row.port | uri %]&prefer=port">
|
||||
[% IF row.is_master %]
|
||||
<small><i class="icon-group muted"></i></small>
|
||||
[% END %]
|
||||
[% row.port | html_entity %]</a>
|
||||
[% IF row.slave_of %]<br/>
|
||||
<a class="nd_this-port-only" href="[% uri_for('/device',
|
||||
self_options) %]&q=[% params.q | uri %]&f=[% row.slave_of | uri %]&prefer=port">
|
||||
<a class="nd_this-port-only" href="[% device_ports %]&q=[% params.q | uri %]&f=[% row.slave_of | uri %]&prefer=port">
|
||||
[% row.slave_of | html_entity %]</a>
|
||||
[% END %]
|
||||
</td>
|
||||
@@ -268,11 +266,11 @@
|
||||
[% ELSIF row.remote_type AND row.remote_type.match('^AP:\s') %]
|
||||
<i class="icon-signal"></i>
|
||||
[% END %]
|
||||
<a href="[% uri_for('/device', self_options) %]&q=[% row.get_column('neighbor_ip') | uri %]">
|
||||
<a href="[% device_ports %]&q=[% row.get_column('neighbor_ip') | uri %]">
|
||||
[% row.get_column('neighbor_dns').remove(settings.domain_suffix) || row.get_column('neighbor_ip') | html_entity %]</a>
|
||||
[% IF row.remote_port %]
|
||||
-
|
||||
<a href="[% uri_for('/device', self_options) %]&q=[% row.get_column('neighbor_ip') | uri %]&f=[% row.remote_port | uri %]&prefer=port">
|
||||
<a href="[% device_ports %]&q=[% row.get_column('neighbor_ip') | uri %]&f=[% row.remote_port | uri %]&prefer=port">
|
||||
[% row.remote_port | html_entity %]</a>
|
||||
[% END %]
|
||||
<br/>
|
||||
|
||||
@@ -94,13 +94,13 @@
|
||||
[% IF tab.tag == 'ports' %]
|
||||
// to be fair I can't remember why we do this in JS and not from the app
|
||||
// perhaps because selecting form fields to go in the cookie is easier?
|
||||
var cookie = $('#ports_form').find('input,select')
|
||||
.not('#nd_port-query,input[name="q"],input[name="tab"]')
|
||||
.serializeArray();
|
||||
$('#ports_form').find('input[type="checkbox"]').map(function() {
|
||||
cookie.push({'name': 'columns', 'value': $(this).attr('name')});
|
||||
});
|
||||
$.cookie('nd_ports-form', $.param(cookie) ,{ expires: 365 });
|
||||
// var cookie = $('#ports_form').find('input,select')
|
||||
// .not('#nd_port-query,input[name="q"],input[name="tab"]')
|
||||
// .serializeArray();
|
||||
// $('#ports_form').find('input[type="checkbox"]').map(function() {
|
||||
// cookie.push({'name': 'columns', 'value': $(this).attr('name')});
|
||||
// });
|
||||
// $.cookie('nd_ports-form', $.param(cookie) ,{ expires: 365 });
|
||||
|
||||
// form reset icon on ports tab
|
||||
$('#nd_sidebar-reset-link').attr('href', uri_base + '/device?tab=[% tab.tag %]&reset=on&' +
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<!-- <script type="text/javascript" src="http://code.jquery.com/jquery-migrate-1.1.1.js"></script> -->
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/jquery-ui.custom.min.js"></script>
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/jquery-history.js"></script>
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/jquery.cookie.js"></script>
|
||||
<!-- <script type="text/javascript" src="[% uri_base %]/javascripts/jquery.cookie.js"></script> -->
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/jquery-deserialize.js"></script>
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="[% uri_base %]/javascripts/underscore.min.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user