.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Mojolicious::Plugin::Minion::Admin 3pm" .TH Mojolicious::Plugin::Minion::Admin 3pm 2024-03-24 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Mojolicious::Plugin::Minion::Admin \- Admin UI .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& # Mojolicious \& $self\->plugin(\*(AqMinion::Admin\*(Aq); \& \& # Mojolicious::Lite \& plugin \*(AqMinion::Admin\*(Aq; \& \& # Secure access to the admin ui with Basic authentication \& my $under = $self\->routes\->under(\*(Aq/minion\*(Aq =>sub ($c) { \& return 1 if $c\->req\->url\->to_abs\->userinfo eq \*(AqBender:rocks\*(Aq; \& $c\->res\->headers\->www_authenticate(\*(AqBasic\*(Aq); \& $c\->render(text => \*(AqAuthentication required!\*(Aq, status => 401); \& return undef; \& }); \& $self\->plugin(\*(AqMinion::Admin\*(Aq => {route => $under}); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Mojolicious::Plugin::Minion::Admin is a Mojolicious plugin providing an admin ui for the Minion job queue. .SH OPTIONS .IX Header "OPTIONS" Mojolicious::Plugin::Minion::Admin supports the following options. .SS return_to .IX Subsection "return_to" .Vb 2 \& # Mojolicious::Lite \& plugin \*(AqMinion::Admin\*(Aq => {return_to => \*(Aqsome_route\*(Aq}; .Ve .PP Name of route or path to return to when leaving the admin ui, defaults to \f(CW\*(C`/\*(C'\fR. .SS route .IX Subsection "route" .Vb 2 \& # Mojolicious::Lite \& plugin \*(AqMinion::Admin\*(Aq => {route => app\->routes\->any(\*(Aq/admin\*(Aq)}; .Ve .PP Mojolicious::Routes::Route object to attach the admin ui to, defaults to generating a new one with the prefix \&\f(CW\*(C`/minion\*(C'\fR. .SH METHODS .IX Header "METHODS" Mojolicious::Plugin::Minion::Admin inherits all methods from Mojolicious::Plugin and implements the following new ones. .SS register .IX Subsection "register" .Vb 1 \& $plugin\->register(Mojolicious\->new); .Ve .PP Register plugin in Mojolicious application. .SH "SEE ALSO" .IX Header "SEE ALSO" Minion, Minion::Guide, , Mojolicious::Guides, .