From c1846103fe763b845d9e8f97438399f1992f7931 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 21 Jul 2014 21:48:52 +0000 Subject: [PATCH] DataTables render function should check for type --- Netdisco/Changes | 1 + Netdisco/share/views/ajax/report/ipinventory.tt | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Netdisco/Changes b/Netdisco/Changes index 7e8211fb..c1f71100 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -4,6 +4,7 @@ * DNS Mismatch report incorrectly trimmed domain_suffix * Fake one device aliases entry for devices not providing ip_index + * DataTables render function should check for type 2.028006 - 2014-07-21 diff --git a/Netdisco/share/views/ajax/report/ipinventory.tt b/Netdisco/share/views/ajax/report/ipinventory.tt index 12e011a0..5eeadd61 100644 --- a/Netdisco/share/views/ajax/report/ipinventory.tt +++ b/Netdisco/share/views/ajax/report/ipinventory.tt @@ -25,11 +25,15 @@ $(document).ready(function() { "data": 'ip', "render": function(data, type, row, meta) { var cell_str = he.encode(data); - if (row.time_last && row.node) { - cell_str = '' + he.encode(data) + (row.active ? '' : '  ') + ''; - } - else if (row.time_last) { - cell_str = '' + he.encode(data) + ''; + if (type == 'display') { + if (row.time_last && row.node) { + cell_str = '' + he.encode(data) + + (row.active ? '' : '  ') + ''; + } + else if (row.time_last) { + cell_str = '' + he.encode(data) + ''; + } } return cell_str; }