From fdd75ba5619055e1dac76b1f1e5d8fa36eada98a Mon Sep 17 00:00:00 2001 From: Matevz Golob Date: Thu, 26 Sep 2019 13:07:13 +0100 Subject: [PATCH] Merged all commits from tutorial branch. Added business templates for Wendelin tutorial tests. --- .../wendelin_configurator_zuite.xml | 26 + .../testWendelinConfigurator.xml | 58 + .../testWendelinConfigurator.zpt | 75 + .../test.erp5.testWendelinConfiguration.py | 44 + .../test.erp5.testWendelinConfiguration.xml | 123 ++ .../bt/dependency_list | 2 + .../bt/description | 1 + .../bt/template_format_version | 1 + ..._keep_last_workflow_history_only_path_list | 2 + .../bt/template_keep_workflow_path_list | 2 + .../bt/template_path_list | 2 + .../bt/template_test_id_list | 1 + .../bt/test_dependency_list | 1 + bt5/erp5_wendelin_configuration_test/bt/title | 1 + .../bt/version | 1 + bt5/erp5_wendelin_tutorial/bt/dependency_list | 1 + .../portal_tests/wendelin_tutorial_zuite.xml | 26 + .../testWendelinTutorial.xml | 58 + .../testWendelinTutorial.zpt | 650 ++++++ ...delin-Tutorial.Installation.Usage.KVM.html | 1955 +++++++++++++++++ ...ndelin-Tutorial.Installation.Usage.KVM.xml | 320 +++ ...rial.Installation.Usage.Linux.machine.html | 1911 ++++++++++++++++ ...orial.Installation.Usage.Linux.machine.xml | 320 +++ ...Tutorial.Installation.Usage.Webrunner.html | 1908 ++++++++++++++++ ...-Tutorial.Installation.Usage.Webrunner.xml | 320 +++ .../test.erp5.testWendelinTutorial.py | 45 + .../test.erp5.testWendelinTutorial.xml | 123 ++ .../bt/dependency_list | 2 + .../bt/description | 1 + .../bt/template_format_version | 1 + ..._keep_last_workflow_history_only_path_list | 5 + .../bt/template_keep_workflow_path_list | 5 + .../bt/template_path_list | 5 + .../bt/template_test_id_list | 1 + .../bt/test_dependency_list | 4 + bt5/erp5_wendelin_tutorial_test/bt/title | 1 + bt5/erp5_wendelin_tutorial_test/bt/version | 1 + 37 files changed, 8003 insertions(+) create mode 100644 bt5/erp5_wendelin_configuration_test/PathTemplateItem/portal_tests/wendelin_configurator_zuite.xml create mode 100644 bt5/erp5_wendelin_configuration_test/PathTemplateItem/portal_tests/wendelin_configurator_zuite/testWendelinConfigurator.xml create mode 100644 bt5/erp5_wendelin_configuration_test/PathTemplateItem/portal_tests/wendelin_configurator_zuite/testWendelinConfigurator.zpt create mode 100644 bt5/erp5_wendelin_configuration_test/TestTemplateItem/portal_components/test.erp5.testWendelinConfiguration.py create mode 100644 bt5/erp5_wendelin_configuration_test/TestTemplateItem/portal_components/test.erp5.testWendelinConfiguration.xml create mode 100644 bt5/erp5_wendelin_configuration_test/bt/dependency_list create mode 100644 bt5/erp5_wendelin_configuration_test/bt/description create mode 100644 bt5/erp5_wendelin_configuration_test/bt/template_format_version create mode 100644 bt5/erp5_wendelin_configuration_test/bt/template_keep_last_workflow_history_only_path_list create mode 100644 bt5/erp5_wendelin_configuration_test/bt/template_keep_workflow_path_list create mode 100644 bt5/erp5_wendelin_configuration_test/bt/template_path_list create mode 100644 bt5/erp5_wendelin_configuration_test/bt/template_test_id_list create mode 100644 bt5/erp5_wendelin_configuration_test/bt/test_dependency_list create mode 100644 bt5/erp5_wendelin_configuration_test/bt/title create mode 100644 bt5/erp5_wendelin_configuration_test/bt/version create mode 100644 bt5/erp5_wendelin_tutorial/bt/dependency_list create mode 100644 bt5/erp5_wendelin_tutorial_test/PathTemplateItem/portal_tests/wendelin_tutorial_zuite.xml create mode 100644 bt5/erp5_wendelin_tutorial_test/PathTemplateItem/portal_tests/wendelin_tutorial_zuite/testWendelinTutorial.xml create mode 100644 bt5/erp5_wendelin_tutorial_test/PathTemplateItem/portal_tests/wendelin_tutorial_zuite/testWendelinTutorial.zpt create mode 100644 bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.KVM.html create mode 100644 bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.KVM.xml create mode 100644 bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Linux.machine.html create mode 100644 bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Linux.machine.xml create mode 100644 bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Webrunner.html create mode 100644 bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Webrunner.xml create mode 100644 bt5/erp5_wendelin_tutorial_test/TestTemplateItem/portal_components/test.erp5.testWendelinTutorial.py create mode 100644 bt5/erp5_wendelin_tutorial_test/TestTemplateItem/portal_components/test.erp5.testWendelinTutorial.xml create mode 100644 bt5/erp5_wendelin_tutorial_test/bt/dependency_list create mode 100644 bt5/erp5_wendelin_tutorial_test/bt/description create mode 100644 bt5/erp5_wendelin_tutorial_test/bt/template_format_version create mode 100644 bt5/erp5_wendelin_tutorial_test/bt/template_keep_last_workflow_history_only_path_list create mode 100644 bt5/erp5_wendelin_tutorial_test/bt/template_keep_workflow_path_list create mode 100644 bt5/erp5_wendelin_tutorial_test/bt/template_path_list create mode 100644 bt5/erp5_wendelin_tutorial_test/bt/template_test_id_list create mode 100644 bt5/erp5_wendelin_tutorial_test/bt/test_dependency_list create mode 100644 bt5/erp5_wendelin_tutorial_test/bt/title create mode 100644 bt5/erp5_wendelin_tutorial_test/bt/version diff --git a/bt5/erp5_wendelin_configuration_test/PathTemplateItem/portal_tests/wendelin_configurator_zuite.xml b/bt5/erp5_wendelin_configuration_test/PathTemplateItem/portal_tests/wendelin_configurator_zuite.xml new file mode 100644 index 0000000..507852c --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/PathTemplateItem/portal_tests/wendelin_configurator_zuite.xml @@ -0,0 +1,26 @@ + + + + + + + + + + _objects + + + + + + id + wendelin_configurator_zuite + + + title + Testing Wendelin Configurator + + + + + diff --git a/bt5/erp5_wendelin_configuration_test/PathTemplateItem/portal_tests/wendelin_configurator_zuite/testWendelinConfigurator.xml b/bt5/erp5_wendelin_configuration_test/PathTemplateItem/portal_tests/wendelin_configurator_zuite/testWendelinConfigurator.xml new file mode 100644 index 0000000..d79d432 --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/PathTemplateItem/portal_tests/wendelin_configurator_zuite/testWendelinConfigurator.xml @@ -0,0 +1,58 @@ + + + + + + + + + + _bind_names + + + + + + + + + + _asgns + + + + name_subpath + traverse_subpath + + + + + + + + + + + content_type + text/html + + + expand + 0 + + + id + testWendelinConfigurator + + + output_encoding + utf-8 + + + title + + + + + + diff --git a/bt5/erp5_wendelin_configuration_test/PathTemplateItem/portal_tests/wendelin_configurator_zuite/testWendelinConfigurator.zpt b/bt5/erp5_wendelin_configuration_test/PathTemplateItem/portal_tests/wendelin_configurator_zuite/testWendelinConfigurator.zpt new file mode 100644 index 0000000..9345a1a --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/PathTemplateItem/portal_tests/wendelin_configurator_zuite/testWendelinConfigurator.zpt @@ -0,0 +1,75 @@ + + + +Test Wendelin Configurator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wendelin Configurator Zuite
setTimeout1800000
openAndWait${base_url}
verifyTextPresentWelcome to ERP5
openAndWait${base_url}/portal_configurator
verifyTextPresentERP5 Configuration
verifyTextPresentWelcome to Configurator
clickAndWait//*[@id="dialog-submit-button" and @value="business_configuration_module/wendelin_configuration"]
clickAndWait//*[@type="Submit" and @value="Setup data notebook module"]
click//*[@type="Submit" and @value="Install"]
pause1200000
open${base_url}
verifyTextPresentWelcome to ERP5
+ \ No newline at end of file diff --git a/bt5/erp5_wendelin_configuration_test/TestTemplateItem/portal_components/test.erp5.testWendelinConfiguration.py b/bt5/erp5_wendelin_configuration_test/TestTemplateItem/portal_components/test.erp5.testWendelinConfiguration.py new file mode 100644 index 0000000..788b7b5 --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/TestTemplateItem/portal_components/test.erp5.testWendelinConfiguration.py @@ -0,0 +1,44 @@ +############################################################################## +# +# Copyright (c) 2002-2019 Nexedi SA and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +############################################################################## + +import unittest +from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import ERP5TypeFunctionalTestCase + +class TestWendelinConfigurator(ERP5TypeFunctionalTestCase): + foreground = 0 + run_only = "wendelin_configurator_zuite" + + def getBusinessTemplateList(self): + return ( + 'erp5_wendelin_configurator_test', + 'erp5_wendelin_configurator', + ) + +def test_suite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TestWendelinConfigurator)) + return suite diff --git a/bt5/erp5_wendelin_configuration_test/TestTemplateItem/portal_components/test.erp5.testWendelinConfiguration.xml b/bt5/erp5_wendelin_configuration_test/TestTemplateItem/portal_components/test.erp5.testWendelinConfiguration.xml new file mode 100644 index 0000000..6bb11af --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/TestTemplateItem/portal_components/test.erp5.testWendelinConfiguration.xml @@ -0,0 +1,123 @@ + + + + + + + + + + _recorded_property_dict + + AAAAAAAAAAI= + + + + default_reference + testWendelinConfiguration + + + description + + + + + + id + test.erp5.testWendelinConfiguration + + + portal_type + Test Component + + + sid + + + + + + text_content_error_message + + + + + + text_content_warning_message + + + + + + version + erp5 + + + workflow_history + + AAAAAAAAAAM= + + + + + + + + + + + + + data + + + + + + + + + + + + + + + data + + + + component_validation_workflow + + AAAAAAAAAAQ= + + + + + + + + + + + + + + + + + + + action + validate + + + validation_state + validated + + + + + + + diff --git a/bt5/erp5_wendelin_configuration_test/bt/dependency_list b/bt5/erp5_wendelin_configuration_test/bt/dependency_list new file mode 100644 index 0000000..8840a5f --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/bt/dependency_list @@ -0,0 +1,2 @@ +erp5_ui_test_core +erp5_wendelin_configurator \ No newline at end of file diff --git a/bt5/erp5_wendelin_configuration_test/bt/description b/bt5/erp5_wendelin_configuration_test/bt/description new file mode 100644 index 0000000..6740441 --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/bt/description @@ -0,0 +1 @@ +Includes zelenium test for Wendelin configuration. \ No newline at end of file diff --git a/bt5/erp5_wendelin_configuration_test/bt/template_format_version b/bt5/erp5_wendelin_configuration_test/bt/template_format_version new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/bt/template_format_version @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/bt5/erp5_wendelin_configuration_test/bt/template_keep_last_workflow_history_only_path_list b/bt5/erp5_wendelin_configuration_test/bt/template_keep_last_workflow_history_only_path_list new file mode 100644 index 0000000..dcf7875 --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/bt/template_keep_last_workflow_history_only_path_list @@ -0,0 +1,2 @@ +portal_tests/wendelin_configurator_zuite +portal_tests/wendelin_configurator_zuite/** \ No newline at end of file diff --git a/bt5/erp5_wendelin_configuration_test/bt/template_keep_workflow_path_list b/bt5/erp5_wendelin_configuration_test/bt/template_keep_workflow_path_list new file mode 100644 index 0000000..dcf7875 --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/bt/template_keep_workflow_path_list @@ -0,0 +1,2 @@ +portal_tests/wendelin_configurator_zuite +portal_tests/wendelin_configurator_zuite/** \ No newline at end of file diff --git a/bt5/erp5_wendelin_configuration_test/bt/template_path_list b/bt5/erp5_wendelin_configuration_test/bt/template_path_list new file mode 100644 index 0000000..dcf7875 --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/bt/template_path_list @@ -0,0 +1,2 @@ +portal_tests/wendelin_configurator_zuite +portal_tests/wendelin_configurator_zuite/** \ No newline at end of file diff --git a/bt5/erp5_wendelin_configuration_test/bt/template_test_id_list b/bt5/erp5_wendelin_configuration_test/bt/template_test_id_list new file mode 100644 index 0000000..564730d --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/bt/template_test_id_list @@ -0,0 +1 @@ +test.erp5.testWendelinConfiguration \ No newline at end of file diff --git a/bt5/erp5_wendelin_configuration_test/bt/test_dependency_list b/bt5/erp5_wendelin_configuration_test/bt/test_dependency_list new file mode 100644 index 0000000..bff77e3 --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/bt/test_dependency_list @@ -0,0 +1 @@ +erp5_full_text_mroonga_catalog \ No newline at end of file diff --git a/bt5/erp5_wendelin_configuration_test/bt/title b/bt5/erp5_wendelin_configuration_test/bt/title new file mode 100644 index 0000000..53835a8 --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/bt/title @@ -0,0 +1 @@ +erp5_wendelin_configuration_test \ No newline at end of file diff --git a/bt5/erp5_wendelin_configuration_test/bt/version b/bt5/erp5_wendelin_configuration_test/bt/version new file mode 100644 index 0000000..0f30166 --- /dev/null +++ b/bt5/erp5_wendelin_configuration_test/bt/version @@ -0,0 +1 @@ +001 \ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial/bt/dependency_list b/bt5/erp5_wendelin_tutorial/bt/dependency_list new file mode 100644 index 0000000..8853475 --- /dev/null +++ b/bt5/erp5_wendelin_tutorial/bt/dependency_list @@ -0,0 +1 @@ +erp5_web \ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/portal_tests/wendelin_tutorial_zuite.xml b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/portal_tests/wendelin_tutorial_zuite.xml new file mode 100644 index 0000000..b4b2d65 --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/portal_tests/wendelin_tutorial_zuite.xml @@ -0,0 +1,26 @@ + + + + + + + + + + _objects + + + + + + id + wendelin_tutorial_zuite + + + title + Testing Wendelin Tutorial + + + + + diff --git a/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/portal_tests/wendelin_tutorial_zuite/testWendelinTutorial.xml b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/portal_tests/wendelin_tutorial_zuite/testWendelinTutorial.xml new file mode 100644 index 0000000..25d4689 --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/portal_tests/wendelin_tutorial_zuite/testWendelinTutorial.xml @@ -0,0 +1,58 @@ + + + + + + + + + + _bind_names + + + + + + + + + + _asgns + + + + name_subpath + traverse_subpath + + + + + + + + + + + content_type + text/html + + + expand + 0 + + + id + testWendelinTutorial + + + output_encoding + utf-8 + + + title + + + + + + diff --git a/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/portal_tests/wendelin_tutorial_zuite/testWendelinTutorial.zpt b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/portal_tests/wendelin_tutorial_zuite/testWendelinTutorial.zpt new file mode 100644 index 0000000..5951714 --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/portal_tests/wendelin_tutorial_zuite/testWendelinTutorial.zpt @@ -0,0 +1,650 @@ + + + + Test Wendelin Tutorial + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wendelin Tutorial Zuite
open${base_url}
verifyTextPresentWelcome to ERP5
open${base_url}/portal_ingestion_policies
verifyElementPresent//*[@name="form_id" and @value="IngestionPolicyTool_view"]
clickAndWait//*[@id="context_bar"]/span[4]/span[1]/a[3]
verifyElementPresent//*[@name="dialog_id" and @value="IngestionPolicyTool_viewAddIngestionPolicyActionDialog"]
typefield_your_titlePydata
typefield_your_referencepydata
clickAndWait//button[@name="Base_callDialogMethod:method" and @id="dialog_submit_button"]
pause3000
open${base_url}
selectAndWaitselect_modulelabel=Web Sites
verifyTextPresentWeb Sites
verifyElementPresent//*[@name="form_id" and @value="WebSiteModule_viewWebSiteList"]
type//*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/thead/tr[2]/th[2]/inputrenderjs_runner
clickAndWait//*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/thead/tr[2]/th[1]/input
verifyElementPresent//*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/a
clickAndWait//*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/a
verifyElementPresent//*[@name="form_id" and @value="WebSite_view"]
verifyTextPresentRenderJS Runner
open${base_url}/web_site_module/renderjs_runner/
pause15000
verifyTextPresentWorklist
open${base_url}/web_site_module/renderjs_runner?ignore_layout:int=1&editable;_mode:int=1&selection;_name=web_site_module_view_web_site_list_selection
clickAndWait//button[@type="submit" and @title="Clone"]
verifyTextPresentCreated Clone Web Site.
verifyElementPresent//*[@name="form_id" and @value="WebSite_view"]
pause3000
typefield_my_idpydata_runner
typefield_my_titlePydata Runner +
clickAndWait//button[@name="Base_edit:method" and @title="Save"]
selectAndWaitselect_actionlabel=Publish
verifyElementPresent//*[@name="dialog_id" and @value="Base_viewWorkflowActionDialog"]
clickAndWait//*[@id="dialog_submit_button"]
verifyTextPresentStatus changed.
verifyTextPresentPublished
clickAndWait//div[@class="actions"]/ul/li[3]/a
verifyTextPresentFront Page Gadget
typefield_my_configuration_frontpage_gadget_urlpydata
clickAndWait//*[@id="master"]/div/div[1]/button
verifyTextPresentData updated.
open${base_url}/
selectAndWaitselect_modulelabel=Web Pages
verifyElementPresent//*[@name="form_id" and @value="WebPageModule_viewWebPageList"]
type//*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/thead/tr[2]/th[2]/inputgadget_erp5_page_worklist.html
clickAndWait//*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/thead/tr[2]/th[1]/input
verifyElementPresent//*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/a
clickAndWait//*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/a
verifyElementPresent//*[@name="form_id" and @value="WebPage_view"]
verifyTextPresentGadget ERP5 Worklist
clickAndWait//button[@name="Base_createCloneDocument:method"]
verifyTextPresentCreated Clone Web Page.
typefield_my_titleGadget ERP5 PyData
typefield_my_referencegadget_erp5_page_pydata.html
clickAndWait//button[@name="Base_edit:method" and @title="Save"]
verifyTextPresentData updated.
selectAndWaitselect_actionlabel=Publish Document Alive
clickAndWait//*[@id="dialog_submit_button"]
verifyTextPresentStatus changed.
verifyTextPresentPublished Alive
clickAndWait//div[@class="actions"]/ul/li[2]/a
pause3000
type//*[@data-gadget-editable="field_my_text_content"]/div
clickAndWait//button[@name="Base_edit:method" and @title="Save"]
verifyTextPresentData updated.
open${base_url}
selectAndWaitselect_modulelabel=Web Pages
type//*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/thead/tr[2]/th[2]/inputgadget_erp5_page_worklist.js
clickAndWait//*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/thead/tr[2]/th[1]/input
verifyElementPresent//*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/a
clickAndWait//*[@id="master"]/fieldset/div/div/div/div[2]/div[2]/table/tbody/tr/td[2]/a
verifyElementPresent//*[@name="form_id" and @value="WebPage_view"]
verifyTextPresentGadget ERP5 Worklist JS
clickAndWait//button[@name="Base_createCloneDocument:method"]
verifyTextPresentCreated Clone Web Script.
typefield_my_titleGadget ERP5 PyData JS
typefield_my_referencegadget_erp5_page_pydata.js
clickAndWait//*[@id="master"]/div/div[1]/button
verifyTextPresentData updated.
selectAndWaitselect_actionlabel=Publish Document Alive
clickAndWait//*[@id="dialog_submit_button"]
verifyTextPresentStatus changed.
verifyTextPresentPublished Alive
clickAndWait//*[@id="master"]/div/div[1]/ul/li[2]/a
pause3000
type//*[@data-gadget-editable="field_my_text_content"]/div/*global window, rJS, console, RSVP, Dygraph */ +/*jslint indent: 2, maxerr: 3 */ +(function (rJS) { + "use strict"; + + var ARRAY_VALUE_LENGTH = 8, + OPTION_DICT = { + start_date: 0, + time_factor: 1000, + resolution: 1, + xlabel: 'x', + ylabel: 'y', + key_list: ["Channel 1", "Date"], + label_list: ["Date", "Channel 1"], + series_dict: { + "Channel 1": { + axis : "y", + color: "#00884B", + pointSize: 1, + visible : true, + connectSeparatedPoints: true + } + }, + axis_dict: { + y: { + position : "left", + axisLabelColor: "grey", + axisLabelWidth : 40, + pixelsPerLabel : 30 + }, + x: { + drawAxis : true, + axisLabelWidth : 60, + axisLabelColor: "grey", + pixelsPerLabel : 30 + } + }, + connectSeparatedPoints: true + }; + + function generateInitialGraphData(label_list) { + var i, + data = [[]]; + for (i = 0; i < label_list.length; i += 1) { + data[0].push(0); + } + return data; + } + + function convertDateColToDate(gadget, array) { + var label_list = gadget.property_dict.option_dict.label_list, + time_factor = gadget.property_dict.option_dict.time_factor, + time_offset = gadget.property_dict.option_dict.time_offset || 0, + i, + k; + + for (k = 0; k < label_list.length; k += 1) { + if (label_list[k] === "Date") { + for (i = 0; i < array.length; i += 1) { + array[i] = [i, array[i]]; + } + } + } + return array; + } + + rJS(window) + + .ready(function (gadget) { + gadget.property_dict = {}; + return gadget.getElement() + .push(function (element) { + gadget.property_dict.element = element; + gadget.property_dict.option_dict = OPTION_DICT; + }); + }) + + .declareAcquiredMethod("jio_getAttachment", "jio_getAttachment") + + // render gadget + .declareMethod('render', function () { + var gadget = this, + interaction_model = Dygraph.Interaction.defaultModel, + option_dict = {}, + url; + + url = "${base_url}/web_site_module/pydata_runner/hateoas/data_array_module/wendelin-Tutorial.Installation.Usage.Test.Spectrum"; + + return new RSVP.Queue() + .push(function () { + return gadget.jio_getAttachment("erp5", url, { + start : 0, + format : "array_buffer" + }); + }) + .push(function (buffer) { + var array_length, + length, + array, + array_width = 1; + + array_length = Math.floor( + buffer.byteLength / array_width / ARRAY_VALUE_LENGTH + ); + length = buffer.byteLength - (buffer.byteLength % ARRAY_VALUE_LENGTH); + if (length === buffer.byteLength) { + array = new Float64Array(buffer); + } else { + array = new Float64Array(buffer, 0, length); + } + return nj.ndarray(array, [array_length, array_width]); + }) + .push(function (result) { + var i, + data = [], + ndarray = result, + label_list = gadget.property_dict.option_dict.label_list, + key_list = gadget.property_dict.option_dict.key_list; + + for (i = 1; i < label_list.length; i += 1) { + data = data.concat( + nj.unpack( + ndarray.pick( + null, + key_list.indexOf(label_list[i]) + ) + ) + ); + } + + data = convertDateColToDate(gadget, data); + + gadget.property_dict.data = data; + return gadget + }); + }) + + .declareService(function () { + var gadget = this; + + return gadget.property_dict.graph = new Dygraph( + gadget.property_dict.element, + gadget.property_dict.data, + gadget.property_dict.option_dict + ); + }); + +}(rJS));
clickAndWait//button[@name="Base_edit:method" and @title="Save"]
assertTextPresentData updated.
open${base_url}/web_site_module/pydata_runner/
pause15000
verifyElementPresent//*[@data-gadget-url="https://softinst116522.host.vifib.net/erp5/web_site_module/pydata_runner/gadget_jio.html"]
+ + \ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.KVM.html b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.KVM.html new file mode 100644 index 0000000..9f69a6b --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.KVM.html @@ -0,0 +1,1955 @@ +
+

