module

JaneHQ::Web

Web console (Kemal). configure wires session config, the auth guard and all routes to the shared Config/Storage. Static assets under ./public are served by Kemal's StaticFileHandler, which runs before the auth guard, so only "/login" needs whitelisting.

Class methods

authed?(env) : Bool
Source
config
Source
configure(config : Config, storage : Storage)
Source
define_admin_routes

Destinations for the Admin menu. "Hosts" is the dashboard at "/", "Host Groups" lives in groups.cr and "Alerts" in alert_groups.cr; Users is still a Phase 2 feature and renders a placeholder so the menu never dead-ends.

Source
define_alert_group_routes

Alert group admin: list, create, edit, enable/disable, delete. An alert group is one rule — hosts/host groups to watch, which check results qualify (service, status, event), and how to deliver the alert. Delivery itself is not built yet; rules are stored and displayed only.

Source
define_auth_routes
Source
define_dashboard_routes
Source
define_group_routes

Host group admin: list, create, edit membership, delete. The dual-column drag-and-drop form posts its "in group" column as a JSON array of hostnames in the hostnames field (see public/groups.js).

Source
parse_hostnames(raw : String | Nil) : Array(String)

The form posts the "Hosts in Group" column as a JSON array.

Source
selected_group(env) : GroupRecord

The group the dashboard is filtered to: ?group=<id>, falling back to the seeded "All Hosts" group (also used when the id is bogus or deleted).

Source
storage
Source
validate_group_name(name : String) : String | Nil
Source

Nested types