summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldviewer/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/bldviewer/views.py')
-rw-r--r--bitbake/lib/toaster/bldviewer/views.py25
1 files changed, 11 insertions, 14 deletions
diff --git a/bitbake/lib/toaster/bldviewer/views.py b/bitbake/lib/toaster/bldviewer/views.py
index 7be4d4b899..3eb785b6c6 100644
--- a/bitbake/lib/toaster/bldviewer/views.py
+++ b/bitbake/lib/toaster/bldviewer/views.py
@@ -20,8 +20,9 @@ import operator
20 20
21from django.db.models import Q 21from django.db.models import Q
22from django.shortcuts import render 22from django.shortcuts import render
23from orm.models import Build, Target, Task, Layer, Layer_Version, Recipe, Target_Package, LogMessage, Variable 23from orm.models import Build, Target, Task, Layer, Layer_Version, Recipe, LogMessage, Variable
24from orm.models import Task_Dependency, Recipe_Dependency, Build_Package, Build_File, Build_Package_Dependency 24from orm.models import Task_Dependency, Recipe_Dependency, Package, Package_File, Package_Dependency
25from orm.models import Target_Installed_Package
25from django.views.decorators.cache import cache_control 26from django.views.decorators.cache import cache_control
26 27
27@cache_control(no_store=True) 28@cache_control(no_store=True)
@@ -78,23 +79,20 @@ def configuration(request, build_id):
78 79
79def bpackage(request, build_id): 80def bpackage(request, build_id):
80 template = 'bpackage.html' 81 template = 'bpackage.html'
81 packages = Build_Package.objects.filter(build = build_id) 82 packages = Package.objects.filter(build = build_id)
82 context = {'build': Build.objects.filter(pk=build_id)[0], 'packages' : packages} 83 context = {'build': Build.objects.filter(pk=build_id)[0], 'packages' : packages}
83 return render(request, template, context) 84 return render(request, template, context)
84 85
85def bfile(request, build_id, package_id): 86def bfile(request, build_id, package_id):
86 template = 'bfile.html' 87 template = 'bfile.html'
87 files = Build_File.objects.filter(bpackage = package_id) 88 files = Package_File.objects.filter(package = package_id)
88 context = {'build': Build.objects.filter(pk=build_id)[0], 'files' : files} 89 context = {'build': Build.objects.filter(pk=build_id)[0], 'files' : files}
89 return render(request, template, context) 90 return render(request, template, context)
90 91
91def tpackage(request, build_id, target_id): 92def tpackage(request, build_id, target_id):
92 template = 'package.html' 93 template = 'package.html'
93 94 packages = map(lambda x: x.package, list(Target_Installed_Package.objects.filter(target=target_id)))
94 packages = Target_Package.objects.filter(target=target_id) 95 context = {'build': Build.objects.filter(pk=build_id)[0], 'packages' : packages}
95
96 context = {'build' : Build.objects.filter(pk=build_id)[0],'packages': packages}
97
98 return render(request, template, context) 96 return render(request, template, context)
99 97
100def layer(request): 98def layer(request):
@@ -135,17 +133,16 @@ def model_explorer(request, model_name):
135 model_mapping = { 133 model_mapping = {
136 'build': Build, 134 'build': Build,
137 'target': Target, 135 'target': Target,
138 'target_package': Target_Package,
139 'task': Task, 136 'task': Task,
140 'task_dependency': Task_Dependency, 137 'task_dependency': Task_Dependency,
141 'package': Build_Package, 138 'package': Package,
142 'layer': Layer, 139 'layer': Layer,
143 'layerversion': Layer_Version, 140 'layerversion': Layer_Version,
144 'recipe': Recipe, 141 'recipe': Recipe,
145 'recipe_dependency': Recipe_Dependency, 142 'recipe_dependency': Recipe_Dependency,
146 'build_package': Build_Package, 143 'package': Package,
147 'build_package_dependency': Build_Package_Dependency, 144 'package_dependency': Package_Dependency,
148 'build_file': Build_File, 145 'build_file': Package_File,
149 'variable': Variable, 146 'variable': Variable,
150 'logmessage': LogMessage, 147 'logmessage': LogMessage,
151 } 148 }