Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
02c701ab
Commit
02c701ab
authored
Feb 11, 2019
by
Guilhem Saurel
Browse files
admin imaages for allow_failure
parent
6aee0735
Pipeline
#2779
passed with stages
in 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/tables.py
View file @
02c701ab
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment