Esempio n. 1
0
def home_authentication_switcher(request, *args, **kwargs):
    if cabot_needs_setup():
        return redirect('first_time_setup')
    if not request.user.is_authenticated():
        return ServicePublicListView.as_view()(request, *args, **kwargs)
    else:
        return ServiceListView.as_view()(request, *args, **kwargs)
Esempio n. 2
0
                                             url(r'^$', view=RedirectView.as_view(url='services/', permanent=False),
                                                     name='dashboard'),
                                             url(r'^subscriptions/', view=subscriptions,
                                                     name='subscriptions'),
                                             url(r'^accounts/login/', view=login, name='login'),
                                             url(r'^accounts/logout/', view=logout, name='logout'),
                                             url(r'^accounts/password-reset/',
                                                     view=password_reset, name='password-reset'),
                                             url(r'^accounts/password-reset-done/',
                                                     view=password_reset_done, name='password-reset-done'),
                                             url(r'^accounts/password-reset-confirm/',
                                                     view=password_reset_confirm, name='password-reset-confirm'),
                                             url(r'^status/', view=checks_run_recently,
                                                     name='system-status'),

                                             url(r'^services/', view=ServiceListView.as_view(),
                                                     name='services'),
                                             url(r'^service/create/', view=ServiceCreateView.as_view(),
                                                     name='create-service'),
                                             url(r'^service/update/(?P<pk>\d+)/',
                                                     view=ServiceUpdateView.as_view(
                                                     ), name='update-service'),
                                             url(r'^service/delete/(?P<pk>\d+)/',
                                                     view=ServiceDeleteView.as_view(
                                                     ), name='delete-service'),
                                             url(r'^service/(?P<pk>\d+)/',
                                                     view=ServiceDetailView.as_view(), name='service'),

                                             url(r'^instances/', view=InstanceListView.as_view(),
                                                     name='instances'),
                                             url(r'^instance/create/', view=InstanceCreateView.as_view(),
Esempio n. 3
0
        name='subscriptions'),
     url(r'^accounts/login/', view=first_time_setup_wrapper(login), name='login'),
     url(r'^accounts/logout/', view=logout, name='logout'),
     url(r'^setup/', view=SetupView.as_view(), name='first_time_setup'),
     url(r'^accounts/password-reset/',
        view=password_reset, name='password-reset'),
     url(r'^accounts/password-reset-done/',
        view=password_reset_done, name='password-reset-done'),
     url(r'^accounts/password-reset-confirm/',
        view=password_reset_confirm, name='password-reset-confirm'),
     url(r'^status/', view=checks_run_recently,
        name='system-status'),
     url(r'^about/', view=about,
        name='about-cabot'),

     url(r'^services/', view=ServiceListView.as_view(),
        name='services'),
     url(r'^public/', view=ServicePublicListView.as_view(),
        name='public'),
     url(r'^service/create/', view=ServiceCreateView.as_view(),
        name='create-service'),
     url(r'^service/update/(?P<pk>\d+)/',
        view=ServiceUpdateView.as_view(), name='update-service'),
     url(r'^service/delete/(?P<pk>\d+)/',
        view=ServiceDeleteView.as_view(), name='delete-service'),
     url(r'^service/(?P<pk>\d+)/',
        view=ServiceDetailView.as_view(), name='service'),
     url(r'^service/acknowledge_alert/(?P<pk>\d+)/',
        view=acknowledge_alert, name='acknowledge-alert'),
     url(r'^service/remove_acknowledgement/(?P<pk>\d+)/',
        view=remove_acknowledgement, name='remove-acknowledgement'),
