summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/urls.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-05-19 16:14:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-12 00:01:47 +0100
commitafe06e313eac61f598f65e622ceb5951a9fabc9a (patch)
tree02e37805b7b10a30c77fc3c82987bf435b221423 /bitbake/lib/toaster/toastergui/urls.py
parent94aa0d5408f71a2e9fd48fd2c0e283acfc9ac2a2 (diff)
downloadpoky-afe06e313eac61f598f65e622ceb5951a9fabc9a.tar.gz
bitbake: 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. (Bitbake rev: 15a2274eba13d19b864f337057d61c75ff7849cc) 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.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/urls.py b/bitbake/lib/toaster/toastergui/urls.py
index 7a1132febc..4e328dae17 100644
--- a/bitbake/lib/toaster/toastergui/urls.py
+++ b/bitbake/lib/toaster/toastergui/urls.py
@@ -77,8 +77,6 @@ urlpatterns = patterns('toastergui.views',
77 77
78 url(r'^projects/$', 'projects', name='all-projects'), 78 url(r'^projects/$', 'projects', name='all-projects'),
79 79
80 url(r'^project/$', lambda x: HttpResponseBadRequest(), name='base_project'),
81
82 url(r'^project/(?P<pid>\d+)/$', 'project', name='project'), 80 url(r'^project/(?P<pid>\d+)/$', 'project', name='project'),
83 url(r'^project/(?P<pid>\d+)/configuration$', 'projectconf', name='projectconf'), 81 url(r'^project/(?P<pid>\d+)/configuration$', 'projectconf', name='projectconf'),
84 url(r'^project/(?P<pid>\d+)/builds/$', 'projectbuilds', name='projectbuilds'), 82 url(r'^project/(?P<pid>\d+)/builds/$', 'projectbuilds', name='projectbuilds'),
@@ -110,7 +108,6 @@ urlpatterns = patterns('toastergui.views',
110 name="all-layers"), 108 name="all-layers"),
111 109
112 110
113 url(r'^xhr_build/$', 'xhr_build', name='xhr_build'),
114 url(r'^xhr_projectbuild/(?P<pid>\d+)$', 'xhr_projectbuild', name='xhr_projectbuild'), 111 url(r'^xhr_projectbuild/(?P<pid>\d+)$', 'xhr_projectbuild', name='xhr_projectbuild'),
115 url(r'^xhr_projectinfo/$', 'xhr_projectinfo', name='xhr_projectinfo'), 112 url(r'^xhr_projectinfo/$', 'xhr_projectinfo', name='xhr_projectinfo'),
116 url(r'^xhr_projectedit/(?P<pid>\d+)$', 'xhr_projectedit', name='xhr_projectedit'), 113 url(r'^xhr_projectedit/(?P<pid>\d+)$', 'xhr_projectedit', name='xhr_projectedit'),