Overview

+ + +
+ +
+

1. Getting Wendelin on your KVM

+
+ +
+

Request a KVM

+ + + +
+ +
+
+ +
+

Request a KVM

+ + + +
+ +
+
+ +
+

Request a KVM

+ + + +
+ +
+
+ +
+

Access your KVM from terminal

+ + +
+ +
+

Authenticate and install Wendelin

+ + +
+ +
+

Monitor Installaton process

+ + + +
+
    +
  • Be patient. Installation can take up to several hours to complete.
  • +
+
+
+ +
+

Check Software Installaton Status

+ + +
+ +
+

Socat Bind

+ + +
+ +
+

Request frontend

+ + + +
+ +
+

Login

+ + +
+ +
+

Configure Site

+ + + +
+
    +
  • Your ERP5 instance is now ready, but it has only very generic core library. This core can be specialized through different business templates for different purposes.
  • +
  • This can be done manually, installing individual business templates that provide your ERP5 instance with utilities that you need.
  • +
  • That can be done in My Favorites > Manage Business Templates
  • +
  • But Wendelin uses a lot of different business templates and that would be a lot of work, so configurator is provided that makes that work for you and installs just the business templates that are important for Wendelin.
  • +
+
+
+ +
+

Install Configuration

+ + + +
+
    +
  • IF there is no Wendelin Configurator, you have to install it: +
      +
    • Go to My Favourites > Manage Business Templates .
    • +
    • Click on Import/Export button (blue and red arrows).
    • +
    • Select Exchange > Install Business Templates from Repositories .
    • +
    • Check box before erp5_wendelin_configurator business template and click Install Business Templates from Repositories.
    • +
    +
  • +
  • Configuration will take some minutes.
  • +
