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
Labels
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
02c8ee0d
Commit
02c8ee0d
authored
Jan 26, 2023
by
Cédric Le Ninivin
Committed by
Cédric Le Ninivin
Mar 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: JIO API Revision depend on web section
parent
c4a7cbec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
master/bt5/slapos_cloud/DocumentTemplateItem/portal_components/document.erp5.SoftwareInstallation.py
...m/portal_components/document.erp5.SoftwareInstallation.py
+5
-2
master/bt5/slapos_cloud/DocumentTemplateItem/portal_components/document.erp5.SoftwareInstance.py
...eItem/portal_components/document.erp5.SoftwareInstance.py
+5
-1
No files found.
master/bt5/slapos_cloud/DocumentTemplateItem/portal_components/document.erp5.SoftwareInstallation.py
View file @
02c8ee0d
...
...
@@ -66,15 +66,18 @@ class SoftwareInstallation(Item, JSONType):
status_dict
=
self
.
getAccessStatus
()
result
=
{
"$schema"
:
self
.
getJSONSchemaUrl
(),
"reference"
:
self
.
getReference
().
decode
(
"UTF-8"
),
"reference"
:
self
.
getReference
().
decode
(
"UTF-8"
)
if
self
.
getReference
()
else
""
,
"software_release_uri"
:
self
.
getUrlString
(),
"compute_node_id"
:
self
.
getAggregateReference
(),
"state"
:
state
,
"reported_state"
:
status_dict
.
get
(
"state"
),
"status_message"
:
status_dict
.
get
(
"text"
),
"processing_timestamp"
:
self
.
getSlapTimestamp
(),
"api_revision"
:
self
.
getJIOAPIRevision
(),
}
web_section
=
self
.
getWebSectionValue
()
web_section
=
web_section
.
getRelativeUrl
()
if
web_section
else
self
.
REQUEST
.
get
(
"web_section_relative_url"
,
None
)
if
web_section
:
result
[
"api_revision"
]
=
self
.
getJIOAPIRevision
(
web_section
)
result
.
update
()
return
json
.
dumps
(
result
,
indent
=
2
)
...
...
master/bt5/slapos_cloud/DocumentTemplateItem/portal_components/document.erp5.SoftwareInstance.py
View file @
02c8ee0d
...
...
@@ -387,9 +387,13 @@ class SoftwareInstance(Item, JSONType):
"compute_partition_id"
:
parameter_dict
.
get
(
"slap_computer_partition_id"
),
"processing_timestamp"
:
self
.
getSlapTimestamp
(),
"access_status_message"
:
self
.
getTextAccessStatus
(),
"api_revision"
:
self
.
getJIOAPIRevision
(),
"portal_type"
:
self
.
getPortalType
(),
}
web_section
=
self
.
getWebSectionValue
()
web_section
=
web_section
.
getRelativeUrl
()
if
web_section
else
self
.
REQUEST
.
get
(
"web_section_relative_url"
,
None
)
if
web_section
:
result
[
"api_revision"
]
=
self
.
getJIOAPIRevision
(
web_section
)
self
.
REQUEST
.
response
.
setHeader
(
'Cache-Control'
,
'private, max-age=0, must-revalidate'
)
self
.
REQUEST
.
response
.
setHeader
(
'Vary'
,
...
...
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