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>
This commit is contained in:
Elliot Smith
2016-01-15 13:01:06 +02:00
committed by Richard Purdie
parent c4b50111e9
commit 798e8b8d03
3 changed files with 8 additions and 13 deletions

View File

@@ -477,15 +477,9 @@ class Build(models.Model):
targets in this build targets in this build
""" """
targets = self.target_set.all() targets = self.target_set.all()
target_labels = [] target_labels = [target.target +
target_label = None (':' + target.task if target.task else '')
for target in targets]
for target in targets:
target_label = target.target
if target.task:
target_label = target_label + ':' + target.task
target_labels.append(target_label)
target_labels.sort() target_labels.sort()
return target_labels return target_labels

View File

@@ -688,7 +688,9 @@ class ProjectsTable(ToasterTable):
self.queryset = queryset self.queryset = queryset
# columns: last activity on (updated) - DEFAULT, project (name), release, machine, number of builds, last build outcome, recipe (name), errors, warnings, image files # columns: last activity on (updated) - DEFAULT, project (name), release,
# machine, number of builds, last build outcome, recipe (name), errors,
# warnings, image files
def setup_columns(self, *args, **kwargs): def setup_columns(self, *args, **kwargs):
name_template = ''' name_template = '''
{% load project_url_tag %} {% load project_url_tag %}

View File

@@ -462,7 +462,7 @@ def builddashboard( request, build_id ):
for t in tgts: for t in tgts:
elem = { } elem = { }
elem[ 'target' ] = t elem[ 'target' ] = t
if ( t.is_image ): if t.is_image:
hasImages = True hasImages = True
npkg = 0 npkg = 0
pkgsz = 0 pkgsz = 0
@@ -481,8 +481,7 @@ def builddashboard( request, build_id ):
ndx = 0; ndx = 0;
f = i.file_name[ ndx + 1: ] f = i.file_name[ ndx + 1: ]
imageFiles.append({ 'id': i.id, 'path': f, 'size' : i.file_size }) imageFiles.append({ 'id': i.id, 'path': f, 'size' : i.file_size })
if ( t.is_image and if t.is_image and (len(imageFiles) <= 0 or len(t.license_manifest_path) <= 0):
(( len( imageFiles ) <= 0 ) or ( len( t.license_manifest_path ) <= 0 ))):
targetHasNoImages = True targetHasNoImages = True
elem[ 'imageFiles' ] = imageFiles elem[ 'imageFiles' ] = imageFiles
elem[ 'targetHasNoImages' ] = targetHasNoImages elem[ 'targetHasNoImages' ] = targetHasNoImages