+
+
+ +
+

Install Configuration

+ + + +
+ +
+

Wait

+ + + +
+ +
+

Main Interface

+ + + +
+
    +
  • The start screen shows a list of modules (data-types) directly accessible.
  • +
  • You can also access them through Modules selection tab at the top of the screen.
  • +
  • Probably you noticed that after configuration there are a lot more of them.
  • +
  • Modules can be contain anything from Persons, Organizations to Data Streams.
  • +
  • Modules prefixed with Portal are not displayed (e.g. portal ingestion policies)
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

2. Simulate Sensor and ingest data via Fluentd

+
+ +
+

Create Ingestion Policy

+ + + +
+
    +
  • Currently fluentd and Wendelin are setup to receive streams of data
  • +
  • A data stream is a file, created by ingestion policy, to which data is continually appended
  • +
+
+ + + + + + + + + + + + + + + + + + +
+ +
+

Fast Input

+ + + +
+
    +
  • The ingestion policy includes default scripts to be called on incoming data.
  • +
  • If you want to modify data handling, you could now write your own script.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Wendelin in Production

+ + + +
+ +
+
+ +
+

Wendelin in Production

+ + +
+ +
+

Basic FluentD

+ + +
+ +
+

Complex FluentD

+ + +
+ +
+

Record Audio

+ + + +
+ +
+

Webrunner using fluentD

+ + +
+ +
+

Upload to Monitor

+ + +
+ +
+

Forward File to fluentD

+ + + +
+
    +
  • We are now creating a configuration file to pass to fluentd
  • +
  • The file contains all parameters for fluentD regarding data source and destination
  • +
  • Normally this is set upfront, but for the tutorial we hardcode
  • +
+
+
+ +
+

FluentD Configuration File (Gist)

+ +
+    
+            <source>
+            @type bin
+            format none
+            path /srv/slapgrid/slappart9/srv/runner/PUT_YOUR_WAV_HERE/!!YOURNAME!!*.wav
+            pos_file /srv/slapgrid/slappart9/srv/runner/!!YOURNAMEGOESHERE!!.pos
+            enable_watch_timer false
+            read_from_head true
+            tag pydata
+            </source>
+            <match pydata>
+            @type wendelin
+            @id wendelin_out
+            streamtool_uri
+            http://!!URL_TO_YOUR_ZOPE!!/erp5/portal_ingestion_policies/pydata
+            user zope
+            password insecure
+            buffer_type memory
+            flush_interval 1s
+            disable_retry_limit true
+            </match>
+          
+        
+ + + +
+ +
+
+ +
+

