Commit 58ee604f authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel: fixup parameter edition by a manager

Do not access destination section value when updating instance tree,
as manager can't access customer info
parent af06f46d
Pipeline #36484 failed with stage
in 0 seconds
...@@ -3,18 +3,16 @@ if instance_xml is None: ...@@ -3,18 +3,16 @@ if instance_xml is None:
if software_type is None: if software_type is None:
software_type = context.getSourceReference() software_type = context.getSourceReference()
if state is None: if state is None:
state = {'start_requested': 'started', state = {'start_requested': 'started',
'destroy_requested': 'destroyed', 'destroy_requested': 'destroyed',
'stop_requested': 'stopped'}[context.getSlapState()] 'stop_requested': 'stopped'}[context.getSlapState()]
person = context.getDestinationSectionValue() context.InstanceTree_updateParameterAndRequest(
person.requestSoftwareInstance(
state=state, state=state,
software_release=context.getUrlString(), software_release=context.getUrlString(),
software_title=context.getTitle(), software_title=context.getTitle(),
software_type=software_type, software_type=software_type,
instance_xml=instance_xml, instance_xml=instance_xml,
sla_xml=context.getSlaXml(), sla_xml=context.getSlaXml(),
shared=context.isRootSlave(), shared=context.isRootSlave()
project_reference=context.getFollowUpReference()
) )
...@@ -368,7 +368,45 @@ ...@@ -368,7 +368,45 @@
</tal:block> </tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Edit instance tree as manager</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Home'}">
<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" />
<tal:block tal:define="click_configuration python: {'text': 'Projects'}">
<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" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test Project'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Test instance'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Update Parameter'}">
<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='root[resilient-clone-number]']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Action succeeded.'}">
<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/check_consistency" /> <tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/check_consistency" />
......
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