8050eb888d4338f0349b0c15bef1dcf17e2d8a99
[pharos-tools.git] / pharos-dashboard / dashboard / urls.py
1 from dashboard.views.booking import BookingCalendarView, ResourceBookingsView, DeleteBookingView
2 from dashboard.views.table_views import CIPodsView, DevelopmentPodsView, JenkinsSlavesView
3 from django.conf.urls import url, include
4 from django.contrib.auth import views as auth_views
5
6
7 urlpatterns = [
8     # registration
9     url(r'^accounts/login/$', auth_views.login, name='login'),
10     url(r'^accounts/logout/$', auth_views.logout, name='logout'),
11
12     # Index
13     url(r'^index/$', CIPodsView.as_view(), name='index'),
14     url(r'^index/$', CIPodsView.as_view(), name='index'),
15     url(r'^$', CIPodsView.as_view(), name=""),
16
17     # Tables
18     url(r'^ci_pods/$', CIPodsView.as_view(), name='ci_pods'),
19     url(r'^dev_pods/$', DevelopmentPodsView.as_view(), name='dev_pods'),
20     url(r'^jenkins_slaves/$', JenkinsSlavesView.as_view(), name='jenkins_slaves'),
21
22     # Booking Calendar
23     url(r'^booking_calendar/$', DevelopmentPodsView.as_view(),
24         name='booking_calendar'),
25     url(r'^booking_calendar/(?P<resource_id>[0-9]+)/$',
26         BookingCalendarView.as_view(), name='booking_calendar'),
27     url(r'^booking_calendar/(?P<resource_id>[0-9]+)/(?P<booking_id>[0-9]+)/$',
28         BookingCalendarView.as_view(), name='booking_calendar'),
29
30     # AJAX urls
31     url(r'^resource/(?P<resource_id>[0-9]+)/bookings/$',
32         ResourceBookingsView.as_view(), name='resource_bookings'),
33     url(r'^booking/(?P<booking_id>[0-9]+)/delete$',
34         DeleteBookingView.as_view(), name='delete_booking'),
35 ]