]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toastergui: bring back base URLs for pages that need them
authorAlexandru DAMIAN <alexandru.damian@intel.com>
Mon, 9 Mar 2015 11:57:08 +0000 (11:57 +0000)
committerAlexandru DAMIAN <alexandru.damian@intel.com>
Mon, 9 Mar 2015 13:15:21 +0000 (13:15 +0000)
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.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
lib/toaster/toastergui/templates/base.html
lib/toaster/toastergui/templates/importlayer.html
lib/toaster/toastergui/templates/layerdetails.html
lib/toaster/toastergui/templates/project.html
lib/toaster/toastergui/urls.py

index 62cc7ad94c246594c655e28267a236f6db268f6a..a781224ea182642a0f34ea41fc92fc8f9c23bdd7 100644 (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 %}
index 19d2fc4af8dde9ccc6a0fae537b5301c4eb857b2..6b2111a1f43614d99c0a824acea181ed6c46be60 100644 (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 %}",
index c3a50dff29dc04dce8128637878434820d9f7272..67033b1e07d804d1c19034b498f6d0db43b9277f 100644 (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' %}",
index a8cb917c6d4b1e269c845594c0b9174298e33a8d..58b524eaa815c1a5335c7ada976a2c303a79f980 100644 (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}};
index 64f790293a7ee2acf06d5e1f1005b63d968919f5..8a7fef1dee78b9eba2a5be3315d68d6139250b35 100644 (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'),