Merge branch 'live-dashboard' into 'develop'
Add Phoenix LiveDashboard See merge request pleroma/pleroma!3566
This commit is contained in:
commit
1ff9ffed83
8 changed files with 22 additions and 2 deletions
|
|
@ -10,6 +10,7 @@ defmodule Pleroma.Web.Endpoint do
|
|||
alias Pleroma.Config
|
||||
|
||||
socket("/socket", Pleroma.Web.UserSocket)
|
||||
socket("/live", Phoenix.LiveView.Socket)
|
||||
|
||||
plug(Plug.Telemetry, event_prefix: [:phoenix, :endpoint])
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
defmodule Pleroma.Web.Router do
|
||||
use Pleroma.Web, :router
|
||||
import Phoenix.LiveDashboard.Router
|
||||
|
||||
pipeline :accepts_html do
|
||||
plug(:accepts, ["html"])
|
||||
|
|
@ -763,6 +764,11 @@ defmodule Pleroma.Web.Router do
|
|||
end
|
||||
end
|
||||
|
||||
scope "/" do
|
||||
pipe_through([:pleroma_html, :authenticate, :require_admin])
|
||||
live_dashboard("/phoenix/live_dashboard")
|
||||
end
|
||||
|
||||
# Test-only routes needed to test action dispatching and plug chain execution
|
||||
if Pleroma.Config.get(:env) == :test do
|
||||
@test_actions [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue