diff options
author | Michael Wood <michael.g.wood@intel.com> | 2015-08-06 19:01:35 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-06 16:04:48 -0500 |
commit | af72d0fbb2d0f4d9aa29e124b3b4e216017f771d (patch) | |
tree | ecde1021451fcb2e2cc78729134441cb21a412e5 /bitbake/lib/toaster/toastergui/views.py | |
parent | da4c66385dc8bc80242664c365b180c9bbc98707 (diff) | |
download | poky-af72d0fbb2d0f4d9aa29e124b3b4e216017f771d.tar.gz |
bitbake: toastergui: Move layerdetails view definition to the views.py
The layerdetails view definition was moved to tables though it isn't
a table. We have a mechanism for the JSON response for this page so use
this instead of a custom class.
(Bitbake rev: b5100bfd4cb32a9b59b0554c6dbc3a4295da7d8e)
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/views.py')
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 4563eaf01a..889b6c64ca 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -2517,6 +2517,21 @@ if True: | |||
2517 | } | 2517 | } |
2518 | return render(request, template, context) | 2518 | return render(request, template, context) |
2519 | 2519 | ||
2520 | @_template_renderer('layerdetails.html') | ||
2521 | def layerdetails(request, pid, layerid): | ||
2522 | project = Project.objects.get(pk=pid) | ||
2523 | layer_version = Layer_Version.objects.get(pk=layerid) | ||
2524 | |||
2525 | context = { 'project' : project, | ||
2526 | 'layerversion' : layer_version, | ||
2527 | 'layerdeps' : { "list": [ | ||
2528 | [{"id": y.id, "name": y.layer.name} for y in x.depends_on.get_equivalents_wpriority(project)][0] for x in layer_version.dependencies.all()]}, | ||
2529 | 'projectlayers': map(lambda prjlayer: prjlayer.layercommit.id, ProjectLayer.objects.filter(project=project)) | ||
2530 | } | ||
2531 | |||
2532 | return context | ||
2533 | |||
2534 | |||
2520 | def get_project_configvars_context(): | 2535 | def get_project_configvars_context(): |
2521 | # Vars managed outside of this view | 2536 | # Vars managed outside of this view |
2522 | vars_managed = { | 2537 | vars_managed = { |