1Mojolicious::Plugin::MiUnsieorn:C:oAndtmriinb(u3t)ed PerMlojDoolciucmieonutsa:t:iPolnugin::Minion::Admin(3)
2
3
4
6 Mojolicious::Plugin::Minion::Admin - Admin UI
7
9 # Mojolicious
10 $self->plugin('Minion::Admin');
11
12 # Mojolicious::Lite
13 plugin 'Minion::Admin';
14
15 # Secure access to the admin ui with Basic authentication
16 my $under = $self->routes->under('/minion' =>sub ($c) {
17 return 1 if $c->req->url->to_abs->userinfo eq 'Bender:rocks';
18 $c->res->headers->www_authenticate('Basic');
19 $c->render(text => 'Authentication required!', status => 401);
20 return undef;
21 });
22 $self->plugin('Minion::Admin' => {route => $under});
23
25 Mojolicious::Plugin::Minion::Admin is a Mojolicious plugin providing an
26 admin ui for the Minion job queue.
27
29 Mojolicious::Plugin::Minion::Admin supports the following options.
30
31 return_to
32 # Mojolicious::Lite
33 plugin 'Minion::Admin' => {return_to => 'some_route'};
34
35 Name of route or path to return to when leaving the admin ui, defaults
36 to "/".
37
38 route
39 # Mojolicious::Lite
40 plugin 'Minion::Admin' => {route => app->routes->any('/admin')};
41
42 Mojolicious::Routes::Route object to attach the admin ui to, defaults
43 to generating a new one with the prefix "/minion".
44
46 Mojolicious::Plugin::Minion::Admin inherits all methods from
47 Mojolicious::Plugin and implements the following new ones.
48
49 register
50 $plugin->register(Mojolicious->new);
51
52 Register plugin in Mojolicious application.
53
55 Minion, Minion::Guide, <https://minion.pm>, Mojolicious::Guides,
56 <https://mojolicious.org>.
57
58
59
60perl v5.34.0 2021-07-M2o2jolicious::Plugin::Minion::Admin(3)