Merge "Fix Missing Static Assets"
[pharos-tools.git] / dashboard / src / api / urls.py
1 ##############################################################################
2 # Copyright (c) 2016 Max Breitenfeldt and others.
3 # Copyright (c) 2018 Sawyer Bergeron, Parker Berberian, and others
4 #
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11
12 """pharos_dashboard URL Configuration
13
14 The `urlpatterns` list routes URLs to views. For more information please see:
15     https://docs.djangoproject.com/en/1.10/topics/http/urls/
16 Examples:
17 Function views
18     1. Add an import:  from my_app import views
19     2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
20 Class-based views
21     1. Add an import:  from other_app.views import Home
22     2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
23 Including another URLconf
24     1. Import the include() function: from django.conf.urls import url, include
25     2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
26 """
27 from django.conf.urls import url, include
28 from django.urls import path
29 from rest_framework import routers
30
31 from api.views import *
32
33 router = routers.DefaultRouter()
34 router.register(r'bookings', BookingViewSet)
35 router.register(r'notifier', NotifierViewSet)
36 router.register(r'user', UserViewSet)
37
38 urlpatterns = [
39     url(r'^', include(router.urls)),
40     path('labs/<slug:lab_name>/profile', lab_profile),
41     path('labs/<slug:lab_name>/status', lab_status),
42     path('labs/<slug:lab_name>/inventory', lab_inventory),
43     path('labs/<slug:lab_name>/jobs/<int:job_id>', specific_job),
44     path('labs/<slug:lab_name>/jobs/<int:job_id>/<slug:task_id>', specific_task),
45     path('labs/<slug:lab_name>/jobs/new', new_jobs),
46     path('labs/<slug:lab_name>/jobs/current', current_jobs),
47     path('labs/<slug:lab_name>/jobs/done', done_jobs),
48     url(r'^token$', GenerateTokenView.as_view(), name='generate_token'),
49 ]