| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Arbiter.Servant.UI
Description
Embedded admin dashboard (Bootstrap 5 + Alpine.js, compiled-in static files).
Security: No built-in authentication. All queue management operations (view, delete, retry) are publicly accessible. Add auth middleware before exposing to untrusted networks.
Quick Start
run port $ arbiterAppWithAdmin @MyRegistry config
Custom Composition
Mount the API and admin UI under a shared prefix:
type MyApp = "arbiter" :> (ArbiterAPI MyRegistry :<|> AdminUI) :<|> MyRoutes run port $ serve (Proxy @MyApp) ((arbiterServer config :<|> adminUIServer) :<|> myHandler)
The admin UI auto-discovers the API path from its own URL.
If it loads at /arbiter/ it finds the API at /arbiter/api/v1/.
Synopsis
- type AdminUI = Raw
- adminUIServer :: Server AdminUI
- adminUIServerHoisted :: (forall x. Handler x -> m x) -> ServerT AdminUI m
- adminUIServerDev :: FilePath -> Server AdminUI
- adminUIServerDevHoisted :: (forall x. Handler x -> m x) -> FilePath -> ServerT AdminUI m
- adminApplication :: Application
- devAdminApplication :: FilePath -> Application
- arbiterAppWithAdmin :: forall (registry :: JobPayloadRegistry). (BuildServer registry registry, HasServer (ArbiterAPI registry) ('[] :: [Type])) => ArbiterServerConfig registry -> Application
- arbiterAppWithAdminDev :: forall (registry :: JobPayloadRegistry). (BuildServer registry registry, HasServer (ArbiterAPI registry) ('[] :: [Type])) => FilePath -> ArbiterServerConfig registry -> Application
Servant integration
Source #adminUIServerHoisted :: (forall x. Handler x -> m x) -> ServerT AdminUI m
Hoisted variant for integration into a route tree using a custom monad.
Source #adminUIServerDevHoisted :: (forall x. Handler x -> m x) -> FilePath -> ServerT AdminUI m
Hoisted dev-mode variant for integration into a route tree using a custom monad.
Standalone WAI app
Source #adminApplication :: Application
The dashboard as a standalone WAI application over the embedded files.
Source #devAdminApplication :: FilePath -> Application
The dashboard served from disk, read per request.
Combined app helper
Source #arbiterAppWithAdmin :: forall (registry :: JobPayloadRegistry). (BuildServer registry registry, HasServer (ArbiterAPI registry) ('[] :: [Type])) => ArbiterServerConfig registry -> Application
The API at /api/v1 and the admin UI at the root, in one application.
Source #arbiterAppWithAdminDev :: forall (registry :: JobPayloadRegistry). (BuildServer registry registry, HasServer (ArbiterAPI registry) ('[] :: [Type])) => FilePath -> ArbiterServerConfig registry -> Application
arbiterAppWithAdmin serving the UI from disk.