blib/lib/App/Netdisco/Web/Plugin/AdminTask/SlowDevices.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod n/a totaltotal 0.0% 0 / 27 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package App::Netdisco::Web::Plugin::AdminTask::SlowDevices;
2  
3 use Dancer ':syntax';
4 use Dancer::Plugin::Ajax;
5 use Dancer::Plugin::DBIC;
6 use Dancer::Plugin::Auth::Extensible;
7  
8 use App::Netdisco::Web::Plugin;
9  
10 register_admin_task({
11 tag => 'slowdevices',
12 label => 'Slowest Devices',
13 });
14  
15 ajax '/ajax/content/admin/slowdevices' => require_role admin => sub {
16 my $set = schema(vars->{'tenant'})->resultset('Virtual::SlowDevices');
17  
18 content_type('text/html');
19 template 'ajax/admintask/slowdevices.tt', {
20 results => $set,
21 }, { layout => undef };
22 };
23  
24 true;