explicit no-op layout so that layout hook gets triggered which makes API work

This commit is contained in:
Oliver Gorwits
2021-10-19 08:59:42 +01:00
parent 8902efc6d3
commit feeebe04cb
34 changed files with 66 additions and 66 deletions

View File

@@ -24,7 +24,7 @@ ajax '/ajax/content/device/modules' => require_login sub {
content_type('text/html');
template 'ajax/device/modules.tt', {
nodes => $results,
}, { layout => undef };
}, { layout => 'noop' };
};
true;

View File

@@ -218,7 +218,7 @@ get '/ajax/content/device/ports' => require_login sub {
ips => $ips_name,
device => $device,
vlans => $vlans,
}, { layout => undef };
}, { layout => 'noop' };
}
else {
header( 'Content-Type' => 'text/comma-separated-values' );
@@ -228,7 +228,7 @@ get '/ajax/content/device/ports' => require_login sub {
ips => $ips_name,
device => $device,
vlans => $vlans,
}, { layout => undef };
}, { layout => 'noop' };
}
};

View File

@@ -25,12 +25,12 @@ get '/ajax/content/device/vlans' => require_login sub {
if (request->is_ajax) {
my $json = to_json( \@results );
template 'ajax/device/vlans.tt', { results => $json },
{ layout => undef };
{ layout => 'noop' };
}
else {
header( 'Content-Type' => 'text/comma-separated-values' );
template 'ajax/device/vlans_csv.tt', { results => \@results },
{ layout => undef };
{ layout => 'noop' };
}
};