DataTables render function should check for type
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
* DNS Mismatch report incorrectly trimmed domain_suffix
|
* DNS Mismatch report incorrectly trimmed domain_suffix
|
||||||
* Fake one device aliases entry for devices not providing ip_index
|
* Fake one device aliases entry for devices not providing ip_index
|
||||||
|
* DataTables render function should check for type
|
||||||
|
|
||||||
2.028006 - 2014-07-21
|
2.028006 - 2014-07-21
|
||||||
|
|
||||||
|
|||||||
@@ -25,11 +25,15 @@ $(document).ready(function() {
|
|||||||
"data": 'ip',
|
"data": 'ip',
|
||||||
"render": function(data, type, row, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
var cell_str = he.encode(data);
|
var cell_str = he.encode(data);
|
||||||
if (row.time_last && row.node) {
|
if (type == 'display') {
|
||||||
cell_str = '<a href="[% search_node %]&q=' + encodeURIComponent(data) + (row.active ? '' : '&archived=on') + '">' + he.encode(data) + (row.active ? '' : ' <i class="icon-book text-warning"></i> ') + '</a>';
|
if (row.time_last && row.node) {
|
||||||
}
|
cell_str = '<a href="[% search_node %]&q=' + encodeURIComponent(data)
|
||||||
else if (row.time_last) {
|
+ (row.active ? '' : '&archived=on') + '">' + he.encode(data)
|
||||||
cell_str = '<a href="[% search_device %]&q=' + encodeURIComponent(data) + '">' + he.encode(data) + '</a>';
|
+ (row.active ? '' : ' <i class="icon-book text-warning"></i> ') + '</a>';
|
||||||
|
}
|
||||||
|
else if (row.time_last) {
|
||||||
|
cell_str = '<a href="[% search_device %]&q=' + encodeURIComponent(data) + '">' + he.encode(data) + '</a>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return cell_str;
|
return cell_str;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user