Commit 28dbb885 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: Use Dialog to show parameter editor for Instance Tree

  On normal UI, this allow use this UI for edit parameters also.
parent 40daffdf
......@@ -16,13 +16,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
<string>action_type/object_action</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
<value> <string>object_action</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
......@@ -60,7 +60,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Parameter Editor</string> </value>
<value> <string>Edit Parameters</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
......
<?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>text_content, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InstanceTree_requestParameterChange</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -39,11 +39,11 @@
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
<value> <string>InstanceTree_requestParameterChange</string> </value>
</item>
<item>
<key> <string>action_title</string> </key>
<value> <string></string> </value>
<value> <string>Save</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -83,7 +83,7 @@
<key> <string>bottom</string> </key>
<value>
<list>
<string>my_text_content</string>
<string>your_instance_xml</string>
</list>
</value>
</item>
......@@ -140,7 +140,7 @@
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
<value> <string>form_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_text_content</string> </value>
<value> <string>your_instance_xml</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -114,9 +114,7 @@
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -152,7 +150,9 @@
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value> <string></string> </value>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -195,7 +195,7 @@
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
......@@ -229,7 +229,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>my_text_content</string> </value>
<value> <string>Parameter</string> </value>
</item>
<item>
<key> <string>validator_field_id</string> </key>
......@@ -253,7 +253,11 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/Base_getParameterEditorDict</string> </value>
<value> <string encoding="cdata"><![CDATA[
python: [(\'json_url\', context.getUrlString().split("?")[0] + ".json"), (\'softwaretype\', context.getSourceReference("")), (\'shared\', context.getRootSlave()), (\'parameter_xml\', context.getTextContent(\'<?xml version="1.0" encoding="utf-8" ?><instance></instance>\'))]
]]></string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -102,6 +102,7 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_cloud/InstanceTree_requestDestroy',
'slapos_cloud/InstanceTree_requestStart',
'slapos_cloud/InstanceTree_requestStop',
'slapos_cloud/InstanceTree_requestParameterChange',
'slapos_cloud/Organisation_afterClone',
'slapos_cloud/Organisation_init',
'slapos_cloud/Person_findPartition',
......
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