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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
c892c53d
Commit
c892c53d
authored
Nov 03, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_panel: improve software release creation
extend software type list
parent
f0384a74
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
110 deletions
+88
-110
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/SoftwareProduct_addSlapOSSoftwareRelease.py
.../slapos_panel/SoftwareProduct_addSlapOSSoftwareRelease.py
+32
-4
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/SoftwareProduct_addSlapOSSoftwareRelease.xml
...slapos_panel/SoftwareProduct_addSlapOSSoftwareRelease.xml
+1
-1
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/SoftwareProduct_viewSlapOSSoftwareReleaseFastInputDialog.xml
...twareProduct_viewSlapOSSoftwareReleaseFastInputDialog.xml
+1
-2
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/SoftwareProduct_viewSlapOSSoftwareReleaseFastInputDialog/your_product_import_json.xml
...ftwareReleaseFastInputDialog/your_product_import_json.xml
+54
-9
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/SoftwareProduct_viewSlapOSSoftwareReleaseFastInputDialog/your_title.xml
...t_viewSlapOSSoftwareReleaseFastInputDialog/your_title.xml
+0
-94
No files found.
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/SoftwareProduct_addSlapOSSoftwareRelease.py
View file @
c892c53d
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Message
import
translateString
portal
=
context
.
getPortalObject
()
software_product
=
context
software_product
=
context
software_release
=
software_product
.
newContent
(
# First, search if the release already exists
software_release_variation
=
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"Software Product Release Variation"
,
portal_type
=
"Software Product Release Variation"
,
title
=
title
,
url_string
=
software_release
,
url_string
=
url_string
)
)
if
software_release_variation
is
not
None
:
return
software_release_variation
.
Base_redirect
(
keep_items
=
{
'portal_status_message'
:
translateString
(
'Software Release already exist.'
)
}
)
software_release_variation
=
software_product
.
newContent
(
portal_type
=
"Software Product Release Variation"
,
title
=
software_release
,
url_string
=
software_release
)
if
same_type
(
software_type_list
,
""
):
software_type_list
=
[
software_type_list
]
for
software_type
in
software_type_list
:
# Check if the software type already exist
software_type_variation
=
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"Software Product Type Variation"
,
parent_uid
=
software_product
.
getUid
(),
title
=
software_type
,
)
if
software_type_variation
is
None
:
software_product
.
newContent
(
portal_type
=
"Software Product Type Variation"
,
title
=
software_type
)
return
software_release
.
Base_redirect
(
return
software_release
_variation
.
Base_redirect
(
keep_items
=
{
keep_items
=
{
'portal_status_message'
:
translateString
(
'New Software Release created.'
)
'portal_status_message'
:
translateString
(
'New Software Release created.'
)
})
})
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/SoftwareProduct_addSlapOSSoftwareRelease.xml
View file @
c892c53d
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
title, url_string
, **kw
</string>
</value>
<value>
<string>
software_release, software_type_list
, **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/SoftwareProduct_viewSlapOSSoftwareReleaseFastInputDialog.xml
View file @
c892c53d
...
@@ -90,8 +90,7 @@
...
@@ -90,8 +90,7 @@
<key>
<string>
left
</string>
</key>
<key>
<string>
left
</string>
</key>
<value>
<value>
<list>
<list>
<string>
your_title
</string>
<string>
your_product_import_json
</string>
<string>
your_url_string
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
...
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/SoftwareProduct_viewSlapOSSoftwareReleaseFastInputDialog/your_
url_string
.xml
→
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/SoftwareProduct_viewSlapOSSoftwareReleaseFastInputDialog/your_
product_import_json
.xml
View file @
c892c53d
...
@@ -10,15 +10,17 @@
...
@@ -10,15 +10,17 @@
<key>
<string>
delegated_list
</string>
</key>
<key>
<string>
delegated_list
</string>
</key>
<value>
<value>
<list>
<list>
<string>
input_type
</string>
<string>
gadget_url
</string>
<string>
re
quired
</string>
<string>
re
nderjs_extra
</string>
<string>
title
</string>
<string>
title
</string>
<string>
validator_field_id
</string>
<string>
validator_form_id
</string>
</list>
</list>
</value>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_
url_string
</string>
</value>
<value>
<string>
your_
product_import_json
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
message_values
</string>
</key>
<key>
<string>
message_values
</string>
</key>
...
@@ -58,6 +60,22 @@
...
@@ -58,6 +60,22 @@
<key>
<string>
form_id
</string>
</key>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
<value>
<string></string>
</value>
</item>
</item>
<item>
<key>
<string>
gadget_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
validator_field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
validator_form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</dictionary>
</value>
</value>
</item>
</item>
...
@@ -67,23 +85,50 @@
...
@@ -67,23 +85,50 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
field_id
</string>
</key>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_
string
_field
</string>
</value>
<value>
<string>
my_
gadget
_field
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
form_id
</string>
</key>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
input_type
</string>
</key>
<key>
<string>
gadget_url
</string>
</key>
<value>
<string>
ur
l
</string>
</value>
<value>
<string>
slapos_master_panel_import_product.htm
l
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
required
</string>
</key>
<key>
<string>
renderjs_extra
</string>
</key>
<value>
<int>
1
</int>
</value>
<value>
<list>
<tuple>
<string>
title_key
</string>
<string>
title
</string>
</tuple>
<tuple>
<string>
description_key
</string>
<string>
description
</string>
</tuple>
<tuple>
<string>
software_release_key
</string>
<string>
software_release
</string>
</tuple>
<tuple>
<string>
software_type_key
</string>
<string>
software_type_list
</string>
</tuple>
</list>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
<value>
<string>
Url String
</string>
</value>
<value>
<string>
Software Release
</string>
</value>
</item>
<item>
<key>
<string>
validator_field_id
</string>
</key>
<value>
<string>
my_core_mode_text_content_validator
</string>
</value>
</item>
<item>
<key>
<string>
validator_form_id
</string>
</key>
<value>
<string>
erp5_core/Base_viewFieldLibrary
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</value>
</value>
...
...
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/SoftwareProduct_viewSlapOSSoftwareReleaseFastInputDialog/your_title.xml
deleted
100644 → 0
View file @
f0384a74
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
input_type
</string>
<string>
required
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_title
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
input_type
</string>
</key>
<value>
<string>
url
</string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Title
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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