Monitorex. Layouts
(monitorex v0.8.0)
Copy Markdown
LiveView layouts for the Monitorex dashboard.
Provides a root layout with sidebar navigation, flash messages, and a main content area. Fully responsive — sidebar collapses on mobile.
Summary
Functions
Renders flash messages for the Dashboard.
Displays Phoenix flash messages (info, error) as notification bars inside the dashboard layout. Each flash kind gets a distinct CSS class for visual styling.
Renders the root layout HTML document.
Includes:
- HTML5 doctype and responsive viewport meta
- CSRF token and LiveSocket path metas for the LiveView client
- Versioned CSS and JS asset links
- Sidebar navigation with icons for Outbound, Inbound, and Cluster nodes
- Flash group rendering
- Main content area yielding
@inner_content
The asset links and navigation hrefs are built from @mount_prefix so the
dashboard works when mounted under a path prefix. When rendered outside the
LiveView mount (e.g. in tests or with a custom :on_mount), @mount_prefix,
@assets_path and @socket_path default to /, /dashboard-assets and
/live respectively.