targets in this build
"""
targets = self.target_set.all()
- target_labels = []
- target_label = None
-
- for target in targets:
- target_label = target.target
- if target.task:
- target_label = target_label + ':' + target.task
- target_labels.append(target_label)
-
+ target_labels = [target.target +
+ (':' + target.task if target.task else '')
+ for target in targets]
target_labels.sort()
return target_labels
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):
name_template = '''
{% load project_url_tag %}
for t in tgts:
elem = { }
elem[ 'target' ] = t
- if ( t.is_image ):
+ if t.is_image:
hasImages = True
npkg = 0
pkgsz = 0
ndx = 0;
f = i.file_name[ ndx + 1: ]
imageFiles.append({ 'id': i.id, 'path': f, 'size' : i.file_size })
- if ( t.is_image and
- (( len( imageFiles ) <= 0 ) or ( len( t.license_manifest_path ) <= 0 ))):
+ if t.is_image and (len(imageFiles) <= 0 or len(t.license_manifest_path) <= 0):
targetHasNoImages = True
elem[ 'imageFiles' ] = imageFiles
elem[ 'targetHasNoImages' ] = targetHasNoImages