mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
bitbake: toaster: Add distro selection support
Add the ability to select a distro in the project page, based on values from the Layer Index. Add a distro selection page with the add layer feature, based on the add machine page. [YOCTO #10632] (Bitbake rev: a156a4eff67cdc3943494f5be72b96e3db656250) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
43aaa802c3
commit
4f2baebf36
@@ -874,6 +874,12 @@ class XhrProject(View):
|
||||
machinevar.value = request.POST['machineName']
|
||||
machinevar.save()
|
||||
|
||||
# Distro name change
|
||||
if 'distroName' in request.POST:
|
||||
distrovar = prj.projectvariable_set.get(name="DISTRO")
|
||||
distrovar.value = request.POST['distroName']
|
||||
distrovar.save()
|
||||
|
||||
return JsonResponse({"error": "ok"})
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
@@ -960,10 +966,11 @@ class XhrProject(View):
|
||||
except ProjectVariable.DoesNotExist:
|
||||
data["machine"] = None
|
||||
try:
|
||||
data["distro"] = project.projectvariable_set.get(
|
||||
name="DISTRO").value
|
||||
data["distro"] = {"name":
|
||||
project.projectvariable_set.get(
|
||||
name="DISTRO").value}
|
||||
except ProjectVariable.DoesNotExist:
|
||||
data["distro"] = "-- not set yet"
|
||||
data["distro"] = None
|
||||
|
||||
data['error'] = "ok"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user