Commit ed8d611d authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel: disable the software product discovery via the software release json

Many old releases do not have such json, and must still be configurable for now
parent 7047699f
Pipeline #34587 failed with stage
in 0 seconds
from Products.ERP5Type.Message import translateString
# previous args: title, software_release, software_type_list, description="", **kw
portal = context.getPortalObject()
"""
# First, search if the release already exists
software_release_variation = portal.portal_catalog.getResultValue(
portal_type="Software Product Release Variation",
......@@ -32,6 +35,24 @@ for software_type in software_type_list:
portal_type="Software Product Type Variation",
title=software_type
)
"""
# First, search if the release already exists
software_product = portal.portal_catalog.getResultValue(
portal_type="Software Product",
title=title,
follow_up__uid=context.getUid()
)
if software_product is not None:
return software_product.Base_redirect(
keep_items={
'portal_status_message': translateString('Software Product already exist.')
}
)
software_product = portal.software_product_module.newContent(
title=title,
follow_up_value=context
)
software_product.validate()
return software_product.Base_redirect(
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>title, software_release, software_type_list, description="", **kw</string> </value>
<value> <string>title, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -95,6 +95,7 @@
<value>
<list>
<string>your_product_import_json</string>
<string>your_title</string>
</list>
</value>
</item>
......
......@@ -10,6 +10,7 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>enabled</string>
<string>gadget_url</string>
<string>renderjs_extra</string>
<string>title</string>
......@@ -83,6 +84,10 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_gadget_field</string> </value>
......
<?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>required</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_dialog_mode_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from Products.ERP5Type.Message import translateString
# previous args: software_release, software_type_list, **kw
portal = context.getPortalObject()
software_product = context
......@@ -22,6 +23,7 @@ software_release_variation = software_product.newContent(
url_string=software_release
)
"""
if same_type(software_type_list, ""):
software_type_list = [software_type_list]
for software_type in software_type_list:
......@@ -36,7 +38,7 @@ for software_type in software_type_list:
portal_type="Software Product Type Variation",
title=software_type
)
"""
return software_release_variation.Base_redirect(
keep_items={
'portal_status_message': translateString('New Software Release created.')
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>software_release, software_type_list, **kw</string> </value>
<value> <string>software_release, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -95,6 +95,7 @@
<value>
<list>
<string>your_product_import_json</string>
<string>your_software_release</string>
</list>
</value>
</item>
......
......@@ -10,6 +10,7 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>enabled</string>
<string>gadget_url</string>
<string>renderjs_extra</string>
<string>title</string>
......@@ -83,6 +84,10 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_gadget_field</string> </value>
......
<?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_software_release</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>Software Release</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -47,42 +47,13 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Add a software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Product'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<!--tr>
<td>type</td>
<td>//input[@name='field_your_title']</td>
<td>Test Software Product</td>
</tr-->
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg</td>
</tr>
<!--tr>
<td>type</td>
<td>//input[@name='field_your_software_type']</td>
<td>default</td>
</tr-->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Product created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
<tal:block tal:define="software_product_configuration python: {
'title': 'Theia',
'software_release_list': ['https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg'],
'software_type_list': ['default', 'resilient']
}">
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/create_software_product_from_project" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Back to the project page</b></td>
......
......@@ -47,105 +47,18 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Add a software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Product'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
<tal:block tal:define="software_product_configuration python: {
'title': 'Theia',
'software_release_list': ['https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg',
'https://lab.nexedi.com/nexedi/slapos/raw/1.0.290/software/theia/software.cfg',
'https://lab.nexedi.com/nexedi/slapos/raw/1.0.291/software/theia/software.cfg'],
'software_type_list': ['default', 'resilient']
}">
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/create_software_product_from_project" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Product created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/wait_for_activities" />
<tr>
<td colspan="3"><b>Add a software release</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Release'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.290/software/theia/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Release created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Back to the software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Software Product Release Variation: https://lab.nexedi.com/nexedi/slapos/raw/1.0.290/software/theia/software.cfg'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Add a software release</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Release'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.291/software/theia/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Release created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Back to the software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Software Product Release Variation: https://lab.nexedi.com/nexedi/slapos/raw/1.0.291/software/theia/software.cfg'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Back to the project page</b></td>
</tr>
......
......@@ -48,31 +48,13 @@
<tr>
<td colspan="3"><b>Add a software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Product'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Product created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
<tal:block tal:define="software_product_configuration python: {
'title': 'Theia',
'software_release_list': ['https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg'],
'software_type_list': ['default', 'resilient']
}">
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/create_software_product_from_project" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/wait_for_activities" />
......@@ -99,31 +81,13 @@
<tr>
<td colspan="3"><b>Add a software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Product'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Product created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
<tal:block tal:define="software_product_configuration python: {
'title': 'Theia',
'software_release_list': ['https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg'],
'software_type_list': ['default', 'resilient']
}">
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/create_software_product_from_project" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Back to the project page</b></td>
......
......@@ -48,31 +48,13 @@
<tr>
<td colspan="3"><b>Add a software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Product'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
<tal:block tal:define="software_product_configuration python: {
'title': 'Caddy Frontend',
'software_release_list': ['https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/caddy-frontend/software.cfg'],
'software_type_list': ['custom-personal', 'default']
}">
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/create_software_product_from_project" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/caddy-frontend/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Product created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/wait_for_activities" />
......@@ -98,31 +80,14 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Add a software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Product'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/caddy-frontend/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Product created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
<tal:block tal:define="software_product_configuration python: {
'title': 'Caddy Frontend',
'software_release_list': ['https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/caddy-frontend/software.cfg'],
'software_type_list': ['custom-personal', 'default']
}">
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/create_software_product_from_project" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/wait_for_activities" />
<tr>
......
......@@ -48,40 +48,14 @@
<tr>
<td colspan="3"><b>Add a software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Product'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
<tal:block tal:define="software_product_configuration python: {
'title': 'Theia',
'software_release_list': ['https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg'],
'software_type_list': ['default', 'resilient']
}">
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/create_software_product_from_project" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<!--tr>
<td>type</td>
<td>//input[@name='field_your_title']</td>
<td>Test Software Product</td>
</tr-->
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg</td>
</tr>
<!--tr>
<td>type</td>
<td>//input[@name='field_your_software_type']</td>
<td>default</td>
</tr-->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Product created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/wait_for_activities" />
<tr>
......
......@@ -48,30 +48,14 @@
<tr>
<td colspan="3"><b>Add a software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Product'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
<tal:block tal:define="software_product_configuration python: {
'title': 'Caddy Frontend',
'software_release_list': ['https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/caddy-frontend/software.cfg'],
'software_type_list': ['custom-personal', 'default']
}">
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/create_software_product_from_project" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/caddy-frontend/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Product created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/wait_for_activities" />
<tr>
......@@ -83,7 +67,6 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Add a compute node</b></td>
</tr>
......
......@@ -47,71 +47,17 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Add a software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Product'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Product created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
<tal:block tal:define="software_product_configuration python: {
'title': 'Theia',
'software_release_list': ['https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg',
'https://lab.nexedi.com/nexedi/slapos/raw/1.0.290/software/theia/software.cfg'],
'software_type_list': ['default', 'resilient']
}">
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/create_software_product_from_project" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/wait_for_activities" />
<tr>
<td colspan="3"><b>Add a software release</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Release'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.290/software/theia/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Release created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Back to the software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Software Product Release Variation: https://lab.nexedi.com/nexedi/slapos/raw/1.0.290/software/theia/software.cfg'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Back to the project</b></td>
</tr>
......
......@@ -187,4 +187,95 @@
</tr>
</tal:block>
<tal:block metal:define-macro="create_software_product_from_project">
<tr>
<td colspan="3"><b>Add a software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Product'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_title']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_title']</td>
<td tal:content="python: software_product_configuration['title']"></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Product created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:repeat="field_your_software_type python: software_product_configuration['software_type_list']">
<tr>
<td colspan="3"><b>Add a software type</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Type'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_software_type']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_software_type']</td>
<td tal:content="field_your_software_type"></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Type created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
</tal:block>
<tal:block tal:repeat="field_your_software_release python: software_product_configuration['software_release_list']">
<tr>
<td colspan="3"><b>Add a software release</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Software Release'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_software_release']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_software_release']</td>
<td tal:content="field_your_software_release"></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Release created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Back to the software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Software Product Release Variation: %s' % field_your_software_release}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
</tal:block>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
</tal:block>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment