コード例 #1
0
ファイル: urls.py プロジェクト: yujiaqi/sentry
from sentry.web.frontend.unsubscribe_incident_notifications import (
    UnsubscribeIncidentNotificationsView,
)
from sentry.web.frontend.user_avatar import UserAvatarPhotoView
from sentry.web.frontend.setup_wizard import SetupWizardView
from sentry.web.frontend.vsts_extension_configuration import VstsExtensionConfigurationView
from sentry.web.frontend.js_sdk_loader import JavaScriptSdkLoader
from sentry.web.frontend.project_event import ProjectEventRedirect


__all__ = ("urlpatterns",)


# Only create one instance of the ReactPageView since it's duplicated everywhere
generic_react_page_view = GenericReactPageView.as_view()
react_page_view = ReactPageView.as_view()

urlpatterns = []

if getattr(settings, "DEBUG_VIEWS", settings.DEBUG):
    from sentry.web.debug_urls import urlpatterns as debug_urls

    urlpatterns += debug_urls

# Special favicon in debug mode
if settings.DEBUG:
    urlpatterns += [
        url(
            r"^_static/[^/]+/[^/]+/images/favicon\.(ico|png)$",
            generic.dev_favicon,
            name="sentry-dev-favicon",
コード例 #2
0
ファイル: urls.py プロジェクト: sashahilton00/sentry
    """
    Forces import of all applications to ensure code is registered.
    """
    from django.db.models import get_apps, get_models

    for app in get_apps():
        try:
            get_models(app)
        except Exception:
            continue

init_all_applications()

# Only create one instance of the ReactPageView since it's duplicated errywhere
generic_react_page_view = GenericReactPageView.as_view()
react_page_view = ReactPageView.as_view()

urlpatterns = patterns('')

if getattr(settings, 'DEBUG_VIEWS', settings.DEBUG):
    from sentry.web.debug_urls import urlpatterns as debug_urls
    urlpatterns += debug_urls

urlpatterns += patterns(
    '',
    # Store endpoints first since they are the most active
    url(r'^api/store/$', api.StoreView.as_view(),
        name='sentry-api-store'),
    url(r'^api/(?P<project_id>[\w_-]+)/store/$', api.StoreView.as_view(),
        name='sentry-api-store'),
    url(r'^api/(?P<project_id>\d+)/csp-report/$', api.CspReportView.as_view(),
コード例 #3
0
ファイル: urls.py プロジェクト: zuiwanting/sentry
        admin.configure_plugin,
        name='sentry-admin-configure-plugin'),

    # Legacy Redirects
    url(r'^docs/?$',
        RedirectView.as_view(url='https://docs.getsentry.com/hosted/',
                             permanent=False),
        name='sentry-docs-redirect'),
    url(r'^api/?$',
        RedirectView.as_view(url='https://docs.getsentry.com/hosted/api/',
                             permanent=False),
        name='sentry-api-docs-redirect'),

    # Organizations
    url(r'^(?P<organization_slug>[\w_-]+)/$',
        ReactPageView.as_view(),
        name='sentry-organization-home'),
    url(r'^organizations/new/$',
        CreateOrganizationView.as_view(),
        name='sentry-create-organization'),
    url(r'^organizations/(?P<organization_slug>[\w_-]+)/api-keys/$',
        OrganizationApiKeysView.as_view(),
        name='sentry-organization-api-keys'),
    url(r'^organizations/(?P<organization_slug>[\w_-]+)/api-keys/(?P<key_id>[\w_-]+)$',
        OrganizationApiKeySettingsView.as_view(),
        name='sentry-organization-api-key-settings'),
    url(r'^organizations/(?P<organization_slug>[\w_-]+)/auth/$',
        OrganizationAuthSettingsView.as_view(),
        name='sentry-organization-auth-settings'),
    url(r'^organizations/(?P<organization_slug>[\w_-]+)/audit-log/$',
        OrganizationAuditLogView.as_view(),
コード例 #4
0
ファイル: urls.py プロジェクト: TaurusTiger/sentry
        name='sentry-admin-list-user-projects'),

    # Admin - Plugins
    url(r'^manage/plugins/(?P<slug>[\w_-]+)/$', admin.configure_plugin,
        name='sentry-admin-configure-plugin'),

    # Legacy Redirects
    url(r'^docs/?$',
        RedirectView.as_view(url='https://docs.getsentry.com/hosted/', permanent=False),
        name='sentry-docs-redirect'),
    url(r'^api/?$',
        RedirectView.as_view(url='https://docs.getsentry.com/hosted/api/', permanent=False),
        name='sentry-api-docs-redirect'),

    # Organizations
    url(r'^(?P<organization_slug>[\w_-]+)/$', ReactPageView.as_view(),
        name='sentry-organization-home'),
    url(r'^organizations/new/$', CreateOrganizationView.as_view(),
        name='sentry-create-organization'),
    url(r'^organizations/(?P<organization_slug>[\w_-]+)/api-keys/$', OrganizationApiKeysView.as_view(),
        name='sentry-organization-api-keys'),
    url(r'^organizations/(?P<organization_slug>[\w_-]+)/api-keys/(?P<key_id>[\w_-]+)/$', OrganizationApiKeySettingsView.as_view(),
        name='sentry-organization-api-key-settings'),
    url(r'^organizations/(?P<organization_slug>[\w_-]+)/auth/$', OrganizationAuthSettingsView.as_view(),
        name='sentry-organization-auth-settings'),
    url(r'^organizations/(?P<organization_slug>[\w_-]+)/audit-log/$', OrganizationAuditLogView.as_view(),
        name='sentry-organization-audit-log'),
    url(r'^organizations/(?P<organization_slug>[\w_-]+)/members/$', OrganizationMembersView.as_view(),
        name='sentry-organization-members'),
    url(r'^organizations/(?P<organization_slug>[\w_-]+)/members/new/$', CreateOrganizationMemberView.as_view(),
        name='sentry-create-organization-member'),
コード例 #5
0
ファイル: urls.py プロジェクト: rahul-deepsource/sentry
from django.conf.urls import url

from sentry.web.frontend.react_page import ReactPageView
from sentry.conf.urls import urlpatterns as conf_urlpatterns
from .demo_start import DemoStartView

# add the demo start route at the head of the urls
urlpatterns = [
    url(r"^demo/start/$", DemoStartView.as_view(), name="sentry-demo-start"),
]
# add the rest of our rules
urlpatterns += conf_urlpatterns

# pop off the catch all
catch_all = urlpatterns.pop()
# add our org catch all before the last catch all
urlpatterns += [
    url(
        r"^(?:settings|organizations)/(?P<organization_slug>[\w_-]+)/",
        ReactPageView.as_view(),
        name="sentry-org-catch-all",
    ),
    catch_all,
]