diff options
| author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-05-07 18:09:09 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-12 12:14:13 +0100 |
| commit | 94d38a4e403f9e1930312b94694077a5300d625f (patch) | |
| tree | 9ffc996e3bf106a513d78e0026395305f9f83678 /bitbake/lib/toaster/toastergui/urls.py | |
| parent | a5193d3c7f1562ea6858c5b992159d79f58f644b (diff) | |
| download | poky-94d38a4e403f9e1930312b94694077a5300d625f.tar.gz | |
bitbake: toasterui: URL refactoring
This is a URL refactoring needed to remove the inadvertent
usage of server-side user session in a REST-style API.
We move the parameters that were stored in the user session
to the URL, making navigation more robust.
This refactoring allows a clean (no 500 HTTP return codes) crawl
of the website following inside links.
(Bitbake rev: cc251da0f211f3ee881ad07478733e2f4c1b7019)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/urls.py')
| -rw-r--r-- | bitbake/lib/toaster/toastergui/urls.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/bitbake/lib/toaster/toastergui/urls.py b/bitbake/lib/toaster/toastergui/urls.py index 76357e3b80..52fc0cc0ed 100644 --- a/bitbake/lib/toaster/toastergui/urls.py +++ b/bitbake/lib/toaster/toastergui/urls.py | |||
| @@ -76,20 +76,25 @@ urlpatterns = patterns('toastergui.views', | |||
| 76 | 76 | ||
| 77 | # project URLs | 77 | # project URLs |
| 78 | url(r'^newproject/$', 'newproject', name='newproject'), | 78 | url(r'^newproject/$', 'newproject', name='newproject'), |
| 79 | url(r'^importlayer/$', 'importlayer', name='importlayer'), | ||
| 80 | 79 | ||
| 81 | url(r'^layers/$', 'layers', name='layers'), | ||
| 82 | url(r'^layer/(?P<layerid>\d+)/$', 'layerdetails', name='layerdetails'), | ||
| 83 | url(r'^layer/$', lambda x: HttpResponseBadRequest(), name='base_layerdetails'), | ||
| 84 | url(r'^targets/$', 'targets', name='all-targets'), | ||
| 85 | url(r'^machines/$', 'machines', name='machines'), | ||
| 86 | 80 | ||
| 87 | url(r'^projects/$', 'projects', name='all-projects'), | 81 | url(r'^projects/$', 'projects', name='all-projects'), |
| 88 | 82 | ||
| 89 | url(r'^project/$', lambda x: HttpResponseBadRequest(), name='base_project'), | 83 | url(r'^project/$', lambda x: HttpResponseBadRequest(), name='base_project'), |
| 90 | url(r'^project/(?P<pid>\d+)/$', 'project', name='project'), | 84 | |
| 85 | url(r'^project/(?P<pid>\d+)$', 'project', name='project'), | ||
| 91 | url(r'^project/(?P<pid>\d+)/configuration$', 'projectconf', name='projectconf'), | 86 | url(r'^project/(?P<pid>\d+)/configuration$', 'projectconf', name='projectconf'), |
| 92 | url(r'^project/(?P<pid>\d+)/builds$', 'projectbuilds', name='projectbuilds'), | 87 | url(r'^project/(?P<pid>\d+)/builds/$', 'projectbuilds', name='projectbuilds'), |
| 88 | |||
| 89 | url(r'^project/(?P<pid>\d+)/layers/$', 'layers', name='all-layers'), | ||
| 90 | url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)$', 'layerdetails', name='layerdetails'), | ||
| 91 | url(r'^project/(?P<pid>\d+)/layer/$', lambda x: HttpResponseBadRequest(), name='base_layerdetails'), | ||
| 92 | |||
| 93 | # the import layer is a project-specific functionality; | ||
| 94 | url(r'^project/(?P<pid>\d+)/importlayer$', 'importlayer', name='importlayer'), | ||
| 95 | |||
| 96 | url(r'^project/(?P<pid>\d+)/targets/$', 'targets', name='all-targets'), | ||
| 97 | url(r'^project/(?P<pid>\d+)/machines/$', 'machines', name='all-machines'), | ||
| 93 | 98 | ||
| 94 | url(r'^xhr_build/$', 'xhr_build', name='xhr_build'), | 99 | url(r'^xhr_build/$', 'xhr_build', name='xhr_build'), |
| 95 | url(r'^xhr_projectbuild/(?P<pid>\d+)/$', 'xhr_projectbuild', name='xhr_projectbuild'), | 100 | url(r'^xhr_projectbuild/(?P<pid>\d+)/$', 'xhr_projectbuild', name='xhr_projectbuild'), |