Save and send from Terminal

+ + + +
+
    +
  • Notice that Fluentd is running until you interrupt it and waiting for new input.
  • +
  • In our case, we had just a small .vaw file, but we could also have continuous stream of data from the sensor and fluentd would be continuously appending it to Data Stream.
  • +
+
+
+ +
+

Check created Data Stream

+ + +
+ +
+

3. Work with Ingested Data

+
+ +
+

Out-of-Core

+ + +
+ +
+

Enable Data Notebook

+ + +
+ +
+

Head to Jupyter

+ + + +
+
    +
  • The Python 2 Kernel is the default Jupyter Kernel
  • +
  • Using Python 2 will disregard Wendelin and Wendelin.Core, so it's basic Jupyter.
  • +
  • Using ERP5 Kernel will use Wendelin.core in the background.
  • +
  • To make good use of it, all code written should be Out-of-core "compatible"
  • +
  • For example you should not just load a large file into memory (see below).
  • +
+
+
+ +
+

Learn ERP5 Kernel

+ + + +
+
    +
  • Note that your ERP5_URL in this case should be your internal url
  • +
  • You can retrieve it by running erp5-show -s in your KVM
  • +
  • Note, outside of the tutorial we would set the external IPv6 adress of ZOPE
  • +
+
+
+ +
+

Getting Started

+ + + +
+
    +
  • This is always the first step when you start a new Notebook with ERP5 Kernel.
  • +
  • It makes sure that you are connected to ERP5/Wendelin instance any you can work with objects on it.
  • +
  • It also creates Data Notebook object on your ERP5/Wendelin instance.
  • +
  • You can go to Data Notebook Module and see that your Data Notebook object is now saved there.
  • +
+
+
+ +
+

Accessing Objects

+ + + +
+
    +
  • Accessing data works the same ways throughout [IPv6]:30002/erp5/[module_name]/[id].
  • +
  • All modules you see on the Wendelin/ERP5 start page can be accessed like this.
  • +
  • Once you have an object you can manipulate it.
  • +
  • Note that accessing a file by internal id (1) is only one way.
  • +
  • The standard way would be using the reference of the respective object, which will also allow to user portal_catalog to query.
  • +
+
+
+ +
+

Import libraries

+ + + +
 
+
+ +
+

Accessing Data Itself

+ + + +
+
    +
  • It's important to understand that manipulations outside of Wendelin.Core need to be Big Data "compatible"
  • +
  • Internally Wendelin.Core will run all manipulations "context-aware"
  • +
  • An alternative way to work would be to create your scripts inside Wendelin/ERP5 and call them from Juypter
  • +
  • Scripts/Manipulations are stored in Data Operations Module
  • +
+
+
+ +
+

Compute Fourier

+ + + +
+
    +
  • Note the way to call methods from Wendelin/ERP5 (Base_renderAsHtml )
  • +
  • Wendelin/ERP5 has a system of method acquistion. Every module can come with its own module specific methods and method names are always context specific ([object_name]_[method_name] ). Base methods on the other hand are core methods of Wendelin/ERP5 and applicable to more than one object.
  • +
+
+
+ +
+

Display Fourier

+ + + +
+ +
+

Save Image

+ + + +
 
+
+ +
+

Create BigFile Reader

+ + + +
+ +
+

Rerun using Big File Reader

+ + + +
+
    +
  • We are now showing how to step by step convert our code to being Out-of-Core compatible
  • +
  • This will only be possible for code we write ourselves
  • +
  • Whenever we have to rely on 3rd party libraries, there is no guarantee that data will be handled in the correct way. The only option to be truly Out-of-Core is to either make sure the 3rd party methods used are compatible and fixing them accordingly/committing back or to reimplement a 3rd party library completely.
  • +
+
+
+ +
+

Redraw from Wendelin

+ + + +
+ +
+

Verify Images are Stored

+ + + +
+ +
+

Verify Data Arrays are Stored

+ + + +
+ +
+

4. Visualize, Display computed data

+
+ +
+

Running Web Sites from Wendelin

+ + + +
+
    +
  • One of the modules in erp5 is Web Site Module.
  • +
  • We will use it to create simple Web Site for presentation of our result.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

WebSite Module

+ + + +
+
    +
  • Front end components are written with two frameworks, jIO and renderJS
  • +
  • jIO (Gitlab) is used to access documents across different storages
  • +
  • Storages include: Wendelin, ERP5, Dropbox, webDav, AWS, ...
  • +
  • jIO includes querying, offline support, synchronization
  • +
  • renderJS (Gitlab) allows to build apps from reusable components
  • +
  • Both jIO/renderJS are asynchronous using promises
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Renderjs Runner

+ + + +
+
    +
  • Apps from gadgets are built as a tree structure, the application launcher is the top gadget
  • +
  • All other gadgets are child gadgets of this one
  • +
  • RenderJS allows to publish/aquire methods from other gadget to keep functionality encapsulated
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Renderjs Web App

+ + + +
+ +
+

Clone Website

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Rename Website

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Publish Website

+ + + +
+
    +
  • Every object in ERP5 has a state (For example draft, published,...).
  • +
  • Workflows are used to change the state of objects.
  • +
  • A workflow in this case is to publish a webpage, which means changing its status from Embedded to Published.
  • +
  • Workflows (among other properties) can be security restricted. For example, everybody can see Web Site in published state, but only its creator can see it while it is still in draft state.
  • +
  • This concept applies to all documents in ERP5.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Layout Properties

+ + + +
+
    +
  • One advantage working with an aync promise-chain based framework like renderJS is the ability to capture errors
  • +
  • It is possible to capture errors on client side, send report to ERP5 (stack-trace, browser) and not fail the app
  • +
  • Much more fine-grainded control, we currently just dump to screen/console
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Web Page Module

+ + + +
+
    +
  • The web page module includes html, js and css files used to build the frontend UI
  • +
  • The usual way of working with static files is to clone a file, rename its reference and publish it alive (still editable)
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Clone Worklist gadgets

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Pydata Gadget HTML

+ + + +
+
    +
  • This is a default gadget setup with some HTML.
  • +
  • Gadgets should be self containable so they always include all dependencies
  • +
  • RenderJS is using a custom version of RSVP for promises (we can cancel promises)
  • +
  • The global gadget includes promisified event binding (single, infinite event listener)
  • +
  • We are using RenderJS and jIO javascript libraries.
  • +
  • More info: + +
  • +
  • This is a default gadget setup with some HTML.
  • +
  • Gadgets should be self containable so they always include all dependencies
  • +
  • RenderJS is using a custom version of RSVP for promises (we can cancel promises)
  • +
  • The global gadget includes promisified event binding (single, infinite event listener)
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Pydata Gadget JS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Save, refresh web app

+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Update Pydata Gadget HTML

+ + + +
+
    +
  • Took from existing project, HTML was created to fit a responsive grid of graphs
  • +
  • Added JS library for multidimensional arrays: NDArray
  • +
  • Added JS libarary for displaying graphs: Dygraph
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Pydata Gadget JS (1)

+ + + +
+
    +
  • First we only defined options for the Dygraph plugin
  • +
  • In production system these are either set as defaults or stored along with respective data
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Pydata Gadget JS (2)

+ +
+
    +
  • Add methods outside of the promise chain
  • +
  • Simplified (removed actual creation of date objects)
  • +
+
+
+ +
+

Pydata Gadget JS (3)

+ + + +
+
    +
  • "ready" triggered once gadget is loaded
  • +
  • define gadget specific parameters
  • +
  • "render" called by parent gadget or automatically
  • +
  • we hardcode url parameter, by default it would be URL based
  • +
+
+
+ +
+

Pydata Gadget JS (4)

+ +
+
    +
  • Orchestrated process starting with a cancellable promise queue
  • +
  • First step requesting the full file (NOT OUT-OF-CORE compliant - we load the whole file)
  • +
  • Return file converted into ndarray
  • +
  • Convert data into graph compatible format, store onto gadget
  • +
  • "declareService" triggered once UI is built
  • +
  • Graph will be rendered there.
  • +
+
+
+ +
+

Refresh Web Application

+ + + + + + + + + + + + + + + + + + + + +
+ +
+

Summary: What did we do?

+ + +
diff --git a/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.KVM.xml b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.KVM.xml new file mode 100644 index 0000000..c995b6b --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.KVM.xml @@ -0,0 +1,320 @@ + + + + + + + + + + _Access_contents_information_Permission + + + Assignee + Assignor + Manager + Owner + + + + + _Add_portal_content_Permission + + + Assignee + Assignor + Manager + Owner + + + + + _Change_local_roles_Permission + + + Assignor + Manager + + + + + _Modify_portal_content_Permission + + + Assignee + Assignor + Manager + Owner + + + + + _View_Permission + + + Assignee + Assignor + Manager + Owner + + + + + content_md5 + + + + + + content_type + text/html + + + default_reference + wendelin-Tutorial.Installation.Usage.KVM + + + description + Tutorial showing how to install Wendelin on KVM, how to ingest data, how to manipulate data and how to present data. + + + id + wendelin-Tutorial.Installation.Usage.KVM + + + language + en + + + portal_type + Test Page + + + short_title + Installing and Using Wendelin on KVM + + + title + Wendelin Tutorial - Installing and Using Wendelin on KVM + + + version + 001 + + + workflow_history + + AAAAAAAAAAI= + + + + + + + + + + + + + data + + + + document_publication_workflow + + AAAAAAAAAAM= + + + + edit_workflow + + AAAAAAAAAAQ= + + + + processing_status_workflow + + AAAAAAAAAAU= + + + + + + + + + + + + + + + + + + + action + + + + + + actor + zope + + + comment + + + + error_message + + + + time + + + + + + + + + + + 1567439410.65 + UTC + + + + + + + validation_state + draft + + + + + + + + + + + + + + + + + action + edit + + + actor + zope + + + comment + + + + + + error_message + + + + serial + 978.22261.56480.36130 + + + state + current + + + time + + + + + + + + + + + 1569491652.32 + UTC + + + + + + + + + + + + + + + + + + + + + action + + + + + + actor + zope + + + comment + + + + error_message + + + + external_processing_state + empty + + + serial + 0.0.0.0 + + + time + + + + + + + + + + + 1567439410.64 + UTC + + + + + + + + + + + diff --git a/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Linux.machine.html b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Linux.machine.html new file mode 100644 index 0000000..b22237f --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Linux.machine.html @@ -0,0 +1,1911 @@ +
+

