Commit 093000a8 authored by Douglas's avatar Douglas Committed by Ivan Tyagov

wendelin_configurator: added knowledge pad with wendelin introduction

Please review, @Tyagov.

This knowledge pad includes the WendelinInfo gadget, which is a simple
introduction to Wendelin and pointer to its documentation. The script
BusinessConfiguration_afterWendelinConfiguration now activates the knowledge pad
home page automatically.

This business template was migrated into the new format.

Screenshot: 

![wendelin-information-gadget](/uploads/25369df9342e1eebf973bbffe112bf98/wendelin-information-gadget.png)

/reviewed-on nexedi/wendelin!12
parents 237cc8b3 e36d55ff
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Gadget" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>gadget_type/web_front</string>
<string>gadget_type/erp5_front</string>
<string>gadget_type/web_section</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WendelinInformationGadget</string> </value>
</item>
<item>
<key> <string>multiple_instances_allowed</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Gadget</string> </value>
</item>
<item>
<key> <string>render_type</string> </key>
<value> <string>asynchronous</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Wendelin Information</string> </value>
</item>
<item>
<key> <string>view_form_id</string> </key>
<value> <string>ERP5Site_viewWendelinInformationGadget</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html>
<body>
<h3>What is it?</h3>
<p>The Wendelin project started in the beginning of 2015 with Nexedi as
consortium leader in charge of managing the development of a big data
solution "made in France". Wendelin is based on open source software
components and combines a number of widely used libraries for data
analysis, modification and visualization.</p>
<h3>What is included?</h3>
<p>Included in this instance is:</p>
<ul>
<li>
Famous scientific libraries, like: NumPy, Pandas and scikit-learn
</li>
<li>
Integration with Jupyter frontend running the ERP5 kernel with access to
the previously mentioned libraries to enable rapid prototyping and data
analysis. Check your instance's parameters for the Jupyter url.
</li>
<li>
Many modules and tools for big data processing: data acquisition unit,
data aggregation unit, data analysis, data array, data ingestion, data
license, data operation, data product, data release, data set, data stream,
data supply and sensor modules.
</li>
</ul>
<h3>Developing Wendelin</h3>
If you want to customize Wendelin, check the
<a href="${portal_url}/portal_skins/erp5_data_notebook/manage_main">
"erp5_data_notebook" folder at portal_skins.</a>
To access the kernel you should see the
<a href="${portal_url}portal_components/extension.erp5.JupyterCompile">
JupyterCompile extension at portal_components. </a>
<h3>Documentation</h3>
To access the Wendelin official documentation
<a href="http://www.wendelin.io/documentation/">click here.</a>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list>
<string>information</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_viewWendelinInformationGadget</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>ERP5Site_viewWendelinInfoGadget</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>gadget_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Wendelin Information</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebPage_getWendelinInformationVariableDict</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
web_page_module/wendelin_information_gadget.html
\ No newline at end of file
portal_gadgets/WendelinInformationGadget
web_page_module/wendelin_information_gadget.html
\ No newline at end of file
......@@ -6,12 +6,33 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>55.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_configurator_wendelin</string> </value>
......
"""
This script will be called to apply the customization.
"""
# Activate the knowledge pads on portal home to enable later the Wendelin
# Information gadget.
#
configuration = self.portal.portal_preferences.getActivePreference()
configuration.setPreferredHtmlStyleAccessTab(True)
......@@ -48,15 +48,6 @@
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>""" \n
This script will be called to apply the customization. \n
"""\n
\n
# Ivan: we simply do nothing for now\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>alter_preferences=True</string> </value>
......
configuration_save = context.restrictedTraverse(configuration_save_url)
context.setGlobalConfigurationAttr(
categories_spreadsheet_configuration_save_relative_url=configuration_save.getRelativeUrl())
configuration_save.addConfigurationItem("Categories Spreadsheet Configurator Item",
configuration_spreadsheet_file=configuration_spreadsheet)
# l10n
user_preferred_language = kw.get('user_preferred_language')
if user_preferred_language not in ('en', None):
# english is default lang anyway
bt5_name = 'erp5_l10n_%s' %user_preferred_language
configuration_save.addConfigurationItem("Standard BT5 Configurator Item",
title=bt5_name,
bt5_id=bt5_name,
update_catalog=False,
install_dependency=True)
......@@ -48,27 +48,6 @@
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n
\n
context.setGlobalConfigurationAttr(\n
categories_spreadsheet_configuration_save_relative_url=configuration_save.getRelativeUrl())\n
\n
configuration_save.addConfigurationItem("Categories Spreadsheet Configurator Item",\n
configuration_spreadsheet_file=configuration_spreadsheet)\n
# l10n\n
user_preferred_language = kw.get(\'user_preferred_language\')\n
if user_preferred_language not in (\'en\', None):\n
# english is default lang anyway\n
bt5_name = \'erp5_l10n_%s\' %user_preferred_language\n
configuration_save.addConfigurationItem("Standard BT5 Configurator Item",\n
title=bt5_name, \n
bt5_id=bt5_name,\n
update_catalog=False,\n
install_dependency=True)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>configuration_save_url, configuration_spreadsheet, **kw</string> </value>
......
configuration_save = context.restrictedTraverse(configuration_save_url)
company_email = kw['default_email_text']
group = kw['group']
organisation_configurator_item = configuration_save.addConfigurationItem(
"Organisation Configurator Item", **kw)
# store globally preferred group
context.setGlobalConfigurationAttr(group_id=group)
# store globally company's email
context.setGlobalConfigurationAttr(company_email=company_email)
# store globally company's configurator item which we can use later to reconfigure
context.setGlobalConfigurationAttr(organisation_configurator_item=organisation_configurator_item.getRelativeUrl())
# price currency contains all currency info like iso code& precision ';' separated
currency_info_list = kw['price_currency_list']
for currency_info in currency_info_list:
currency_reference, currency_base_unit_quantity, currency_title = \
currency_info.split(';')
configuration_save.addConfigurationItem(
"Currency Configurator Item",
reference = currency_reference,
base_unit_quantity = currency_base_unit_quantity,
title = currency_title,)
context.setGlobalConfigurationAttr(default_currency=currency_reference)
......@@ -48,41 +48,6 @@
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
configuration_save = context.restrictedTraverse(configuration_save_url)\n
company_email = kw[\'default_email_text\']\n
group = kw[\'group\']\n
\n
organisation_configurator_item = configuration_save.addConfigurationItem(\n
"Organisation Configurator Item", **kw)\n
\n
# store globally preferred group\n
context.setGlobalConfigurationAttr(group_id=group)\n
\n
# store globally company\'s email\n
context.setGlobalConfigurationAttr(company_email=company_email)\n
\n
# store globally company\'s configurator item which we can use later to reconfigure\n
context.setGlobalConfigurationAttr(organisation_configurator_item=organisation_configurator_item.getRelativeUrl())\n
\n
# price currency contains all currency info like iso code& precision \';\' separated\n
currency_info_list = kw[\'price_currency_list\']\n
for currency_info in currency_info_list:\n
currency_reference, currency_base_unit_quantity, currency_title = \\\n
currency_info.split(\';\')\n
configuration_save.addConfigurationItem(\n
"Currency Configurator Item",\n
reference = currency_reference,\n
base_unit_quantity = currency_base_unit_quantity,\n
title = currency_title,)\n
context.setGlobalConfigurationAttr(default_currency=currency_reference)\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>configuration_save_url=None, **kw</string> </value>
......
l = context.BusinessConfiguration_getCategoriesSpreadsheetConfiguratorItem().getCategoryTitleItemList(category_id)
l.sort()
return l
......@@ -48,13 +48,6 @@
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>l = context.BusinessConfiguration_getCategoriesSpreadsheetConfiguratorItem().getCategoryTitleItemList(category_id)\n
l.sort()\n
return l\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>category_id</string> </value>
......
configuration_save = context.restrictedTraverse(configuration_save_url)
bt5_installation_list = ('erp5_full_text_mroonga_catalog',
'erp5_base',
'erp5_jquery_ui',
'erp5_ingestion_mysql_innodb_catalog',
'erp5_ingestion',
'erp5_stock_cache',
'erp5_web',
'erp5_dms',
'erp5_pdm',
'erp5_knowledge_pad',
'erp5_trade',
'erp5_project',
'erp5_simulation',
'erp5_ods_style',
'erp5_odt_style',
'erp5_rss_style',
'erp5_trade',
# to develop faster
'erp5_ace_editor',
'erp5_forge',
'erp5_development_wizard',
'erp5_dhtml_style',
# install later UI bt5s as broken now
#'erp5_wendelin_renderjs_ui',
'erp5_hal_json_style',
'erp5_web_renderjs_ui',
'erp5_wendelin',
'erp5_wendelin_examples',
'erp5_wendelin_data',
'erp5_wendelin_development'
)
bt5_update_catalog = ('erp5_ingestion_mysql_innodb_catalog',)
for name in bt5_installation_list:
configuration_save.addConfigurationItem("Standard BT5 Configurator Item",
title=name, bt5_id=name,
update_catalog=(name in bt5_update_catalog),
install_dependency=True,
)
......@@ -48,54 +48,6 @@
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n
\n
bt5_installation_list = (\'erp5_full_text_mroonga_catalog\',\n
\'erp5_base\',\n
\'erp5_jquery_ui\',\n
\'erp5_ingestion_mysql_innodb_catalog\',\n
\'erp5_ingestion\',\n
\'erp5_stock_cache\',\n
\'erp5_knowledge_pad\', # it must be before erp5_web\n
\'erp5_web\',\n
\'erp5_dms\',\n
\'erp5_pdm\',\n
\'erp5_trade\',\n
\'erp5_project\',\n
\'erp5_simulation\',\n
\'erp5_ods_style\',\n
\'erp5_odt_style\',\n
\'erp5_rss_style\',\n
\'erp5_trade\',\n
# jupiter notebook integration\n
\'erp5_data_notebook\',\n
# to develop faster\n
\'erp5_ace_editor\',\n
\'erp5_forge\',\n
\'erp5_development_wizard\',\n
\'erp5_dhtml_style\',\n
# install later UI bt5s as broken now\n
#\'erp5_wendelin_renderjs_ui\',\n
\'erp5_hal_json_style\',\n
\'erp5_web_renderjs_ui\',\n
\'erp5_wendelin\',\n
\'erp5_wendelin_examples\',\n
\'erp5_wendelin_data\',\n
\'erp5_wendelin_development\'\n
)\n
\n
bt5_update_catalog = (\'erp5_ingestion_mysql_innodb_catalog\',)\n
\n
for name in bt5_installation_list:\n
configuration_save.addConfigurationItem("Standard BT5 Configurator Item",\n
title=name, bt5_id=name,\n
update_catalog=(name in bt5_update_catalog),\n
install_dependency=True,\n
)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>configuration_save_url=None, **kw</string> </value>
......
knowledge_box = knowledge_pad.newContent(
portal_type='Knowledge Box',
specialise='portal_gadgets/wendelin_info_gadget',
activate_kw=activate_kw)
knowledge_box.visible()
<?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>knowledge_pad, **activate_kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_createDefaultKnowledgeBox</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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