Commit f9197397 authored by Romain Courteaud's avatar Romain Courteaud

slapos_jio: drop gadget_erp5_page_slap_instance_tree_view

parent 973104a5
<!DOCTYPE html>
<html>
<!--
data-i18n=The Status
data-i18n=Status
data-i18n=Data updated.
data-i18n=Title
data-i18n=Reference
data-i18n=Type
data-i18n=Enabled
data-i18n=Disabled
data-i18n=Auto Upgrade
data-i18n=Ask Confirmation before Upgrade
data-i18n=Never Upgrade
data-i18n=State
data-i18n=Modification Date
data-i18n=Parameter
data-i18n=Value
data-i18n=Short Title
data-i18n=Description
data-i18n=Software Type
data-i18n=Software Release
data-i18n=Configuration Parameter
data-i18n=The name of a document in ERP5
data-i18n=Current Project
data-i18n=Current Organisation
data-i18n=Monitoring Status
data-i18n=Monitoring
data-i18n=Upgrade
data-i18n=Connection Parameters
data-i18n=Associated Tickets
data-i18n=Instances
data-i18n=Instance Tree:
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Site List</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_page_slap_instance_tree_view.js" type="text/javascript"></script>
</head>
<body>
<form class="save_form ui-body-c" novalidate>
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"></button>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view"
data-gadget-sandbox="public">
</div>
</form>
</body>
</html>
request = context.REQUEST
edit_kw = {}
if monitor_scope is not None and monitor_scope != context.getMonitorScope():
edit_kw["monitor_scope"] = monitor_scope
if upgrade_scope is not None and upgrade_scope != context.getUpgradeScope():
edit_kw["upgrade_scope"] = upgrade_scope
if short_title != context.getShortTitle():
edit_kw["short_title"] = short_title
if description != context.getDescription():
edit_kw["description"] = description
if edit_kw.keys():
context.edit(**edit_kw)
def isSoftwareTypeChanged(software_type):
base_type = ['RootSoftwareInstance', 'default']
current_software_type = context.getSourceReference()
if software_type in base_type and current_software_type in base_type:
return False
else:
return current_software_type != software_type
if 'software_type' in request and isSoftwareTypeChanged(request['software_type']):
raise ValueError("Change Software Type is forbidden.")
if context.getTextContent() != text_content:
context.InstanceTree_requestPerson(instance_xml=text_content)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<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, short_title, description, monitor_scope=None, upgrade_scope=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InstanceTree_edit</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
title = context.getTitle()
result = []
found = False
for instance in context.getSuccessorValueList():
if (instance.getTitle() == title) and (instance.getSlapState() != 'destroy_requested'):
found = True
break
if found:
result = instance.SoftwareInstance_getConnectionParameterList(
relative_url=context.getRelativeUrl(), raw=raw)
return result
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<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>raw=False, **kwargs</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InstanceTree_getConnectionParameterList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from Products.ERP5Type.Document import newTempBase
import json
return_list = []
try:
connection_dict = context.getConnectionXmlAsDict()
except Exception:
return return_list
if connection_dict is None:
return return_list
if connection_dict.keys() == ["_"]:
json_connection_dict = json.loads(connection_dict["_"])
if isinstance(json_connection_dict, dict):
connection_dict = json_connection_dict
portal = context.getPortalObject()
if relative_url == None:
relative_url = context.getRelativeUrl()
for k in sorted(connection_dict):
if raw:
d = {"connection_key": k, "connection_value": connection_dict[k]}
else:
d = newTempBase(portal, relative_url)
d.edit(connection_key=k, connection_value=connection_dict[k])
return_list.append(d)
return return_list
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<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>relative_url=None, raw=False, **kwargs</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SoftwareInstance_getConnectionParameterList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -47,8 +47,6 @@ web_page_module/rjs_gadget_erp5_page_slap_facebook_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_facebook_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_google_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_google_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_instance_tree_view_html
web_page_module/rjs_gadget_erp5_page_slap_instance_tree_view_js
web_page_module/rjs_gadget_erp5_page_slap_access_denied_view_html
web_page_module/rjs_gadget_erp5_page_slap_access_denied_view_js
web_page_module/rjs_gadget_erp5_page_slap_intent_html
......
......@@ -44,8 +44,6 @@ web_page_module/rjs_gadget_erp5_page_slap_facebook_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_facebook_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_google_login_view_html
web_page_module/rjs_gadget_erp5_page_slap_google_login_view_js
web_page_module/rjs_gadget_erp5_page_slap_instance_tree_view_html
web_page_module/rjs_gadget_erp5_page_slap_instance_tree_view_js
web_page_module/rjs_gadget_erp5_page_slap_intent_html
web_page_module/rjs_gadget_erp5_page_slap_intent_js
web_page_module/rjs_gadget_erp5_page_slap_intent_zh_html
......
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