Overview

+ + +
+ +
+

1. Getting Wendelin on your Linux machine

+
+ +
+

Requirements

+ + +
+ +
+

Install Wendelin from terminal

+ + +
+ +
+

Monitor Installaton process

+ + + +
+
    +
  • Be patient. Installation can take up to several hours to complete.
  • +
+
+
+ +
+

Check Software Installaton Status

+ + +
+ +
+

Socat Bind

+ + + +
+
    +
  • If this does not work try:
  • +
  • apt-get install socat
  • +
  • apt-get install net-tools
  • +
  • and try bash wendelin-standalone-bind.sh again.
  • +
+
+
+ +
+

Login

+ + + +
+
    +
  • For example, if internal IPv4 is 10.0.2.15:
  • +
  • http://10.0.2.15:20001
  • +
  • Here we are using internal IPv4, because wendelin services are on this machine.
  • +
  • To use services from oudside this machine, we would use external IPv6 of the machine.
  • +
+
+
+ +
+

Configure Site

+ + + +
+
    +
  • Your ERP5 instance is now ready, but it has only very generic core library. This core can be specialized through different business templates for different purposes.
  • +
  • This can be done manually, installing individual business templates that provide your ERP5 instance with utilities that you need.
  • +
  • That can be done in My Favorites > Manage Business Templates
  • +
  • But Wendelin uses a lot of different business templates and that would be a lot of work, so configurator is provided that makes that work for you and installs just the business templates that are important for Wendelin.
  • +
+
+
+ +
+

Install Configuration

+ + + +
+
    +
  • IF there is no Wendelin Configurator, you have to install it: +
      +
    • Go to My Favourites > Manage Business Templates .
    • +
    • Click on Import/Export button (blue and red arrows).
    • +
    • Select Exchange > Install Business Templates from Repositories .
    • +
    • Check box before erp5_wendelin_configurator business template and click Install Business Templates from Repositories.
    • +
    +
  • +
  • Configuration will take some minutes.
  • +
+
+
+ +
+

Install Configuration

+ + +
+ +
+

Wait

+ + +
+ +
+

Main Interface

+ + + +
+
    +
  • The start screen shows a list of modules (data-types) directly accessible.
  • +
  • You can also access them through Modules selection tab at the top of the screen.
  • +
  • Probably you noticed that after configuration there are a lot more of them.
  • +
  • Modules can be contain anything from Persons, Organizations to Data Streams.
  • +
  • Modules prefixed with Portal are not displayed (e.g. portal ingestion policies)
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

2. Simulate Sensor and ingest data via Fluentd

+
+ +
+

Create Ingestion Policy

+ + + +
+
    +
  • Currently fluentd and Wendelin are setup to receive streams of data
  • +
  • A data stream is a file, created by ingestion policy, to which data is continually appended
  • +
+
+ + + + + + + + + + + + + + + + + + +
+ +
+

Fast Input

+ + + +
+
    +
  • The ingestion policy includes default scripts to be called on incoming data.
  • +
  • If you want to modify data handling, you could now write your own script.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Wendelin in Production

+ + + +
+ +
+
+ +
+

Wendelin in Production

+ + +
+ +
+

Basic FluentD

+ + +
+ +
+

Complex FluentD

+ + +
+ +
+

Record Audio

+ + +
+ +
+

Install fluentD

+ + + +
+
    +
  • Fluentd is written in ruby languages, so you need to install ruby interpreter.
  • +
  • In addition you need ruby-dev package to build native extension gems like fluentd.
  • +
+
+
+ +
+

Install plugins

+ + + +
+
    +
  • In Fluentd, data input/output is managed by plugins. Each plugin knows how to communicate with external endpoint.
  • +
  • In our case external endpoint of output is Wendelin, so we will use wendelin output plugin, and input is binary file, so we will use bin input plugin.
  • +
  • Plugins that come with fluentd are located in ruby gems directory, but for our custom plugins we make new folder /etc/fluent/plugin.
  • +
+
+
+ +
+

Create configuration for fluentD

+ + + +
+
    +
  • We are now creating a configuration file to pass to fluentd
  • +
  • The file contains all parameters for fluentD regarding data source and destination
  • +
  • Normally configuration is set upfront in the /etc/fluent/fluent.conf. If you open it you can see that it can be quite complex.
  • +
  • But for tutorial we will hardcode a simple example of configuration file.
  • +
+
+
+ +
+

FluentD Configuration File (Gist)

+ +
+<source>
+    @type bin
+    format none
+    path /!!path/to/audio file!!/sample.wav
+    pos_file /!!path/to/audio file!!/sample.pos
+    enable_watch_timer false
+    read_from_head true
+    tag pydata
+</source>
+<match pydata>
+    @type wendelin
+    @id wendelin_out
+    streamtool_uri http://!!internal IPv4!!:20001/erp5/portal_ingestion_policies/pydata
+    user zope
+    password !!your erp5 password!!
+    buffer_type memory
+    flush_interval 1s
+    disable_retry_limit true
+</match>
+
+ + + +
+
    +
  • Fluentd configuration file has two parts: Input or source part and output part.
  • +
  • Source part contains path to file that you wish to upload, path to pos file which is used to track position while sending the data, and a tag, which is used to match source to the output
  • +
  • Output part is a match tag. It must match a tag given to the data in the source part. It contains uri to external endpoint (which is in out case ingestion policy, that we created in Wendelin), and username and password to authenticate your Wendelin
  • +
  • Both parts also have type, which is yust a plugin, that it should use
  • +
  • Note that in tutorial we can use internal IPv4, since we have Wendelin and Fluentd on the same machine. To send data to Wendelin on another machine, we would have to use external IP address.
  • +
  • For more information on writing Fluentd configuration files check out: Fluentd configuration documentation.
  • +
+
+
+ +
+

Save and send from Terminal

+ + + +
+
    +
  • Notice that Fluentd is running and waiting for new input, until you interrupt it.
  • +
  • When you see that data is on your wendelin instance, you can interrupt it with keyboard interrupt Ctrl+C
  • +
  • In our case, we had just a small .vaw file, but we could also have continuous stream of data from the sensor and fluentd would be continuously appending it to Data Stream.
  • +
+
+
+ +
+

Check created Data Stream

+ + +
+ +
+

3. Work with Ingested Data

+
+ +
+

Out-of-Core

+ + +
+ +
+

Enable Data Notebook

+ + +
+ +
+

Head to Jupyter

+ + + +
+
    +
  • The Python 2 Kernel is the default Jupyter Kernel
  • +
  • Using Python 2 will disregard Wendelin and Wendelin.Core, so it's basic Jupyter.
  • +
  • Using ERP5 Kernel will use Wendelin.core in the background.
  • +
  • To make good use of it, all code written should be Out-of-core "compatible"
  • +
  • For example you should not just load a large file into memory (see below).
  • +
+
+
+ +
+

Learn ERP5 Kernel

+ + + +
+
    +
  • Passing login/password will authenticate Juypter with Wendelin/ERP5
  • +
  • The reference you set will store your notebook in the Date Notebook Module
  • +
+
+
+ +
+

Getting Started

+ + + +
+
    +
  • This is always the first step when you start a new Notebook with ERP5 Kernel.
  • +
  • It makes sure that you are connected to ERP5/Wendelin instance any you can work with objects on it.
  • +
  • It also creates Data Notebook object on your ERP5/Wendelin instance.
  • +
  • You can go to Data Notebook Module and see that your Data Notebook object is now saved there.
  • +
+
+
+ +
+

Accessing Objects

+ + + +
+
    +
  • Accessing data works the same ways throughout [IPv6]:30002/erp5/[module_name]/[id].
  • +
  • All modules you see on the Wendelin/ERP5 start page can be accessed like this.
  • +
  • Once you have an object you can manipulate it.
  • +
  • Note that accessing a file by internal id (1) is only one way.
  • +
  • The standard way would be using the reference of the respective object, which will also allow to user portal_catalog to query.
  • +
+
+
+ +
+

Import libraries

+ + +
+ +
+

Accessing Data Itself

+ + + +
+
    +
  • It's important to understand that manipulations outside of Wendelin.Core need to be Big Data "compatible"
  • +
  • Internally Wendelin.Core will run all manipulations "context-aware"
  • +
  • An alternative way to work would be to create your scripts inside Wendelin/ERP5 and call them from Juypter
  • +
  • Scripts/Manipulations are stored in Data Operations Module
  • +
+
+
+ +
+

Compute Fourier

