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
18
Merge Requests
18
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
58b09a86
Commit
58b09a86
authored
Oct 04, 2024
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_panel: factorize the schema url calculation in a python script
parent
977467b2
Pipeline
#37259
failed with stage
in 0 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
2 deletions
+74
-2
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.py
...Item/portal_components/test.erp5.testSlapOSCodingStyle.py
+1
-0
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/InstanceTree_viewParameterDialog/your_instance_xml.xml
...el/InstanceTree_viewParameterDialog/your_instance_xml.xml
+1
-1
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_getSoftwareReleaseSchemaUrl.py
...skins/slapos_panel/Project_getSoftwareReleaseSchemaUrl.py
+9
-0
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_getSoftwareReleaseSchemaUrl.xml
...kins/slapos_panel/Project_getSoftwareReleaseSchemaUrl.xml
+62
-0
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_viewRequestInstanceTreeDialog/your_text_content.xml
...oject_viewRequestInstanceTreeDialog/your_text_content.xml
+1
-1
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.py
View file @
58b09a86
...
@@ -258,6 +258,7 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
...
@@ -258,6 +258,7 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_panel/Project_addSlapOSSoftwareProduct'
,
'slapos_panel/Project_addSlapOSSoftwareProduct'
,
'slapos_panel/Project_getComputeNodeTrackingList'
,
'slapos_panel/Project_getComputeNodeTrackingList'
,
'slapos_panel/Project_getPayableSoftwareProductPredicateList'
,
'slapos_panel/Project_getPayableSoftwareProductPredicateList'
,
'slapos_panel/Project_getSoftwareReleaseSchemaUrl'
,
'slapos_panel/Project_redirectSlapOSComputeNodeCertificate'
,
'slapos_panel/Project_redirectSlapOSComputeNodeCertificate'
,
'slapos_panel/Project_selectRequestInstanceTree'
,
'slapos_panel/Project_selectRequestInstanceTree'
,
'slapos_panel/Project_selectRequestSoftwareRelease'
,
'slapos_panel/Project_selectRequestSoftwareRelease'
,
...
...
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/InstanceTree_viewParameterDialog/your_instance_xml.xml
View file @
58b09a86
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [(\'parameter_xml\', context.getTextContent()), (\'restricted_softwaretype\', True), (\'softwaretype\', context.getSourceReference()), (\'json_url\', context.get
UrlString().split(\'?\')[0] + \'.json\'
), (\'restricted_softwaretype\', False), (\'shared\', context.isRootSlave())]
</string>
</value>
<value>
<string>
python: [(\'parameter_xml\', context.getTextContent()), (\'restricted_softwaretype\', True), (\'softwaretype\', context.getSourceReference()), (\'json_url\', context.get
FollowUpValue().Project_getSoftwareReleaseSchemaUrl(context.getUrlString())
), (\'restricted_softwaretype\', False), (\'shared\', context.isRootSlave())]
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_getSoftwareReleaseSchemaUrl.py
0 → 100644
View file @
58b09a86
from
zExceptions
import
Unauthorized
if
REQUEST
is
not
None
:
raise
Unauthorized
# Ensure this script is called on the expected context
# for futur compatibility
assert
context
.
getPortalType
()
==
'Project'
return
software_release_url
.
split
(
"?"
)[
0
]
+
".json"
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_getSoftwareReleaseSchemaUrl.xml
0 → 100644
View file @
58b09a86
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
software_release_url, REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Project_getSoftwareReleaseSchemaUrl
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_viewRequestInstanceTreeDialog/your_text_content.xml
View file @
58b09a86
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [(\'json_url\',
request.get(\'field_your_url_string\').split(\'?\')[0] + \'.json\'
), (\'restricted_softwaretype\', False), (\'software_type_list\', list(set([x.getSoftwareTypeTitle() for x in context.Project_getSoftwareProductPredicateList(software_product=context.getPortalObject().portal_catalog.getResultValue(portal_type=\'Software Product\', uid=request.get(\'field_your_aggregate_uid\')), software_product_release=context.getPortalObject().portal_catalog.getResultValue(portal_type=\'Software Product Release Variation\', parent_uid=request.get(\'field_your_aggregate_uid\'), url_string=request.get(\'field_your_url_string\')))])))]
</string>
</value>
<value>
<string>
python: [(\'json_url\',
context.Project_getSoftwareReleaseSchemaUrl(request.get(\'field_your_url_string\'))
), (\'restricted_softwaretype\', False), (\'software_type_list\', list(set([x.getSoftwareTypeTitle() for x in context.Project_getSoftwareProductPredicateList(software_product=context.getPortalObject().portal_catalog.getResultValue(portal_type=\'Software Product\', uid=request.get(\'field_your_aggregate_uid\')), software_product_release=context.getPortalObject().portal_catalog.getResultValue(portal_type=\'Software Product Release Variation\', parent_uid=request.get(\'field_your_aggregate_uid\'), url_string=request.get(\'field_your_url_string\')))])))]
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
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