~linaro-validation/lava-dashboard/trunk

« back to all changes in this revision

Viewing changes to dashboard_app/views/images.py

multiple runs in image-reports now shown properly

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
        for test_run in match.test_runs:
84
84
            name = test_run.test.test_id
85
85
            denorm = test_run.denormalization
86
 
            if denorm.count_pass == denorm.count_all():
 
86
            if denorm.count_fail == 0:
87
87
                cls = 'present pass'
88
88
            else:
89
89
                    cls = 'present fail'
93
93
                cls=cls,
94
94
                uuid=test_run.analyzer_assigned_uuid,
95
95
                passes=denorm.count_pass,
96
 
                total=denorm.count_all(),
 
96
                total=denorm.count_pass + denorm.count_fail,
97
97
                link=test_run.get_permalink(),
98
98
                bug_ids=bug_ids,
99
99
                )
100
 
            if match.tag not in build_number_to_cols:
101
 
                # This assumes 1 bundle per match...
102
 
                build_number_to_cols[match.tag] = {
 
100
            if (match.tag, test_run.bundle.uploaded_on) not in build_number_to_cols:
 
101
                build_number_to_cols[(match.tag, test_run.bundle.uploaded_on)] = {
103
102
                    'test_runs': {},
104
103
                    'number': match.tag,
105
104
                    'date': test_run.bundle.uploaded_on,
106
105
                    'link': test_run.bundle.get_absolute_url(),
107
106
                    }
108
 
            build_number_to_cols[match.tag]['test_runs'][name] = test_run_data
 
107
            build_number_to_cols[(match.tag, test_run.bundle.uploaded_on)]['test_runs'][name] = test_run_data
109
108
            if name != 'lava':
110
109
                test_run_names.add(name)
111
110