explicit no-op layout so that layout hook gets triggered which makes API work
This commit is contained in:
@@ -78,14 +78,14 @@ foreach my $report (@{setting('reports')}) {
|
|||||||
is_custom_report => true,
|
is_custom_report => true,
|
||||||
column_options => \%column_config,
|
column_options => \%column_config,
|
||||||
headings => [map {$column_config{$_}->{displayname}} @column_order],
|
headings => [map {$column_config{$_}->{displayname}} @column_order],
|
||||||
columns => [@column_order] }, { layout => undef };
|
columns => [@column_order] }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/generic_report_csv.tt',
|
template 'ajax/report/generic_report_csv.tt',
|
||||||
{ results => \@results,
|
{ results => \@results,
|
||||||
headings => [map {$column_config{$_}->{displayname}} @column_order],
|
headings => [map {$column_config{$_}->{displayname}} @column_order],
|
||||||
columns => [@column_order] }, { layout => undef };
|
columns => [@column_order] }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ ajax '/ajax/content/device/modules' => require_login sub {
|
|||||||
content_type('text/html');
|
content_type('text/html');
|
||||||
template 'ajax/device/modules.tt', {
|
template 'ajax/device/modules.tt', {
|
||||||
nodes => $results,
|
nodes => $results,
|
||||||
}, { layout => undef };
|
}, { layout => 'noop' };
|
||||||
};
|
};
|
||||||
|
|
||||||
true;
|
true;
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ get '/ajax/content/device/ports' => require_login sub {
|
|||||||
ips => $ips_name,
|
ips => $ips_name,
|
||||||
device => $device,
|
device => $device,
|
||||||
vlans => $vlans,
|
vlans => $vlans,
|
||||||
}, { layout => undef };
|
}, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
@@ -228,7 +228,7 @@ get '/ajax/content/device/ports' => require_login sub {
|
|||||||
ips => $ips_name,
|
ips => $ips_name,
|
||||||
device => $device,
|
device => $device,
|
||||||
vlans => $vlans,
|
vlans => $vlans,
|
||||||
}, { layout => undef };
|
}, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ get '/ajax/content/device/vlans' => require_login sub {
|
|||||||
if (request->is_ajax) {
|
if (request->is_ajax) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/device/vlans.tt', { results => $json },
|
template 'ajax/device/vlans.tt', { results => $json },
|
||||||
{ layout => undef };
|
{ layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/device/vlans_csv.tt', { results => \@results },
|
template 'ajax/device/vlans_csv.tt', { results => \@results },
|
||||||
{ layout => undef };
|
{ layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ get '/ajax/content/report/apchanneldist' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/apchanneldist.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/apchanneldist.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/apchanneldist_csv.tt', { results => \@results }, { layout => undef };
|
template 'ajax/report/apchanneldist_csv.tt', { results => \@results }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -38,12 +38,12 @@ get '/ajax/content/report/apclients' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/apclients.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/apclients.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/apclients_csv.tt',
|
template 'ajax/report/apclients_csv.tt',
|
||||||
{ results => \@results }, { layout => undef };
|
{ results => \@results }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ get '/ajax/content/report/apradiochannelpower/data' => require_login sub {
|
|||||||
get '/ajax/content/report/apradiochannelpower' => require_login sub {
|
get '/ajax/content/report/apradiochannelpower' => require_login sub {
|
||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
template 'ajax/report/apradiochannelpower.tt', {}, { layout => undef };
|
template 'ajax/report/apradiochannelpower.tt', {}, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
my @results
|
my @results
|
||||||
@@ -50,7 +50,7 @@ get '/ajax/content/report/apradiochannelpower' => require_login sub {
|
|||||||
|
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/apradiochannelpower_csv.tt',
|
template 'ajax/report/apradiochannelpower_csv.tt',
|
||||||
{ results => \@results, }, { layout => undef };
|
{ results => \@results, }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -29,12 +29,12 @@ get '/ajax/content/report/deviceaddrnodns' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json (\@results);
|
my $json = to_json (\@results);
|
||||||
template 'ajax/report/deviceaddrnodns.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/deviceaddrnodns.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/deviceaddrnodns_csv.tt',
|
template 'ajax/report/deviceaddrnodns_csv.tt',
|
||||||
{ results => \@results, }, { layout => undef };
|
{ results => \@results, }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ get '/ajax/content/report/devicebylocation' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/devicebylocation.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/devicebylocation.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/devicebylocation_csv.tt',
|
template 'ajax/report/devicebylocation_csv.tt',
|
||||||
{ results => \@results }, { layout => undef };
|
{ results => \@results }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -28,12 +28,12 @@ get '/ajax/content/report/devicednsmismatch' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/devicednsmismatch.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/devicednsmismatch.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/devicednsmismatch_csv.tt',
|
template 'ajax/report/devicednsmismatch_csv.tt',
|
||||||
{ results => \@results }, { layout => undef };
|
{ results => \@results }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ get '/ajax/content/report/devicepoestatus/data' => require_login sub {
|
|||||||
get '/ajax/content/report/devicepoestatus' => require_login sub {
|
get '/ajax/content/report/devicepoestatus' => require_login sub {
|
||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
template 'ajax/report/devicepoestatus.tt', {}, { layout => undef };
|
template 'ajax/report/devicepoestatus.tt', {}, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
my @results
|
my @results
|
||||||
@@ -51,7 +51,7 @@ get '/ajax/content/report/devicepoestatus' => require_login sub {
|
|||||||
|
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/devicepoestatus_csv.tt',
|
template 'ajax/report/devicepoestatus_csv.tt',
|
||||||
{ results => \@results, }, { layout => undef };
|
{ results => \@results, }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -23,12 +23,12 @@ get '/ajax/content/report/duplexmismatch' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/duplexmismatch.tt', { results => $json, }, { layout => undef };
|
template 'ajax/report/duplexmismatch.tt', { results => $json, }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/duplexmismatch_csv.tt',
|
template 'ajax/report/duplexmismatch_csv.tt',
|
||||||
{ results => \@results, }, { layout => undef };
|
{ results => \@results, }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ get '/ajax/content/report/halfduplex' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/halfduplex.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/halfduplex.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/halfduplex_csv.tt',
|
template 'ajax/report/halfduplex_csv.tt',
|
||||||
{ results => \@results }, { layout => undef };
|
{ results => \@results }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -193,11 +193,11 @@ get '/ajax/content/report/ipinventory' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/ipinventory.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/ipinventory.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/ipinventory_csv.tt', { results => \@results, }, { layout => undef };
|
template 'ajax/report/ipinventory_csv.tt', { results => \@results, }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -131,13 +131,13 @@ get '/ajax/content/report/moduleinventory' => require_login sub {
|
|||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/moduleinventory.tt',
|
template 'ajax/report/moduleinventory.tt',
|
||||||
{ results => $json, opt => $has_opt },
|
{ results => $json, opt => $has_opt },
|
||||||
{ layout => undef };
|
{ layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/moduleinventory_csv.tt',
|
template 'ajax/report/moduleinventory_csv.tt',
|
||||||
{ results => \@results, opt => $has_opt },
|
{ results => \@results, opt => $has_opt },
|
||||||
{ layout => undef };
|
{ layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -97,13 +97,13 @@ get '/ajax/content/report/netbios' => require_login sub {
|
|||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/netbios.tt',
|
template 'ajax/report/netbios.tt',
|
||||||
{ results => $json, opt => $domain },
|
{ results => $json, opt => $domain },
|
||||||
{ layout => undef };
|
{ layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/netbios_csv.tt',
|
template 'ajax/report/netbios_csv.tt',
|
||||||
{ results => \@results, opt => $domain },
|
{ results => \@results, opt => $domain },
|
||||||
{ layout => undef };
|
{ layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -38,12 +38,12 @@ get '/ajax/content/report/nodemultiips' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/nodemultiips.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/nodemultiips.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/nodemultiips_csv.tt',
|
template 'ajax/report/nodemultiips_csv.tt',
|
||||||
{ results => \@results }, { layout => undef };
|
{ results => \@results }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -120,13 +120,13 @@ get '/ajax/content/report/nodevendor' => require_login sub {
|
|||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/nodevendor.tt',
|
template 'ajax/report/nodevendor.tt',
|
||||||
{ results => $json, opt => $vendor },
|
{ results => $json, opt => $vendor },
|
||||||
{ layout => undef };
|
{ layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/nodevendor_csv.tt',
|
template 'ajax/report/nodevendor_csv.tt',
|
||||||
{ results => \@results, opt => $vendor },
|
{ results => \@results, opt => $vendor },
|
||||||
{ layout => undef };
|
{ layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -64,12 +64,12 @@ get '/ajax/content/report/nodesdiscovered' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/nodesdiscovered.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/nodesdiscovered.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/nodesdiscovered_csv.tt',
|
template 'ajax/report/nodesdiscovered_csv.tt',
|
||||||
{ results => \@results }, { layout => undef };
|
{ results => \@results }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ get '/ajax/content/report/portadmindown' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json (\@results);
|
my $json = to_json (\@results);
|
||||||
template 'ajax/report/portadmindown.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/portadmindown.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/portadmindown_csv.tt',
|
template 'ajax/report/portadmindown_csv.tt',
|
||||||
{ results => \@results, }, { layout => undef };
|
{ results => \@results, }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ get '/ajax/content/report/portblocking' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json (\@results);
|
my $json = to_json (\@results);
|
||||||
template 'ajax/report/portblocking.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/portblocking.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/portblocking_csv.tt',
|
template 'ajax/report/portblocking_csv.tt',
|
||||||
{ results => \@results, }, { layout => undef };
|
{ results => \@results, }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ ajax '/ajax/content/report/portlog' => require_login sub {
|
|||||||
content_type('text/html');
|
content_type('text/html');
|
||||||
template 'ajax/report/portlog.tt', {
|
template 'ajax/report/portlog.tt', {
|
||||||
results => $set,
|
results => $set,
|
||||||
}, { layout => undef };
|
}, { layout => 'noop' };
|
||||||
};
|
};
|
||||||
|
|
||||||
true;
|
true;
|
||||||
|
|||||||
@@ -46,12 +46,12 @@ get '/ajax/content/report/portmultinodes' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json (\@results);
|
my $json = to_json (\@results);
|
||||||
template 'ajax/report/portmultinodes.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/portmultinodes.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/portmultinodes_csv.tt',
|
template 'ajax/report/portmultinodes_csv.tt',
|
||||||
{ results => \@results, }, { layout => undef };
|
{ results => \@results, }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -71,12 +71,12 @@ get '/ajax/content/report/portssid' => require_login sub {
|
|||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/portssid.tt',
|
template 'ajax/report/portssid.tt',
|
||||||
{ results => $json, opt => $ssid }, { layout => undef };
|
{ results => $json, opt => $ssid }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/portssid_csv.tt',
|
template 'ajax/report/portssid_csv.tt',
|
||||||
{ results => \@results, opt => $ssid }, { layout => undef };
|
{ results => \@results, opt => $ssid }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -37,11 +37,11 @@ get '/ajax/content/report/portutilization' => require_login sub {
|
|||||||
|
|
||||||
if (request->is_ajax) {
|
if (request->is_ajax) {
|
||||||
my $json = to_json (\@results);
|
my $json = to_json (\@results);
|
||||||
template 'ajax/report/portutilization.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/portutilization.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/portutilization_csv.tt', { results => \@results, }, { layout => undef };
|
template 'ajax/report/portutilization_csv.tt', { results => \@results, }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,11 @@ get '/ajax/content/report/portvlanmismatch' => require_login sub {
|
|||||||
|
|
||||||
if (request->is_ajax) {
|
if (request->is_ajax) {
|
||||||
my $json = to_json (\@results);
|
my $json = to_json (\@results);
|
||||||
template 'ajax/report/portvlanmismatch.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/portvlanmismatch.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/portvlanmismatch_csv.tt', { results => \@results, }, { layout => undef };
|
template 'ajax/report/portvlanmismatch_csv.tt', { results => \@results, }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ get '/ajax/content/report/ssidinventory' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/report/portssid.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/portssid.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/portssid_csv.tt', { results => \@results }, { layout => undef };
|
template 'ajax/report/portssid_csv.tt', { results => \@results }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ get '/ajax/content/report/subnets' => require_login sub {
|
|||||||
return unless scalar @results;
|
return unless scalar @results;
|
||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
template 'ajax/report/subnets.tt', { results => \@results }, { layout => undef };
|
template 'ajax/report/subnets.tt', { results => \@results }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/subnets_csv.tt', { results => \@results }, { layout => undef };
|
template 'ajax/report/subnets_csv.tt', { results => \@results }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -37,11 +37,11 @@ get '/ajax/content/report/vlaninventory' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json (\@results);
|
my $json = to_json (\@results);
|
||||||
template 'ajax/report/vlaninventory.tt', { results => $json }, { layout => undef };
|
template 'ajax/report/vlaninventory.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/vlaninventory_csv.tt', { results => \@results }, { layout => undef };
|
template 'ajax/report/vlaninventory_csv.tt', { results => \@results }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -87,11 +87,11 @@ get '/ajax/content/search/device' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/search/device.tt', { results => $json }, { layout => undef };;
|
template 'ajax/search/device.tt', { results => $json }, { layout => 'noop' };;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/search/device_csv.tt', { results => \@results, }, { layout => undef };
|
template 'ajax/search/device_csv.tt', { results => \@results, }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ get '/ajax/content/search/node' => require_login sub {
|
|||||||
ports => $ports,
|
ports => $ports,
|
||||||
wireless => $wireless,
|
wireless => $wireless,
|
||||||
netbios => $netbios,
|
netbios => $netbios,
|
||||||
}, { layout => undef };
|
}, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
my $ports = param('deviceports')
|
my $ports = param('deviceports')
|
||||||
@@ -203,7 +203,7 @@ get '/ajax/content/search/node' => require_login sub {
|
|||||||
ports => $ports,
|
ports => $ports,
|
||||||
wireless => $wireless,
|
wireless => $wireless,
|
||||||
netbios => $netbios,
|
netbios => $netbios,
|
||||||
}, { layout => undef };
|
}, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,7 +248,7 @@ get '/ajax/content/search/node' => require_login sub {
|
|||||||
return template 'ajax/search/node_by_ip.tt', {
|
return template 'ajax/search/node_by_ip.tt', {
|
||||||
macs => $set,
|
macs => $set,
|
||||||
archive_filter => {@active},
|
archive_filter => {@active},
|
||||||
}, { layout => undef };
|
}, { layout => 'noop' };
|
||||||
};
|
};
|
||||||
|
|
||||||
true;
|
true;
|
||||||
|
|||||||
@@ -100,11 +100,11 @@ get '/ajax/content/search/port' => require_login sub {
|
|||||||
|
|
||||||
if ( request->is_ajax ) {
|
if ( request->is_ajax ) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/search/port.tt', { results => $json }, { layout => undef };
|
template 'ajax/search/port.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/search/port_csv.tt', { results => \@results }, { layout => undef };
|
template 'ajax/search/port_csv.tt', { results => \@results }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -40,11 +40,11 @@ get '/ajax/content/search/vlan' => require_login sub {
|
|||||||
|
|
||||||
if (request->is_ajax) {
|
if (request->is_ajax) {
|
||||||
my $json = to_json( \@results );
|
my $json = to_json( \@results );
|
||||||
template 'ajax/search/vlan.tt', { results => $json }, { layout => undef };
|
template 'ajax/search/vlan.tt', { results => $json }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/search/vlan_csv.tt', { results => \@results }, { layout => undef };
|
template 'ajax/search/vlan_csv.tt', { results => \@results }, { layout => 'noop' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ get '/ajax/content/statistics' => require_login sub {
|
|||||||
var( nav => 'statistics' );
|
var( nav => 'statistics' );
|
||||||
template 'ajax/statistics.tt',
|
template 'ajax/statistics.tt',
|
||||||
{ stats => $stats },
|
{ stats => $stats },
|
||||||
{ layout => undef };
|
{ layout => 'noop' };
|
||||||
};
|
};
|
||||||
|
|
||||||
true;
|
true;
|
||||||
|
|||||||
Reference in New Issue
Block a user