« blib/lib/App/Netdisco/Web/Plugin/AdminTask/OrphanedDevices.pm
↑ Summary
blib/lib/App/Netdisco/Web/Plugin/AdminTask/SlowDevices.pm »
| 1 | package App::Netdisco::Web::Plugin::AdminTask::PollerPerformance; | ||
| 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 => 'performance', | ||
| 12 | label => 'Poller Performance', | ||
| 13 | }); | ||
| 14 | |||
| 15 | ajax '/ajax/content/admin/performance' => require_role admin => sub { | ||
| 16 | my $set = schema(vars->{'tenant'})->resultset('Virtual::PollerPerformance'); | ||
| 17 | |||
| 18 | content_type('text/html'); | ||
| 19 | template 'ajax/admintask/performance.tt', { | ||
| 20 | results => $set, | ||
| 21 | }, { layout => undef }; | ||
| 22 | }; | ||
| 23 | |||
| 24 | true; |