From 951e40dd7d77ca5fcad35204817cfae916c267e5 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Tue, 4 Aug 2015 22:46:36 +0300 Subject: bitbake: toasterui: views Remove unused xhr_typeahead view definition The one thing left being used in this definition was a response which contains the list of layers which would be deleted if you change the project release. This patch moves that to it's own url/endpoint and updates the frontend reference which is using it. (Bitbake rev: 1cc19c84ee97182f39eae0338c712f7a2b40a18d) Signed-off-by: Michael Wood Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- .../toaster/toastergui/static/js/projectpage.js | 4 +- .../lib/toaster/toastergui/templates/project.html | 3 +- bitbake/lib/toaster/toastergui/urls.py | 8 ++- bitbake/lib/toaster/toastergui/views.py | 60 +++++++++------------- 4 files changed, 32 insertions(+), 43 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/static/js/projectpage.js b/bitbake/lib/toaster/toastergui/static/js/projectpage.js index b82f7408e7..146319e042 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projectpage.js +++ b/bitbake/lib/toaster/toastergui/static/js/projectpage.js @@ -406,8 +406,8 @@ function projectPageInit(ctx) { var newRelease = releaseForm.find("option:selected").data('release'); - $.getJSON(ctx.typeaheadUrl, - { search: newRelease.id, type: "versionlayers" }, + $.getJSON(ctx.testReleaseChangeUrl, + { new_release_id: newRelease.id }, function(layers) { if (layers.rows.length === 0){ /* No layers to change for this release */ diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html index d21f4bd7e5..e8354fd678 100644 --- a/bitbake/lib/toaster/toastergui/templates/project.html +++ b/bitbake/lib/toaster/toastergui/templates/project.html @@ -11,8 +11,7 @@