aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastergui/views.py
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2014-03-25 10:42:55 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-28 13:44:26 +0000
commit842abf6759894690d5bc770f4ea2ac15b127e5e2 (patch)
tree818a6a2bdf2d8ff372e7f24d43184b42b636f5ec /lib/toaster/toastergui/views.py
parenteaff7b50d7102c97b75df185b9ef917970319d59 (diff)
downloadbitbake-842abf6759894690d5bc770f4ea2ac15b127e5e2.tar.gz
toaster: added file types to the Outputs column in the build
The file types are displayed in the Outputs column in the build page. The file types are derived from the target image filenames. [YOCTO #5947] Signed-off-by: Farrell Wymore <farrell.wymore@windriver.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/toaster/toastergui/views.py')
-rw-r--r--lib/toaster/toastergui/views.py24
1 files changed, 22 insertions, 2 deletions
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index 0f92caf56..d323b3701 100644
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -19,13 +19,13 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import operator
+import operator,re
from django.db.models import Q, Sum
from django.shortcuts import render, redirect
from orm.models import Build, Target, Task, Layer, Layer_Version, Recipe, LogMessage, Variable
from orm.models import Task_Dependency, Recipe_Dependency, Package, Package_File, Package_Dependency
-from orm.models import Target_Installed_Package, Target_Image_File
+from orm.models import Target_Installed_Package, Target_File, Target_Image_File
from django.views.decorators.cache import cache_control
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.http import HttpResponseBadRequest
@@ -231,6 +231,25 @@ def builds(request):
else:
b.eta = 0
+ # set up list of fstypes for each build
+ fstypes_map = {};
+ for build in build_info:
+ targets = Target.objects.filter( build_id = build.id )
+ comma = "";
+ extensions = "";
+ for t in targets:
+ if ( not t.is_image ):
+ continue
+ tif = Target_Image_File.objects.filter( target_id = t.id )
+ for i in tif:
+ s=re.sub('.*tar.bz2', 'tar.bz2', i.file_name)
+ if s == i.file_name:
+ s=re.sub('.*\.', '', i.file_name)
+ if None == re.search(s,extensions):
+ extensions += comma + s
+ comma = ", "
+ fstypes_map[build.id]=extensions
+
# send the data to the template
context = {
# specific info for
@@ -238,6 +257,7 @@ def builds(request):
# TODO: common objects for all table views, adapt as needed
'objects' : build_info,
'objectname' : "builds",
+ 'fstypes' : fstypes_map,
'search_term' : search_term,
'total_count' : queryset_with_search.count(),
# Specifies the display of columns for the table, appearance in "Edit columns" box, toggling default show/hide, and specifying filters for columns