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/lib | |
parent | ece39b4c47a5c9b55c291d6b4acdeb29e8d8884f (diff) | |
download | 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/lib')
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 62cc7ad94c..a781224ea1 100644 --- a/bitbake/lib/toaster/toastergui/templates/base.html +++ b/bitbake/lib/toaster/toastergui/templates/base.html | |||
@@ -34,7 +34,7 @@ | |||
34 | var ctx = {}; | 34 | var ctx = {}; |
35 | ctx.xhrDataTypeaheadUrl = "{% url 'xhr_datatypeahead' %}"; | 35 | ctx.xhrDataTypeaheadUrl = "{% url 'xhr_datatypeahead' %}"; |
36 | ctx.projectBuildUrl = "{% url 'xhr_build' %}"; | 36 | ctx.projectBuildUrl = "{% url 'xhr_build' %}"; |
37 | ctx.projectPageUrl = "{% url 'project' %}"; | 37 | ctx.projectPageUrl = "{% url 'base_project' %}"; |
38 | ctx.projectInfoUrl = "{% url 'xhr_projectinfo' %}"; | 38 | ctx.projectInfoUrl = "{% url 'xhr_projectinfo' %}"; |
39 | ctx.numProjects = {{projects|length}}; | 39 | ctx.numProjects = {{projects|length}}; |
40 | {% if project %} | 40 | {% if project %} |
diff --git a/bitbake/lib/toaster/toastergui/templates/importlayer.html b/bitbake/lib/toaster/toastergui/templates/importlayer.html index 19d2fc4af8..6b2111a1f4 100644 --- a/bitbake/lib/toaster/toastergui/templates/importlayer.html +++ b/bitbake/lib/toaster/toastergui/templates/importlayer.html | |||
@@ -14,7 +14,7 @@ | |||
14 | $(document).ready(function (){ | 14 | $(document).ready(function (){ |
15 | var ctx = { | 15 | var ctx = { |
16 | xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}", | 16 | xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}", |
17 | layerDetailsUrl : "{% url 'layerdetails' %}", | 17 | layerDetailsUrl : "{% url 'base_layerdetails' %}", |
18 | xhrImportLayerUrl : "{% url 'xhr_importlayer' %}", | 18 | xhrImportLayerUrl : "{% url 'xhr_importlayer' %}", |
19 | xhrEditProjectUrl : "{% url 'xhr_projectedit' project.id %}", | 19 | xhrEditProjectUrl : "{% url 'xhr_projectedit' project.id %}", |
20 | projectPageUrl : "{% url 'project' project.id %}", | 20 | projectPageUrl : "{% url 'project' project.id %}", |
diff --git a/bitbake/lib/toaster/toastergui/templates/layerdetails.html b/bitbake/lib/toaster/toastergui/templates/layerdetails.html index c3a50dff29..67033b1e07 100644 --- a/bitbake/lib/toaster/toastergui/templates/layerdetails.html +++ b/bitbake/lib/toaster/toastergui/templates/layerdetails.html | |||
@@ -17,7 +17,7 @@ | |||
17 | $(document).ready(function (){ | 17 | $(document).ready(function (){ |
18 | var ctx = { | 18 | var ctx = { |
19 | projectBuildUrl : "{% url 'xhr_build' %}", | 19 | projectBuildUrl : "{% url 'xhr_build' %}", |
20 | layerDetailsUrl : "{% url 'layerdetails' %}", | 20 | layerDetailsUrl : "{% url 'base_layerdetails' %}", |
21 | projectPageUrl : "{% url 'project' project.id %}", | 21 | projectPageUrl : "{% url 'project' project.id %}", |
22 | xhrEditProjectUrl : "{% url 'xhr_projectedit' project.id %}", | 22 | xhrEditProjectUrl : "{% url 'xhr_projectedit' project.id %}", |
23 | xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}", | 23 | xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}", |
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html index a8cb917c6d..58b524eaa8 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() { | |||
426 | scope.urls.layers = "{% url 'layers' %}"; | 426 | scope.urls.layers = "{% url 'layers' %}"; |
427 | scope.urls.targets = "{% url 'targets' %}"; | 427 | scope.urls.targets = "{% url 'targets' %}"; |
428 | scope.urls.importlayer = "{% url 'importlayer'%}"; | 428 | scope.urls.importlayer = "{% url 'importlayer'%}"; |
429 | scope.urls.layer = "{% url 'layerdetails' %}"; | 429 | scope.urls.layer = "{% url 'base_layerdetails' %}"; |
430 | scope.project = {{prj|json}}; | 430 | scope.project = {{prj|json}}; |
431 | scope.builds = {{builds|json}}; | 431 | scope.builds = {{builds|json}}; |
432 | scope.layers = {{layers|json}}; | 432 | scope.layers = {{layers|json}}; |
diff --git a/bitbake/lib/toaster/toastergui/urls.py b/bitbake/lib/toaster/toastergui/urls.py index 64f790293a..8a7fef1dee 100644 --- a/bitbake/lib/toaster/toastergui/urls.py +++ b/bitbake/lib/toaster/toastergui/urls.py | |||
@@ -19,6 +19,8 @@ | |||
19 | from django.conf.urls import patterns, include, url | 19 | from django.conf.urls import patterns, include, url |
20 | from django.views.generic import RedirectView | 20 | from django.views.generic import RedirectView |
21 | 21 | ||
22 | from django.http import HttpResponseBadRequest | ||
23 | |||
22 | urlpatterns = patterns('toastergui.views', | 24 | urlpatterns = patterns('toastergui.views', |
23 | # landing page | 25 | # landing page |
24 | url(r'^landing/$', 'landing', name='landing'), | 26 | url(r'^landing/$', 'landing', name='landing'), |
@@ -78,11 +80,13 @@ urlpatterns = patterns('toastergui.views', | |||
78 | 80 | ||
79 | url(r'^layers/$', 'layers', name='layers'), | 81 | url(r'^layers/$', 'layers', name='layers'), |
80 | url(r'^layer/(?P<layerid>\d+)/$', 'layerdetails', name='layerdetails'), | 82 | url(r'^layer/(?P<layerid>\d+)/$', 'layerdetails', name='layerdetails'), |
83 | url(r'^layer/$', lambda x: HttpResponseBadRequest(), name='base_layerdetails'), | ||
81 | url(r'^targets/$', 'targets', name='all-targets'), | 84 | url(r'^targets/$', 'targets', name='all-targets'), |
82 | url(r'^machines/$', 'machines', name='machines'), | 85 | url(r'^machines/$', 'machines', name='machines'), |
83 | 86 | ||
84 | url(r'^projects/$', 'projects', name='all-projects'), | 87 | url(r'^projects/$', 'projects', name='all-projects'), |
85 | 88 | ||
89 | url(r'^project/$', lambda x: HttpResponseBadRequest(), name='base_project'), | ||
86 | url(r'^project/(?P<pid>\d+)/$', 'project', name='project'), | 90 | url(r'^project/(?P<pid>\d+)/$', 'project', name='project'), |
87 | url(r'^project/(?P<pid>\d+)/configuration$', 'projectconf', name='projectconf'), | 91 | url(r'^project/(?P<pid>\d+)/configuration$', 'projectconf', name='projectconf'), |
88 | url(r'^project/(?P<pid>\d+)/builds$', 'projectbuilds', name='projectbuilds'), | 92 | url(r'^project/(?P<pid>\d+)/builds$', 'projectbuilds', name='projectbuilds'), |