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
10293956
Commit
10293956
authored
Sep 06, 2019
by
Guilhem Saurel
Browse files
expose ordered projects
parent
27f26e29
Pipeline
#5524
passed with stage
in 1 minute and 46 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
10293956
...
...
@@ -1165,11 +1165,9 @@ def to_release_in_robotpkg():
def
ordered_projects
():
# TODO: clean, expose on API, add wip after current lst
bad_ones
=
Q
(
from_gepetto
=
False
)
|
Q
(
robotpkg__isnull
=
True
)
|
Q
(
robotpkg__category
=
'wip'
)
library_bad_ones
=
(
Q
(
library__from_gepetto
=
False
)
|
Q
(
library__robotpkg__isnull
=
True
)
|
Q
(
library__robotpkg__category
=
'wip'
))
""" helper for gepetto/buildfarm/generate_all.py """
bad_ones
=
Q
(
from_gepetto
=
False
)
|
Q
(
robotpkg__isnull
=
True
)
library_bad_ones
=
Q
(
library__from_gepetto
=
False
)
|
Q
(
library__robotpkg__isnull
=
True
)
main
=
Project
.
objects
.
exclude
(
bad_ones
)
ret
=
main
.
all
().
exclude
(
dependencies__isnull
=
False
)
...
...
rainboard/urls.py
View file @
10293956
...
...
@@ -27,6 +27,7 @@ urlpatterns = [
path
(
'contributors'
,
views
.
ContributorsView
.
as_view
(),
name
=
'contributors'
),
path
(
'projects'
,
views
.
ProjectsView
.
as_view
(),
name
=
'projects'
),
path
(
'projects/gepetto'
,
views
.
GepettoProjectsView
.
as_view
(),
name
=
'gepetto'
),
path
(
'projects/ordered'
,
views
.
ordered_projects
,
name
=
'ordered'
),
path
(
'project/<str:slug>/robotpkg'
,
views
.
ProjectView
.
as_view
(),
name
=
'project'
),
path
(
'project/<str:slug>/repos'
,
views
.
ProjectReposView
.
as_view
(),
name
=
'project-repos'
),
path
(
'project/<str:slug>/branches'
,
views
.
ProjectBranchesView
.
as_view
(),
name
=
'project-branches'
),
...
...
rainboard/views.py
View file @
10293956
...
...
@@ -3,6 +3,7 @@ from subprocess import PIPE, run
from
django.http
import
Http404
from
django.http.response
import
HttpResponse
,
JsonResponse
from
django.views.generic
import
DetailView
from
django_filters.views
import
FilterView
from
django_tables2
import
RequestConfig
from
django_tables2.views
import
SingleTableMixin
,
SingleTableView
...
...
@@ -133,6 +134,10 @@ def graph_svg(request):
return
HttpResponse
(
svg
,
content_type
=
'image/svg+xml'
)
def
ordered_projects
(
request
):
return
JsonResponse
(
models
.
order_projects
)
class
AuthenticatedOrReadOnlyModelViewSet
(
viewsets
.
ModelViewSet
):
permission_classes
=
(
permissions
.
IsAuthenticatedOrReadOnly
,
)
...
...
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