+ + + +
+
    +
  • Note the way to call methods from Wendelin/ERP5 (Base_renderAsHtml )
  • +
  • Wendelin/ERP5 has a system of method acquistion. Every module can come with its own module specific methods and method names are always context specific ([object_name]_[method_name] ). Base methods on the other hand are core methods of Wendelin/ERP5 and applicable to more than one object.
  • +
+
+
+ +
+

Display Fourier

+ + +
+ +
+

Save Image

+ + +
+ +
+

Create BigFile Reader

+ + +
+ +
+

Rerun using Big File Reader

+ + + +
+
    +
  • We are now showing how to step by step convert our code to being Out-of-Core compatible
  • +
  • This will only be possible for code we write ourselves
  • +
  • Whenever we have to rely on 3rd party libraries, there is no guarantee that data will be handled in the correct way. The only option to be truly Out-of-Core is to either make sure the 3rd party methods used are compatible and fixing them accordingly/committing back or to reimplement a 3rd party library completely.
  • +
+
+
+ +
+

Check the graphs

+ + +
+ +
+

Redraw from Wendelin

+ + +
+ +
+

Verify Images are Stored

+ + +
+ +
+

Verify Data Arrays are Stored

+ + +
+ +
+

4. Visualize, Display computed data

+
+ +
+

Running Web Sites from Wendelin

+ + + +
+
    +
  • One of the modules in erp5 is Web Site Module.
  • +
  • We will use it to create simple Web Site for presentation of our result.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

WebSite Module

+ + + +
+
    +
  • Front end components are written with two frameworks, jIO and renderJS
  • +
  • jIO (Gitlab) is used to access documents across different storages
  • +
  • Storages include: Wendelin, ERP5, Dropbox, webDav, AWS, ...
  • +
  • jIO includes querying, offline support, synchronization
  • +
  • renderJS (Gitlab) allows to build apps from reusable components
  • +
  • Both jIO/renderJS are asynchronous using promises
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Renderjs Runner

+ + + +
+
    +
  • Apps from gadgets are built as a tree structure, the application launcher is the top gadget
  • +
  • All other gadgets are child gadgets of this one
  • +
  • RenderJS allows to publish/aquire methods from other gadget to keep functionality encapsulated
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Renderjs Web App

+ + +
+ +
+

Clone Website

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Rename Website

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Publish Website

+ + + +
+
    +
  • Every object in ERP5 has a state (For example draft, published,...).
  • +
  • Workflows are used to change the state of objects.
  • +
  • A workflow in this case is to publish a webpage, which means changing its status from Embedded to Published.
  • +
  • Workflows (among other properties) can be security restricted. For example, everybody can see Web Site in published state, but only its creator can see it while it is still in draft state.
  • +
  • This concept applies to all documents in ERP5.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Layout Properties

+ + + +
+
    +
  • One advantage working with an aync promise-chain based framework like renderJS is the ability to capture errors
  • +
  • It is possible to capture errors on client side, send report to ERP5 (stack-trace, browser) and not fail the app
  • +
  • Much more fine-grainded control, we currently just dump to screen/console
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Web Page Module

+ + + +
+
    +
  • The web page module includes html, js and css files used to build the frontend UI
  • +
  • The usual way of working with static files is to clone a file, rename its reference and publish it alive (still editable)
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Clone Worklist gadgets

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Pydata Gadget HTML

+ + + +
+
    +
  • This is a default gadget setup with some HTML.
  • +
  • Gadgets should be self containable so they always include all dependencies
  • +
  • RenderJS is using a custom version of RSVP for promises (we can cancel promises)
  • +
  • The global gadget includes promisified event binding (single, infinite event listener)
  • +
  • We are using RenderJS and jIO javascript libraries.
  • +
  • RenderJS Website
  • +
  • jIO Website
  • +
  • This is a default gadget setup with some HTML.
  • +
  • Gadgets should be self containable so they always include all dependencies
  • +
  • RenderJS is using a custom version of RSVP for promises (we can cancel promises)
  • +
  • The global gadget includes promisified event binding (single, infinite event listener)
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Pydata Gadget JS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Save, refresh web app

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Update Pydata Gadget HTML

+ + + +
+
    +
  • Took from existing project, HTML was created to fit a responsive grid of graphs
  • +
  • Added JS library for multidimensional arrays: NDArray
  • +
  • Added JS libarary for displaying graphs: Dygraph
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Pydata Gadget JS (1)

+ + + +
+
    +
  • First we only defined options for the Dygraph plugin
  • +
  • In production system these are either set as defaults or stored along with respective data
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Pydata Gadget JS (2)

+ +
+
    +
  • Add methods outside of the promise chain
  • +
  • Simplified (removed actual creation of date objects)
  • +
+
+
+ +
+

Pydata Gadget JS (3)

+ + + +
+
    +
  • "ready" triggered once gadget is loaded
  • +
  • define gadget specific parameters
  • +
  • "render" called by parent gadget or automatically
  • +
  • we hardcode url parameter, by default it would be URL based
  • +
+
+
+ +
+

Pydata Gadget JS (4)

+ +
+
    +
  • Orchestrated process starting with a cancellable promise queue
  • +
  • First step requesting the full file (NOT OUT-OF-CORE compliant - we load the whole file)
  • +
  • Return file converted into ndarray
  • +
  • Convert data into graph compatible format, store onto gadget
  • +
  • "declareService" triggered once UI is built
  • +
  • Graph will be rendered there.
  • +
+
+
+ +
+

Refresh Web Application

+ + + + + + + + + + + + + + + + + + + +
+ +
+

Summary: What did we do?

+ + +
\ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Linux.machine.xml b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Linux.machine.xml new file mode 100644 index 0000000..65ab89e --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Linux.machine.xml @@ -0,0 +1,320 @@ + + + + + + + + + + _Access_contents_information_Permission + + + Assignee + Assignor + Manager + Owner + + + + + _Add_portal_content_Permission + + + Assignee + Assignor + Manager + Owner + + + + + _Change_local_roles_Permission + + + Assignor + Manager + + + + + _Modify_portal_content_Permission + + + Assignee + Assignor + Manager + Owner + + + + + _View_Permission + + + Assignee + Assignor + Manager + Owner + + + + + content_md5 + + + + + + content_type + text/html + + + default_reference + wendelin-Tutorial.Installation.Usage.Linux.machine + + + description + Tutorial showing how to install Wendelin on Linux Machine, how to ingest data, how to manipulate data and how to present data. + + + id + wendelin-Tutorial.Installation.Usage.Linux.machine + + + language + en + + + portal_type + Test Page + + + short_title + Installing and Using Wendelin on Linux machine + + + title + Wendelin Tutorial - Installing and Using Wendelin on Linux machine + + + version + 001 + + + workflow_history + + AAAAAAAAAAI= + + + + + + + + + + + + + data + + + + document_publication_workflow + + AAAAAAAAAAM= + + + + edit_workflow + + AAAAAAAAAAQ= + + + + processing_status_workflow + + AAAAAAAAAAU= + + + + + + + + + + + + + + + + + + + action + + + + + + actor + zope + + + comment + + + + error_message + + + + time + + + + + + + + + + + 1567439709.35 + UTC + + + + + + + validation_state + draft + + + + + + + + + + + + + + + + + action + edit + + + actor + zope + + + comment + + + + + + error_message + + + + serial + 978.22261.56480.36130 + + + state + current + + + time + + + + + + + + + + + 1569491540.57 + UTC + + + + + + + + + + + + + + + + + + + + + action + + + + + + actor + zope + + + comment + + + + error_message + + + + external_processing_state + empty + + + serial + 0.0.0.0 + + + time + + + + + + + + + + + 1567439709.35 + UTC + + + + + + + + + + + diff --git a/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Webrunner.html b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Webrunner.html new file mode 100644 index 0000000..124641e --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Webrunner.html @@ -0,0 +1,1908 @@ +
+

Overview

+ + +
+ +
+

1. Getting Wendelin on a Webrunner

+
+ +
+

Request a Webrunner

+ + + +
+ +
+

Request a Webrunner

+ + + +
+ +
+

Request a Webrunner

+ + + +
+ +
+

Install Wendelin

+ + + +
+ +
+

Install Wendelin

+ + +
+ +
+

Connection Information

+ + + +
+ +
+

Request frontend

+ + + +
+ +
+

Login

+ + +
+ +
+

Configure Site

+ + + +
+
    +
  • Your ERP5 instance is now ready, but it has only very generic core library. This core can be specialized through different business templates for different purposes.
  • +
  • This can be done manually, installing individual business templates that provide your ERP5 instance with utilities that you need.
  • +
  • That can be done in My Favorites > Manage Business Templates
  • +
  • But Wendelin uses a lot of different business templates and that would be a lot of work, so configurator is provided that makes that work for you and installs just the business templates that are important for Wendelin.
  • +
+
+
+ +
+

Install Configuration

+ + + +
+
    +
  • IF there is no Wendelin Configurator, you have to install it: +
      +
    • Go to My Favourites > Manage Business Templates .
    • +
    • Click on Import/Export button (blue and red arrows).
    • +
    • Select Exchange > Install Business Templates from Repositories .
    • +
    • Check box before erp5_wendelin_configurator business template and click Install Business Templates from Repositories.
    • +
    +
  • +
+
+
+ +
+

Install Configuration

+ + + +
+ +
+

Wait

+ + + +
+ +
+

Main Interface

+ + + +
+
    +
  • The start screen shows a list of modules (data-types) directly accessible.
  • +
  • You can also access them through Modules selection tab at the top of the screen.
  • +
  • Probably you noticed that after configuration there are a lot more of them.
  • +
  • Modules can be contain anything from Persons, Organizations to Data Streams.
  • +
  • Modules prefixed with Portal are not displayed (e.g. portal ingestion policies)
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

