get rid of device_ports and self_options template vars
This commit is contained in:
@@ -105,7 +105,7 @@
|
||||
<td>Switch Port</td>
|
||||
<td class="nd_center-cell">
|
||||
<a class="nd_linkcell"
|
||||
href="[% device_ports %]&q=[% node.switch | uri %]&f=[% node.port | uri %]&c_nodes=on&c_neighbors=on">
|
||||
href="[% uri_for('/device/ports') %]&q=[% node.switch | uri %]&f=[% node.port | uri %]&c_nodes=on&c_neighbors=on">
|
||||
[% node.switch | html_entity %] - [% node.port | html_entity %]
|
||||
[% ' <i class="icon-book text-warning"></i>' IF NOT node.active %]</a>
|
||||
[% IF node.device.dns AND node.device_port AND node.device_port.name %]
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
</td>
|
||||
<td>Switch Port</td>
|
||||
<td class="nd_center-cell">
|
||||
<a href="[% device_ports %]&q=[% node.switch | uri %]&f=[% node.port | uri %]&c_nodes=on&c_neighbors=on">
|
||||
<a href="[% uri_for('/device/ports') %]&q=[% node.switch | uri %]&f=[% node.port | uri %]&c_nodes=on&c_neighbors=on">
|
||||
[% node.switch | html_entity %] - [% node.port | html_entity %]</a>
|
||||
[% ' <i class="icon-book text-warning"></i> ' IF NOT node.active %]
|
||||
[% IF node.device.dns AND node.device_port AND node.device_port.name %]
|
||||
@@ -69,7 +69,7 @@
|
||||
</td>
|
||||
<td>Switch Port</td>
|
||||
<td class="nd_center-cell">
|
||||
<a href="[% device_ports %]&q=[% port.ip | uri %]&f=[% port.port | uri %]&c_mac=on&c_nodes=on&c_neighbors=on">
|
||||
<a href="[% uri_for('/device/ports') %]&q=[% port.ip | uri %]&f=[% port.port | uri %]&c_mac=on&c_nodes=on&c_neighbors=on">
|
||||
[% port.ip | html_entity %] - [% port.descr | html_entity %]</a>
|
||||
[% IF port.device.dns AND port.name %]
|
||||
([% port.device.dns | html_entity %] - [% port.name | html_entity %])
|
||||
|
||||
@@ -26,7 +26,7 @@ $(document).ready(function() {
|
||||
if (row.device.dns || row.device.name) {
|
||||
ddns = ' (' + he.encode(row.device.dns || row.device.name) + ')';
|
||||
}
|
||||
return '<a href="[% device_ports %]&q=' + encodeURIComponent(data)
|
||||
return '<a href="[% uri_for('/device/ports') %]&q=' + encodeURIComponent(data)
|
||||
+ '&f=' + encodeURIComponent(row.port) + '">' + he.encode(data)
|
||||
+ ' [' + he.encode(row.port) + ']</a>' + ddns;
|
||||
}
|
||||
|
||||
@@ -19,32 +19,32 @@ $(document).ready(function() {
|
||||
"columns": [{
|
||||
"data": 'vlans.vlan',
|
||||
"render": function(data, type, row, meta) {
|
||||
return '<a class="nd_linkcell nd_stealth-link" href="[% device_ports %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(data) + '">' + data + '</a>';
|
||||
return '<a class="nd_linkcell nd_stealth-link" href="[% uri_for('/device/ports') %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(data) + '">' + data + '</a>';
|
||||
}
|
||||
}, {
|
||||
"data": 'ip',
|
||||
"render": function(data, type, row, meta) {
|
||||
return '<a href="[% device_ports %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(row.vlans.vlan) + '">' + he.encode(row.dns || row.ip) + '</a>';
|
||||
return '<a href="[% uri_for('/device/ports') %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(row.vlans.vlan) + '">' + he.encode(row.dns || row.ip) + '</a>';
|
||||
}
|
||||
}, {
|
||||
"data": 'vlans.description',
|
||||
"render": function(data, type, row, meta) {
|
||||
return '<a class="nd_linkcell nd_stealth-link" href="[% device_ports %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(row.vlans.vlan) + '">' + he.encode(data || '') + '</a>';
|
||||
return '<a class="nd_linkcell nd_stealth-link" href="[% uri_for('/device/ports') %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(row.vlans.vlan) + '">' + he.encode(data || '') + '</a>';
|
||||
}
|
||||
}, {
|
||||
"data": 'model',
|
||||
"render": function(data, type, row, meta) {
|
||||
return '<a class="nd_linkcell nd_stealth-link" href="[% device_ports %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(row.vlans.vlan) + '">' + he.encode(data || '') + '</a>';
|
||||
return '<a class="nd_linkcell nd_stealth-link" href="[% uri_for('/device/ports') %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(row.vlans.vlan) + '">' + he.encode(data || '') + '</a>';
|
||||
}
|
||||
}, {
|
||||
"data": 'os',
|
||||
"render": function(data, type, row, meta) {
|
||||
return '<a class="nd_linkcell nd_stealth-link" href="[% device_ports %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(row.vlans.vlan) + '">' + he.encode(data || '') + '</a>';
|
||||
return '<a class="nd_linkcell nd_stealth-link" href="[% uri_for('/device/ports') %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(row.vlans.vlan) + '">' + he.encode(data || '') + '</a>';
|
||||
}
|
||||
}, {
|
||||
"data": 'vendor',
|
||||
"render": function(data, type, row, meta) {
|
||||
return '<a class="nd_linkcell nd_stealth-link" href="[% device_ports %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(row.vlans.vlan) + '">' + he.encode(data || '') + '</a>';
|
||||
return '<a class="nd_linkcell nd_stealth-link" href="[% uri_for('/device/ports') %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(row.vlans.vlan) + '">' + he.encode(data || '') + '</a>';
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user