analytics/lib/plausible_web/views/debug_view.ex
Karl-Aksel Puulmann 4967960278
Populate log_comment with debug information, /debug/clickhouse route (#4435)
* Set log_comment with request information

* CRMAuthPlug -> SuperAdminOnlyPlug

* Super basic debug view

* Handle clustered setups

* Changelog entry

* Cleanup

* fragment trick to use ecto querying, filtering

* Move clustered_table? function to IngestRepo module

* Format

* More resilient user_id getting in helper
2024-08-14 12:33:36 +03:00

12 lines
290 B
Elixir

defmodule PlausibleWeb.DebugView do
use PlausibleWeb, :view
def controller_name(phoenix_controller_name) do
phoenix_controller_name
|> String.to_existing_atom()
|> Module.split()
|> Enum.drop_while(&String.starts_with?(&1, "Plausible"))
|> Enum.join(".")
end
end