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>
This commit is contained in:
Alexandru DAMIAN 2015-03-09 11:57:08 +00:00 committed by Richard Purdie
parent ece39b4c47
commit 4004aebb1b
5 changed files with 8 additions and 4 deletions

View File

@ -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 %}

View File

@ -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 %}",

View File

@ -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' %}",

View File

@ -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}};

View File

@ -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'),