DOKK / manpages / debian 12 / libminion-perl / Mojolicious::Plugin::Minion::Admin.3pm.en
Mojolicious::Plugin::Minion::Admin(3pm) User Contributed Perl Documentation Mojolicious::Plugin::Minion::Admin(3pm)

Mojolicious::Plugin::Minion::Admin - Admin UI

  # 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});

Mojolicious::Plugin::Minion::Admin is a Mojolicious plugin providing an admin ui for the Minion job queue.

Mojolicious::Plugin::Minion::Admin supports the following options.

  # Mojolicious::Lite
  plugin 'Minion::Admin' => {return_to => 'some_route'};

Name of route or path to return to when leaving the admin ui, defaults to "/".

  # 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".

Mojolicious::Plugin::Minion::Admin inherits all methods from Mojolicious::Plugin and implements the following new ones.

  $plugin->register(Mojolicious->new);

Register plugin in Mojolicious application.

Minion, Minion::Guide, <https://minion.pm>, Mojolicious::Guides, <https://mojolicious.org>.

2022-10-14 perl v5.34.0