some older cisco devices report a numeric value for class, ignore null as a class
This commit is contained in:
@@ -88,7 +88,7 @@ get '/ajax/content/report/moduleinventory' => require_login sub {
|
||||
}
|
||||
else {
|
||||
@results = $rs->search(
|
||||
{},
|
||||
{class => { '!=', undef }},
|
||||
{ select => [ 'class', { count => 'class' } ],
|
||||
as => [qw/ class count /],
|
||||
group_by => [qw/ class /]
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user