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
333b3708
Commit
333b3708
authored
Aug 04, 2018
by
Guilhem Saurel
Browse files
docker view: only get acttive targets
parent
0345428d
Changes
1
Hide whitespace changes
Inline
Side-by-side
rainboard/views.py
View file @
333b3708
...
...
@@ -108,7 +108,7 @@ 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
(
**
filters
)
images
=
models
.
Image
.
objects
.
filter
(
target__active
=
True
).
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