diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-03-09 11:57:08 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-09 14:33:50 +0000 |
commit | 4004aebb1b505967410494ed152b44eab0bf6cb4 (patch) | |
tree | d8d7065241d320ca4f5bbcc5857a1441f6e1ebb7 /bitbake | |
parent | ece39b4c47a5c9b55c291d6b4acdeb29e8d8884f (diff) | |
download | ast2050-yocto-poky-4004aebb1b505967410494ed152b44eab0bf6cb4.zip ast2050-yocto-poky-4004aebb1b505967410494ed152b44eab0bf6cb4.tar.gz |
bitbake: toastergui: bring back base URLs for pages that need them
Some URLs, although invalid on their own, are used in JS to
build valid page pointers. Previous patch removed two of these URLs,
breaking the display of several patches.
This patch re-adds these URLs with different names, and returns
400 Bad Request empty pages on them, which is consistent with the
intended usage of these URLs.
(Bitbake rev: 73afee5ddb2e89dcec65854639b19b8860232d89)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
5 files changed, 8 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html index 62cc7ad..a781224 100644 --- a/bitbake/lib/toaster/toastergui/templates/base.html +++ b/bitbake/lib/toaster/toastergui/templates/base.html @@ -34,7 +34,7 @@ var ctx = {}; ctx.xhrDataTypeaheadUrl = "{% url 'xhr_datatypeahead' %}"; ctx.projectBuildUrl = "{% url 'xhr_build' %}"; - ctx.projectPageUrl = "{% url 'project' %}"; + ctx.projectPageUrl = "{% url 'base_project' %}"; ctx.projectInfoUrl = "{% url 'xhr_projectinfo' %}"; ctx.numProjects = {{projects|length}}; {% if project %} diff --git a/bitbake/lib/toaster/toastergui/templates/importlayer.html b/bitbake/lib/toaster/toastergui/templates/importlayer.html index 19d2fc4..6b2111a 100644 --- a/bitbake/lib/toaster/toastergui/templates/importlayer.html +++ b/bitbake/lib/toaster/toastergui/templates/importlayer.html @@ -14,7 +14,7 @@ $(document).ready(function (){ var ctx = { xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}", - layerDetailsUrl : "{% url 'layerdetails' %}", + layerDetailsUrl : "{% url 'base_layerdetails' %}", xhrImportLayerUrl : "{% url 'xhr_importlayer' %}", xhrEditProjectUrl : "{% url 'xhr_projectedit' project.id %}", projectPageUrl : "{% url 'project' project.id %}", diff --git a/bitbake/lib/toaster/toastergui/templates/layerdetails.html b/bitbake/lib/toaster/toastergui/templates/layerdetails.html index c3a50df..67033b1 100644 --- a/bitbake/lib/toaster/toastergui/templates/layerdetails.html +++ b/bitbake/lib/toaster/toastergui/templates/layerdetails.html @@ -17,7 +17,7 @@ $(document).ready(function (){ var ctx = { projectBuildUrl : "{% url 'xhr_build' %}", - layerDetailsUrl : "{% url 'layerdetails' %}", + layerDetailsUrl : "{% url 'base_layerdetails' %}", projectPageUrl : "{% url 'project' project.id %}", xhrEditProjectUrl : "{% url 'xhr_projectedit' project.id %}", xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}", diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html index a8cb917..58b524e 100644 --- a/bitbake/lib/toaster/toastergui/templates/project.html +++ b/bitbake/lib/toaster/toastergui/templates/project.html @@ -426,7 +426,7 @@ angular.element(document).ready(function() { scope.urls.layers = "{% url 'layers' %}"; scope.urls.targets = "{% url 'targets' %}"; scope.urls.importlayer = "{% url 'importlayer'%}"; - scope.urls.layer = "{% url 'layerdetails' %}"; + scope.urls.layer = "{% url 'base_layerdetails' %}"; scope.project = {{prj|json}}; scope.builds = {{builds|json}}; scope.layers = {{layers|json}}; diff --git a/bitbake/lib/toaster/toastergui/urls.py b/bitbake/lib/toaster/toastergui/urls.py index 64f7902..8a7fef1 100644 --- a/bitbake/lib/toaster/toastergui/urls.py +++ b/bitbake/lib/toaster/toastergui/urls.py @@ -19,6 +19,8 @@ from django.conf.urls import patterns, include, url from django.views.generic import RedirectView +from django.http import HttpResponseBadRequest + urlpatterns = patterns('toastergui.views', # landing page url(r'^landing/$', 'landing', name='landing'), @@ -78,11 +80,13 @@ urlpatterns = patterns('toastergui.views', url(r'^layers/$', 'layers', name='layers'), url(r'^layer/(?P<layerid>\d+)/$', 'layerdetails', name='layerdetails'), + url(r'^layer/$', lambda x: HttpResponseBadRequest(), name='base_layerdetails'), url(r'^targets/$', 'targets', name='all-targets'), url(r'^machines/$', 'machines', name='machines'), 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'), |