2. Simulate Sensor and ingest data via Fluentd

+
+ +
+

Create Ingestion Policy

+ + + +
+
    +
  • Currently fluentd and Wendelin are setup to receive streams of data
  • +
  • A data stream is a file, created by ingestion policy, to which data is continually appended
  • +
+
+ + + + + + + + + + + + + + + + + + +
+ +
+

Fast Input

+ + + +
+
    +
  • The ingestion policy includes default scripts to be called on incoming data.
  • +
  • If you want to modify data handling, you could now write your own script.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Wendelin in Production

+ + + +
+ +
+

Wendelin in Production

+ + +
+ +
+

Basic FluentD

+ + +
+ +
+

Complex FluentD

+ + +
+ +
+

Record Audio

+ + + +
+ +
+

Webrunner using fluentD

+ + +
+ +
+

Upload to Monitor

+ + +
+ +
+

Forward File to fluentD

+ + + +
+
    +
  • We are now creating a configuration file to pass to fluentd
  • +
  • The file contains all parameters for fluentD regarding data source and destination
  • +
  • Normally this is set upfront, but for the tutorial we hardcode
  • +
+
+
+ +
+

FluentD Configuration File (Gist)

+ +
+    <source>
+          @type bin
+          format none
+          path /srv/slapgrid/slappart9/srv/runner/PUT_YOUR_WAV_HERE/!!YOURNAME!!*.wav
+          pos_file /srv/slapgrid/slappart9/srv/runner/!!YOURNAMEGOESHERE!!.pos
+          enable_watch_timer false
+          read_from_head true
+          tag pydata
+          </source>
+          <match pydata>
+          @type wendelin
+          @id wendelin_out
+          streamtool_uri http://!!URL_TO_YOUR_ZOPE!!/erp5/portal_ingestion_policies/pydata
+          user zope
+          password insecure
+          buffer_type memory
+          flush_interval 1s
+          disable_retry_limit true
+          </match>
+        
+ + + +
+
    +
  • Fluentd configuration file has two parts. Input part, represented by the source tag and output part represented by the match tag.
  • +
  • Each part first define which plugin shall fluentd use with @type variable.
  • +
  • Source tag then define path to file that you wish to upload, and path for .pos file with @file and @pos_file variables.
  • +
  • .pos file is created by fluentd and is used for tracking position in a file during ingestion.
  • +
  • @tag variable in the source part should match the match tag
  • +
  • Output part is a match tag. It must match a tag given to the data in the source part. It contains uri to your ingestion policy, and username and password for your Wendelin
  • +
  • For more information on writing Fluentd configuration files check out: Fluentd configuration documentation.
  • +
+
+
+ +
+

Save and send from Terminal

+ + + +
+
    +
  • Notice that Fluentd is running until you interrupt it and waiting for new input.
  • +
  • In our case, we had just a small .vaw file, but we could also have continuous stream of data from the sensor and fluentd would be continuously appending it to Data Stream.
  • +
+
+
+ +
+

Check created Data Stream

+ + +
+ +
+

3. Work with Ingested Data

+
+ +
+

Out-of-Core

+ + +
+ +
+

Enable Data Notebook

+ + +
+ +
+

Head to Jupyter

+ + + +
+
    +
  • Note that to open jupyter-url you need IPv6 access. If you don't have it, you have to request a new frontend on vifib with jupyter-url as backend url, and backend type notebook, and then click on secure access url to access it.
  • +
  • The Python 2 Kernel is the default Jupyter Kernel
  • +
  • Using Python 2 will disregard Wendelin and Wendelin.Core, so it's basic Jupyter.
  • +
  • Using ERP5 Kernel will use Wendelin.core in the background.
  • +
  • To make good use of it, all code written should be Out-of-core "compatible"
  • +
  • For example you should not just load a large file into memory (see below).
  • +
+
+
+ +
+

Learn ERP5 Kernel

+ + + +
+
    +
  • Passing login/password will authenticate Juypter with Wendelin/ERP5
  • +
  • The reference you set will store your notebook in the Date Notebook Module
  • +
+
+
+ +
+

Getting Started

+ + + +
+
    +
  • This is always the first step when you start a new Notebook with ERP5 Kernel.
  • +
  • It makes sure that you are connected to ERP5/Wendelin instance any you can work with objects on it.
  • +
  • It also creates Data Notebook object on your ERP5/Wendelin instance.
  • +
  • You can go to Data Notebook Module and see that your Data Notebook object is now saved there.
  • +
+
+
+ +
+

Accessing Objects

+ + + +
+
    +
  • Accessing data works the same ways throughout [IPv6]:30002/erp5/[module_name]/[id].
  • +
  • All modules you see on the Wendelin/ERP5 start page can be accessed like this.
  • +
  • Once you have an object you can manipulate it.
  • +
  • Note that accessing a file by internal id (1) is only one way.
  • +
  • The standard way would be using the reference of the respective object, which will also allow to user portal_catalog to query.
  • +
+
+
+ +
+

Import libraries

+ + + +
+ +
+

Accessing Data Itself

+ + + +
+
    +
  • It's important to understand that manipulations outside of Wendelin.Core need to be Big Data "compatible"
  • +
  • Internally Wendelin.Core will run all manipulations "context-aware"
  • +
  • An alternative way to work would be to create your scripts inside Wendelin/ERP5 and call them from Juypter
  • +
  • Scripts/Manipulations are stored in Data Operations Module
  • +
+
+
+ +
+

Compute Fourier

+ + + +
+
    +
  • Note the way to call methods from Wendelin/ERP5 (Base_renderAsHtml )
  • +
  • Wendelin/ERP5 has a system of method acquistion. Every module can come with its own module specific methods and method names are always context specific ([object_name]_[method_name] ). Base methods on the other hand are core methods of Wendelin/ERP5 and applicable to more than one object.
  • +
+
+
+ +
+

Display Fourier

+ + + +
+ +
+

Save Image

+ + + +
+ +
+

Create BigFile Reader

+ + + +
+ +
+

Rerun using Big File Reader

+ + + +
+
    +
  • We are now showing how to step by step convert our code to being Out-of-Core compatible
  • +
  • This will only be possible for code we write ourselves
  • +
  • Whenever we have to rely on 3rd party libraries, there is no guarantee that data will be handled in the correct way. The only option to be truly Out-of-Core is to either make sure the 3rd party methods used are compatible and fixing them accordingly/committing back or to reimplement a 3rd party library completely.
  • +
+
+
+ +
+

Check the graphs

+ + + +
+ +
+

Redraw from Wendelin

+ + + +
+ +
+

Verify Images are Stored

+ + + +
+ +
+

Verify Data Arrays are Stored

+ + + +
+ +
+

4. Visualize, Display computed data

+
+ +
+

Running Web Sites from Wendelin

+ + + +
+
    +
  • One of the modules in erp5 is Web Site Module.
  • +
  • We will use it to create simple Web Site for presentation of our result.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

WebSite Module

+ + + +
+
    +
  • Front end components are written with two frameworks, jIO and renderJS
  • +
  • jIO (Gitlab) is used to access documents across different storages
  • +
  • Storages include: Wendelin, ERP5, Dropbox, webDav, AWS, ...
  • +
  • jIO includes querying, offline support, synchronization
  • +
  • renderJS (Gitlab) allows to build apps from reusable components
  • +
  • Both jIO/renderJS are asynchronous using promises
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Renderjs Runner

+ + + +
+
    +
  • Apps from gadgets are built as a tree structure, the application launcher is the top gadget
  • +
  • All other gadgets are child gadgets of this one
  • +
  • RenderJS allows to publish/aquire methods from other gadget to keep functionality encapsulated
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Renderjs Web App

+ + + +
+ +
+

Clone Website

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Rename Website

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Publish Website

+ + + +
+
    +
  • Every object in ERP5 has a state (For example draft, published,...).
  • +
  • Workflows are used to change the state of objects.
  • +
  • A workflow in this case is to publish a webpage, which means changing its status from Embedded to Published.
  • +
  • Workflows (among other properties) can be security restricted. For example, everybody can see Web Site in published state, but only its creator can see it while it is still in draft state.
  • +
  • This concept applies to all documents in ERP5.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Layout Properties

+ + + +
+
    +
  • One advantage working with an aync promise-chain based framework like renderJS is the ability to capture errors
  • +
  • It is possible to capture errors on client side, send report to ERP5 (stack-trace, browser) and not fail the app
  • +
  • Much more fine-grainded control, we currently just dump to screen/console
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Web Page Module

+ + + +
+
    +
  • The web page module includes html, js and css files used to build the frontend UI
  • +
  • The usual way of working with static files is to clone a file, rename its reference and publish it alive (still editable)
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Clone Worklist gadgets

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Pydata Gadget HTML

+ + + +
+
    +
  • This is a default gadget setup with some HTML.
  • +
  • Gadgets should be self containable so they always include all dependencies
  • +
  • RenderJS is using a custom version of RSVP for promises (we can cancel promises)
  • +
  • The global gadget includes promisified event binding (single, infinite event listener)
  • +
  • We are using RenderJS and jIO javascript libraries.
  • +
  • More info: + +
  • +
  • This is a default gadget setup with some HTML.
  • +
  • Gadgets should be self containable so they always include all dependencies
  • +
  • RenderJS is using a custom version of RSVP for promises (we can cancel promises)
  • +
  • The global gadget includes promisified event binding (single, infinite event listener)
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Pydata Gadget JS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Save, refresh web app

