mirror of
https://github.com/plausible/analytics.git
synced 2024-12-24 01:54:34 +03:00
Hook up flags to the custom prop filter
This commit is contained in:
parent
c7742ec179
commit
428ee747c3
@ -127,7 +127,9 @@ function DropdownContent({history, site, query, wrapped}) {
|
||||
const [addingFilter, setAddingFilter] = useState(false);
|
||||
|
||||
if (wrapped === 0 || addingFilter) {
|
||||
return Object.keys(FILTER_GROUPS).map((option) => filterDropdownOption(site, option))
|
||||
return Object.keys(FILTER_GROUPS)
|
||||
.filter((option) => option === 'props' ? site.flags.custom_dimension_filter : true)
|
||||
.map((option) => filterDropdownOption(site, option))
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -16,7 +16,8 @@ if (container) {
|
||||
statsBegin: container.dataset.statsBegin,
|
||||
embedded: container.dataset.embedded,
|
||||
background: container.dataset.background,
|
||||
selfhosted: container.dataset.selfhosted === 'true'
|
||||
selfhosted: container.dataset.selfhosted === 'true',
|
||||
flags: JSON.parse(container.dataset.flags)
|
||||
}
|
||||
|
||||
const loggedIn = container.dataset.loggedIn === 'true'
|
||||
|
@ -41,9 +41,11 @@ defmodule PlausibleWeb.Router do
|
||||
plug PlausibleWeb.Firewall
|
||||
end
|
||||
|
||||
pipeline :mounted_apps do
|
||||
pipeline :flags do
|
||||
plug :accepts, ["html"]
|
||||
plug :put_secure_browser_headers
|
||||
plug :fetch_session
|
||||
plug PlausibleWeb.CRMAuthPlug
|
||||
end
|
||||
|
||||
if Mix.env() == :dev do
|
||||
@ -52,9 +54,9 @@ defmodule PlausibleWeb.Router do
|
||||
|
||||
use Kaffy.Routes, scope: "/crm", pipe_through: [PlausibleWeb.CRMAuthPlug]
|
||||
|
||||
scope path: "/feature-flags" do
|
||||
pipe_through :mounted_apps
|
||||
forward "/", FunWithFlags.UI.Router, namespace: "feature-flags"
|
||||
scope path: "/flags" do
|
||||
pipe_through :flags
|
||||
forward "/", FunWithFlags.UI.Router, namespace: "flags"
|
||||
end
|
||||
|
||||
scope "/api/stats", PlausibleWeb.Api do
|
||||
|
Loading…
Reference in New Issue
Block a user