some older cisco devices report a numeric value for class, ignore null as a class

This commit is contained in:
Eric A. Miller
2014-05-29 23:02:16 -04:00
parent 669333d490
commit 8ddd5c3d2d
2 changed files with 3 additions and 3 deletions

View File

@@ -65,7 +65,7 @@ $(document).ready(function() {
}, {
"data": 'class',
"render": function(data, type, row, meta) {
return '<a href="[% uri_for('/report/moduleinventory') %]?class=' + encodeURIComponent(data) + '">' + he.encode(capitalizeFirstLetter(data)) + '</a>';
return '<a href="[% uri_for('/report/moduleinventory') %]?class=' + encodeURIComponent(data) + '">' + he.encode(capitalizeFirstLetter(data + '')) + '</a>';
}
}, {
"data": 'type',
@@ -101,7 +101,7 @@ $(document).ready(function() {
[% ELSE %] {
"data": 'class',
"render": function(data, type, row, meta) {
return '<a href="[% uri_for('/report/moduleinventory') %]?class=' + encodeURIComponent(data) + '">' + he.encode(capitalizeFirstLetter(data)) + '</a>';
return '<a href="[% uri_for('/report/moduleinventory') %]?class=' + encodeURIComponent(data) + '">' + he.encode(capitalizeFirstLetter(data + '')) + '</a>';
}
}, {
"data": 'count',