+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Update Pydata Gadget HTML

+ + + +
+
    +
  • Took from existing project, HTML was created to fit a responsive grid of graphs
  • +
  • Added JS library for multidimensional arrays: NDArray
  • +
  • Added JS libarary for displaying graphs: Dygraph
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Pydata Gadget JS (1)

+ + + +
+
    +
  • First we only defined options for the Dygraph plugin
  • +
  • In production system these are either set as defaults or stored along with respective data
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

Pydata Gadget JS (2)

+ +
+
    +
  • Add methods outside of the promise chain
  • +
  • Simplified (removed actual creation of date objects)
  • +
+
+
+ +
+

Pydata Gadget JS (3)

+ + + +
+
    +
  • "ready" triggered once gadget is loaded
  • +
  • define gadget specific parameters
  • +
  • "render" called by parent gadget or automatically
  • +
  • we hardcode url parameter, by default it would be URL based
  • +
+
+
+ +
+

Pydata Gadget JS (4)

+ +
+
    +
  • Orchestrated process starting with a cancellable promise queue
  • +
  • First step requesting the full file (NOT OUT-OF-CORE compliant - we load the whole file)
  • +
  • Return file converted into ndarray
  • +
  • Convert data into graph compatible format, store onto gadget
  • +
  • "declareService" triggered once UI is built
  • +
  • Graph will be rendered there.
  • +
+
+
+ +
+

Refresh Web Application

+ + + + + + + + + + + + + + + + + + + + +
+ +
+

Summary: What did we do?

+ + +
\ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Webrunner.xml b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Webrunner.xml new file mode 100644 index 0000000..4bed9ed --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/PathTemplateItem/test_page_module/wendelin-Tutorial.Installation.Usage.Webrunner.xml @@ -0,0 +1,320 @@ + + + + + + + + + + _Access_contents_information_Permission + + + Assignee + Assignor + Manager + Owner + + + + + _Add_portal_content_Permission + + + Assignee + Assignor + Manager + Owner + + + + + _Change_local_roles_Permission + + + Assignor + Manager + + + + + _Modify_portal_content_Permission + + + Assignee + Assignor + Manager + Owner + + + + + _View_Permission + + + Assignee + Assignor + Manager + Owner + + + + + content_md5 + + + + + + content_type + text/html + + + default_reference + wendelin-Tutorial.Installation.Usage.Webrunner + + + description + Tutorial showing how to install Wendelin on Webrunner, how to ingest data, how to manipulate data and how to present data. + + + id + wendelin-Tutorial.Installation.Usage.Webrunner + + + language + en + + + portal_type + Test Page + + + short_title + Installing and Using Wendelin on Webrunner + + + title + Wendelin Tutorial - Installing and Using Wendelin on Webrunner + + + version + 001 + + + workflow_history + + AAAAAAAAAAI= + + + + + + + + + + + + + data + + + + document_publication_workflow + + AAAAAAAAAAM= + + + + edit_workflow + + AAAAAAAAAAQ= + + + + processing_status_workflow + + AAAAAAAAAAU= + + + + + + + + + + + + + + + + + + + action + + + + + + actor + zope + + + comment + + + + error_message + + + + time + + + + + + + + + + + 1567439652.04 + UTC + + + + + + + validation_state + draft + + + + + + + + + + + + + + + + + action + edit + + + actor + zope + + + comment + + + + + + error_message + + + + serial + 978.45413.53197.47530 + + + state + current + + + time + + + + + + + + + + + 1569491106.02 + UTC + + + + + + + + + + + + + + + + + + + + + action + + + + + + actor + zope + + + comment + + + + error_message + + + + external_processing_state + empty + + + serial + 0.0.0.0 + + + time + + + + + + + + + + + 1567439652.04 + UTC + + + + + + + + + + + diff --git a/bt5/erp5_wendelin_tutorial_test/TestTemplateItem/portal_components/test.erp5.testWendelinTutorial.py b/bt5/erp5_wendelin_tutorial_test/TestTemplateItem/portal_components/test.erp5.testWendelinTutorial.py new file mode 100644 index 0000000..208d25d --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/TestTemplateItem/portal_components/test.erp5.testWendelinTutorial.py @@ -0,0 +1,45 @@ +############################################################################## +# +# Copyright (c) 2002-2019 Nexedi SA and Contributors. All Rights Reserved. +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +############################################################################## + +import unittest +from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import ERP5TypeFunctionalTestCase + +class TestWendelinTutorial(ERP5TypeFunctionalTestCase): + foreground = 0 + run_only = "wendelin_tutorial_zuite" + + def getBusinessTemplateList(self): + return ( + 'erp5_wendelin_tutorial_test', + 'erp5_web', + 'erp5_wendelin', + ) + +def test_suite(): + suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(TestWendelinTutorial)) + return suite \ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial_test/TestTemplateItem/portal_components/test.erp5.testWendelinTutorial.xml b/bt5/erp5_wendelin_tutorial_test/TestTemplateItem/portal_components/test.erp5.testWendelinTutorial.xml new file mode 100644 index 0000000..9cab3bb --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/TestTemplateItem/portal_components/test.erp5.testWendelinTutorial.xml @@ -0,0 +1,123 @@ + + + + + + + + + + _recorded_property_dict + + AAAAAAAAAAI= + + + + default_reference + testWendelinTutorial + + + description + + + + + + id + test.erp5.testWendelinTutorial + + + portal_type + Test Component + + + sid + + + + + + text_content_error_message + + + + + + text_content_warning_message + + + + + + version + erp5 + + + workflow_history + + AAAAAAAAAAM= + + + + + + + + + + + + + data + + + + + + + + + + + + + + + data + + + + component_validation_workflow + + AAAAAAAAAAQ= + + + + + + + + + + + + + + + + + + + action + validate + + + validation_state + validated + + + + + + + diff --git a/bt5/erp5_wendelin_tutorial_test/bt/dependency_list b/bt5/erp5_wendelin_tutorial_test/bt/dependency_list new file mode 100644 index 0000000..570a148 --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/bt/dependency_list @@ -0,0 +1,2 @@ +erp5_run_my_doc +erp5_ui_test_core \ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial_test/bt/description b/bt5/erp5_wendelin_tutorial_test/bt/description new file mode 100644 index 0000000..a1494c7 --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/bt/description @@ -0,0 +1 @@ +Includes test pages for wendelin tutorial. \ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial_test/bt/template_format_version b/bt5/erp5_wendelin_tutorial_test/bt/template_format_version new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/bt/template_format_version @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial_test/bt/template_keep_last_workflow_history_only_path_list b/bt5/erp5_wendelin_tutorial_test/bt/template_keep_last_workflow_history_only_path_list new file mode 100644 index 0000000..c752631 --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/bt/template_keep_last_workflow_history_only_path_list @@ -0,0 +1,5 @@ +portal_tests/wendelin_tutorial_zuite +portal_tests/wendelin_tutorial_zuite/** +test_page_module/wendelin-Tutorial.Installation.Usage.KVM +test_page_module/wendelin-Tutorial.Installation.Usage.Linux.machine +test_page_module/wendelin-Tutorial.Installation.Usage.Webrunner \ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial_test/bt/template_keep_workflow_path_list b/bt5/erp5_wendelin_tutorial_test/bt/template_keep_workflow_path_list new file mode 100644 index 0000000..c752631 --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/bt/template_keep_workflow_path_list @@ -0,0 +1,5 @@ +portal_tests/wendelin_tutorial_zuite +portal_tests/wendelin_tutorial_zuite/** +test_page_module/wendelin-Tutorial.Installation.Usage.KVM +test_page_module/wendelin-Tutorial.Installation.Usage.Linux.machine +test_page_module/wendelin-Tutorial.Installation.Usage.Webrunner \ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial_test/bt/template_path_list b/bt5/erp5_wendelin_tutorial_test/bt/template_path_list new file mode 100644 index 0000000..c752631 --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/bt/template_path_list @@ -0,0 +1,5 @@ +portal_tests/wendelin_tutorial_zuite +portal_tests/wendelin_tutorial_zuite/** +test_page_module/wendelin-Tutorial.Installation.Usage.KVM +test_page_module/wendelin-Tutorial.Installation.Usage.Linux.machine +test_page_module/wendelin-Tutorial.Installation.Usage.Webrunner \ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial_test/bt/template_test_id_list b/bt5/erp5_wendelin_tutorial_test/bt/template_test_id_list new file mode 100644 index 0000000..91a3d9f --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/bt/template_test_id_list @@ -0,0 +1 @@ +test.erp5.testWendelinTutorial \ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial_test/bt/test_dependency_list b/bt5/erp5_wendelin_tutorial_test/bt/test_dependency_list new file mode 100644 index 0000000..3c863e9 --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/bt/test_dependency_list @@ -0,0 +1,4 @@ +erp5_full_text_mroonga_catalog +erp5_wendelin +erp5_web +erp5_web_renderjs_ui \ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial_test/bt/title b/bt5/erp5_wendelin_tutorial_test/bt/title new file mode 100644 index 0000000..5c411a3 --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/bt/title @@ -0,0 +1 @@ +erp5_wendelin_tutorial_test \ No newline at end of file diff --git a/bt5/erp5_wendelin_tutorial_test/bt/version b/bt5/erp5_wendelin_tutorial_test/bt/version new file mode 100644 index 0000000..0f30166 --- /dev/null +++ b/bt5/erp5_wendelin_tutorial_test/bt/version @@ -0,0 +1 @@ +001 \ No newline at end of file -- 2.30.9