Commit 02c701ab authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

admin imaages for allow_failure

parent 6aee0735
Pipeline #2779 passed with stages
in 48 seconds
......@@ -96,12 +96,17 @@ class ImageTable(StrippedTable):
class Meta:
model = models.Image
fields = ('name', 'robotpkg', 'target', 'image', 'py3', 'debug', 'created')
fields = ('name', 'robotpkg', 'target', 'image', 'py3', 'debug', 'allow_failure', 'created')
def render_name(self, record, value):
if value:
return mark_safe(f'<a href="{record.get_image_url()}">{value}</a>')
def render_allow_failure(self, record, value):
url = reverse('admin:rainboard_image_change', args=[record.id])
status = {True: '✓', False: '✗'}[value]
return mark_safe(f'<a href="{url}">{status}</a>')
class ContributorTable(StrippedTable):
names = tables.Column(accessor='names', orderable=False)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment