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
8766d040
Commit
8766d040
authored
Jan 26, 2023
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: JIO API Revision depend on web section
parent
5cd5fd9a
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 @
8766d040
...
...
@@ -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 @
8766d040
...
...
@@ -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