standardize variable names
This commit is contained in:
@@ -27,8 +27,8 @@ get '/ajax/content/report/deviceaddrnodns' => require_login sub {
|
|||||||
return unless scalar @results;
|
return unless scalar @results;
|
||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $results = to_json (\@results);
|
my $json = to_json (\@results);
|
||||||
template 'ajax/report/deviceaddrnodns.tt', { results => $results, },
|
template 'ajax/report/deviceaddrnodns.tt', { results => $json },
|
||||||
{ layout => undef };
|
{ layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ get '/ajax/content/report/devicebylocation' => require_login sub {
|
|||||||
return unless scalar @results;
|
return unless scalar @results;
|
||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $results = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/devicebylocation.tt', { results => $results },
|
template 'ajax/report/devicebylocation.tt', { results => $json },
|
||||||
{ layout => undef };
|
{ layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ get '/ajax/content/report/devicednsmismatch' => require_login sub {
|
|||||||
return unless scalar @results;
|
return unless scalar @results;
|
||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $results = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/devicednsmismatch.tt', { results => $results },
|
template 'ajax/report/devicednsmismatch.tt', { results => $json },
|
||||||
{ layout => undef };
|
{ layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -100,10 +100,11 @@ get '/ajax/content/report/moduleinventory' => require_login sub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return unless scalar @results;
|
return unless scalar @results;
|
||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $results = to_json (\@results);
|
my $json = to_json (\@results);
|
||||||
template 'ajax/report/moduleinventory.tt',
|
template 'ajax/report/moduleinventory.tt',
|
||||||
{ results => $results, opt => $has_opt },
|
{ results => $json, opt => $has_opt },
|
||||||
{ layout => undef };
|
{ layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ get '/ajax/content/report/portadmindown' => require_login sub {
|
|||||||
return unless scalar @results;
|
return unless scalar @results;
|
||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $results = to_json (\@results);
|
my $json = to_json (\@results);
|
||||||
template 'ajax/report/portadmindown.tt', { results => $results, },
|
template 'ajax/report/portadmindown.tt', { results => $json },
|
||||||
{ layout => undef };
|
{ layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ get '/ajax/content/report/portblocking' => require_login sub {
|
|||||||
return unless scalar @results;
|
return unless scalar @results;
|
||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $results = to_json (\@results);
|
my $json = to_json (\@results);
|
||||||
template 'ajax/report/portblocking.tt', { results => $results, },
|
template 'ajax/report/portblocking.tt', { results => $json },
|
||||||
{ layout => undef };
|
{ layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ get '/ajax/content/report/portmultinodes' => require_login sub {
|
|||||||
return unless scalar @results;
|
return unless scalar @results;
|
||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $results = to_json (\@results);
|
my $json = to_json (\@results);
|
||||||
template 'ajax/report/portmultinodes.tt', { results => $results, },
|
template 'ajax/report/portmultinodes.tt', { results => $json },
|
||||||
{ layout => undef };
|
{ layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ get '/ajax/content/report/portutilization' => require_login sub {
|
|||||||
my @results = schema('netdisco')->resultset('Virtual::PortUtilization')->hri->all;
|
my @results = schema('netdisco')->resultset('Virtual::PortUtilization')->hri->all;
|
||||||
|
|
||||||
if (request->is_ajax) {
|
if (request->is_ajax) {
|
||||||
my $results = to_json (\@results);
|
my $json = to_json (\@results);
|
||||||
template 'ajax/report/portutilization.tt', { results => $results, },
|
template 'ajax/report/portutilization.tt', { results => $json },
|
||||||
{ layout => undef };
|
{ layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ $(document).ready(function() {
|
|||||||
}, {
|
}, {
|
||||||
"data": 'ch_count',
|
"data": 'ch_count',
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ $(document).ready(function() {
|
|||||||
"data": 'duplex',
|
"data": 'duplex',
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"orderable": false,
|
"orderable": false,
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return he.encode(capitalizeFirstLetter(data));
|
return he.encode(capitalizeFirstLetter(data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,12 +70,12 @@ $(document).ready(function() {
|
|||||||
"columns": [
|
"columns": [
|
||||||
{
|
{
|
||||||
"data": 'domain',
|
"data": 'domain',
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return '<a href="[% uri_for('/report/netbios') %]?domain=' + encodeURIComponent(data || 'blank') + '">' + he.encode(data || '(Blank Domain)') + '</a>';
|
return '<a href="[% uri_for('/report/netbios') %]?domain=' + encodeURIComponent(data || 'blank') + '">' + he.encode(data || '(Blank Domain)') + '</a>';
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"data": 'count',
|
"data": 'count',
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ $(document).ready(function() {
|
|||||||
}, {
|
}, {
|
||||||
"data": 'mac_count',
|
"data": 'mac_count',
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"data": 'broadcast',
|
"data": 'broadcast',
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return (data ? 'Yes' : 'No');
|
return (data ? 'Yes' : 'No');
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
@@ -63,18 +63,18 @@ $(document).ready(function() {
|
|||||||
"columns": [
|
"columns": [
|
||||||
{
|
{
|
||||||
"data": 'ssid',
|
"data": 'ssid',
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return '<a href="[% uri_for('/report/portssid') %]?ssid=' + encodeURIComponent(data) + '">' + he.encode(data) + '</a>';
|
return '<a href="[% uri_for('/report/portssid') %]?ssid=' + encodeURIComponent(data) + '">' + he.encode(data) + '</a>';
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"data": 'broadcast',
|
"data": 'broadcast',
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return (data ? 'Yes' : 'No');
|
return (data ? 'Yes' : 'No');
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"data": 'count',
|
"data": 'count',
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -24,25 +24,25 @@ $(document).ready(function() {
|
|||||||
}, {
|
}, {
|
||||||
"data": 'port_count',
|
"data": 'port_count',
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"data": 'ports_in_use',
|
"data": 'ports_in_use',
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"data": 'ports_shutdown',
|
"data": 'ports_shutdown',
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"data": 'ports_free',
|
"data": 'ports_free',
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,13 +28,13 @@ $(document).ready(function() {
|
|||||||
}, {
|
}, {
|
||||||
"data": 'dcount',
|
"data": 'dcount',
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"data": 'pcount',
|
"data": 'pcount',
|
||||||
"searchable": false,
|
"searchable": false,
|
||||||
"render": function(data, type, full, meta) {
|
"render": function(data, type, row, meta) {
|
||||||
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return data.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user