Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
872fb18e
Commit
872fb18e
authored
4 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-272
: minor fixes
parent
353594c5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!213
Resolve TMSS-272
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SAS/TMSS/src/tmss/tmssapp/viewsets/scheduling.py
+0
-11
0 additions, 11 deletions
SAS/TMSS/src/tmss/tmssapp/viewsets/scheduling.py
SAS/TMSS/src/tmss/tmssapp/viewsets/specification.py
+12
-5
12 additions, 5 deletions
SAS/TMSS/src/tmss/tmssapp/viewsets/specification.py
with
12 additions
and
16 deletions
SAS/TMSS/src/tmss/tmssapp/viewsets/scheduling.py
+
0
−
11
View file @
872fb18e
...
...
@@ -111,17 +111,6 @@ class SubtaskTemplateViewSet(LOFARViewSet):
subtask_template
=
get_object_or_404
(
models
.
SubtaskTemplate
,
pk
=
pk
)
return
JsonResponse
(
subtask_template
.
schema
)
@swagger_auto_schema
(
responses
=
{
200
:
'
The schema as a JSON object
'
,
403
:
'
forbidden
'
},
operation_description
=
"
Get the schema as a JSON object.
"
)
@action
(
methods
=
[
'
get
'
],
detail
=
True
)
def
resolved_schema
(
self
,
request
,
pk
=
None
):
template
=
get_object_or_404
(
models
.
SubtaskTemplate
,
pk
=
pk
)
base_url
=
"
%s://%s
"
%
(
request
.
scheme
,
request
.
get_host
())
schema
=
models
.
Template
.
update_tmss_common_json_schema_refs
(
template
.
schema
,
base_url
)
schema
=
models
.
Template
.
flatten_schema
(
schema
)
return
JsonResponse
(
schema
)
@swagger_auto_schema
(
responses
=
{
200
:
'
JSON object with all the defaults from the schema filled in
'
,
403
:
'
forbidden
'
},
operation_description
=
"
Get a JSON object with all the defaults from the schema filled in.
"
)
...
...
This diff is collapsed.
Click to expand it.
SAS/TMSS/src/tmss/tmssapp/viewsets/specification.py
+
12
−
5
View file @
872fb18e
...
...
@@ -51,9 +51,7 @@ class CommonSchemaTemplateViewSet(LOFARViewSet):
@action
(
methods
=
[
'
get
'
],
detail
=
True
)
def
schema
(
self
,
request
,
pk
=
None
):
template
=
get_object_or_404
(
models
.
CommonSchemaTemplate
,
pk
=
pk
)
base_url
=
"
%s://%s
"
%
(
request
.
scheme
,
request
.
get_host
())
schema
=
models
.
Template
.
update_tmss_common_json_schema_refs
(
template
.
schema
,
base_url
)
return
JsonResponse
(
schema
)
return
JsonResponse
(
template
.
schema
)
@swagger_auto_schema
(
responses
=
{
200
:
'
The schema as a JSON object
'
,
403
:
'
forbidden
'
},
...
...
@@ -62,10 +60,19 @@ class CommonSchemaTemplateViewSet(LOFARViewSet):
def
resolved_schema
(
self
,
request
,
pk
=
None
):
template
=
get_object_or_404
(
models
.
CommonSchemaTemplate
,
pk
=
pk
)
base_url
=
"
%s://%s
"
%
(
request
.
scheme
,
request
.
get_host
())
schema
=
models
.
Template
.
update_tmss_common_json_schema_refs
(
template
.
schema
,
base_url
)
schema
=
models
.
Template
.
flatten_schema
(
schema
)
schema
=
json_utils
.
resolved_refs
(
template
.
schema
)
return
JsonResponse
(
schema
)
@swagger_auto_schema
(
responses
=
{
200
:
'
JSON object with all the defaults from the schema filled in
'
,
403
:
'
forbidden
'
},
operation_description
=
"
Get a JSON object with all the defaults from the schema filled in.
"
)
@action
(
methods
=
[
'
get
'
],
detail
=
True
)
def
default_specification
(
self
,
request
,
pk
=
None
):
template
=
get_object_or_404
(
models
.
CommonSchemaTemplate
,
pk
=
pk
)
spec
=
get_default_json_object_for_schema
(
template
.
schema
)
return
JsonResponse
(
spec
)
class
GeneratorTemplateViewSet
(
LOFARViewSet
):
queryset
=
models
.
GeneratorTemplate
.
objects
.
all
()
serializer_class
=
serializers
.
GeneratorTemplateSerializer
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment