#761 explicit null template layout for xhr/fetch snippets
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] };
|
columns => [@column_order] }, { layout => undef };
|
||||||
}
|
}
|
||||||
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] };
|
columns => [@column_order] }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/apchanneldist.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/apchanneldist_csv.tt', { results => \@results };
|
template 'ajax/report/apchanneldist_csv.tt', { results => \@results }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/apclients.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
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 };
|
{ results => \@results }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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';
|
template 'ajax/report/apradiochannelpower.tt', {}, { layout => undef };
|
||||||
}
|
}
|
||||||
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, };
|
{ results => \@results, }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/deviceaddrnodns.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
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, };
|
{ results => \@results, }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/devicebylocation.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
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 };
|
{ results => \@results }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/devicednsmismatch.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
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 };
|
{ results => \@results }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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';
|
template 'ajax/report/devicepoestatus.tt', {}, { layout => undef };
|
||||||
}
|
}
|
||||||
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, };
|
{ results => \@results, }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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, };
|
template 'ajax/report/duplexmismatch.tt', { results => $json, }, { layout => undef };
|
||||||
}
|
}
|
||||||
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, };
|
{ results => \@results, }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/halfduplex.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
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 };
|
{ results => \@results }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/ipinventory.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/ipinventory_csv.tt', { results => \@results, };
|
template 'ajax/report/ipinventory_csv.tt', { results => \@results, }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/nodemultiips.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
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 };
|
{ results => \@results }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/nodesdiscovered.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
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 };
|
{ results => \@results }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/portadmindown.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
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, };
|
{ results => \@results, }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/portblocking.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
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, };
|
{ results => \@results, }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/portmultinodes.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
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, };
|
{ results => \@results, }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
{ results => $json, opt => $ssid }, { layout => undef };
|
||||||
}
|
}
|
||||||
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 };
|
{ results => \@results, opt => $ssid }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/portutilization.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/portutilization_csv.tt', { results => \@results, };
|
template 'ajax/report/portutilization_csv.tt', { results => \@results, }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/portvlanmismatch.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/portvlanmismatch_csv.tt', { results => \@results, };
|
template 'ajax/report/portvlanmismatch_csv.tt', { results => \@results, }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/portssid.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/portssid_csv.tt', { results => \@results };
|
template 'ajax/report/portssid_csv.tt', { results => \@results }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/subnets.tt', { results => \@results }, { layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/subnets_csv.tt', { results => \@results };
|
template 'ajax/report/subnets_csv.tt', { results => \@results }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/report/vlaninventory.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/report/vlaninventory_csv.tt', { results => \@results };
|
template 'ajax/report/vlaninventory_csv.tt', { results => \@results }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ get '/ajax/content/search/device' => require_login sub {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/search/device_csv.tt', { results => \@results, };
|
template 'ajax/search/device_csv.tt', { results => \@results, }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/search/port.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/search/port_csv.tt', { results => \@results };
|
template 'ajax/search/port_csv.tt', { results => \@results }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
template 'ajax/search/vlan.tt', { results => $json }, { layout => undef };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header( 'Content-Type' => 'text/comma-separated-values' );
|
header( 'Content-Type' => 'text/comma-separated-values' );
|
||||||
template 'ajax/search/vlan_csv.tt', { results => \@results };
|
template 'ajax/search/vlan_csv.tt', { results => \@results }, { layout => undef };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user