Esempio n. 4
0
     view=first_time_setup_wrapper(login),
     name='login'),
 url(r'^accounts/logout/', view=logout, name='logout'),
 url(r'^setup/', view=SetupView.as_view(), name='first_time_setup'),
 url(r'^accounts/password-reset/',
     view=password_reset,
     name='password-reset'),
 url(r'^accounts/password-reset-done/',
     view=password_reset_done,
     name='password-reset-done'),
 url(r'^accounts/password-reset-confirm/',
     view=password_reset_confirm,
     name='password-reset-confirm'),
 url(r'^status/', view=checks_run_recently, name='system-status'),
 url(r'^about/', view=about, name='about-cabot'),
 url(r'^services/', view=ServiceListView.as_view(), name='services'),
 url(r'^public/', view=ServicePublicListView.as_view(), name='public'),
 url(r'^service/create/',
     view=ServiceCreateView.as_view(),
     name='create-service'),
 url(r'^service/update/(?P<pk>\d+)/',
     view=ServiceUpdateView.as_view(),
     name='update-service'),
 url(r'^service/delete/(?P<pk>\d+)/',
     view=ServiceDeleteView.as_view(),
     name='delete-service'),
 url(r'^service/(?P<pk>\d+)/',
     view=ServiceDetailView.as_view(),
     name='service'),
 url(r'^service/acknowledge_alert/(?P<pk>\d+)/',
     view=acknowledge_alert,
Esempio n. 5
0
logger = logging.getLogger(__name__)

urlpatterns = patterns(
    "",
    # for the password reset views
    url("^", include("django.contrib.auth.urls")),
    url(r"^$", view=RedirectView.as_view(url="services/", permanent=False), name="dashboard"),
    url(r"^subscriptions/", view=subscriptions, name="subscriptions"),
    url(r"^accounts/login/", view=login, name="login"),
    url(r"^accounts/logout/", view=logout, name="logout"),
    url(r"^accounts/password-reset/", view=password_reset, name="password-reset"),
    url(r"^accounts/password-reset-done/", view=password_reset_done, name="password-reset-done"),
    url(r"^accounts/password-reset-confirm/", view=password_reset_confirm, name="password-reset-confirm"),
    url(r"^status/", view=checks_run_recently, name="system-status"),
    url(r"^services/", view=ServiceListView.as_view(), name="services"),
    url(r"^service/create/", view=ServiceCreateView.as_view(), name="create-service"),
    url(r"^service/update/(?P<pk>\d+)/", view=ServiceUpdateView.as_view(), name="update-service"),
    url(r"^service/delete/(?P<pk>\d+)/", view=ServiceDeleteView.as_view(), name="delete-service"),
    url(r"^service/(?P<pk>\d+)/", view=ServiceDetailView.as_view(), name="service"),
    url(r"^service/acknowledge_alert/(?P<pk>\d+)/", view=acknowledge_alert, name="acknowledge-alert"),
    url(r"^service/remove_acknowledgement/(?P<pk>\d+)/", view=remove_acknowledgement, name="remove-acknowledgement"),
    url(r"^instances/", view=InstanceListView.as_view(), name="instances"),
    url(r"^instance/create/", view=InstanceCreateView.as_view(), name="create-instance"),
    url(r"^instance/update/(?P<pk>\d+)/", view=InstanceUpdateView.as_view(), name="update-instance"),
    url(r"^instance/duplicate/(?P<pk>\d+)/", view=duplicate_instance, name="duplicate-instance"),
    url(r"^instance/delete/(?P<pk>\d+)/", view=InstanceDeleteView.as_view(), name="delete-instance"),
    url(r"^instance/(?P<pk>\d+)/", view=InstanceDetailView.as_view(), name="instance"),
    url(r"^checks/$", view=StatusCheckListView.as_view(), name="checks"),
    url(r"^check/run/(?P<pk>\d+)/", view=run_status_check, name="run-check"),
    url(r"^check/delete/(?P<pk>\d+)/", view=StatusCheckDeleteView.as_view(), name="delete-check"),
Esempio n. 6
0
File: urls.py Progetto: Affirm/cabot
     name='dashboard'),
 url(r'^subscriptions/', view=subscriptions,
     name='subscriptions'),
 url(r'^accounts/login/', view=login, name='login'),
 url(r'^accounts/logout/', view=logout, name='logout'),
 url(r'^accounts/password-reset/',
     view=password_reset, name='password-reset'),
 url(r'^accounts/password-reset-done/',
     view=password_reset_done,
     name='password-reset-done'),
 url(r'^accounts/password-reset-confirm/',
     view=password_reset_confirm,
     name='password-reset-confirm'),
 url(r'^status/', view=checks_run_recently,
     name='system-status'),
 url(r'^services/', view=ServiceListView.as_view(), name='services'),
 url(r'^service/create/', view=ServiceCreateView.as_view(),
     name='create-service'),
 url(r'^service/update/(?P<pk>\d+)/',
     view=ServiceUpdateView.as_view(), name='update-service'),
 url(r'^service/delete/(?P<pk>\d+)/',
     view=ServiceDeleteView.as_view(), name='delete-service'),
 url(r'^service/(?P<pk>\d+)/',
     view=ServiceDetailView.as_view(), name='service'),
 url(r'^instances/', view=InstanceListView.as_view(), name='instances'),
 url(r'^instance/create/', view=InstanceCreateView.as_view(),
     name='create-instance'),
 url(r'^instance/update/(?P<pk>\d+)/', view=InstanceUpdateView.as_view(),
     name='update-instance'),
 url(r'^instance/duplicate/(?P<pk>\d+)/',
     view=duplicate_instance, name='duplicate-instance'),