fix undef data error in JS, and when no remote_(ip|port)

This commit is contained in:
Oliver Gorwits
2014-08-25 17:13:11 +01:00
parent 4c08de9512
commit fb7bcbf120
2 changed files with 3 additions and 4 deletions

View File

@@ -33,8 +33,7 @@ WHERE d.ip = p.ip
WHERE a.alias = p.remote_ip WHERE a.alias = p.remote_ip
AND q.ip = a.ip AND q.ip = a.ip
AND q.port = p.remote_port) AND q.port = p.remote_port)
AND p.remote_ip IS NOT NULL AND (p.remote_id IS NOT NULL OR p.remote_type IS NOT NULL)
AND p.remote_port IS NOT NULL
ENDSQL ENDSQL
); );

View File

@@ -33,7 +33,7 @@ $(document).ready(function() {
"type": 'portsort', "type": 'portsort',
"render": function(data, type, row, meta) { "render": function(data, type, row, meta) {
return type === 'display' ? return type === 'display' ?
'<a href="[% device_ports %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(data) + '">' + he.encode(data) + '</a>' : '<a href="[% device_ports %]&c_nodes=on&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(data) + '">' + he.encode(data) + '</a>' :
data; data;
} }
}, { }, {
@@ -44,7 +44,7 @@ $(document).ready(function() {
}, { }, {
"data": 'remote_ip', "data": 'remote_ip',
"render": function(data, type, row, meta) { "render": function(data, type, row, meta) {
return '<a href="[% search_node %]&q=' + encodeURIComponent(data) + '">' + he.encode(data) + '</a>'; return '<a href="[% search_node %]&q=' + encodeURIComponent(data || '') + '">' + he.encode(data || '') + '</a>';
} }
}, { }, {
"data": 'remote_port', "data": 'remote_port',