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
009da5c7
Commit
009da5c7
authored
Aug 04, 2021
by
Guilhem Saurel
Browse files
docker: send extended_target commands
parent
d8ac688d
Pipeline
#15504
passed with stage
in 5 minutes and 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/views.py
View file @
009da5c7
...
...
@@ -137,7 +137,11 @@ def docker(request):
filters
=
request
.
GET
.
dict
()
if
'cmd'
in
filters
and
filters
[
'cmd'
]
in
[
'push'
,
'pull'
,
'build'
]:
cmd
=
filters
.
pop
(
'cmd'
)
images
=
models
.
Image
.
objects
.
filter
(
target__active
=
True
).
filter
(
**
filters
)
if
'target__name'
in
filters
:
filters
[
'robotpkg__extended_target__name'
]
=
filters
[
'target__name'
]
else
:
filters
[
'target__active'
]
=
True
images
=
models
.
Image
.
objects
.
filter
(
**
filters
)
return
HttpResponse
(
'
\n
'
.
join
([
' '
.
join
(
getattr
(
image
,
cmd
)())
for
image
in
images
]),
content_type
=
"text/plain"
)
...
...
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