add links to test failures
this isn't quite ready for prime-time: it works, but it's ugly. I think the right way to do it might be to add a double-height row when there are failures, with the arch and lng cells spanning both rows and two cells in the last-built column, one for the image link and one for the failure links. then we can play with the height of the failure links row. but that needs quite a change to the logic, might have to split out the result row code into a separate function for sanity. i'll play with it tomorrow.
This commit is contained in:
parent
411846f543
commit
5413a3bd63
1 changed files with 19 additions and 4 deletions
|
|
@ -35,6 +35,7 @@ th {background-color: lightgrey;}
|
|||
.relheader {background-color: black; color: white;}
|
||||
.groupheader {background-color: lightskyblue;}
|
||||
.failedlink {color: red;}
|
||||
.failedcell {line-height: 90%;}
|
||||
.passedlink {color: green;}
|
||||
.key {font-size: 0.9em; color: dimgrey;}
|
||||
</style>
|
||||
|
|
@ -198,12 +199,26 @@ class ReleaseTable(Element):
|
|||
# add a cell for each image in the list, with
|
||||
# appropriate class for its test results
|
||||
if image.testspass is True:
|
||||
link = lnpart(cssclass='passedlink')
|
||||
links = [lnpart(cssclass='passedlink')]
|
||||
elif image.testspass is False:
|
||||
link = lnpart(cssclass='failedlink')
|
||||
links = [lnpart(cssclass='failedlink')]
|
||||
if image['openqa']:
|
||||
fails = [str(job['id']) for job in image['openqa']
|
||||
if job['result'] not in ('passed', 'softfail')]
|
||||
if fails:
|
||||
links.extend((Element('br'), 'Fails: '))
|
||||
links.extend(
|
||||
[Element('a', job,
|
||||
href='https://openqa.fedoraproject.org/tests/{0}'.format(job))
|
||||
for job in fails])
|
||||
elif image['autocloud']:
|
||||
job = str(image['autocloud']['job_id'])
|
||||
links.extend((Element('br'), 'Fails: '))
|
||||
url = 'https://apps.fedoraproject.org/autocloud/jobs/{0}'.format(job)
|
||||
links.append(Element('a', job, href=url))
|
||||
else:
|
||||
link = lnpart()
|
||||
cells.append(Element('td', link))
|
||||
links = [lnpart()]
|
||||
cells.append(Element('td', links))
|
||||
# pad the row with empty cells (this is when we don't
|
||||
# have a 'last known good' as no image passed tests)
|
||||
while len(cells) < 3:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue