summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-01-15 13:01:06 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-15 16:30:01 +0000
commit798e8b8d03b78929a936c6ea01166209a747ca1f (patch)
tree682683bdc9c6a3fbe4a8c0d5f7d7b5fb0ad135a8
parentc4b50111e9887c4d69f6a8b5fb50824fc44f7128 (diff)
downloadpoky-798e8b8d03b78929a936c6ea01166209a747ca1f.tar.gz
bitbake: toastergui: code formatting and clean-up
Minor fixes to code formatting and small improvements from code review. (Bitbake rev: 2c97f3a5c6ae37de910deb90390c5b856a600c5f) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/toaster/orm/models.py12
-rw-r--r--bitbake/lib/toaster/toastergui/tables.py4
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py5
3 files changed, 8 insertions, 13 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 3dc4d6d891..ac2aa9e469 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -477,15 +477,9 @@ class Build(models.Model):
477 targets in this build 477 targets in this build
478 """ 478 """
479 targets = self.target_set.all() 479 targets = self.target_set.all()
480 target_labels = [] 480 target_labels = [target.target +
481 target_label = None 481 (':' + target.task if target.task else '')
482 482 for target in targets]
483 for target in targets:
484 target_label = target.target
485 if target.task:
486 target_label = target_label + ':' + target.task
487 target_labels.append(target_label)
488
489 target_labels.sort() 483 target_labels.sort()
490 484
491 return target_labels 485 return target_labels
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
index 227973114c..e9f1fdccb1 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -688,7 +688,9 @@ class ProjectsTable(ToasterTable):
688 688
689 self.queryset = queryset 689 self.queryset = queryset
690 690
691 # columns: last activity on (updated) - DEFAULT, project (name), release, machine, number of builds, last build outcome, recipe (name), errors, warnings, image files 691 # columns: last activity on (updated) - DEFAULT, project (name), release,
692 # machine, number of builds, last build outcome, recipe (name), errors,
693 # warnings, image files
692 def setup_columns(self, *args, **kwargs): 694 def setup_columns(self, *args, **kwargs):
693 name_template = ''' 695 name_template = '''
694 {% load project_url_tag %} 696 {% load project_url_tag %}
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 4f7b50f9dc..59e16b27b2 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -462,7 +462,7 @@ def builddashboard( request, build_id ):
462 for t in tgts: 462 for t in tgts:
463 elem = { } 463 elem = { }
464 elem[ 'target' ] = t 464 elem[ 'target' ] = t
465 if ( t.is_image ): 465 if t.is_image:
466 hasImages = True 466 hasImages = True
467 npkg = 0 467 npkg = 0
468 pkgsz = 0 468 pkgsz = 0
@@ -481,8 +481,7 @@ def builddashboard( request, build_id ):
481 ndx = 0; 481 ndx = 0;
482 f = i.file_name[ ndx + 1: ] 482 f = i.file_name[ ndx + 1: ]
483 imageFiles.append({ 'id': i.id, 'path': f, 'size' : i.file_size }) 483 imageFiles.append({ 'id': i.id, 'path': f, 'size' : i.file_size })
484 if ( t.is_image and 484 if t.is_image and (len(imageFiles) <= 0 or len(t.license_manifest_path) <= 0):
485 (( len( imageFiles ) <= 0 ) or ( len( t.license_manifest_path ) <= 0 ))):
486 targetHasNoImages = True 485 targetHasNoImages = True
487 elem[ 'imageFiles' ] = imageFiles 486 elem[ 'imageFiles' ] = imageFiles
488 elem[ 'targetHasNoImages' ] = targetHasNoImages 487 elem[ 'targetHasNoImages' ] = targetHasNoImages