diff options
author | David Reyna <David.Reyna@windriver.com> | 2014-01-17 16:58:08 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-27 21:01:06 +0000 |
commit | 84b239086dbd53c59d51f4e0779767a72af02d2b (patch) | |
tree | 62ff436a8710f4d3d80913bcb0c02dab7a514859 /bitbake/lib/toaster/toastergui/views.py | |
parent | b45defd88821bb712d5f5d56835600732b05025c (diff) | |
download | poky-84b239086dbd53c59d51f4e0779767a72af02d2b.tar.gz |
bitbake: toaster: Implementation of recipe detail views
Add the new recipe detail page and update the view context accordingly.
Rename the recipe summary page to 'recipes.html' and add the respective
links to the recipe details page.
The views are based on specifications found in attachments to
https://bugzilla.yoctoproject.org/show_bug.cgi?id=4299
[YOCTO #4299]
(Bitbake rev: d561000b6c4927ef6ec269e9ab7c70249b3c344a)
Signed-off-by: David Reyna <david.reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/views.py')
-rw-r--r-- | bitbake/lib/toaster/toastergui/views.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index d54c66be81..1604bb6bc4 100644 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -335,9 +335,20 @@ def recipe(request, build_id, recipe_id): | |||
335 | template = "recipe.html" | 335 | template = "recipe.html" |
336 | if Recipe.objects.filter(pk=recipe_id).count() == 0 : | 336 | if Recipe.objects.filter(pk=recipe_id).count() == 0 : |
337 | return redirect(builds) | 337 | return redirect(builds) |
338 | |||
339 | object = Recipe.objects.filter(pk=recipe_id)[0] | ||
340 | layer_version = Layer_Version.objects.filter(pk=object.layer_version_id)[0] | ||
341 | layer = Layer.objects.filter(pk=layer_version.layer_id)[0] | ||
342 | tasks = Task.objects.filter(recipe_id = recipe_id).filter(build_id = build_id) | ||
343 | packages = Package.objects.filter(recipe_id = recipe_id).filter(build_id = build_id) | ||
344 | |||
338 | context = { | 345 | context = { |
339 | 'build' : Build.objects.filter(pk=build_id)[0], | 346 | 'build' : Build.objects.filter(pk=build_id)[0], |
340 | 'object' : Recipe.objects.filter(pk=recipe_id)[0], | 347 | 'object' : object, |
348 | 'layer_version' : layer_version, | ||
349 | 'layer' : layer, | ||
350 | 'tasks' : tasks, | ||
351 | 'packages': packages, | ||
341 | } | 352 | } |
342 | return render(request, template, context) | 353 | return render(request, template, context) |
343 | 354 | ||
@@ -399,7 +410,7 @@ def tasks(request, build_id): | |||
399 | return render(request, template, context) | 410 | return render(request, template, context) |
400 | 411 | ||
401 | def recipes(request, build_id): | 412 | def recipes(request, build_id): |
402 | template = 'recipe.html' | 413 | template = 'recipes.html' |
403 | mandatory_parameters = { 'count': 100, 'page' : 1}; | 414 | mandatory_parameters = { 'count': 100, 'page' : 1}; |
404 | retval = _verify_parameters( request.GET, mandatory_parameters ) | 415 | retval = _verify_parameters( request.GET, mandatory_parameters ) |
405 | if retval: | 416 | if retval: |