Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos.core
Commits
504d008d
Commit
504d008d
authored
Dec 21, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Set Proper Content-Type on the response
parent
af16f03d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
8 deletions
+13
-8
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Person_requestComputeNode.py
..._skins/slapos_hal_json_style/Person_requestComputeNode.py
+1
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Person_requestNetwork.py
...rtal_skins/slapos_hal_json_style/Person_requestNetwork.py
+3
-2
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Person_requestOrganisation.py
...skins/slapos_hal_json_style/Person_requestOrganisation.py
+3
-2
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Person_requestProject.py
...rtal_skins/slapos_hal_json_style/Person_requestProject.py
+3
-2
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Person_requestSite.py
.../portal_skins/slapos_hal_json_style/Person_requestSite.py
+3
-2
No files found.
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Person_requestComputeNode.py
View file @
504d008d
...
...
@@ -13,6 +13,7 @@ else:
compute_node
=
context
.
restrictedTraverse
(
context
.
REQUEST
.
get
(
'compute_node'
))
compute_node
.
generateCertificate
()
response
.
setHeader
(
'Content-Type'
,
"application/json"
)
return
json
.
dumps
({
"certificate"
:
request
.
get
(
'compute_node_certificate'
),
"key"
:
request
.
get
(
'compute_node_key'
),
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Person_requestNetwork.py
View file @
504d008d
...
...
@@ -10,9 +10,10 @@ if person is None:
else
:
request_kw
=
dict
(
network_title
=
title
)
person
.
requestNetwork
(
**
request_kw
)
network_relative_url
=
context
.
REQUEST
.
get
(
'computer_network_relative_url'
)
network_reference
=
context
.
REQUEST
.
get
(
'computer_network_reference'
)
network_relative_url
=
request
.
get
(
'computer_network_relative_url'
)
network_reference
=
request
.
get
(
'computer_network_reference'
)
response
.
setHeader
(
'Content-Type'
,
"application/json"
)
return
json
.
dumps
({
"reference"
:
network_reference
,
"relative_url"
:
network_relative_url
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Person_requestOrganisation.py
View file @
504d008d
...
...
@@ -10,9 +10,10 @@ if person is None:
else
:
request_kw
=
dict
(
organisation_title
=
title
)
person
.
requestOrganisation
(
**
request_kw
)
organisation_relative_url
=
context
.
REQUEST
.
get
(
'organisation_relative_url'
)
organisation_reference
=
context
.
REQUEST
.
get
(
'organisation_reference'
)
organisation_relative_url
=
request
.
get
(
'organisation_relative_url'
)
organisation_reference
=
request
.
get
(
'organisation_reference'
)
response
.
setHeader
(
'Content-Type'
,
"application/json"
)
return
json
.
dumps
({
"reference"
:
organisation_reference
,
"relative_url"
:
organisation_relative_url
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Person_requestProject.py
View file @
504d008d
...
...
@@ -10,9 +10,10 @@ if person is None:
else
:
request_kw
=
dict
(
project_title
=
title
)
person
.
requestProject
(
**
request_kw
)
project_relative_url
=
context
.
REQUEST
.
get
(
'project_relative_url'
)
project_reference
=
context
.
REQUEST
.
get
(
'project_reference'
)
project_relative_url
=
request
.
get
(
'project_relative_url'
)
project_reference
=
request
.
get
(
'project_reference'
)
response
.
setHeader
(
'Content-Type'
,
"application/json"
)
return
json
.
dumps
({
"reference"
:
project_reference
,
"relative_url"
:
project_relative_url
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Person_requestSite.py
View file @
504d008d
...
...
@@ -10,9 +10,10 @@ if person is None:
else
:
request_kw
=
dict
(
organisation_title
=
title
)
person
.
requestSite
(
**
request_kw
)
organisation_relative_url
=
context
.
REQUEST
.
get
(
'organisation_relative_url'
)
organisation_reference
=
context
.
REQUEST
.
get
(
'organisation_reference'
)
organisation_relative_url
=
request
.
get
(
'organisation_relative_url'
)
organisation_reference
=
request
.
get
(
'organisation_reference'
)
response
.
setHeader
(
'Content-Type'
,
"application/json"
)
return
json
.
dumps
({
"reference"
:
organisation_reference
,
"relative_url"
:
organisation_relative_url
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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