Merge "update the huawei's lab"
[pharos.git] / tools / pharos-dashboard / dashboard / urls.py
1 ##############################################################################
2 # Copyright (c) 2016 Max Breitenfeldt and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10
11 """pharos_dashboard URL Configuration
12
13 The `urlpatterns` list routes URLs to views. For more information please see:
14     https://docs.djangoproject.com/en/1.10/topics/http/urls/
15 Examples:
16 Function views
17     1. Add an import:  from my_app import views
18     2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
19 Class-based views
20     1. Add an import:  from other_app.views import Home
21     2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
22 Including another URLconf
23     1. Import the include() function: from django.conf.urls import url, include
24     2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
25 """
26 from django.conf.urls import url
27 from dashboard.views import *
28
29 urlpatterns = [
30     url(r'^ci_pods/$', CIPodsView.as_view(), name='ci_pods'),
31     url(r'^dev_pods/$', DevelopmentPodsView.as_view(), name='dev_pods'),
32     url(r'^jenkins_slaves/$', JenkinsSlavesView.as_view(), name='jenkins_slaves'),
33     url(r'^resource/all/$', LabOwnerView.as_view(), name='resources'),
34     url(r'^resource/(?P<resource_id>[0-9]+)/$', ResourceView.as_view(), name='resource'),
35     url(r'^resource/(?P<resource_id>[0-9]+)/booking_utilization/(?P<weeks>-?\d+)/$',
36         BookingUtilizationJSON.as_view(), name='booking_utilization'),
37     url(r'^resource/(?P<resource_id>[0-9]+)/jenkins_utilization/(?P<weeks>-?\d+)/$',
38         JenkinsUtilizationJSON.as_view(), name='jenkins_utilization'),
39     url(r'^$', DevelopmentPodsView.as_view(), name="index"),
40 ]