refactor: move admin dashboards to /admin namespace
- Move Oban Web from /oban to /admin/oban - Move LiveDashboard from /dashboard to /admin/dashboard - Both remain protected by :require_superuser plug - Update documentation to reflect new paths
This commit is contained in:
parent
c22a1c94ea
commit
eebeb31456
2 changed files with 6 additions and 6 deletions
|
|
@ -223,13 +223,13 @@ LiveDashboard is available at `/dashboard` (requires authentication in productio
|
|||
Metrics are collected every 10 seconds via `telemetry_poller` and published using `:telemetry.execute/3`.
|
||||
|
||||
To view metrics:
|
||||
1. Navigate to `/dashboard` (or `/dev/dashboard` in development)
|
||||
1. Navigate to `/admin/dashboard` (or `/dev/dashboard` in development)
|
||||
2. Click the "Metrics" tab
|
||||
3. Scroll to see Oban and Redis sections
|
||||
|
||||
### Oban Web Dashboard
|
||||
|
||||
Oban Web provides a dedicated dashboard for job monitoring and management at `/oban` (superuser access required).
|
||||
Oban Web provides a dedicated dashboard for job monitoring and management at `/admin/oban` (superuser access required).
|
||||
|
||||
**Access Control**: Only superusers can access the Oban Web dashboard. The route is protected by `:require_superuser` plug.
|
||||
|
||||
|
|
@ -244,7 +244,7 @@ Oban Web provides a dedicated dashboard for job monitoring and management at `/o
|
|||
**Router Configuration**:
|
||||
```elixir
|
||||
# lib/towerops_web/router.ex
|
||||
scope "/" do
|
||||
scope "/admin" do
|
||||
pipe_through [:browser, :require_authenticated_user, :require_superuser]
|
||||
|
||||
oban_dashboard "/oban"
|
||||
|
|
|
|||
|
|
@ -125,10 +125,10 @@ defmodule ToweropsWeb.Router do
|
|||
end
|
||||
|
||||
# Enable LiveDashboard in production with authentication
|
||||
scope "/dashboard" do
|
||||
scope "/admin" do
|
||||
pipe_through [:browser, :require_authenticated_user, :require_superuser]
|
||||
|
||||
live_dashboard "/",
|
||||
live_dashboard "/dashboard",
|
||||
metrics: ToweropsWeb.Telemetry,
|
||||
ecto_repos: [Towerops.Repo],
|
||||
ecto_psql_extras_options: [
|
||||
|
|
@ -140,7 +140,7 @@ defmodule ToweropsWeb.Router do
|
|||
end
|
||||
|
||||
# Enable Oban Web (superuser only)
|
||||
scope "/" do
|
||||
scope "/admin" do
|
||||
pipe_through [:browser, :require_authenticated_user, :require_superuser]
|
||||
|
||||
oban_dashboard("/oban")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue