0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-29 03:04:16 +01:00
posthog/ee/urls.py
Eric Duong ef17c83089
feat(feature-flags): Auto rollback beta (#12485)
* api

* add performed_rollback

* add celery task and tests

* rollback test

* remove first and last

* add sentry stuff

* basic auto rollback UI

* fix errors

* testable

* add errors rollback ui

* clean up sentry keys

* clean up some ui stuff

* add some sentry context

* update ui

* fix celery

* Update posthog/api/feature_flag.py

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>

* add sentry instructions when not enabled

* add sentry context

* merge migration

* remove unnecessary field right now and update UI to 7 day trailing average

* fix migration

* fix frontend type

* activity

* reset migratioN'

* remove default

* update test

* add feature flag

* add view for conditions and make sure insight loads

* Update snapshots

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
Co-authored-by: Li Yi Yu <li@posthog.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-02 21:15:47 -04:00

51 lines
1.6 KiB
Python

from typing import Any, List
from django.urls.conf import path
from rest_framework_extensions.routers import NestedRegistryItem
from ee.api import integration
from posthog.api.routing import DefaultRouterPlusPlus
from .api import (
authentication,
billing,
dashboard_collaborator,
debug_ch_queries,
explicit_team_member,
hooks,
license,
sentry_stats,
subscription,
)
def extend_api_router(
root_router: DefaultRouterPlusPlus,
*,
projects_router: NestedRegistryItem,
project_dashboards_router: NestedRegistryItem,
) -> None:
root_router.register(r"billing-v2", billing.BillingViewset, "billing")
root_router.register(r"license", license.LicenseViewSet)
root_router.register(r"debug_ch_queries", debug_ch_queries.DebugCHQueries, "debug_ch_queries")
root_router.register(r"integrations", integration.PublicIntegrationViewSet)
projects_router.register(r"hooks", hooks.HookViewSet, "project_hooks", ["team_id"])
projects_router.register(
r"explicit_members", explicit_team_member.ExplicitTeamMemberViewSet, "project_explicit_members", ["team_id"]
)
project_dashboards_router.register(
r"collaborators",
dashboard_collaborator.DashboardCollaboratorViewSet,
"project_dashboard_collaborators",
["team_id", "dashboard_id"],
)
projects_router.register(r"subscriptions", subscription.SubscriptionViewSet, "subscriptions", ["team_id"])
urlpatterns: List[Any] = [
path("api/saml/metadata/", authentication.saml_metadata_view),
path("api/sentry_errors/", sentry_stats.sentry_stats),
]