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
c01294f0
Commit
c01294f0
authored
Apr 12, 2018
by
Guilhem Saurel
Browse files
docker view: can filter from GET parameters
parent
cd67db25
Pipeline
#552
passed with stages
in 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/views.py
View file @
c01294f0
...
...
@@ -95,8 +95,8 @@ def json_doc(request):
def
docker
(
request
):
method
=
request
.
GET
.
get
(
'method'
,
'build'
)
if
method
not
in
[
'push'
,
'pull'
,
'build'
]:
method
=
'buil
d'
return
HttpResponse
(
'
\n
'
.
join
([
' '
.
join
(
getattr
(
image
,
method
)())
for
image
in
models
.
Image
.
objects
.
all
()]),
content_type
=
"text/plain"
)
cmd
=
'build'
if
'cmd'
in
request
.
GET
and
request
.
GET
[
'cmd'
]
in
[
'push'
,
'pull'
,
'build'
]:
cmd
=
request
.
GET
.
pop
(
'cm
d'
)
images
=
models
.
Image
.
objects
.
filter
(
**
request
.
GET
.
dict
())
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