NAME
Mojolicious::Plugin::Minion::Admin - Admin UI
SYNOPSIS
# Mojolicious
$self->plugin('Minion::Admin');
# Mojolicious::Lite
plugin 'Minion::Admin';
# Secure access to the admin ui with Basic authentication
my $under = $self->routes->under('/minion' =>sub ($c) {
return 1 if $c->req->url->to_abs->userinfo eq 'Bender:rocks';
$c->res->headers->www_authenticate('Basic');
$c->render(text => 'Authentication required!', status => 401);
return undef;
});
$self->plugin('Minion::Admin' => {route => $under});
DESCRIPTION
Mojolicious::Plugin::Minion::Admin is a Mojolicious plugin providing an admin ui for the Minion job queue.
OPTIONS
Mojolicious::Plugin::Minion::Admin supports the following options.
return_to
# Mojolicious::Lite
plugin 'Minion::Admin' => {return_to => 'some_route'};
Name of route or path to return to when leaving the admin ui, defaults to /
.
route
# Mojolicious::Lite
plugin 'Minion::Admin' => {route => app->routes->any('/admin')};
Mojolicious::Routes::Route object to attach the admin ui to, defaults to generating a new one with the prefix /minion
.
METHODS
Mojolicious::Plugin::Minion::Admin inherits all methods from Mojolicious::Plugin and implements the following new ones.
register
$plugin->register(Mojolicious->new);
Register plugin in Mojolicious application.
SEE ALSO
Minion, Minion::Guide, https://minion.pm, Mojolicious::Guides, https://mojolicious.org.