summaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastergui/urls.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-05-19 16:14:29 +0100
committerAlexandru DAMIAN <alexandru.damian@intel.com>2015-06-10 15:31:11 +0100
commit15a2274eba13d19b864f337057d61c75ff7849cc (patch)
tree5b6b9925202f51fbeee6b2326fbcd663de10b7b3 /lib/toaster/toastergui/urls.py
parent430f7a288b4446600b3a943c51f6711ffcf9e619 (diff)
downloadbitbake-15a2274eba13d19b864f337057d61c75ff7849cc.tar.gz
toaster: move project data typeahead to the REST API
This patch enables JSON requests on the project REST endpoint, and replaces the universal queries "xhr_datatypeahead" with the `project` type to the REST project endpoint. The patch adds a decorator that takes a context returned by a view and either renders the template specified as the decorator argument, or converts the context to JSON. Normal "search", "filter" and "order" options for view work as normal on the JSON API format. To enable the JSON return, set the "format" GET parameter to "json". In order to demonstrate the functionality, the "New build" button is switched from using the xhr_datatypeahead to the project REST API with JSON formatting. Additionally, the XHR APIs that perform actions with the project id passed as parameter are removed, and the needed URLs are populated from the project JSON API returns after the project has been selected. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/toaster/toastergui/urls.py')
-rw-r--r--lib/toaster/toastergui/urls.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/toaster/toastergui/urls.py b/lib/toaster/toastergui/urls.py
index 7a1132feb..4e328dae1 100644
--- a/lib/toaster/toastergui/urls.py
+++ b/lib/toaster/toastergui/urls.py
@@ -77,8 +77,6 @@ urlpatterns = patterns('toastergui.views',
url(r'^projects/$', 'projects', name='all-projects'),
- url(r'^project/$', lambda x: HttpResponseBadRequest(), name='base_project'),
-
url(r'^project/(?P<pid>\d+)/$', 'project', name='project'),
url(r'^project/(?P<pid>\d+)/configuration$', 'projectconf', name='projectconf'),
url(r'^project/(?P<pid>\d+)/builds/$', 'projectbuilds', name='projectbuilds'),
@@ -110,7 +108,6 @@ urlpatterns = patterns('toastergui.views',
name="all-layers"),
- url(r'^xhr_build/$', 'xhr_build', name='xhr_build'),
url(r'^xhr_projectbuild/(?P<pid>\d+)$', 'xhr_projectbuild', name='xhr_projectbuild'),
url(r'^xhr_projectinfo/$', 'xhr_projectinfo', name='xhr_projectinfo'),
url(r'^xhr_projectedit/(?P<pid>\d+)$', 'xhr_projectedit', name='xhr_projectedit'),