Compare commits

..
Author SHA1 Message Date
Luis Fernando Molina b5d7b2d2f8 Merge pull request #1860 from Superalgos/develop
Develop into Master
2021-09-24 06:33:44 -04:00
Luis Fernando Molina a8e4b71efa Merge pull request #1859 from Luis-Fernando-Molina/develop
Contribution: DeepScan Bug Fixes
2021-09-24 06:29:01 -04:00
Luis Fernando Molina 5e5207f508 Merge pull request #1858 from Superalgos/plugins-docs
Plugins docs into Develop
2021-09-24 06:27:40 -04:00
Luis Fernando Molina 8597332738 DeepScan Bug Fixes 2021-09-24 12:27:26 +02:00
Luis Fernando Molina 927f3016c9 Merge pull request #1857 from Luis-Fernando-Molina/develop
Contribution: Launch.json updated
2021-09-24 06:20:10 -04:00
Luis Fernando Molina 1edb6c878e Launch.json updated 2021-09-24 12:17:33 +02:00
Luis Fernando Molina ac29807afd Merge pull request #1856 from Ferrox85/develop
Update Snapshots.js
2021-09-24 06:16:07 -04:00
Ferrox85 6c2a8abf93 Update Snapshots.js
Added periods and a minor bug fix if the the undefined values happen before save
2021-09-24 10:37:09 +02:00
Luis Fernando Molina 3b569e509a Changes in User Profile done by Profile Owner Tentacule23 automatically merged by Superalgos.
Contribution: Profile_Update Tentacule23
2021-09-23 13:08:33 -04:00
Tentacule23 7cdb4ffaf3 Profile_Update Tentacule23 2021-09-23 13:08:12 -04:00
Luis Fernando Molina f7496db953 Changes in User Profile done by Profile Owner cozed-gh automatically merged by Superalgos.
Contribution: User Profile cozed-gh
2021-09-23 11:27:32 -04:00
cozed-gh fc5b97caf8 User Profile cozed-gh 2021-09-23 17:26:48 +02:00
Luis Fernando Molina b8873cd4f3 Changes in User Profile done by Profile Owner cozed-gh automatically merged by Superalgos.
Contribution: User Profile cozed-gh
2021-09-23 11:16:32 -04:00
cozed-gh 505722047c User Profile cozed-gh 2021-09-23 17:15:28 +02:00
Luis Fernando Molina 06a336742c Changes in User Profile done by Profile Owner cozed-gh automatically merged by Superalgos.
Contribution: User Profile cozed-gh
2021-09-23 04:12:29 -04:00
cozed-gh 041d2f0b38 User Profile cozed-gh 2021-09-23 10:11:33 +02:00
Luis Fernando Molina be09981ef5 Changes in User Profile done by Profile Owner cozed-gh automatically merged by Superalgos.
Contribution: User Profile cozed-gh
2021-09-23 03:55:28 -04:00
cozed-gh 7c851c26d7 User Profile cozed-gh 2021-09-23 09:54:49 +02:00
Luis Fernando Molina b89d904d72 Changes in User Profile done by Profile Owner cozed-gh automatically merged by Superalgos.
Contribution: User Profile cozed-gh
2021-09-23 03:00:28 -04:00
cozed-gh 0b464f3628 User Profile cozed-gh 2021-09-23 08:59:35 +02:00
Luis Fernando Molina 33035603ad Changes in User Profile done by Profile Owner teehanming automatically merged by Superalgos.
profile claim
2021-09-23 01:23:27 -04:00
Tee Han Ming 7924ac4162 Merge branch 'Superalgos:develop' into develop 2021-09-23 13:22:13 +08:00
teehanming 4b963a8dc3 profile claim 2021-09-23 13:21:45 +08:00
Luis Fernando Molina 523490d7e5 Changes in User Profile done by Profile Owner Tentacule23 automatically merged by Superalgos.
Contribution: User_profile_update Tentacule23
2021-09-22 16:09:23 -04:00
Tentacule23 ae1ed6e3ff User_profile_update Tentacule23 2021-09-22 16:08:38 -04:00
Luis Fernando Molina 4425d456d6 Merge pull request #1847 from Raplh2502/develop
Contribution: Finalization of Monte-Carlo forecast at Polus Trading Mine ; creation of a new indicator based on combination of Keltner, MAMA and Bollinger Bands
2021-09-22 15:49:12 -04:00
Raplh2502 eac46b3393 Finalization of Monte-Carlo forecast at Polus Trading Mine ; creation of a new indicator based on combination of Keltner, MAMA and Bollinger Bands 2021-09-22 21:12:11 +02:00
Luis Fernando Molina 83e5f8f3bc Merge pull request #1846 from harrellbm/develop
Adjustments to Governance Onboarding for Tentacule23
2021-09-22 14:34:40 -04:00
harrellbm 7459dfd074 Add final Feature claim for Tentacule23 2021-09-22 13:29:03 -05:00
harrellbm a492ebf4e1 Final Adjustments to harrellbm Profile 2021-09-22 13:28:45 -05:00
Luis Fernando Molina 8db9598060 Merge pull request #1844 from Ferrox85/develop
Minor Tweak to snapshot
2021-09-22 14:25:10 -04:00
harrellbm ced2bba300 Merge branch 'develop' of https://github.com/harrellbm/Superalgos into develop 2021-09-22 12:49:45 -05:00
Luis Fernando Molina d7a5953f7f Changes in User Profile done by Profile Owner cozed-gh automatically merged by Superalgos.
Contribution: User Profile cozed-gh
2021-09-22 13:43:21 -04:00
cozed-gh 8b7c3b2bc8 User Profile cozed-gh 2021-09-22 19:42:53 +02:00
Ferrox85 67d2f4b443 Merge branch 'Superalgos:develop' into develop 2021-09-22 19:29:56 +02:00
Ferrox85 57c4f80eb0 Merge branch 'develop' of https://github.com/Ferrox85/Superalgos into develop 2021-09-22 19:27:23 +02:00
Ferrox85 9badedfbdb Update Snapshots.js
Minor tweak for if on finalize there is no data / running trade (and a small typo)
2021-09-22 19:27:19 +02:00
Luis Fernando Molina eb68e0181a Changes in User Profile done by Profile Owner cozed-gh automatically merged by Superalgos.
Contribution: User Profile cozed-gh
2021-09-22 13:26:21 -04:00
cozed-gh a2480f2d21 User Profile cozed-gh 2021-09-22 19:24:32 +02:00
Luis Fernando Molina 328a82914f Changes in User Profile done by Profile Owner elipwns automatically merged by Superalgos.
Added elipwns profile.
2021-09-22 12:44:15 -04:00
Luis Fernando Molina 9a4d6ccf38 Merge pull request #1842 from Luis-Fernando-Molina/develop
Contribution: Governance Bug Fxed. Calculations  taking too long because of circular references with too many generations. Reduced to 3.
2021-09-22 12:44:04 -04:00
Luis Fernando Molina d6c739b1c5 Governance Bug Fxed. Calculations taking too long because of circular references with too many generations. Reduced to 3. 2021-09-22 18:42:28 +02:00
Eli Kloft 0ee6fd05ba Added elipwns profile. 2021-09-22 09:00:40 -07:00
Luis Fernando Molina edb2f91006 appliesTo at Signing Account node 2021-09-22 17:46:56 +02:00
Luis Fernando Molina 99cb765424 Merge pull request #1840 from cozed-gh/develop
Added "EMA Crossing" and "Triple ALMA"
2021-09-22 09:49:45 -04:00
cozed-gh 1088eeaf43 Merge branch 'Superalgos:develop' into develop 2021-09-22 15:44:22 +02:00
cozed-gh ad97c8a9f1 Added "EMA Crossing" and "Triple ALMA" 2021-09-22 15:37:43 +02:00
Luis Fernando Molina 1bf1960cde Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop 2021-09-22 15:30:59 +02:00
Luis Fernando Molina c8fbd3bcdc Bug Fixed Governance Tab 2021-09-22 14:42:53 +02:00
Luis Fernando Molina 727be74343 Merge pull request #1839 from Luis-Fernando-Molina/develop
Contribution: Desktop & Network validating Signature Hash
2021-09-22 08:35:54 -04:00
Luis Fernando Molina 2a373a243f Desktop & Network validating Signature Hash 2021-09-22 14:34:37 +02:00
Luis Fernando Molina 594262930d Merge pull request #1837 from Ferrox85/develop
Fixet empty rows and undefined strategy values
2021-09-22 08:18:22 -04:00
Luis Fernando Molina ea52a6e0a6 Changes in User Profile done by Profile Owner cozed-gh automatically merged by Superalgos.
Contribution: User Profile cozed-gh
2021-09-22 08:08:16 -04:00
cozed-gh 64bb598d0e User Profile cozed-gh 2021-09-22 14:07:18 +02:00
Ferrox85 2ceedd593c Merge branch 'Superalgos:develop' into develop 2021-09-22 13:40:07 +02:00
Ferrox85 ce336a3f8d Fixet empty rows and undefined strategy values
Complete fix of the CSV snapshot generator. Implemented the trigger values and overwrite the exit values at exit state with keeping the trigger state values. Removed the empty lines in the file.
2021-09-22 13:38:39 +02:00
Luis Fernando Molina 2bd4127135 Merge pull request #1836 from Luis-Fernando-Molina/develop
Contribution: Desktop & Network working with Secrets
2021-09-22 07:14:27 -04:00
Luis Fernando Molina 325163e5fa Desktop & Network working with Secrets 2021-09-22 13:12:54 +02:00
Luis Fernando Molina cf2d083905 Merge pull request #1835 from Luis-Fernando-Molina/develop
Contribution: Governance: Auto processing of PRs
2021-09-22 06:01:55 -04:00
Luis Fernando Molina edc3f86ad8 Governance: Auto processing of PRs 2021-09-22 12:01:05 +02:00
Luis Fernando Molina eea1faef81 Changes in User Profile done by Profile Owner Tentacule23 automatically merged by Superalgos.
Contribution: Profile_update Tentacule23
2021-09-22 03:46:21 -04:00
Tentacule23 dcaffe7aee Profile_update Tentacule23 2021-09-21 22:44:32 -04:00
Luis Fernando Molina ed273f5750 Changes in User Profile done by Profile Owner Luis-Fernando-Molina automatically merged by Superalgos.
Contribution: Governance Hash Validation Test 5
2021-09-21 16:48:23 -04:00
Luis Fernando Molina b298a69c5f Governance Hash Validation Test 6 2021-09-21 22:47:48 +02:00
Luis Fernando Molina d4c9d647d8 Governance Hash Validation Test 5 2021-09-21 22:46:51 +02:00
Luis Fernando Molina 18a0a47136 Governance Hash Validation Test 4 2021-09-21 22:45:42 +02:00
Luis Fernando Molina 65f9165b58 Changes in User Profile done by Profile Owner Luis-Fernando-Molina automatically merged by Superalgos.
Contribution: Governance Hash Validation Test 3
2021-09-21 16:44:33 -04:00
Luis Fernando Molina 525822b3d3 Governance Hash Validation Test 3 2021-09-21 22:44:02 +02:00
Luis Fernando Molina 15891ff890 Merge pull request #1829 from Luis-Fernando-Molina/develop
Contribution: Governance Hash Validation Test 1
2021-09-21 16:43:31 -04:00
Luis Fernando Molina 488261dbd4 Governance Hash Validation Test 2 2021-09-21 22:40:53 +02:00
Luis Fernando Molina c2fcf04369 Governance Hash Validation Test 1 2021-09-21 22:36:20 +02:00
Luis Fernando Molina 8a70df1ffa Merge pull request #1828 from Luis-Fernando-Molina/develop
Contribution: Governance: Signature Hash Validation
2021-09-21 16:34:30 -04:00
Luis Fernando Molina a4239311bb Governance: Signature Hash Validation 2021-09-21 22:31:49 +02:00
Luis Fernando Molina 850bcf8d7f Changes in User Profile done by Profile Owner Luis-Fernando-Molina automatically merged by Superalgos.
Contribution: Governance Signing Account Test 11
2021-09-21 15:08:02 -04:00
Luis Fernando Molina 60b46413c7 Governance Signing Account Test 11 2021-09-21 21:07:40 +02:00
Luis Fernando Molina c8fab584f0 Merge pull request #1826 from Luis-Fernando-Molina/develop
Contribution: Governance Signing Account Test 10
2021-09-21 15:06:34 -04:00
Luis Fernando Molina 64a35b2798 Governance Signing Account Test 10 2021-09-21 21:06:21 +02:00
Luis Fernando Molina dda0883461 Governance Signing Account Test 9 2021-09-21 21:03:41 +02:00
Luis Fernando Molina 82e36eee7a Merge pull request #1824 from Luis-Fernando-Molina/develop
Contribution: Governance Signing Account Test 8
2021-09-21 15:03:23 -04:00
Luis Fernando Molina 87514fed5f Governance Signing Account Test 8 2021-09-21 21:03:04 +02:00
Luis Fernando Molina f25d7d754d Changes in User Profile done by Profile Owner Luis-Fernando-Molina automatically merged by Superalgos.
Contribution: Governance Signing Accounts Test 8
2021-09-21 15:01:06 -04:00
Luis Fernando Molina 392322a432 Governance Signing Accounts Test 8 2021-09-21 21:00:51 +02:00
Luis Fernando Molina 79a03df2fb Merge pull request #1822 from Luis-Fernando-Molina/develop
Contribution: Governance Signing Accounts Test 7
2021-09-21 15:00:31 -04:00
Luis Fernando Molina 3612143d68 Governance Signing Accounts Test 7 2021-09-21 21:00:20 +02:00
Luis Fernando Molina 9d04974902 Changes in User Profile done by Profile Owner Luis-Fernando-Molina automatically merged by Superalgos.
Contribution: Governance Signing Accounts Test 5
2021-09-21 14:55:01 -04:00
Luis Fernando Molina 0443fd2ea2 Governance Signing Accounts Test 5 2021-09-21 20:54:35 +02:00
Luis Fernando Molina 5c3bfb1182 Merge pull request #1820 from Luis-Fernando-Molina/develop
Contribution: Governance Signing Accounts Test 4
2021-09-21 14:54:05 -04:00
Luis Fernando Molina 99ce5971dc Governance Signing Accounts Test 4 2021-09-21 20:52:45 +02:00
Luis Fernando Molina 82fc956181 Merge pull request #1819 from Luis-Fernando-Molina/develop
Contribution: Governance Signing Accounts Test 3
2021-09-21 14:51:58 -04:00
Luis Fernando Molina 440321ee21 Governance Signing Accounts Test 3 2021-09-21 20:51:38 +02:00
Luis Fernando Molina 0df88066cc Changes in User Profile done by Profile Owner Luis-Fernando-Molina automatically merged by Superalgos.
Contribution: Governance: Signing Accounts implementation - Test 2
2021-09-21 14:46:53 -04:00
Luis Fernando Molina 0e73d7c7f4 Governance: Signing Accounts implementation - Test 2 2021-09-21 20:44:26 +02:00
Luis Fernando Molina b1f0658cc5 Changes in User Profile done by Profile Owner Luis-Fernando-Molina automatically merged by Superalgos.
Contribution: Governance: Signing Accounts implementation - Test 1
2021-09-21 14:43:27 -04:00
Luis Fernando Molina 587f97e3b5 Governance: Signing Accounts implementation - Test 1 2021-09-21 20:43:10 +02:00
Luis Fernando Molina 5ae366665b Merge pull request #1816 from Luis-Fernando-Molina/develop
Contribution: Governance: Signing Accounts implementation
2021-09-21 14:42:24 -04:00
Luis Fernando Molina 2ad273a8bb Merge pull request #1815 from Tentacule23/develop
Contribution: Node_Move_Fix2 Tentacule23
2021-09-21 14:41:29 -04:00
Luis Fernando Molina fa7f16360e Governance: Signing Accounts implementation - Fix 2021-09-21 20:41:01 +02:00
Luis Fernando Molina e38b6bc952 Governance: Signing Accounts implementation 2021-09-21 20:37:40 +02:00
Luis Fernando Molina e3f8d25328 My profile with signing accounts for each Superalgos product 2021-09-21 19:09:12 +02:00
Luis Fernando Molina f9ac2761d2 Signing Accounts Created 2021-09-21 18:03:43 +02:00
Luis Fernando Molina 553669f460 Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop 2021-09-21 17:47:33 +02:00
Tentacule23 63eb662290 Node_Move_Fix2 Tentacule23 2021-09-21 09:26:00 -04:00
Tentacule23 533cae9c2e Node_Move_Fix Tentacule23 2021-09-21 09:16:24 -04:00
Tentacule23 3d23408823 Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop 2021-09-21 08:16:53 -04:00
Luis Fernando Molina e1836ec8b4 Recognize Governance Project Node as trigger for the workspace to be considered a Governance Workspace 2021-09-21 13:31:16 +02:00
Julian Molina d4f5200d3c Merge pull request #1812 from julian-molina/develop
Contribution: Simplifying icons assets definitions in governance plugins
2021-09-21 12:33:03 +02:00
Julian Molina 0ee33ae86f Simplifying icons assets definitions in governance plugins 2021-09-21 12:31:45 +02:00
Luis Fernando Molina 6d22b0d6b7 Merge pull request #1805 from harrellbm/develop
Set up Governance Feature Claims for Tentacule23 Contributions
2021-09-21 05:10:14 -04:00
Luis Fernando Molina be9e77f685 Merge pull request #1809 from elipwns/develop
Added various crypto-assets.
2021-09-21 05:07:32 -04:00
Luis Fernando Molina 78693c3be9 Merge pull request #1808 from quantum8/develop
Added choppy indicator
2021-09-21 05:06:11 -04:00
Eli Kloft a64163a332 Merge branch 'Superalgos:develop' into develop 2021-09-20 22:29:25 -07:00
Eli Kloft fff993929f Added CAKE and VET crypto-assets. 2021-09-20 22:23:08 -07:00
Eli Kloft 20a63bb614 Added DAI crypto-asset. 2021-09-20 22:09:55 -07:00
Eli Kloft 71d0d1b9a5 Added USDC crypto-asset. 2021-09-20 21:49:42 -07:00
Eli Kloft 2571590dfb Added NANO crypto-asset. Sorted assets alphabetically. 2021-09-20 21:35:34 -07:00
quantum8 5d84c6af81 Added choppy indicator 2021-09-21 09:50:22 +10:00
Tentacule23 f0dc0e1046 Node_move_fix Tentacule23 2021-09-20 17:43:02 -04:00
harrellbm 5370d814fb Adjust Delegation 2021-09-20 15:19:36 -05:00
harrellbm 218282a2a0 Add Feature Weights 2021-09-20 15:05:58 -05:00
harrellbm b04916fdbf Add Tentacule 23 Features and Delegate Tokens 2021-09-20 14:58:35 -05:00
Luis Fernando Molina ec01ed4345 Changes in User Profile done by Profile Owner end-debug automatically merged by Superalgos.
Contribution: User Profile [end-debug]
2021-09-20 13:59:23 -04:00
Luis Fernando Molina 8d2295d74f Merge pull request #1803 from harrellbm/develop
Remove Safety Comments from Tutorial Tab Code
2021-09-20 13:57:58 -04:00
harrellbm eda995e011 Remove Safty Comments from Tutorial Tab Code 2021-09-20 11:07:58 -05:00
SIFISO KHUMALO 010b5e2597 User Profile [end-debug] 2021-09-20 17:33:04 +02:00
Luis Fernando Molina 12c27519b7 Merge pull request #1802 from Luis-Fernando-Molina/develop
Contribution: Network Refactoring into LAN Network
2021-09-20 07:52:59 -04:00
Luis Fernando Molina ac0b03fd5f Deepscan fixes 2021-09-20 13:52:51 +02:00
Luis Fernando Molina 1090e64fa3 p2p Network Hiererchy basic implementation 2021-09-20 13:41:54 +02:00
Luis Fernando Molina 7dfe5c2397 refactoring Network Hierarchy into LAN Network Hierarchy 2021-09-20 12:51:40 +02:00
Luis Fernando Molina b5dcf93c1f Update CircularMenu.js 2021-09-20 12:47:30 +02:00
Luis Fernando Molina e5a11328ee Fixing some Icons 2021-09-20 12:38:49 +02:00
Luis Fernando Molina 751cd0acfb Refactoring Network into LAN Network, Network Node into LAN Network Node 2021-09-20 12:30:11 +02:00
Luis Fernando Molina a520501258 Create network-project.json 2021-09-20 11:43:19 +02:00
Luis Fernando Molina d750a4be81 Merge pull request #1799 from Tentacule23/develop
Contribution: tutorial_fix_and_better_node_snap Tentacule23
2021-09-20 05:08:19 -04:00
Luis Fernando Molina 7c1bd26491 Merge pull request #1800 from Smidy13/develop
Bug Fix: Telegram Social Bots sendMessage failing due to changes to T…
2021-09-20 05:05:36 -04:00
Luis Fernando Molina 7931dab53e Merge pull request #1801 from PLuv/develop
Add: DCA Bot Demo Workspace ; Update: Pluvtech-DM, Trading-Mine
2021-09-20 05:04:13 -04:00
Philip Love 94e5e301c4 Add: DCA Bot Demo Workspace ; Update: Pluvtech-DM, Trading-Mine 2021-09-20 02:16:50 -04:00
Smidy13 dc6e1bdb1c Bug Fix: Telegram Social Bots sendMessage failing due to changes to Telegram package 2021-09-20 14:57:40 +12:00
Tentacule23 ee29bbcb11 tutorial_fix_and_better_node_snap Tentacule23 2021-09-19 21:42:10 -04:00
Luis Fernando Molina d22287dd0e Merge pull request #1798 from Luis-Fernando-Molina/develop
Contribution: Bug Fixed at Platform Client crashing doing Github Stuff if web app is closed.
2021-09-19 17:37:49 -04:00
Luis Fernando Molina 3821164970 Bug Fixed at Platform Client crashing doing Github Stuff if web app is closed. 2021-09-19 23:37:29 +02:00
Luis Fernando Molina 29e89ef824 Merge pull request #1797 from Luis-Fernando-Molina/develop
Contribution: Bug Fix, Platform Client Crash
2021-09-19 16:57:11 -04:00
Luis Fernando Molina 41f7aa7a20 Merge pull request #1796 from harrellbm/develop
Bug fixes in Docs Space and Play Tutorial
2021-09-19 16:56:30 -04:00
Luis Fernando Molina 06385eb3bf Bug Fix, Platform Client Crash 2021-09-19 22:55:48 +02:00
harrellbm caa339d786 Comment out Code causing issues in Tutorial Play 2021-09-19 11:28:13 -05:00
B Harrell a29ca106b1 Merge branch 'Superalgos:develop' into develop 2021-09-19 11:07:09 -05:00
Luis Fernando Molina 44bfdd4a8f Merge pull request #1795 from Luis-Fernando-Molina/develop
Contribution: Bug Fixed at Platform Client crashing when Http Request Body could not be read.
2021-09-19 04:21:33 -04:00
Luis Fernando Molina 79f0438079 Bug Fixed at Platform Client crashing when Http Request Body could not be read. 2021-09-19 10:20:16 +02:00
Luis Fernando Molina e043fd613d Changes in User Profile done by Profile Owner jance1499 automatically merged by Superalgos.
Contribution: User Profile jance1499
2021-09-19 04:03:30 -04:00
Luis Fernando Molina cf40373829 Changes in User Profile done by Profile Owner mantlik automatically merged by Superalgos.
Contribution: User Profile mantlik
2021-09-19 04:03:26 -04:00
Luis Fernando Molina 183e848937 Merge pull request #1784 from quantum8/develop
Plotter & reference fix
2021-09-19 04:03:05 -04:00
Luis Fernando Molina 6675fb7d47 Merge pull request #1791 from Smidy13/develop
Spelling: Fixing Typo in TaskServerRoot.js
2021-09-19 04:02:21 -04:00
Luis Fernando Molina b6c2554f86 Merge pull request #1793 from thaissmolina75/develop
Contribution: creating profile tut spanish update
2021-09-19 04:01:23 -04:00
Luis Fernando Molina 42b2166824 Merge pull request #1794 from Luis-Fernando-Molina/develop
Contribution: Desktop: Timeline with post contents
2021-09-19 03:58:24 -04:00
thaissmolina75 976b15d484 creating profile tut spanish update 2021-09-19 00:32:51 -04:00
Frantisek Mantlik 1f19b961db User Profile mantlik 2021-09-18 23:23:06 -04:00
Smidy13 bf6bb3559d Improvement: Add Social Bots UI Option to Trading Sessions 2021-09-19 15:05:37 +12:00
Smidy13 6fc2f223ad Spelling: Fixing Typo in TaskServerRoot.js 2021-09-19 14:50:45 +12:00
James Pannell 29e9ba2b1c User Profile jance1499 2021-09-18 16:44:52 -05:00
Luis Fernando Molina e5f83eeccb Merge pull request #1786 from thaissmolina75/develop
Contribution: my profile
2021-09-18 09:39:31 -04:00
Luis Fernando Molina b49237b25f Merge pull request #1785 from Raplh2502/develop
Contribution: Add Monte-Carlo forecast to Polus Datamine
2021-09-18 09:37:36 -04:00
Luis Fernando Molina 8757d26487 Post Text fetched from github and shown at the timeline. 2021-09-18 13:09:10 +02:00
Luis Fernando Molina 760c8d9196 Events Showing up in Timeline 2021-09-18 12:09:17 +02:00
thaissmolina75 e914250f5d my profile 2021-09-18 00:17:50 -04:00
Raplh2502 2949307bb3 Add Monte-Carlo forecast to Polus Datamine 2021-09-18 04:32:23 +02:00
Luis Fernando Molina a995068978 Bug Fixed 2021-09-17 17:57:53 +02:00
Luis Fernando Molina 71de99b11b Applying events from storage implemented. 2021-09-17 16:27:50 +02:00
jacob a0dc92a115 merge with master
Merge branch 'develop' of https://github.com/quantum8/Superalgos into develop
2021-09-17 20:32:04 +10:00
jacob 447830f4a2 Fixed delta MFI plotter. Updated masters node to link to quantum data mine 2021-09-17 20:31:34 +10:00
Luis Fernando Molina 5d2f74c8de Storage Module Implemented 2021-09-17 12:10:06 +02:00
Luis Fernando Molina d2f815d256 Network Node saving events and pushing them to storage 2021-09-17 11:32:11 +02:00
Luis Fernando Molina b1f5d42a25 Merge pull request #1780 from Ferrox85/develop
Update Snapshots.js
2021-09-17 03:14:18 -04:00
Luis Fernando Molina b40417943a Merge pull request #1781 from Raplh2502/develop
Contribution: Creation of the new Polus Datamine with the Fisher Transform MFI
2021-09-17 03:13:56 -04:00
Luis Fernando Molina a88c860989 Merge pull request #1783 from quantum8/develop
data mine update
2021-09-17 03:13:18 -04:00
quantum8 4d6352e089 Add files via upload
updated MVWAP
2021-09-17 17:00:19 +10:00
Brenden Harrell 9379d2b8c2 Fix small Doc Space Refactoring issues 2021-09-16 21:32:17 -05:00
Raplh2502 4b1ed89dde Creation of the new Polus Datamine with the Fisher Transform MFI 2021-09-16 23:55:38 +02:00
Ferrox85 5e60605b58 Update Snapshots.js
Small addition with a profit type (even / loss/profit)
2021-09-16 21:13:34 +02:00
Luis Fernando Molina f68ddda386 Merge pull request #1778 from harrellbm/develop
Update Setup Script for Unified Dependencies
2021-09-16 12:37:04 -04:00
Luis Fernando Molina 45a57d9f27 Merge pull request #1777 from Luis-Fernando-Molina/develop
Contribution: All node_modules moved to the root Superalgos directory
2021-09-16 12:36:50 -04:00
harrellbm 05101d8d8e Update Setup Script for Unified Dependencies 2021-09-16 11:06:06 -05:00
Luis Fernando Molina c1ea907ba7 DeepScan bugs Fixed 2021-09-16 17:25:36 +02:00
Luis Fernando Molina 734dcfd45b Merge pull request #1776 from Ferrox85/develop
Update Snapshots.js
2021-09-16 11:23:54 -04:00
Luis Fernando Molina 862e9995cc Changes in User Profile done by Profile Owner Charlie67j automatically merged by Superalgos.
Contribution: User Profile Charlie67j
2021-09-16 11:22:53 -04:00
Luis Fernando Molina 44033decc6 Websockets Client Bug Fixed, that prevented concurrent messages. 2021-09-16 17:02:44 +02:00
Ferrox85 40566f6059 Update Snapshots.js
Added orders in base and quote asset adn revenue % for base and quoted asset
2021-09-16 16:58:06 +02:00
Charlie67j 2e977822b1 User Profile Charlie67j 2021-09-16 13:52:06 +00:00
Luis Fernando Molina e351fe271f CL into PL refactoring 2021-09-16 12:25:37 +02:00
Luis Fernando Molina e6893d1db5 unnecesary node modules folders removed 2021-09-16 11:48:42 +02:00
Luis Fernando Molina ee8403e39b Task Server running with all the requires at root 2021-09-16 11:34:22 +02:00
Luis Fernando Molina 888c1ae3e6 Task server running from root 2021-09-16 10:48:53 +02:00
Luis Fernando Molina 2584d6aeb0 Bug Fixed ws missing 2021-09-16 10:37:33 +02:00
Luis Fernando Molina 959e75b256 Superalgos Client refactoring 2021-09-16 10:32:49 +02:00
Luis Fernando Molina f990734a87 Task Server Root implemented 2021-09-16 10:31:18 +02:00
Luis Fernando Molina 2ec676defb Requires completely removed from Platform codebase 2021-09-16 10:10:13 +02:00
Luis Fernando Molina d2811cc422 Platoform Running with node modules loaded at platform root 2021-09-16 09:54:36 +02:00
Luis Fernando Molina 61dbbf4e53 Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop 2021-09-16 09:53:47 +02:00
Luis Fernando Molina fea83fbf87 Nodejs command decoupled from root ant Desktop and Network 2021-09-16 08:54:20 +02:00
Luis Fernando Molina 5218b27402 latest CCXT version 2021-09-16 08:29:53 +02:00
Luis Fernando Molina 2eb6f2c9c2 Changes in User Profile done by Profile Owner harrellbm automatically merged by Superalgos.
Update to User Profile harrellbm
2021-09-16 02:15:55 -04:00
harrellbm 90e7e4c32e Update to User Profile harrellbm 2021-09-15 15:50:54 -05:00
Luis Fernando Molina 9eebd3e9dd Merge pull request #1772 from superharoun/develop
Fix typo
2021-09-15 15:48:18 -04:00
Haroun a7f31eb918 Fix typo 2021-09-15 21:34:32 +02:00
Luis Fernando Molina 84af4d9ebf Changes in User Profile done by Profile Owner Jefferson111 automatically merged by Superalgos.
Contribution: User Profile Jefferson111
2021-09-15 12:29:36 -04:00
Luis Fernando Molina 8e5745bf0e Changes in User Profile done by Profile Owner superharoun automatically merged by Superalgos.
User Profile superharoun
2021-09-15 12:29:31 -04:00
Haroun dbd32e208f Revert "Fix typo"
This reverts commit 38bf0759c2.
2021-09-15 17:25:53 +02:00
J 73e426ddad Create Jefferson111.json 2021-09-15 23:11:06 +08:00
Jefferson111 0b1eeafb36 Revert "User Profile Jefferson111"
This reverts commit e9418127ee.
2021-09-15 23:06:22 +08:00
Luis Fernando Molina 4e73c75b8b Merge pull request #1768 from harrellbm/plugins-docs
Update readme for newer node version download
2021-09-15 10:50:14 -04:00
Jefferson111 e9418127ee User Profile Jefferson111 2021-09-15 22:40:15 +08:00
B Harrell 6d9dddcb84 Update readme for newer node version download 2021-09-14 22:02:10 -05:00
Haroun 38bf0759c2 Fix typo 2021-09-14 23:36:38 +02:00
Haroun 884de45ae7 This is my contribution to Superalgos 2021-09-14 23:12:40 +02:00
Haroun bd9dd06f89 Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop 2021-09-14 22:45:00 +02:00
Luis Fernando Molina a12b89dab3 Merge pull request #1764 from ssplatt/fix-spelling
Fix spelling of 'Strength'
2021-09-14 16:33:54 -04:00
ssplatt f7f5a5859c fix spelling of strength 2021-09-14 16:03:47 -04:00
Luis Fernando Molina 29601079c8 Merge pull request #1763 from Ferrox85/develop
Changes to CSV Snapshot and Filestorage foor CSV handling
2021-09-14 15:41:52 -04:00
Ferrox85 9d24120b9b Changes to CSV Snapshot and Filestorage foor CSV handling
Projects/Foundations/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/Snapshots.js
changes on this file:

adds only the first run a header to the to be saved content
next runs it fetches the CSV file
adds the new content to it
saves the file
this way you have a snapshot of all trades for referencing

Projects/Foundations/TS/Task-Modules/FileStorage.js
changes on this file:
-skips JSON validation (because it is no json file) and returns the text
2021-09-14 21:21:37 +02:00
Luis Fernando Molina bf854b4419 Changes in User Profile done by Profile Owner alexbacanu automatically merged by Superalgos.
Contribution: User Profile alexbacanu
2021-09-14 10:08:01 -04:00
Luis Fernando Molina 341334939f Merge pull request #1760 from Luis-Fernando-Molina/develop
Contribution: Social Trading: event for getting the timeline
2021-09-14 09:54:23 -04:00
Luis Fernando Molina e30addb819 Social Trading: event for getting the timeline 2021-09-14 15:51:48 +02:00
Alexandru Bacanu ecb9f0013f User Profile alexbacanu 2021-09-14 13:40:43 +03:00
Luis Fernando Molina 3530f125d3 Merge pull request #1737 from a-r-1/plugins-docs
Plugins docs
2021-09-14 03:54:34 -04:00
Luis Fernando Molina d641a7e3b4 Merge pull request #1741 from Tentacule23/develop
Contribution: Menu-Tooltip Tentacule23
2021-09-14 03:51:41 -04:00
Luis Fernando Molina 7388ebc629 Changes in User Profile done by Profile Owner 9808us automatically merged by Superalgos.
Contribution: User Profile update 9808us
2021-09-14 03:46:32 -04:00
Luis Fernando Molina 82e54dc8f5 Changes in User Profile done by Profile Owner a-r-1 automatically merged by Superalgos.
Contribution: User Profile [a-r-1]
2021-09-14 03:46:27 -04:00
Luis Fernando Molina 354a8b1126 Changes in User Profile done by Profile Owner hellarnasstrom automatically merged by Superalgos.
Contribution: User Profile hellarnasstrom
2021-09-14 03:46:23 -04:00
Luis Fernando Molina 2683476fe4 Changes in User Profile done by Profile Owner narkxx automatically merged by Superalgos.
Contribution: User Profile Narkxx
2021-09-14 03:46:18 -04:00
Luis Fernando Molina fcdc0c75b3 Changes in User Profile done by Profile Owner NAmorim automatically merged by Superalgos.
Contribution: User Profile NAmorim
2021-09-14 03:46:14 -04:00
Luis Fernando Molina a7287c5261 Merge pull request #1745 from quantum8/develop
data quantum mine
2021-09-14 03:42:49 -04:00
Luis Fernando Molina a752730d9d Merge pull request #1750 from harrellbm/develop
Update Space setting docs and default config
2021-09-14 03:39:32 -04:00
Brenden Harrell a93925e520 Refactor docs space and fix space settings node overlap 2021-09-13 22:11:21 -05:00
Brenden Harrell ec582c45bc Finish Education Project Head node 2021-09-13 22:10:57 -05:00
Brenden Harrell e59eb365bb Hierarchy Head node for Education Project 2021-09-13 21:04:53 -05:00
Brenden Harrell 2662571357 Handle projects that do not have hierarchy head nodes 2021-09-13 21:04:35 -05:00
FMW-NAmorim 3e98e21b43 User Profile NAmorim 2021-09-13 23:31:45 +01:00
Haroun a4671b2ceb User Profile superharoun 2021-09-13 23:42:18 +02:00
Haroun 6b392e8a54 Merge branch 'master' of https://github.com/Superalgos/Superalgos 2021-09-13 21:50:45 +02:00
harrellbm edf824b77d Update Space setting docs and default config 2021-09-13 12:35:24 -05:00
Julian Molina c7e5e48282 Merge pull request #1749 from julian-molina/develop
Contribution: Improvements in Governance tutorial pages
2021-09-13 18:07:04 +02:00
Julian Molina 87765207c0 Improvements in Governance tutorial pages 2021-09-13 18:04:52 +02:00
Tentacule23 e32f5244f0 reference_info_in_menu_tooltip Tentacule23 2021-09-13 09:05:08 -04:00
jacob 243fa7a870 data mine containing keltner channel and MVWAP indicators 2021-09-13 12:45:07 +10:00
Tentacule23 05cd46bb01 collapse_tutorial Tentacule23 2021-09-12 22:07:13 -04:00
narkxx 0a8fcc2a03 User Profile Narkxx 2021-09-12 22:13:31 +02:00
Tentacule23 782cdb6046 Menu-Tooltip Tentacule23 2021-09-12 11:45:59 -04:00
Alpesh a687e50d5b User Profile [a-r-1] 2021-09-12 16:09:15 +01:00
9808us 12730be0d4 User Profile update 9808us 2021-09-12 14:58:54 +02:00
Alpesh ed7a19eed3 My Review - modified 2021-09-12 13:28:14 +01:00
Alpesh 3b4d9853aa My Review - modified to include body of review 2021-09-12 13:19:54 +01:00
Alpesh ef07234b26 Supergalos Review from a noobie getting started 2021-09-12 13:01:54 +01:00
hellarnasstrom dbb03c4aee User Profile hellarnasstrom 2021-09-12 12:25:20 +02:00
Luis Fernando Molina f9a9d02308 Changes in User Profile done by Profile Owner Ferrox85 automatically merged by Superalgos.
Develop
2021-09-12 05:33:45 -04:00
Luis Fernando Molina 7e0a6c7197 Merge pull request #1733 from Smidy13/develop
Bug Fix: Fast Forward into the Future
2021-09-12 05:32:50 -04:00
Luis Fernando Molina 55ff37c296 Merge pull request #1734 from Luis-Fernando-Molina/develop
Contribution: Desktop App: Posts being saved at User's Repos
2021-09-12 05:31:39 -04:00
Luis Fernando Molina f77aa3d1c5 Posts being recorded at User's own Github repo. 2021-09-12 11:19:57 +02:00
Luis Fernando Molina 2b92426d9c Posts being sent to Users Social Trading Repo 2021-09-12 11:01:21 +02:00
Smidy13 2a6515b2af Bug Fix: Fast Forward into the Future 2021-09-12 21:00:27 +12:00
Smidy13 0609479caf Merge branch 'develop' of https://github.com/Smidy13/Superalgos into develop 2021-09-12 20:56:39 +12:00
Smidy13 9b1a54999a Bug Fix: Fast Forward in the Future 2021-09-12 20:51:13 +12:00
Ferrox85 fe64297e55 Merge branch 'Superalgos-develop' into develop 2021-09-12 10:03:06 +02:00
Ferrox85 ea7e27ad6f Merge branch 'develop' of https://github.com/Superalgos/Superalgos into Superalgos-develop 2021-09-12 10:02:21 +02:00
Luis Fernando Molina 3d0db423ed Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop 2021-09-12 08:31:38 +02:00
Luis Fernando Molina 5276fb8728 Merge pull request #1729 from harrellbm/plugins-docs
reference debug topic in actions topic and typo fix
2021-09-12 02:30:19 -04:00
Luis Fernando Molina 7280704a33 Merge pull request #1730 from Tentacule23/develop
Contribution: snap_to_position Tentacule23
2021-09-12 02:28:40 -04:00
Tentacule23 fd1fec92ac snap_to_position Tentacule23 2021-09-11 18:34:33 -04:00
Luis Fernando Molina ee92708d40 Post TextArea ready 2021-09-11 17:17:32 +02:00
Brenden Harrell 335e32613a Merge branch 'plugins-docs' of https://github.com/harrellbm/Superalgos into plugins-docs 2021-09-11 10:09:23 -05:00
Brenden Harrell 2018cbdc6f Docs Typo Fix 2021-09-11 10:09:20 -05:00
B Harrell 7852c26286 Merge branch 'Superalgos:plugins-docs' into plugins-docs 2021-09-11 09:58:04 -05:00
Brenden Harrell 15712a67e1 reference debug topic in actions topic 2021-09-11 09:56:55 -05:00
Luis Fernando Molina be44746f79 Merge pull request #1726 from harrellbm/develop
Harden Tutorial Icon Loading
2021-09-11 10:25:37 -04:00
Luis Fernando Molina cbfbb6e5f6 Merge pull request #1727 from harrellbm/plugins-docs
Cherry Pick icon Hardening and Begin Refactoring Tutorials
2021-09-11 10:24:53 -04:00
Brenden Harrell 938852779b Refactor: Custom Charts for Icons 2021-09-11 09:14:52 -05:00
Brenden Harrell 7db4fbf424 Harden Tutorial Icon loading 2021-09-11 09:11:57 -05:00
B Harrell e06416ba82 Merge branch 'Superalgos:develop' into develop 2021-09-11 09:06:16 -05:00
Brenden Harrell aae8229048 Various Doc Updates 2021-09-11 09:04:40 -05:00
Brenden Harrell b04812762d Harden Tutorial Icon loading 2021-09-11 08:57:36 -05:00
Ferrox85 f3a146d25f Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop 2021-09-11 14:24:09 +02:00
Luis Fernando Molina 986172f616 who to follow working well 2021-09-10 16:14:14 +02:00
Luis Fernando Molina e4f11d5341 Following and Unfollowing working from WebApp 2021-09-10 14:15:55 +02:00
Luis Fernando Molina db348b3f51 follow profile working from Web App to Network Node 2021-09-10 14:03:52 +02:00
Luis Fernando Molina 2f4aa33cfe scrolling problem solved 2021-09-10 11:59:52 +02:00
Luis Fernando Molina e7a44b7760 Click event handled 2021-09-10 11:29:54 +02:00
Luis Fernando Molina 091a8a3c6d Who to Follow 2021-09-10 09:15:06 +02:00
Luis Fernando Molina 8d79c9255d Changes in User Profile done by Profile Owner Tentacule23 automatically merged by Superalgos.
Contribution: User Profile Tentacule23
2021-09-10 03:10:34 -04:00
Tentacule23 061e513601 User Profile Tentacule23 2021-09-09 11:46:41 -04:00
Luis Fernando Molina 9b9dc4d645 Profiles showing up at web page 2021-09-09 17:27:00 +02:00
Luis Fernando Molina c5a83c2889 Changes in User Profile done by Profile Owner Ferrox85 automatically merged by Superalgos.
Develop
2021-09-09 11:01:36 -04:00
Ferrox85 726c012b2f update userprofile 2021-09-09 16:53:52 +02:00
Ferrox85 6f67aa8382 Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop 2021-09-09 16:45:44 +02:00
Luis Fernando Molina 274d8e24fa Merge pull request #1720 from Luis-Fernando-Molina/develop
Contribution: Desktop App: Infraestructure to connect via websockets from Web App to Network Node via Desktop Client
2021-09-09 09:27:43 -04:00
Luis Fernando Molina 481b8fb2d8 Deep Scan Bug Fixes 2021-09-09 15:26:35 +02:00
Luis Fernando Molina f58dcd7e33 Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop 2021-09-09 15:20:45 +02:00
Luis Fernando Molina cdd5cebfc5 Profiles Arrived to the Desktop WebApp 2021-09-09 15:17:41 +02:00
Ferrox85 6968489d8b User Profile Ferrox85 2021-09-09 14:17:26 +02:00
Luis Fernando Molina 4125d54016 SA root object implemented at Web App. 2021-09-09 14:08:59 +02:00
Luis Fernando Molina 663a847351 DESKTOP_WEB_SOCKETS_INTERFACE_PORT used at WebApp 2021-09-09 13:14:02 +02:00
Luis Fernando Molina 9c1baaf306 .children. to .nodeChildren. refactoring 2021-09-09 13:04:51 +02:00
Luis Fernando Molina 7b3aa8da85 Improving App Loader 2021-09-09 13:03:46 +02:00
Luis Fernando Molina c18e1a776d Killed App Post Loader 2021-09-09 12:35:31 +02:00
Ferrox85 652610bb5d User Profile Ferrox85 2021-09-09 12:27:37 +02:00
Luis Fernando Molina 73134a4f45 Modules loaded at UI 2021-09-09 12:16:28 +02:00
Ferrox85 1758d8704c User Profile Ferrox85 2021-09-09 12:11:13 +02:00
Ferrox85 d76c79b9ab Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop 2021-09-09 12:08:55 +02:00
Luis Fernando Molina 303c8a9920 Ready to request profiles 2021-09-09 11:45:07 +02:00
Luis Fernando Molina bdf54265ce Merge pull request #1719 from Tentacule23/plugins-docs
Contribution: My Superalgos Review
2021-09-09 02:06:55 -04:00
Tentacule23 c24381f820 My Superalgos Review 2021-09-08 20:03:24 -04:00
Julian Molina 176a2a8d08 Merge pull request #1716 from julian-molina/develop
Contribution: README Usage section clarifications
2021-09-08 19:31:51 +02:00
Julian Molina 47acdceaad README Usage section clarifications 2021-09-08 19:30:30 +02:00
Luis Fernando Molina a9cf324199 Desktop Web App Websockets Clieent 2021-09-08 15:50:09 +02:00
Luis Fernando Molina f3a7460985 Desktop Websockets Internface Implemeted 2021-09-08 15:19:40 +02:00
Luis Fernando Molina 44332a13de Initializing the Web App 2021-09-08 14:14:27 +02:00
Luis Fernando Molina c01c9bbca6 who to follow 2021-09-08 13:48:48 +02:00
Luis Fernando Molina b81ac5fcf7 Merge pull request #1706 from quantum8/develop
Contribution: User Profile quantum8
2021-09-08 05:34:56 -04:00
Luis Fernando Molina 6af7fe09eb Merge pull request #1693 from quantum8/patch-1
Spelling fix
2021-09-08 05:34:30 -04:00
Luis Fernando Molina 020e01237a html layout 2021-09-08 11:03:43 +02:00
jacob e9ea832281 User Profile quantum8 2021-09-08 11:38:13 +10:00
jacob 6f8d223142 User Profile quantum8 2021-09-08 11:31:54 +10:00
quantum8 591053ef40 Update creating-your-user-profile-tutorial-033-tutorial-step-token-power-requirement.json
Spelling fix
2021-09-08 11:08:53 +10:00
quantum8 7f0bb521d4 Spelling fix
Fix typo
2021-09-08 11:01:29 +10:00
quantum8 cff738248b Spelling fix
Minor spelling fix for the deprecated message text.
2021-09-08 10:36:48 +10:00
Luis Fernando Molina 4e92ff1740 Event Broadcasting 2021-09-07 16:57:48 +02:00
Luis Fernando Molina 65549d136c Merge pull request #1689 from Superalgos/develop
Develop into Master: Beta 11 Hot Fix 2 - Docker
2021-09-07 10:10:09 -04:00
Luis Fernando Molina 511adfd6d8 Merge pull request #1688 from ssplatt/update-docker-file
update run command in docker file
2021-09-07 09:49:48 -04:00
Brett Taylor 03a6e458cb update run command 2021-09-07 09:46:08 -04:00
Luis Fernando Molina bac140cf92 sockets connections and disconnections plus callers ordered arrays. 2021-09-07 13:05:58 +02:00
Luis Fernando Molina 4623ef28a3 Update index.html 2021-09-07 11:31:59 +02:00
Luis Fernando Molina 979b95dab9 Merge pull request #1687 from Superalgos/develop
Develop into Master: Beta 11 Hot Fix 1
2021-09-06 14:38:07 -04:00
Luis Fernando Molina 373f0307d8 WebApp Loading all modules declared at Project Schema 2021-09-06 20:30:05 +02:00
Luis Fernando Molina 8e17897597 Changes in User Profile done by Profile Owner romeox7 automatically merged by Superalgos.
Contribution: User Profile romeox7
2021-09-06 13:40:02 -04:00
Jerome P f5d6154be4 User Profile romeox7 2021-09-06 17:09:31 +00:00
Julian Molina 4e0ac054ec Merge pull request #1685 from julian-molina/develop
Contribution: Reviews clean up and repagination
2021-09-06 18:44:12 +02:00
Julian Molina c1951921c0 Reviews clean up and repagination 2021-09-06 18:43:46 +02:00
Julian Molina 501b447ca1 Merge pull request #1684 from julian-molina/develop
Contribution: Getting started improvements
2021-09-06 18:42:22 +02:00
Julian Molina 0d7db51cf8 Getting started improvements 2021-09-06 18:31:37 +02:00
Luis Fernando Molina ecc7b7d7b6 Web App basic code 2021-09-06 17:59:44 +02:00
Julian Molina debd68e950 Merge pull request #1683 from julian-molina/develop
Contribution: README update fixing node run command instructions
2021-09-06 16:52:10 +02:00
Julian Molina 748ffca1e4 README update fixing node run command instructions 2021-09-06 16:51:21 +02:00
Luis Fernando Molina 474a9238ec Merge pull request #1681 from Superalgos/develop
Develop into Plugins Docs
2021-09-06 10:29:52 -04:00
Luis Fernando Molina 0ff2809f0d Reorg of UI loader 2021-09-06 14:11:54 +02:00
Smidy13 585bb001ba Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop 2021-09-04 08:43:59 +12:00
Smidy13 66e3e205ef Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop 2021-09-02 22:13:50 +12:00
Haroun 178b33545f Merge branch 'master' of https://github.com/Superalgos/Superalgos 2021-06-20 23:34:57 +02:00
Haroun 433a779d95 Merge branch 'master' of https://github.com/Superalgos/Superalgos 2021-06-09 11:27:23 +02:00
Haroun a517b99294 Merge branch 'master' of https://github.com/Superalgos/Superalgos 2021-05-17 22:48:56 +02:00
Haroun 1fcb7095dd This is my contribution to Superalgos 2021-05-09 22:24:55 +02:00
348 changed files with 199115 additions and 57771 deletions

No files matched your search

+3
View File
@@ -1,6 +1,9 @@
Data-Storage
Log-Files
My-Workspaces
My-Social-Trading-Data
My-Network-Nodes-Data
My-Secrets
debug.log
.DS_Store
*.db
+11
View File
@@ -0,0 +1,11 @@
{
"folders": [
{
"path": "C:\\Superalgos\\Platform"
},
{
"path": "C:\\Superalgos\\Projects"
}
],
"settings": {}
}
+13
View File
@@ -0,0 +1,13 @@
{
"folders": [
{
"path": "C:\\Superalgos\\TaskServer"
},
{
"path": "C:\\Superalgos\\Projects"
}
],
"settings": {
"search.maintainFileSearchCache": true
}
}
+4 -2
View File
@@ -4,14 +4,16 @@
"**/Documentation": true,
"**/Log-Files": true,
"**/node_modules": true,
"**/Deprecated-Code": true
"**/Deprecated-Code": true,
"**/My-Social-Trading-Data": true,
},
"search.exclude": {
"**/Data-Storage": true,
"**/Documentation": true,
"**/Log-Files": true,
"**/node_modules": true,
"**/Deprecated-Code": true
"**/Deprecated-Code": true,
"**/My-Social-Trading-Data": true
},
"search.maintainFileSearchCache": true
}
+22 -19
View File
@@ -8,33 +8,36 @@ exports.newDesktopApp = function newDesktopApp() {
async function run() {
/*
let socialGraphService = NT.projects.network.modules.socialGraph.newSocialGraph()
await socialGraphService.initialize()
Heree we will store our running objects:
*/
DK.running = {}
/*
This is the Web Sockets client that interacts with the Superalgos Network.
*/
//DK.webSocketsClient = SA.projects.network.modules.webSocketsClient.newNetworkModulesWebSocketsClient()
//await DK.webSocketsClient.initialize()
/* These are the Network Interfaces by which the UI interacts with the Desktop App.*/
//let WEB_SOCKETS_INTERFACE = require('./webSocketsInterface.js')
let HTTP_INTERFACE = require('./httpInterface.js')
DK.running.socialGraph = DK.projects.socialTrading.modules.socialGraph.newSocialTradingModulesSocialGraph()
await DK.running.socialGraph.initialize()
/*
WEB_SOCKETS_INTERFACE = WEB_SOCKETS_INTERFACE.newWebSocketsInterface()
WEB_SOCKETS_INTERFACE.initialize()
console.log('Web Sockets Interface ....................................... Listening at port ' + global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT)
This is the Web Sockets client that interacts with the Superalgos Network.
*/
DK.running.webSocketsClient = SA.projects.network.modules.webSocketsClient.newNetworkModulesWebSocketsClient()
await DK.running.webSocketsClient.initialize()
console.log('Desktop Client Connected to Network Node via Web Sockets ................... Connected to port ' + global.env.NETWORK_WEB_SOCKETS_INTERFACE_PORT)
HTTP_INTERFACE = HTTP_INTERFACE.newHttpInterface()
HTTP_INTERFACE.initialize()
console.log('Http Interface .............................................. Listening at port ' + global.env.DESKTOP_HTTP_INTERFACE_PORT)
/* These are the Network Interfaces by which the UI interacts with the Desktop App.*/
DK.running.webSocketsInterface = DK.projects.socialTrading.modules.webSocketsInterface.newDesktopModulesWebSocketsInterface()
DK.running.webSocketsInterface.initialize()
console.log('Desktop Client Web Sockets Interface ....................................... Listening at port ' + global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT)
DK.running.httpInterface = DK.projects.socialTrading.modules.httpInterface.newDesktopModulesHttpInterface()
DK.running.httpInterface.initialize()
console.log('Desktop Client Http Interface .............................................. Listening at port ' + global.env.DESKTOP_HTTP_INTERFACE_PORT)
return
let queryMessage
let query
/*
@@ -42,7 +45,7 @@ exports.newDesktopApp = function newDesktopApp() {
*/
queryMessage = {
queryType: SA.projects.socialTrading.globals.queryTypes.USER_PROFILES,
emitterUserProfileId: DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID,
emitterUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId,
initialIndex: 'Last',
amountRequested: 10,
direction: 'Past'
@@ -71,7 +74,7 @@ exports.newDesktopApp = function newDesktopApp() {
let eventMessage = {
eventId: SA.projects.foundations.utilities.miscellaneousFunctions.genereteUniqueId(),
eventType: SA.projects.socialTrading.globals.eventTypes.FOLLOW_USER_PROFILE,
emitterUserProfileId: DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID,
emitterUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId,
targetUserProfileId: profile.userProfileId
}
@@ -96,8 +99,8 @@ exports.newDesktopApp = function newDesktopApp() {
*/
queryMessage = {
queryType: SA.projects.socialTrading.globals.queryTypes.USER_PROFILE_STATS,
emitterUserProfileId: DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID,
targetUserProfileId: DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID
emitterUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId,
targetUserProfileId: SA.secrets.map.get('Social Trading Desktop').userProfileId
}
query = {
-190
View File
@@ -1,190 +0,0 @@
let postLoader
function newAppLoader() {
const MODULE_NAME = 'App Loader'
const INFO_LOG = false
const ERROR_LOG = true
const logger = newWebDebugLog()
let thisObject = {
loadModules: loadModules
}
return thisObject
async function loadModules() {
try {
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> Entering function.') }
let plotters
let modulesArray = []
plotters = defaultPlotters()
modulesArray = modulesArray.concat([
'Globals.js',
'Workspace.js',
'Files/SingleFile.js',
'Files/FileCloud.js',
'Files/MarketFiles.js',
'Files/DailyFiles.js',
'Files/FileCursor.js',
'Files/FileSequence.js',
'Files/FileStorage.js',
'EventsServerClient.js',
'LegacyPlotter.js',
'PlotterPanel.js',
'VideoRecorder.js',
'ProductStorage.js',
'Canvas.js',
'EventHandler.js',
'Frame.js',
'Animation.js',
'Container.js',
'Utilities.js',
'AppPostLoader.js'
])
modulesArray = modulesArray.concat(plotters)
functionLibraries()
function functionLibraries() {
let url = 'ListFunctionLibraries'
httpRequest(undefined, url, onResponse)
function onResponse(err, fileList) {
let urlArray = []
let fileArray = JSON.parse(fileList)
for (let i = 0; i < fileArray.length; i++) {
let item = fileArray[i]
project = item[0]
fileName = item[1]
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Function-Libraries' + '/' + fileName)
}
modulesArray = modulesArray.concat(urlArray)
utilities()
}
}
function utilities() {
let url = 'ListUtilitiesFiles'
httpRequest(undefined, url, onResponse)
function onResponse(err, fileList) {
let urlArray = []
let fileArray = JSON.parse(fileList)
for (let i = 0; i < fileArray.length; i++) {
let item = fileArray[i]
project = item[0]
fileName = item[1]
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Utilities' + '/' + fileName)
}
modulesArray = modulesArray.concat(urlArray)
globals()
}
}
function globals() {
let url = 'ListGlobalFiles'
httpRequest(undefined, url, onResponse)
function onResponse(err, fileList) {
let urlArray = []
let fileArray = JSON.parse(fileList)
for (let i = 0; i < fileArray.length; i++) {
let item = fileArray[i]
project = item[0]
fileName = item[1]
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Globals' + '/' + fileName)
}
modulesArray = modulesArray.concat(urlArray)
spaces()
}
}
function spaces() {
let url = 'ListSpaceFiles'
httpRequest(undefined, url, onResponse)
function onResponse(err, fileList) {
let urlArray = []
let fileArray = JSON.parse(fileList)
for (let i = 0; i < fileArray.length; i++) {
let path = fileArray[i]
urlArray.push('Projects' + '/' + path)
}
modulesArray = modulesArray.concat(urlArray)
downloadIncludedFiles()
}
}
function downloadIncludedFiles() {
let downloadedCounter = 0
for (let i = 0; i < modulesArray.length; i++) {
let path = modulesArray[i]
REQUIREJS([path], onRequired)
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> Module Requested.') }
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> path = ' + path) }
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> total requested = ' + (i + 1)) }
function onRequired(pModule) {
try {
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> Entering function.') }
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> Module Downloaded.') }
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> path = ' + path) }
downloadedCounter++
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> downloadedCounter = ' + downloadedCounter) }
if (downloadedCounter === modulesArray.length) {
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> Starting Advanced Algos Platform.') }
setTimeout(() => {
postLoader = newAppPostLoader()
postLoader.start()
}, 500)
}
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] loadModules -> onRequired -> err = ' + err.stack) }
}
}
}
}
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] loadModules -> err = ' + err.stack) }
}
}
function defaultPlotters() {
return [
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/Candles.js',
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/CandlePanel.js',
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/Volumes.js',
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/VolumePanel.js',
'Plotters/Foundations/Bollinger/Plotters-Bollinger-Bands/BollingerBands.js',
'Plotters/Foundations/Bollinger/Plotters-Bollinger-Bands/BollingerBandsPanel.js',
'Plotters/Foundations/Bollinger/Plotters-Bollinger-Bands/PercentageBandwidth.js'
]
}
}
+15
View File
@@ -0,0 +1,15 @@
/* Root objects*/
let UI = {
projects: {},
schemas: { projectSchema: undefined },
environment: undefined,
running: {}
}
let SA = { projects: {} }
/*
We will use this to load functions originally intended for Nodejs
*/
let exports = {}
+409
View File
@@ -0,0 +1,409 @@
function newWebApp() {
let thisObject = {
initialize: initialize,
finalize: finalize
}
return thisObject
function finalize() {
}
async function initialize() {
try {
setupRootObject(UI, 'UI')
setupRootObject(SA, 'SA')
await UI.projects.socialTrading.modules.webSocketsClient.initialize()
loadWUserProfileTimeline()
loadWhoToFollow()
setupEventHandlers()
} catch (err) {
console.log('[ERROR] initialize -> err.stack = ' + err.stack)
}
}
function setupRootObject(rootObject, rootObjectName) {
/*
Here we will setup the UI object, with all the
projects and spaces.
*/
for (let i = 0; i < UI.schemas.projectSchema.length; i++) {
let projectDefinition = UI.schemas.projectSchema[i]
rootObject.projects[projectDefinition.propertyName] = {}
let projectInstance = rootObject.projects[projectDefinition.propertyName]
projectInstance.utilities = {}
projectInstance.globals = {}
projectInstance.functionLibraries = {}
projectInstance.modules = {}
if (projectDefinition[rootObjectName] === undefined) { continue }
/* Set up Globals of this Project */
if (projectDefinition[rootObjectName].globals !== undefined) {
for (let j = 0; j < projectDefinition[rootObjectName].globals.length; j++) {
let globalDefinition = projectDefinition[rootObjectName].globals[j]
if (exports[globalDefinition.functionName] === undefined) {
projectInstance.globals[globalDefinition.propertyName] = eval(globalDefinition.functionName + '()')
} else {
projectInstance.globals[globalDefinition.propertyName] = eval('exports.' + globalDefinition.functionName + '()')
}
}
}
/* Set up Utilities of this Project */
if (projectDefinition[rootObjectName].utilities !== undefined) {
for (let j = 0; j < projectDefinition[rootObjectName].utilities.length; j++) {
let utilityDefinition = projectDefinition[rootObjectName].utilities[j]
if (exports[utilityDefinition.functionName] === undefined) {
projectInstance.utilities[utilityDefinition.propertyName] = eval(utilityDefinition.functionName + '()')
} else {
projectInstance.utilities[utilityDefinition.propertyName] = eval('exports.' + utilityDefinition.functionName + '()')
}
}
}
/* Set up Function Libraries of this Project */
if (projectDefinition[rootObjectName].functionLibraries !== undefined) {
for (let j = 0; j < projectDefinition[rootObjectName].functionLibraries.length; j++) {
let functionLibraryDefinition = projectDefinition[rootObjectName].functionLibraries[j]
if (exports[functionLibraryDefinition.functionName] === undefined) {
projectInstance.functionLibraries[functionLibraryDefinition.propertyName] = eval(functionLibraryDefinition.functionName + '()')
} else {
projectInstance.functionLibraries[functionLibraryDefinition.propertyName] = eval('exports.' + functionLibraryDefinition.functionName + '()')
}
}
}
/* Set up Modules of this Project */
if (projectDefinition[rootObjectName].modules !== undefined) {
for (let j = 0; j < projectDefinition[rootObjectName].modules.length; j++) {
let functionLibraryDefinition = projectDefinition[rootObjectName].modules[j]
if (exports[functionLibraryDefinition.functionName] === undefined) {
projectInstance.modules[functionLibraryDefinition.propertyName] = eval(functionLibraryDefinition.functionName + '()')
} else {
projectInstance.modules[functionLibraryDefinition.propertyName] = eval('exports.' + functionLibraryDefinition.functionName + '()')
}
}
}
}
}
async function loadWUserProfileTimeline() {
let queryMessage = {
queryType: SA.projects.socialTrading.globals.queryTypes.EVENTS,
emitterUserProfileId: undefined,
initialIndex: SA.projects.socialTrading.globals.queryConstants.INITIAL_INDEX_LAST,
amountRequested: 100,
direction: SA.projects.socialTrading.globals.queryConstants.DIRECTION_PAST
}
let query = {
requestType: 'Query',
queryMessage: JSON.stringify(queryMessage)
}
await UI.projects.socialTrading.modules.webSocketsClient.sendMessage(
JSON.stringify(query)
)
.then(addToContentDiv)
.catch(onError)
function onError(errorMessage) {
console.log('[ERROR] Query not executed. ' + errorMessage)
console.log('[ERROR] query = ' + JSON.stringify(query))
}
function addToContentDiv(events) {
try {
let contentDiv = document.getElementById('content-div')
/*
Delete al current content.
*/
while (contentDiv.childNodes.length > 4) {
let childToRemove = contentDiv.childNodes[contentDiv.childNodes.length - 1]
contentDiv.removeChild(childToRemove)
}
/*
Render the timeline.
*/
for (let i = 0; i < events.length; i++) {
let event = events[i]
let postDiv = document.createElement("div")
postDiv.setAttribute("class", "post-div")
let textNode
switch (event.eventType) {
case SA.projects.socialTrading.globals.eventTypes.NEW_USER_POST: {
textNode = document.createTextNode(event.emitterUserProfile.userProfileHandle + " POSTED " + event.postText)
break
}
case SA.projects.socialTrading.globals.eventTypes.FOLLOW_USER_PROFILE: {
textNode = document.createTextNode(event.emitterUserProfile.userProfileHandle + " FOLLOWED " + event.targetUserProfile.userProfileHandle)
break
}
case SA.projects.socialTrading.globals.eventTypes.UNFOLLOW_USER_PROFILE: {
textNode = document.createTextNode(event.emitterUserProfile.userProfileHandle + " UNFOLLOWED " + event.targetUserProfile.userProfileHandle)
break
}
}
postDiv.appendChild(textNode)
contentDiv.appendChild(postDiv)
}
}
catch (err) {
console.log('[ERROR] err.stack = ' + err.stack)
}
}
}
async function loadWhoToFollow() {
let queryMessage = {
queryType: SA.projects.socialTrading.globals.queryTypes.UNFOLLOWED_USER_PROFILES,
emitterUserProfileId: undefined,
initialIndex: SA.projects.socialTrading.globals.queryConstants.INITIAL_INDEX_FIRST,
amountRequested: 3,
direction: SA.projects.socialTrading.globals.queryConstants.DIRECTION_UP
}
let query = {
requestType: 'Query',
queryMessage: JSON.stringify(queryMessage)
}
await UI.projects.socialTrading.modules.webSocketsClient.sendMessage(
JSON.stringify(query)
)
.then(addWhoToFollowTable)
.catch(onError)
function onError(errorMessage) {
console.log('[ERROR] Query not executed. ' + errorMessage)
console.log('[ERROR] query = ' + JSON.stringify(query))
}
function addWhoToFollowTable(profiles) {
let contextCell = document.getElementById('who-to-follow-cell')
let table = document.createElement("table")
let tblBody = document.createElement("tbody")
for (let i = 0; i < profiles.length; i++) {
let profile = profiles[i]
let row = document.createElement("tr")
let cell = document.createElement("td")
addProfileToFollowTable(cell, profile)
row.appendChild(cell)
tblBody.appendChild(row)
}
table.appendChild(tblBody)
contextCell.appendChild(table)
table.setAttribute("class", "who-to-follow-table")
function addProfileToFollowTable(htmlElement, profile) {
let table = document.createElement("table")
let tblBody = document.createElement("tbody")
let row = document.createElement("tr")
{
let cell = document.createElement("td")
let textNode = document.createTextNode('Profile Picture')
cell.appendChild(textNode)
row.appendChild(cell)
}
{
let cell = document.createElement("td")
let textNode = document.createTextNode(profile.userProfileHandle)
cell.appendChild(textNode)
row.appendChild(cell)
}
{
let cell = document.createElement("td")
let span = document.createElement("span")
let button = document.createElement("button")
let text = document.createTextNode('Follow')
span.setAttribute("id", "profile-to-follow-span-" + profile.userProfileId)
button.setAttribute("id", "profile-to-follow-button-" + profile.userProfileId)
button.name = 'Follow Profile'
button.userProfileId = profile.userProfileId
span.setAttribute("class", "profile-to-follow-span")
button.setAttribute("class", "profile-to-follow-button")
button.appendChild(text)
span.appendChild(button)
cell.appendChild(span)
row.appendChild(cell)
}
tblBody.appendChild(row)
table.appendChild(tblBody)
htmlElement.appendChild(table)
table.setAttribute("class", "profile-to-follow-table")
}
}
}
function setupEventHandlers() {
/*
Add events to process button clicks , and mouseWheel.
*/
document.addEventListener("click", onClick)
document.addEventListener('mousewheel', onMouseWheel, false)
async function onClick(event) {
if (event.target && event.target.nodeName === "BUTTON") {
switch (event.target.name) {
case 'New Post': {
let textArea = document.getElementById("new-post-text-area")
await sendNewPostEvent(
textArea.value
)
.then(updateTextArea)
.catch(onError)
function updateTextArea() {
textArea.value = ""
}
break
}
case 'Follow Profile': {
await sendTargetUserProfileEvent(
event.target.userProfileId,
SA.projects.socialTrading.globals.eventTypes.FOLLOW_USER_PROFILE
)
.then(updateButton)
.catch(onError)
function updateButton() {
let span = document.getElementById('profile-to-follow-span-' + event.target.userProfileId)
let button = document.getElementById('profile-to-follow-button-' + event.target.userProfileId)
span.setAttribute("class", "profile-to-unfollow-span")
button.setAttribute("class", "profile-to-unfollow-button")
button.name = 'Unfollow Profile'
}
break
}
case 'Unfollow Profile': {
await sendTargetUserProfileEvent(
event.target.userProfileId,
SA.projects.socialTrading.globals.eventTypes.UNFOLLOW_USER_PROFILE
)
.then(updateButton)
.catch(onError)
function updateButton() {
let span = document.getElementById('profile-to-follow-span-' + event.target.userProfileId)
let button = document.getElementById('profile-to-follow-button-' + event.target.userProfileId)
span.setAttribute("class", "profile-to-follow-span")
button.setAttribute("class", "profile-to-follow-button")
button.name = 'Follow Profile'
}
break
}
}
}
/*
Error Handling
*/
function onError(errorMessage) {
console.log('[ERROR] Click event failed. ' + errorMessage)
}
}
function onMouseWheel(event) {
let scrollDiv = document.getElementById("scroll-div")
scrollDiv.scrollTop = scrollDiv.scrollTop + event.deltaY
}
}
async function sendTargetUserProfileEvent(
userProfileId,
eventType
) {
return new Promise((resolve, reject) => { asyncCall(resolve, reject) })
async function asyncCall(resolve, reject) {
let eventMessage
let event
eventMessage = {
eventType: eventType,
eventId: SA.projects.foundations.utilities.miscellaneousFunctions.genereteUniqueId(),
targetUserProfileId: userProfileId,
timestamp: (new Date()).valueOf()
}
event = {
requestType: 'Event',
eventMessage: JSON.stringify(eventMessage)
}
await UI.projects.socialTrading.modules.webSocketsClient.sendMessage(
JSON.stringify(event)
)
.then(resolve)
.catch(onError)
function onError(errorMessage) {
console.log('[ERROR] Event not executed. ' + errorMessage)
console.log('[ERROR] event = ' + JSON.stringify(event))
reject(errorMessage)
}
}
}
async function sendNewPostEvent(
postText
) {
return new Promise((resolve, reject) => { asyncCall(resolve, reject) })
async function asyncCall(resolve, reject) {
let eventMessage
let event
eventMessage = {
eventType: SA.projects.socialTrading.globals.eventTypes.NEW_USER_POST,
eventId: SA.projects.foundations.utilities.miscellaneousFunctions.genereteUniqueId(),
postText: postText,
timestamp: (new Date()).valueOf()
}
event = {
requestType: 'Event',
eventMessage: JSON.stringify(eventMessage)
}
await UI.projects.socialTrading.modules.webSocketsClient.sendMessage(
JSON.stringify(event)
)
.then(resolve)
.catch(onError)
function onError(errorMessage) {
console.log('[ERROR] Event not executed. ' + errorMessage)
console.log('[ERROR] event = ' + JSON.stringify(event))
reject(errorMessage)
}
}
}
}
+118
View File
@@ -0,0 +1,118 @@
function newWebAppLoader() {
let thisObject = {
loadModules: loadModules
}
return thisObject
async function loadModules() {
try {
let modulesArray = [
'WebDebugLog.js',
'WebApp.js'
]
for (let i = 0; i < UI.schemas.projectSchema.length; i++) {
let project = UI.schemas.projectSchema[i]
if (project.UI !== undefined) {
if (project.UI.functionLibraries !== undefined) {
for (let j = 0; j < project.UI.functionLibraries.length; j++) {
let fileName = project.UI.functionLibraries[j].fileName
if (fileName === undefined) {fileName = project.UI.functionLibraries[j].name.replaceAll(' ', '') + '.js'}
modulesArray.push('Projects' + '/' + project.name + '/' + 'UI' + '/' + 'Function-Libraries' + '/' + fileName)
}
}
if (project.UI.utilities !== undefined) {
for (let j = 0; j < project.UI.utilities.length; j++) {
let fileName = project.UI.utilities[j].fileName
if (fileName === undefined) {fileName = project.UI.utilities[j].name.replaceAll(' ', '') + '.js'}
modulesArray.push('Projects' + '/' + project.name + '/' + 'UI' + '/' + 'Utilities' + '/' + fileName)
}
}
if (project.UI.globals !== undefined) {
for (let j = 0; j < project.UI.globals.length; j++) {
let fileName = project.UI.globals[j].fileName
if (fileName === undefined) {fileName = project.UI.globals[j].name.replaceAll(' ', '') + '.js'}
modulesArray.push('Projects' + '/' + project.name + '/' + 'UI' + '/' + 'Globals' + '/' + fileName)
}
}
if (project.UI.modules !== undefined) {
for (let j = 0; j < project.UI.modules.length; j++) {
let fileName = project.UI.modules[j].fileName
if (fileName === undefined) {fileName = project.UI.modules[j].name.replaceAll(' ', '') + '.js'}
modulesArray.push('Projects' + '/' + project.name + '/' + 'UI' + '/' + 'Modules' + '/' + fileName)
}
}
}
if (project.SA !== undefined) {
if (project.SA.functionLibraries !== undefined) {
for (let j = 0; j < project.SA.functionLibraries.length; j++) {
let fileName = project.SA.functionLibraries[j].fileName
if (fileName === undefined) {fileName = project.SA.functionLibraries[j].name.replaceAll(' ', '') + '.js'}
modulesArray.push('Projects' + '/' + project.name + '/' + 'SA' + '/' + 'Function-Libraries' + '/' + fileName)
}
}
if (project.SA.utilities !== undefined) {
for (let j = 0; j < project.SA.utilities.length; j++) {
let fileName = project.SA.utilities[j].fileName
if (fileName === undefined) {fileName = project.SA.utilities[j].name.replaceAll(' ', '') + '.js'}
modulesArray.push('Projects' + '/' + project.name + '/' + 'SA' + '/' + 'Utilities' + '/' + fileName)
}
}
if (project.SA.globals !== undefined) {
for (let j = 0; j < project.SA.globals.length; j++) {
let fileName = project.SA.globals[j].fileName
if (fileName === undefined) {fileName = project.SA.globals[j].name.replaceAll(' ', '') + '.js'}
modulesArray.push('Projects' + '/' + project.name + '/' + 'SA' + '/' + 'Globals' + '/' + fileName)
}
}
if (project.SA.modules !== undefined) {
for (let j = 0; j < project.SA.modules.length; j++) {
let fileName = project.SA.modules[j].fileName
if (fileName === undefined) {fileName = project.SA.modules[j].name.replaceAll(' ', '') + '.js'}
modulesArray.push('Projects' + '/' + project.name + '/' + 'SA' + '/' + 'Modules' + '/' + fileName)
}
}
}
}
downloadIncludedFiles()
function downloadIncludedFiles() {
let downloadedCounter = 0
for (let i = 0; i < modulesArray.length; i++) {
let path = modulesArray[i]
REQUIREJS([path], onRequired)
function onRequired(pModule) {
try {
downloadedCounter++
if (downloadedCounter === modulesArray.length) {
setTimeout(() => {
UI.running.webApp = newWebApp()
UI.running.webApp.initialize()
}, 500)
}
} catch (err) {
console.log('[ERROR] loadModules -> onRequired -> err = ' + err.stack)
}
}
}
}
} catch (err) {
console.log('[ERROR] loadModules -> err = ' + err.stack)
}
}
}
+102
View File
@@ -0,0 +1,102 @@
function loadSuperalgos() {
let browser = checkBrowserVersion()
if ((browser.name !== "Chrome" && browser.name !== "Safari") || (browser.name === "Chrome" && parseInt(browser.version) < 85) || (browser.name === "Safari" && parseInt(browser.version) < 13)) {
alert("Superalgos is officially supported on Google Chrome 85 or Safari 13.1 and above. Your browser version has been detected as potentially beneath this. If you continue you may experience some functionaility issues.\n\nDetected Browser: " + browser.name + "\nVersion: " + browser.version)
}
loadGlobals()
function loadGlobals() {
let path = "Globals.js"
REQUIREJS([path], onRequired)
function onRequired(pModule) {
setupEnvironment()
}
}
function setupEnvironment() {
httpRequest(undefined, 'Environment', onResponse)
function onResponse(err, file) {
UI.environment = JSON.parse(file)
setupProjectsSchema()
}
}
function setupProjectsSchema() {
httpRequest(undefined, 'ProjectsSchema', onResponse)
function onResponse(err, file) {
UI.schemas.projectSchema = JSON.parse(file)
loadModules()
}
}
function loadModules() {
let path = "WebAppLoader.js"
REQUIREJS([path], onRequired)
function onRequired(pModule) {
let APP_LOADER_MODULE = newWebAppLoader()
APP_LOADER_MODULE.loadModules()
}
}
}
function httpRequest(pContentToSend, pPath, callBackFunction) {
let xmlHttpRequest = new XMLHttpRequest()
xmlHttpRequest.onreadystatechange = function () {
if (this.readyState === 4 && this.status === 200) {
try {
callBackFunction(undefined, xmlHttpRequest.responseText)
} catch (err) {
console.log('[ERROR] httpRequest -> httpRequest -> err.stack = ' + err.stack)
console.log('[ERROR] httpRequest -> httpRequest -> pContentToSend = ' + pContentToSend)
console.log('[ERROR] httpRequest -> httpRequest -> pPath = ' + pPath)
console.log('[ERROR] httpRequest -> httpRequest -> xmlHttpRequest.responseText = ' + xmlHttpRequest.responseText)
console.log('[ERROR] httpRequest -> httpRequest -> callBackFunction = ' + callBackFunction)
}
return
} else if (this.readyState === 4 && this.status === 404) {
callBackFunction({ result: "Fail", message: xmlHttpRequest.responseText.trim(), code: xmlHttpRequest.responseText.trim() })
return
}
}
if (pContentToSend === undefined) {
xmlHttpRequest.open("GET", pPath, true)
xmlHttpRequest.send()
} else {
try {
let blob = new Blob([pContentToSend], { type: 'text/plain' })
xmlHttpRequest.open("POST", pPath, true)
xmlHttpRequest.send(blob)
} catch (err) {
if (ERROR_LOG === true) { console.log("[ERROR] callServer -> err.message = " + err.message) }
callBackFunction({ result: "Fail", message: err.message })
}
}
}
function checkBrowserVersion() {
let ua = navigator.userAgent, tem, M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []
if (/trident/i.test(M[1])) {
tem = /\brv[ :]+(\d+)/g.exec(ua) || []
return { name: 'IE', version: (tem[1] || '') }
}
if (M[1] === 'Chrome') {
tem = ua.match(/\bOPR|Edge\/(\d+)/)
if (tem != null) { return { name: 'Opera', version: tem[1] } }
}
M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?']
if ((tem = ua.match(/version\/(\d+)/i)) != null) { M.splice(1, 1, tem[1]) }
return {
name: M[0],
version: M[1]
}
}
+21
View File
@@ -0,0 +1,21 @@
function newWebDebugLog() {
try {
let thisObject = {
write: write,
fileName: 'undefined'
}
return thisObject
function write(pText) {
console.log(spacePad(thisObject.fileName, 50) + ' : ' + pText)
function spacePad(str, max) {
str = str.toString()
return str.length < max ? spacePad(' ' + str, max) : str
}
}
} catch (err) {
console.log(spacePad(MODULE_NAME, 50) + ' : ' + '[ERROR] WebDebugLog --> err = ' + err.stack)
}
}
File renamed without changes.
+282 -7
View File
@@ -22,13 +22,288 @@
font-style: normal;
}
kbd {
padding: 2px 8px;
font-size: 125%;
font-weight: 500;
.body{
overflow-y: hidden;
overflow-x: hidden;
}
.scroll-div {
position:absolute;
overflow-y: scroll;
overflow-x: hidden;
top:0px;
left:0px;
vertical-align: top;
height: 100%;
width: 100%;
color: #000;
background-color: #bcd643;
border-radius: 5px;
border-style: outset;
border-color: blue;
background-color: transparent;
border-width: 0px;
}
.static-div {
position: fixed;
top:0px;
left:18%;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
color: #000;
background:transparent;
border-width: 0px;
border-collapse: collapse;
}
.content-div {
position:relative;
vertical-align: top;
height: 100%;
width: 30%;
left: 31.2%;
color: #000;
border-color: blue;
background-color:transparent;
border-width: 1px;
}
.post-placeholder {
vertical-align: top;
height: 50px;
width: 100%;
color: #000;
border-color: blue;
background-color: transparent;
border-width: 0px;
}
.post-div {
vertical-align: top;
height: 300px;
width: 100%;
color: #000;
border-color: blue;
background-color: transparent;
border-width: 0px;
}
.new-post-div {
vertical-align: top;
height: 300px;
width: 100%;
color: #000;
border-color: blue;
background-color: transparent;
border-width: 0px;
}
.page-table {
top:0px;
left:18%;
width: 64%;
height: 100%;
padding: 0;
margin: 0;
color: #000;
background:transparent;
border-width: 0px;
border-collapse: collapse;
}
.left-column {
position:relative;
top:0px;
width: 20%;
height: 100%;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
}
.middle-column {
position:relative;
top:0px;
width: 50%;
height: 100%;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
}
.right-column {
position:relative;
top:0px;
left:0px;
width: 30%;
height: 100%;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
}
.left-table {
position:relative;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
border-collapse: collapse;
}
.logo-cell {
vertical-align: top;
width: 100%;
height: 70px;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
}
.menu-cell {
vertical-align: top;
width: 100%;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
}
.profile-cell {
vertical-align: bottom;
width: 100%;
height: 50px;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
}
.middle-table {
position:relative;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
border-collapse: collapse;
}
.content-title-cell {
vertical-align: top;
width: 100%;
height: 50px;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
background-color: #ffffff;
}
.content-cell {
vertical-align: top;
width: 100%;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
}
.right-table {
position:relative;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
border-collapse: collapse;
}
.search-cell {
vertical-align: top;
width: 100%;
height: 50px;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
}
.context-cell {
vertical-align: top;
width: 100%;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
background:transparent;
}
.menu-table {
position:relative;
width: 100%;
height: 65%;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
border-collapse: collapse;
}
.menu-item-cell {
vertical-align: top;
width: 100%;
height: 50px;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
}
.who-to-follow-table {
position:relative;
width: 100%;
height: 30%;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
border-collapse: collapse;
}
.profile-to-follow-table {
position:relative;
width: 100%;
height: 30%;
padding: 0;
margin: 0;
color: #000;
border-width: 0px;
border-collapse: collapse;
}
.profile-to-follow-span {
float: right;
}
.profile-to-follow-button {
float: right;
background-color: green;
}
.profile-to-unfollow-span {
float: right;
}
.profile-to-unfollow-button {
float: right;
background-color: red;
}
+129 -17
View File
@@ -6,8 +6,8 @@
<meta name="description" content="Free and Open Source Crypto Social Trading">
<link rel="stylesheet" href="main.css" type="text/css" charset="utf-8" />
<link rel="shortcut icon" type="image/png/ico" href="Images/favicon.ico" />
<script type="text/javascript" src="WebServer/require.js"></script>
<script type="text/javascript" src="AppPreLoader.js"></script>
<script type="text/javascript" src="Require.js"></script>
<script type="text/javascript" src="WebAppPreLoader.js"></script>
<script type="text/javascript">
function loadApp() {
@@ -28,25 +28,137 @@
}
function onResize() {
try {
if (page === undefined) { return }
if (page.eventHandler === undefined) { return }
if (DISABLE_BROWSER_RESIZE_EVENT === true) { return }
page.eventHandler.raiseEvent('Browser Resized')
} catch (err) {
console.log('Error Resizing. ' + err.stack)
}
}
</script>
</script>
</head>
<body id="body" onload="loadApp()"
onresize="onResize()">
Hello World!
<div id="masterApp"></div>
<div id="canvasApp"></div>
<body id="body" onload="loadApp()" onresize="onResize()" class="body">
<div id="scroll-div" class="scroll-div">
<div id="static-div" class="static-div">
<table id="page-table" class="page-table">
<tr>
<td class="left-column">
<table class="left-table">
<tr>
<td class="logo-cell">LOGO</td>
</tr>
<tr>
<td class="menu-cell">
<table class="menu-table">
<tr>
<td class="menu-item-cell">Home</td>
</tr>
<tr>
<td class="menu-item-cell">Explore</td>
</tr>
<tr>
<td class="menu-item-cell">Notifications</td>
</tr>
<tr>
<td class="menu-item-cell">Messages</td>
</tr>
<tr>
<td class="menu-item-cell">Bookmarks</td>
</tr>
<tr>
<td class="menu-item-cell">Lists</td>
</tr>
<tr>
<td class="menu-item-cell">Profile</td>
</tr>
<tr>
<td class="menu-item-cell">More</td>
</tr>
<tr>
<td class="menu-item-cell">Post</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="profile-cell">PROFILE</td>
</tr>
</table>
</td>
<td class="middle-column">
<table class="middle-table">
<tr>
<td class="content-title-cell">CONTENT TITLE</td>
</tr>
<tr>
<td class="content-cell">
</td>
</tr>
</table>
</td>
<td class="right-column">
<table class="right-table">
<tr>
<td class="search-cell">SEARCH</td>
</tr>
<tr>
<td class="context-cell">
<table class="context-table">
<tr>
<td>Who to follow</td>
</tr>
<tr>
<td id="who-to-follow-cell">
</td>
</tr>
<tr>
<td>Show more</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>>
<div id="content-div" class="content-div">
<div id="post-placeholder" class="post-placeholder">
Placeholder
</div>
<div id="new-post-div" class="new-post-div">
<table>
<tr>
<td>Profile Pic</td>
<td>
<table>
<tr>
<td>
<textarea id="new-post-text-area">Type your post here...</textarea>
</td>
</tr>
<tr>
<td>Permissions</td>
</tr>
<tr>
<td>Tool Bar <button name="New Post">POST</button></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div class="post-div">
POST 2
</div>
<div class="post-div">
POST 3
</div>
<div class="post-div">
POST 4
</div>
<div class="post-div">
POST 5
</div>
</div>
</div>
</body>
</html>
-68
View File
@@ -1,68 +0,0 @@
exports.newHttpInterface = function newHttpInterface() {
/*
This module represent the HTTP API of the
Desktop App. All HTTP request are processed
by this module.
*/
let thisObject = {
initialize: initialize,
finalize: finalize
}
return thisObject
function finalize() {
}
function initialize() {
/*
We will create an HTTP Server and leave it running forever.
*/
SA.nodeModules.http.createServer(onHttpRequest).listen(global.env.DESKTOP_HTTP_INTERFACE_PORT)
/* Starting the browser now is optional */
if (process.argv.includes("noBrowser")) {
//Running Client only with no UI.
} else {
SA.nodeModules.open('http://localhost:' + global.env.DESKTOP_HTTP_INTERFACE_PORT)
}
}
function onHttpRequest(httpRequest, httpResponse) {
try {
let requestPathAndParameters = httpRequest.url.split('?') // Remove version information
let requestPath = requestPathAndParameters[0].split('/')
let endpointOrFile = requestPath[1]
switch (endpointOrFile) {
case 'Images': // This means the Images folder.
{
let path = global.env.PATH_TO_CLIENT + '/WebServer/Images/' + requestPath[2]
if (requestPath[3] !== undefined) {
path = path + '/' + requestPath[3]
}
if (requestPath[4] !== undefined) {
path = path + '/' + requestPath[4]
}
if (requestPath[5] !== undefined) {
path = path + '/' + requestPath[5]
}
path = unescape(path)
SA.projects.foundations.utilities.httpResponses.respondWithImage(path, httpResponse)
}
break
default:
{
SA.projects.foundations.utilities.httpResponses.respondWithWebFile(httpResponse, endpointOrFile, global.env.PATH_TO_DESKTOP)
}
}
} catch (err) {
console.log(err.stack)
}
}
}
+75
View File
@@ -0,0 +1,75 @@
exports.newDesktopRoot = function newDesktopRoot() {
/*
This module represents the execution root of the Desktop App.
We use this module that is outside the Desktop folder to
load all node dependencies and get them ready to the actual App.
*/
let thisObject = {
run: run
}
return thisObject
async function run() {
/*
The DK object is accesible everywhere at the Superalgos Desktop App.
It provides access to all modules built for this App.
*/
global.DK = {}
/*
The SA object is accesible everywhere at the Superalgos Desktop App.
It provides access to all modules built for Superalgos in general.
*/
global.SA = {}
/* Load Environment Variables */
let ENVIRONMENT = require('./EnvironmentForDebug.js');
let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment()
global.env = ENVIRONMENT_MODULE
/*
First thing is to load the project schema file.
*/
global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA)
/*
Setting up the modules that will be available, defined at the Project Schema file.
*/
let MULTI_PROJECT = require('./MultiProject.js');
let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject()
MULTI_PROJECT_MODULE.initialize(DK, 'DK')
MULTI_PROJECT_MODULE.initialize(SA, 'SA')
/*
Setting up external dependencies.
*/
SA.nodeModules = {
fs: require('fs'),
util: require('util'),
path: require('path'),
web3: require('web3'),
ws: require('ws'),
open: require('open'),
http: require('http'),
octokit: require("@octokit/rest"),
simpleGit: require('simple-git'),
nodeFetch: require('node-fetch')
}
/*
Setting up Secrets.
*/
SA.secrets = {
array: require('./My-Secrets/Secrets.json'),
map: new Map()
}
for (let i = 0; i < SA.secrets.array.length; i++) {
let secret = SA.secrets.array[i]
SA.secrets.map.set (secret.codeName, secret)
}
run()
async function run() {
DK.app = require('./Desktop/DesktopApp.js').newDesktopApp()
await DK.app.run()
console.log('Superalgos Desktop App is Running!')
}
}
}
+1 -1
View File
@@ -22,4 +22,4 @@ RUN node setup noShortcuts
EXPOSE 34248
EXPOSE 18041
VOLUME ["/app/Data-Storage", "/app/Log-Files", "/app/My-Workspaces"]
ENTRYPOINT ["node", "run", "noBrowser"]
ENTRYPOINT ["node", "platform", "noBrowser"]
+1 -2
View File
@@ -4,12 +4,11 @@ exports.newEnvironment = function () {
WEB_SERVER_URL: 'localhost',
CLIENT_WEB_SOCKETS_INTERFACE_PORT: 18041,
CLIENT_HTTP_INTERFACE_PORT: 34248,
PATH_TO_TASK_SERVER: './TaskServer',
PATH_TO_DATA_STORAGE: './Data-Storage',
PATH_TO_PROJECTS: './Projects',
PATH_TO_LOG_FILES: './Log-Files',
PATH_TO_PROJECTS_REQUIRED: './Projects',
PATH_TO_PROJECT_SCHEMA: '../Projects/ProjectsSchema.json',
PATH_TO_PROJECT_SCHEMA: './Projects/ProjectsSchema.json',
PATH_TO_CLIENT: './Platform',
PATH_TO_DEFAULT_WORKSPACE: './Projects/Foundations/Plugins/Workspaces',
PATH_TO_MY_WORKSPACES: './My-Workspaces',
+2 -1
View File
@@ -4,9 +4,10 @@ exports.newEnvironment = function () {
WEB_SERVER_URL: 'localhost',
CLIENT_WEB_SOCKETS_INTERFACE_PORT: 18041,
NETWORK_WEB_SOCKETS_INTERFACE_PORT: 18042,
DESKTOP_WEB_SOCKETS_INTERFACE_PORT: 18043,
DESKTOP_WEB_SOCKETS_INTERFACE_HOST: 'localhost',
CLIENT_HTTP_INTERFACE_PORT: 34248,
DESKTOP_HTTP_INTERFACE_PORT: 34249,
PATH_TO_TASK_SERVER: './TaskServer',
PATH_TO_DATA_STORAGE: './Data-Storage',
PATH_TO_PROJECTS: './Projects',
PATH_TO_LOG_FILES: './Log-Files',
+1 -1
View File
@@ -65,7 +65,7 @@ exports.newMultiProject = function () {
}
/*
From here we will require and get the modules, but without instantiation thisObject.
From here we will require and get the modules, but without instantiating thisObject.
*/
/* Set up Modules for this Project */
+7 -7
View File
@@ -1,24 +1,24 @@
exports.newNetworkNode = function newNetworkNode() {
let thisObject = {
socialGraphService: undefined,
storage: undefined,
run: run
}
return thisObject
function run() {
async function run() {
/*
Let's start the Network Interfaces
*/
NT.webSocketsInterface = NT.projects.network.modules.webSocketsInterface.newNetworkModulesWebSocketsInterface()
NT.webSocketsInterface.initialize()
start()
async function start() {
let socialGraphService = NT.projects.socialTrading.modules.socialGraph.newSocialGraph()
await socialGraphService.initialize()
}
thisObject.socialGraphService = NT.projects.socialTrading.modules.socialGraph.newNetworkModulesSocialGraph()
await thisObject.socialGraphService.initialize()
thisObject.storage = NT.projects.socialTrading.modules.storage.newSocialTradingModulesStorage()
thisObject.storage.initialize()
}
}
+68
View File
@@ -0,0 +1,68 @@
exports.newNetworkRoot = function newNetworkRoot() {
/*
This module represents the execution root of the Network Node.
We use this module that is outside the Network folder to
load all node dependencies and get them ready to the actual node.
*/
let thisObject = {
run: run
}
return thisObject
async function run() {
/*
The NT object is accesible everywhere at the Superalgos Network.
It provides access to all modules built for this Network.
*/
global.NT = {}
/*
The SA object is accesible everywhere at the Superalgos Network.
It provides access to all modules built for Superalgos in general.
*/
global.SA = {}
/* Load Environment Variables */
let ENVIRONMENT = require('./EnvironmentForDebug.js');
let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment()
global.env = ENVIRONMENT_MODULE
/*
First thing is to load the project schema file.
*/
global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA)
/*
Setting up the modules that will be available, defined at the Project Schema file.
*/
let MULTI_PROJECT = require('./MultiProject.js');
let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject()
MULTI_PROJECT_MODULE.initialize(NT, 'NT')
MULTI_PROJECT_MODULE.initialize(SA, 'SA')
/*
Setting up external dependencies.
*/
SA.nodeModules = {
fs: require('fs'),
path: require('path'),
util: require('util'),
nodeFetch: require('node-fetch'),
web3: require('web3'),
ws: require('ws'),
simpleGit: require('simple-git')
}
/*
Setting up Secrets.
*/
SA.secrets = {
array: require('./My-Secrets/Secrets.json'),
map: new Map()
}
for (let i = 0; i < SA.secrets.array.length; i++) {
let secret = SA.secrets.array[i]
SA.secrets.map.set(secret.codeName, secret)
}
NT.app = require('./Network/NetwokNode.js').newNetworkNode()
NT.app.run()
console.log('Superalgos Network is Running.')
}
}
+139 -32
View File
@@ -75,7 +75,7 @@ exports.newGithubServer = function newGithubServer() {
async function doGithub() {
const { Octokit } = require("@octokit/rest")
const { Octokit } = SA.nodeModules.octokit
const octokit = new Octokit({
auth: token,
@@ -93,7 +93,7 @@ exports.newGithubServer = function newGithubServer() {
while (lastPage === false) {
try {
page++
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
let listResponse = await octokit[endpoint][method]({
owner,
repo,
@@ -204,7 +204,7 @@ exports.newGithubServer = function newGithubServer() {
try {
const repo = repository
const owner = 'Superalgos'
const { Octokit } = require("@octokit/rest")
const { Octokit } = SA.nodeModules.octokit
const octokit = new Octokit({
auth: token,
userAgent: 'Superalgos Beta 11'
@@ -223,7 +223,7 @@ exports.newGithubServer = function newGithubServer() {
try {
page++
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
let listResponse = await octokit.rest.pulls.list({
owner: owner,
@@ -284,7 +284,7 @@ exports.newGithubServer = function newGithubServer() {
/*
Lets get the files changed at this Pull Request.
*/
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
let listResponse = await octokit.rest.pulls.listFiles({
owner: owner,
repo: repo,
@@ -301,15 +301,17 @@ exports.newGithubServer = function newGithubServer() {
if (await validateFileNameEqualsGithubUsername() === false) { continue }
if (await validateFileChangedIsUserProfile() === false) { continue }
if (await validateMessageSignedIsGithubUsername() === false) { continue }
if (await validateMessageSignedHashIsSignatureHash() === false) { continue }
if (await validateUserProfileNodeNameEqualsGithubUsername() === false) { continue }
if (await validateUserProfileIdDoesNotBelongtoAnotherUserProfile() === false) { continue }
if (await validateUserProfileBlockchainAccountDoesNotBelongtoAnotherUserProfile() === false) { continue }
if (await validateUserProfileSigningAccountsDoesNotBelongtoAnotherUserProfile() === false) { continue }
if (await mergePullRequest() === false) {
console.log('[WARN] Github Server -> mergeGithubPullRequests -> Merge Failed -> Pull Request "' + pullRequest.title + '" not merged because Github could not merge it. -> mergeResponse.message = ' + mergeResponse.data.message)
} else {
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Merge Succed -> Pull Request "' + pullRequest.title + '" successfully merged. -> mergeResponse.message = ' + mergeResponse.data.message)
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.issues.createComment({
owner: owner,
repo: repo,
@@ -333,7 +335,7 @@ exports.newGithubServer = function newGithubServer() {
let pullRequestFile = filesChanged[j]
let fileContentUrl = pullRequestFile.raw_url
if (fileContentUrl.indexOf('Governance/Plugins/User-Profiles') >= 0) {
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.issues.createComment({
owner: owner,
repo: repo,
@@ -341,7 +343,7 @@ exports.newGithubServer = function newGithubServer() {
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that a User Profile file... \n\n' + fileContentUrl + '\n\n...was submitted together with ' + (filesChanged.length - 1) + ' other file/s. User Profiles files as per the Governance System rules, must be the only file present at a Pull Request in order to pass all the validations and be automatically merged.'
});
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.pulls.update({
owner: owner,
repo: repo,
@@ -379,7 +381,7 @@ exports.newGithubServer = function newGithubServer() {
if (githubUsername !== fileName) {
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #2 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the File Name. -> Github Username = ' + githubUsername + '-> fileName = ' + fileName)
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.issues.createComment({
owner: owner,
repo: repo,
@@ -387,7 +389,7 @@ exports.newGithubServer = function newGithubServer() {
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that the Github User "' + githubUsername + '" who submitted it, is not equal to the name of the User Profile Plugin File.\n\n File Name = "' + fileName + '"'
});
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.pulls.update({
owner: owner,
repo: repo,
@@ -402,8 +404,8 @@ exports.newGithubServer = function newGithubServer() {
/*
Validation #3: The file changed at the PR is a User Profile.
*/
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
fileContent = await CL.projects.foundations.utilities.webAccess.fetchAPIDataFile(fileContentUrl)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
fileContent = await PL.projects.foundations.utilities.webAccess.fetchAPIDataFile(fileContentUrl)
userProfile = JSON.parse(fileContent)
if (userProfile.type !== 'User Profile') {
@@ -421,7 +423,7 @@ exports.newGithubServer = function newGithubServer() {
if (messageSigned !== githubUsername) {
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #4 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the Message Signed at the User Profile. -> Github Username = ' + githubUsername + '-> messageSigned = ' + messageSigned)
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.issues.createComment({
owner: owner,
repo: repo,
@@ -429,7 +431,41 @@ exports.newGithubServer = function newGithubServer() {
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that the Github User "' + githubUsername + '" who submitted it, is not equal to the Message Signed at the User Profile.\n\n Message Signed = "' + messageSigned + '"'
});
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.pulls.update({
owner: owner,
repo: repo,
pull_number: pullRequest.number,
state: 'closed'
});
return false
}
}
async function validateMessageSignedHashIsSignatureHash() {
/*
Validation #5: The message signed has is equal to the signature messageHash.
*/
let config = JSON.parse(userProfile.config)
let serverResponse = await PL.servers.WEB3_SERVER.hashData(
config.signature.message
)
let messageSignedHash = serverResponse.hash
let signatureHash = config.signature.messageHash
if (messageSignedHash !== signatureHash) {
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #5 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Message Signed Hash is not equal to the the Signature Hash. -> messageSignedHash = ' + messageSignedHash + '-> signatureHash = ' + signatureHash)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: pullRequest.number,
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the Message Signed Hash is not equal to the the Signature Hash.\n\n messageSignedHash = "' + messageSignedHash + '"\n\n signatureHash = "' + signatureHash + '"'
});
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.pulls.update({
owner: owner,
repo: repo,
@@ -442,12 +478,12 @@ exports.newGithubServer = function newGithubServer() {
async function validateUserProfileNodeNameEqualsGithubUsername() {
/*
Validation #5: The name of the User Profile node is not the Github Username.
Validation #6: The name of the User Profile node is not the Github Username.
*/
if (userProfile.name !== githubUsername) {
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #5 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the User Profile node\'s name. -> Github Username = ' + githubUsername + '-> userProfile.name = ' + userProfile.name)
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #6 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Github Username is not equal to the User Profile node\'s name. -> Github Username = ' + githubUsername + '-> userProfile.name = ' + userProfile.name)
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.issues.createComment({
owner: owner,
repo: repo,
@@ -455,7 +491,7 @@ exports.newGithubServer = function newGithubServer() {
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because it was detected that the Github User "' + githubUsername + '" who submitted it, is not equal to the User Profile node\'s name.\n\n User Profile Name = "' + userProfile.name + '"'
});
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.pulls.update({
owner: owner,
repo: repo,
@@ -468,7 +504,7 @@ exports.newGithubServer = function newGithubServer() {
async function validateUserProfileIdDoesNotBelongtoAnotherUserProfile() {
/*
Validation #6: The id of the User Profile can not be the id of an already existing User Profile
Validation #7: The id of the User Profile can not be the id of an already existing User Profile
unless the existing one belongs to the same Github username.
*/
let userProfileIdMap = new Map()
@@ -493,9 +529,9 @@ exports.newGithubServer = function newGithubServer() {
if (testUserProfile === undefined) { return true }
if (testUserProfile !== userProfile.name) {
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #6 Failed -> Pull Request "' + pullRequest.title + '" not merged because the User Profile Id already exists and belongs to another User Profile on record. -> Profile Id = ' + userProfile.id + '-> User Profile with the same Id = ' + testUserProfile)
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #7 Failed -> Pull Request "' + pullRequest.title + '" not merged because the User Profile Id already exists and belongs to another User Profile on record. -> Profile Id = ' + userProfile.id + '-> User Profile with the same Id = ' + testUserProfile)
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.issues.createComment({
owner: owner,
repo: repo,
@@ -503,7 +539,7 @@ exports.newGithubServer = function newGithubServer() {
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the User Profile Id already exists and belongs to another User Profile on record. \n\nUser Profile Id = "' + userProfile.id + '" \n\n User Profile with the same Id = "' + testUserProfile + '"'
});
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.pulls.update({
owner: owner,
repo: repo,
@@ -517,7 +553,7 @@ exports.newGithubServer = function newGithubServer() {
async function validateUserProfileBlockchainAccountDoesNotBelongtoAnotherUserProfile() {
try {
/*
Validation #7 The blockchain account of the User Profile can not be the
Validation #8 The blockchain account of the User Profile can not be the
blockchain account of an already existing User Profile
unless the existing one belongs to the same Github username.
*/
@@ -538,7 +574,7 @@ exports.newGithubServer = function newGithubServer() {
let config = JSON.parse(otherUserProfile.config)
let messageSigned = JSON.stringify(config.signature)
let serverResponse = await CL.servers.WEB3_SERVER.recoverAddress(
let serverResponse = await PL.servers.WEB3_SERVER.recoverAddress(
messageSigned
)
userProfileIdMap.set(serverResponse.address, otherUserProfile.name)
@@ -546,7 +582,7 @@ exports.newGithubServer = function newGithubServer() {
let config = JSON.parse(userProfile.config)
let messageSigned = JSON.stringify(config.signature)
let serverResponse = await CL.servers.WEB3_SERVER.recoverAddress(
let serverResponse = await PL.servers.WEB3_SERVER.recoverAddress(
messageSigned
)
@@ -554,9 +590,9 @@ exports.newGithubServer = function newGithubServer() {
if (testUserProfile === undefined) { return true }
if (testUserProfile !== userProfile.name) {
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #7 Failed -> Pull Request "' + pullRequest.title + '" not merged because the User Profile Blockchain Account already exists and belongs to another User Profile on record. -> Profile Blockchain Account = ' + serverResponse.address + '-> User Profile with the same Blockchain Account = ' + testUserProfile)
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #8 Failed -> Pull Request "' + pullRequest.title + '" not merged because the User Profile Blockchain Account already exists and belongs to another User Profile on record. -> Profile Blockchain Account = ' + serverResponse.address + '-> User Profile with the same Blockchain Account = ' + testUserProfile)
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.issues.createComment({
owner: owner,
repo: repo,
@@ -564,7 +600,7 @@ exports.newGithubServer = function newGithubServer() {
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the User Profile Blockchain Account already exists and belongs to another User Profile on record. \n\nUser Profile Blockchain Account = "' + serverResponse.address + '" \n\n User Profile with the same Blockchain Account = "' + testUserProfile + '"'
});
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.pulls.update({
owner: owner,
repo: repo,
@@ -578,11 +614,82 @@ exports.newGithubServer = function newGithubServer() {
}
}
async function validateUserProfileSigningAccountsDoesNotBelongtoAnotherUserProfile() {
try {
if (userProfile.signingAccounts === undefined) { return true }
for (let i = 0; i < userProfile.signingAccounts.signingAccounts.length; i++) {
let signingAccount = userProfile.signingAccounts.signingAccounts[i]
let config = JSON.parse(signingAccount.config)
/*
Validation #9 Signing accounts of the User Profile
must have a signature of the same Github username of the User Profile.
*/
let messageSigned = config.signature.message
if (messageSigned !== githubUsername) {
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #9 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Signing Account ' + signingAccount.name + ' has not signed the current Github User Account, but something else. -> messageSigned = ' + messageSigned + '-> githubUsername = ' + githubUsername)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: pullRequest.number,
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the Signing Account "' + signingAccount.name + '" has not signed the current Github User Account, but something else. \n\n messageSigned = "' + messageSigned + '" \n\n githubUsername = "' + githubUsername + '"'
});
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.pulls.update({
owner: owner,
repo: repo,
pull_number: pullRequest.number,
state: 'closed'
});
return false
}
/*
Validation #10: The message signed has is equal to the signature messageHash.
*/
let serverResponse = await PL.servers.WEB3_SERVER.hashData(
config.signature.message
)
let messageSignedHash = serverResponse.hash
let signatureHash = config.signature.messageHash
if (messageSignedHash !== signatureHash) {
console.log('[INFO] Github Server -> mergeGithubPullRequests -> Validation #10 Failed -> Pull Request "' + pullRequest.title + '" not merged because the Message Signed Hash is not equal to the the Signature Hash. -> messageSignedHash = ' + messageSignedHash + '-> signatureHash = ' + signatureHash)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: pullRequest.number,
body: 'This Pull Request could not be automatically merged and was closed by the Superalgos Governance System because the Message Signed Hash is not equal to the the Signature Hash.\n\n messageSignedHash = "' + messageSignedHash + '"\n\n signatureHash = "' + signatureHash + '"'
});
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.pulls.update({
owner: owner,
repo: repo,
pull_number: pullRequest.number,
state: 'closed'
});
return false
}
}
return true
} catch (err) {
console.log(err.stack)
}
}
async function mergePullRequest() {
/*
All validations passed, we will proceed an merge this Pull Request.
*/
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
mergeResponse = await octokit.rest.pulls.merge({
owner: owner,
repo: repo,
@@ -603,7 +710,7 @@ exports.newGithubServer = function newGithubServer() {
try {
page++
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
let listResponse = await octokit.rest.pulls.list({
owner: owner,
@@ -631,7 +738,7 @@ exports.newGithubServer = function newGithubServer() {
for (let i = 0; i < githubPrListMaster.length; i++) {
let pullRequest = githubPrListMaster[i]
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.issues.createComment({
owner: owner,
repo: repo,
@@ -639,7 +746,7 @@ exports.newGithubServer = function newGithubServer() {
body: 'Hi, this is the Superalgos Governance System taking notice that you have submitted a pull request directly to the master branch.\n\nThanks for submitting a PR to the Superalgos Project. We value every contribution and everyone is welcome to send PRs. Unfortunatelly we are not merging pull requests directly into the master branch. Consider resubmitting to the develop branch intstead. For your convinienve, you can swithch branches from within the app, at the footer of the Docs tab. \n\n I will close this pull request now and look forward for your next contribution either to the develop branch or any other branch available for this purpose.'
});
await CL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await PL.projects.foundations.utilities.asyncFunctions.sleep(GITHUB_API_WAITING_TIME)
await octokit.rest.pulls.update({
owner: owner,
repo: repo,
+97 -43
View File
@@ -24,13 +24,13 @@ exports.newHttpInterface = function newHttpInterface() {
/*
We will create an HTTP Server and leave it running forever.
*/
SA.nodeModules.http.createServer(onHttpRequest).listen(global.env.CLIENT_HTTP_INTERFACE_PORT)
/* Starting the browser now is optional */
if (process.argv.includes("noBrowser")) {
//Running Client only with no UI.
} else {
SA.nodeModules.open('http://localhost:' + global.env.CLIENT_HTTP_INTERFACE_PORT)
}
SA.nodeModules.http.createServer(onHttpRequest).listen(global.env.CLIENT_HTTP_INTERFACE_PORT)
/* Starting the browser now is optional */
if (process.argv.includes("noBrowser")) {
//Running Client only with no UI.
} else {
SA.nodeModules.open('http://localhost:' + global.env.CLIENT_HTTP_INTERFACE_PORT)
}
}
function onHttpRequest(httpRequest, httpResponse) {
@@ -43,16 +43,17 @@ exports.newHttpInterface = function newHttpInterface() {
case 'WEB3':
{
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
async function processRequest(body) {
try {
if (body === undefined) { return }
let params = JSON.parse(body)
switch (params.method) {
case 'getNetworkClientStatus': {
let serverResponse = await CL.servers.WEB3_SERVER.getNetworkClientStatus(
let serverResponse = await PL.servers.WEB3_SERVER.getNetworkClientStatus(
params.host,
params.port,
params.interface
@@ -63,7 +64,7 @@ exports.newHttpInterface = function newHttpInterface() {
}
case 'createWalletAccount': {
let serverResponse = await CL.servers.WEB3_SERVER.createWalletAccount(
let serverResponse = await PL.servers.WEB3_SERVER.createWalletAccount(
params.entropy
)
@@ -72,7 +73,7 @@ exports.newHttpInterface = function newHttpInterface() {
}
case 'getWalletBalances': {
let serverResponse = await CL.servers.WEB3_SERVER.getWalletBalances(
let serverResponse = await PL.servers.WEB3_SERVER.getWalletBalances(
params.host,
params.port,
params.interface,
@@ -84,7 +85,7 @@ exports.newHttpInterface = function newHttpInterface() {
}
case 'signData': {
let serverResponse = await CL.servers.WEB3_SERVER.signData(
let serverResponse = await PL.servers.WEB3_SERVER.signData(
params.privateKey,
params.data
)
@@ -92,9 +93,18 @@ exports.newHttpInterface = function newHttpInterface() {
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(serverResponse), httpResponse)
return
}
case 'hashData': {
let serverResponse = await PL.servers.WEB3_SERVER.hashData(
params.data
)
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(serverResponse), httpResponse)
return
}
case 'recoverAddress': {
let serverResponse = await CL.servers.WEB3_SERVER.recoverAddress(
let serverResponse = await PL.servers.WEB3_SERVER.recoverAddress(
params.signature
)
@@ -103,7 +113,7 @@ exports.newHttpInterface = function newHttpInterface() {
}
case 'mnemonicToPrivateKey': {
let serverResponse = await CL.servers.WEB3_SERVER.mnemonicToPrivateKey(
let serverResponse = await PL.servers.WEB3_SERVER.mnemonicToPrivateKey(
params.mnemonic
)
@@ -131,10 +141,11 @@ exports.newHttpInterface = function newHttpInterface() {
break
case 'CCXT':
{
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
async function processRequest(body) {
try {
if (body === undefined) { return }
let params = JSON.parse(body)
switch (params.method) {
@@ -242,9 +253,11 @@ exports.newHttpInterface = function newHttpInterface() {
break
}
case 'New-Message': {
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
function processRequest(messageReceived) {
if (messageReceived === undefined) { return }
let timestamp = (new Date()).valueOf()
let source = requestPath[3]
let exchange = requestPath[4]
@@ -291,10 +304,12 @@ exports.newHttpInterface = function newHttpInterface() {
{
switch (requestPath[2]) { // switch by command
case 'Save-Node-Schema': {
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
async function processRequest(body) {
try {
if (body === undefined) { return }
let docsSchema = JSON.parse(body)
let project = requestPath[3]
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Nodes'
@@ -322,10 +337,12 @@ exports.newHttpInterface = function newHttpInterface() {
}
case 'Save-Concept-Schema': {
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
async function processRequest(body) {
try {
if (body === undefined) { return }
let docsSchema = JSON.parse(body)
let project = requestPath[3]
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Concepts'
@@ -353,10 +370,12 @@ exports.newHttpInterface = function newHttpInterface() {
}
case 'Save-Topic-Schema': {
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
async function processRequest(body) {
try {
if (body === undefined) { return }
let docsSchema = JSON.parse(body)
let project = requestPath[3]
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Topics'
@@ -384,10 +403,12 @@ exports.newHttpInterface = function newHttpInterface() {
}
case 'Save-Tutorial-Schema': {
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
async function processRequest(body) {
try {
if (body === undefined) { return }
let docsSchema = JSON.parse(body)
let project = requestPath[3]
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Tutorials'
@@ -415,10 +436,12 @@ exports.newHttpInterface = function newHttpInterface() {
}
case 'Save-Review-Schema': {
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
async function processRequest(body) {
try {
if (body === undefined) { return }
let docsSchema = JSON.parse(body)
let project = requestPath[3]
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Reviews'
@@ -446,10 +469,12 @@ exports.newHttpInterface = function newHttpInterface() {
}
case 'Save-Book-Schema': {
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
async function processRequest(body) {
try {
if (body === undefined) { return }
let docsSchema = JSON.parse(body)
let project = requestPath[3]
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Books'
@@ -625,8 +650,8 @@ exports.newHttpInterface = function newHttpInterface() {
contribute()
async function contribute() {
const { lookpath } = require('lookpath');
const gitpath = await lookpath('git');
const { lookpath } = SA.nodeModules.lookpath
const gitpath = await lookpath('git')
if (gitpath === undefined) {
console.log('[ERROR] `git` not installed.')
} else {
@@ -665,7 +690,7 @@ exports.newHttpInterface = function newHttpInterface() {
}
async function doGit() {
const simpleGit = require('simple-git');
const simpleGit = SA.nodeModules.simpleGit
const options = {
baseDir: process.cwd(),
binary: 'git',
@@ -696,7 +721,7 @@ exports.newHttpInterface = function newHttpInterface() {
async function doGithub() {
const { Octokit } = require("@octokit/rest")
const { Octokit } = SA.nodeModules.octokit
const octokit = new Octokit({
auth: token,
@@ -760,7 +785,7 @@ exports.newHttpInterface = function newHttpInterface() {
update()
async function update() {
const { lookpath } = require('lookpath');
const { lookpath } = SA.nodeModules.lookpath
const gitpath = await lookpath('git');
if (gitpath === undefined) {
console.log('[ERROR] `git` not installed.')
@@ -790,7 +815,7 @@ exports.newHttpInterface = function newHttpInterface() {
}
async function doGit() {
const simpleGit = require('simple-git');
const simpleGit = SA.nodeModules.simpleGit
const options = {
baseDir: process.cwd(),
binary: 'git',
@@ -831,7 +856,7 @@ exports.newHttpInterface = function newHttpInterface() {
checkout()
async function checkout() {
const { lookpath } = require('lookpath');
const { lookpath } = SA.nodeModules.lookpath
const gitpath = await lookpath('git');
if (gitpath === undefined) {
console.log('[ERROR] `git` not installed.')
@@ -855,7 +880,7 @@ exports.newHttpInterface = function newHttpInterface() {
}
async function doGit() {
const simpleGit = require('simple-git');
const simpleGit = SA.nodeModules.simpleGit
const options = {
baseDir: process.cwd(),
binary: 'git',
@@ -890,7 +915,7 @@ exports.newHttpInterface = function newHttpInterface() {
branch()
async function branch() {
const { lookpath } = require('lookpath');
const { lookpath } = SA.nodeModules.lookpath
const gitpath = await lookpath('git');
if (gitpath === undefined) {
console.log('[ERROR] `git` not installed.')
@@ -918,7 +943,7 @@ exports.newHttpInterface = function newHttpInterface() {
}
async function doGit() {
const simpleGit = require('simple-git');
const simpleGit = SA.nodeModules.simpleGit
const options = {
baseDir: process.cwd(),
binary: 'git',
@@ -991,16 +1016,18 @@ exports.newHttpInterface = function newHttpInterface() {
related to the Governance System are implemented here and routed
to the backend Servers that can process them.
*/
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
async function processRequest(body) {
try {
if (body === undefined) { return }
let params = JSON.parse(body)
switch (params.method) {
case 'getGithubStars': {
let serverResponse = await CL.servers.GITHUB_SERVER.getGithubStars(
let serverResponse = await PL.servers.GITHUB_SERVER.getGithubStars(
params.repository,
params.username,
params.token
@@ -1011,7 +1038,7 @@ exports.newHttpInterface = function newHttpInterface() {
}
case 'getGithubWatchers': {
let serverResponse = await CL.servers.GITHUB_SERVER.getGithubWatchers(
let serverResponse = await PL.servers.GITHUB_SERVER.getGithubWatchers(
params.repository,
params.username,
params.token
@@ -1022,7 +1049,7 @@ exports.newHttpInterface = function newHttpInterface() {
}
case 'getGithubForks': {
let serverResponse = await CL.servers.GITHUB_SERVER.getGithubForks(
let serverResponse = await PL.servers.GITHUB_SERVER.getGithubForks(
params.repository,
params.username,
params.token
@@ -1033,18 +1060,27 @@ exports.newHttpInterface = function newHttpInterface() {
}
case 'mergePullRequests': {
let serverResponse = await CL.servers.GITHUB_SERVER.mergePullRequests(
let serverResponse = await PL.servers.GITHUB_SERVER.mergePullRequests(
params.commitMessage,
params.username,
params.token
)
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(serverResponse), httpResponse)
setInterval(
PL.servers.GITHUB_SERVER.mergePullRequests,
60000,
params.commitMessage,
params.username,
params.token
)
return
}
case 'payContributors': {
let serverResponse = await CL.servers.WEB3_SERVER.payContributors(
let serverResponse = await PL.servers.WEB3_SERVER.payContributors(
params.contractAddress,
params.contractAbi,
params.paymentsArray,
@@ -1068,7 +1104,11 @@ exports.newHttpInterface = function newHttpInterface() {
message: err.message,
stack: err.stack
}
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(error), httpResponse)
try {
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(error), httpResponse)
} catch(err) {
// we just try to reponnd to the web app, but maybe the response has already been sent.
}
}
}
}
@@ -1375,6 +1415,11 @@ exports.newHttpInterface = function newHttpInterface() {
let folder = unescape(requestPath[3])
let fileName = unescape(requestPath[4])
/*Beta 12 Refactoring Code: Remove this before realeasing beta 12.*/
if (fileName === 'Superalgos-CL.json') {
fileName = 'Superalgos-PL.json'
}
let response = await SA.projects.foundations.utilities.plugins.getPluginFileContent(
project,
folder,
@@ -1407,10 +1452,12 @@ exports.newHttpInterface = function newHttpInterface() {
break
case 'SavePlugin':
{
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
async function processRequest(body) {
try {
if (body === undefined) { return }
let plugin = JSON.parse(body)
let project = requestPath[2]
let folder = requestPath[3]
@@ -1541,10 +1588,12 @@ exports.newHttpInterface = function newHttpInterface() {
break
case 'SaveWorkspace':
{
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, processRequest)
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
async function processRequest(body) {
if (body === undefined) { return }
let fileContent = body
let fileName = unescape(requestPath[2])
let filePath = global.env.PATH_TO_MY_WORKSPACES + '/' + fileName + '.json'
@@ -1693,11 +1742,16 @@ exports.newHttpInterface = function newHttpInterface() {
break
default:
{
SA.projects.foundations.utilities.httpResponses.respondWithWebFile(httpResponse, endpointOrFile, global.env.PATH_TO_CLIENT)
SA.projects.foundations.utilities.httpResponses.respondWithWebFile(httpResponse, endpointOrFile, global.env.PATH_TO_CLIENT)
}
}
} catch (err) {
console.log(err.stack)
if (err.stack !== undefined) {
console.log(err.stack)
}
if (err.message !== undefined) {
console.log('[ERROR] onHttpRequest -> err.message = ' + err.message)
}
}
}
}
+2 -2
View File
@@ -63,7 +63,7 @@
//console.log('[INFO] Client -> Task Manager Server -> runTask -> Task Name = ' + message.event.taskName)
//console.log('[INFO] Client -> Task Manager Server -> runTask -> Task Id = ' + message.event.taskId)
let path = global.env.PATH_TO_TASK_SERVER + '/Task.js'
let path = './TaskServerRoot.js'
/* Workarround to avoid having the same debug port at the forked process which makes it crash. */
for (let i = 0; i < process.execArgv.length; i++) {
@@ -263,7 +263,7 @@
responseWaiters.set(command.callerId, responseCallBack)
}
CL.servers.EVENT_SERVER.onMessage(JSON.stringify(command), thisObject.onMessage)
PL.servers.EVENT_SERVER.onMessage(JSON.stringify(command), thisObject.onMessage)
} catch (err) {
console.log('[ERROR] Client -> Task Manager Server -> sendCommand -> Error Sending Command to Events Server -> command = ' + JSON.stringify(command))
console.log('[ERROR] Client -> Task Manager Server -> sendCommand -> Error Sending Command to Events Server -> error = ' + err.stack)
+22 -5
View File
@@ -7,6 +7,7 @@ exports.newWeb3Server = function newWeb3Server() {
createWalletAccount: createWalletAccount,
getWalletBalances: getWalletBalances,
signData: signData,
hashData: hashData,
recoverAddress: recoverAddress,
mnemonicToPrivateKey: mnemonicToPrivateKey,
payContributors: payContributors,
@@ -15,7 +16,7 @@ exports.newWeb3Server = function newWeb3Server() {
run: run
}
const Web3 = require('web3');
const Web3 = SA.nodeModules.web3
let web3Map = new Map()
return thisObject
@@ -223,6 +224,22 @@ exports.newWeb3Server = function newWeb3Server() {
}
}
async function hashData(data) {
try {
let web3 = new Web3()
let hash = web3.eth.accounts.hashMessage(data)
return {
hash: hash,
result: 'Ok'
}
} catch (err) {
return { error: 'Could not hash the data. ' + err.stack }
}
}
async function recoverAddress(signature) {
try {
let signatureObject = JSON.parse(signature)
@@ -241,7 +258,7 @@ exports.newWeb3Server = function newWeb3Server() {
async function mnemonicToPrivateKey(mnemonic) {
try {
const ethers = require('ethers')
const ethers = SA.nodeModules.ethers
let wallet = ethers.Wallet.fromMnemonic(mnemonic)
if (wallet.privateKey !== undefined) {
@@ -269,7 +286,7 @@ exports.newWeb3Server = function newWeb3Server() {
let privateKey = response.privateKey
for (let i = 0; i < paymentsArray.length; i++) {
await CL.projects.foundations.utilities.asyncFunctions.sleep(10000)
await PL.projects.foundations.utilities.asyncFunctions.sleep(10000)
let payment = paymentsArray[i]
sendTokens(
i + 1,
@@ -288,14 +305,14 @@ exports.newWeb3Server = function newWeb3Server() {
console.log('---------------------------------------------------------------------------------------------------------------------------------------------------')
console.log('')
const Tx = require('ethereumjs-tx').Transaction;
const Tx = SA.nodeModules.ethereumjsTx.Transaction;
const web3 = new Web3(new Web3.providers.HttpProvider('https://bsc-dataseed.binance.org/'))
const amount = web3.utils.toHex(tokenAmount)
privateKey = privateKey.replace('0x', '')
const privateKeyBuffer = Buffer.from(privateKey, 'hex')
const contractAbiObject = JSON.parse(contractAbi)
const contract = new web3.eth.Contract(contractAbiObject, contractAddress, { from: fromAddress })
const Common = require('ethereumjs-common').default
const Common = SA.nodeModules.ethereumjsCommon.default
const BSC_FORK = Common.forCustomChain(
'mainnet',
{
+4 -3
View File
@@ -7,7 +7,7 @@
finalize: finalize
}
const WEB_SOCKET = require('ws')
const WEB_SOCKET = SA.nodeModules.ws
let socketServer
let port = global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT
@@ -86,7 +86,7 @@
}
CL.servers.EVENT_SERVER.onMessage(messageToEventServer, onResponse)
PL.servers.EVENT_SERVER.onMessage(messageToEventServer, onResponse)
function onResponse(message) {
socket.send(message)
@@ -97,7 +97,8 @@
}
}
} catch (err) {
console.log('[ERROR] Client -> Web Sockets Interface -> run -> setUpWebSocketServer -> err.message = ' + err.message.substring(0, 1000))
console.log('[ERROR] Client -> Web Sockets Interface -> run -> setUpWebSocketServer -> err.message = ' + err.message)
console.log('[ERROR] Client -> Web Sockets Interface -> run -> setUpWebSocketServer -> err.message = ' + err.stack)
}
}
}
+162 -190
View File
@@ -1,194 +1,166 @@
exports.newPlatformApp = function newPlatformApp() {
/* Load Environment Variables */
let ENVIRONMENT = require('../Environment.js');
let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment()
global.env = ENVIRONMENT_MODULE
process.on('uncaughtException', function (err) {
if (err.message && err.message.indexOf("EADDRINUSE") > 0) {
console.log("The Superalgos Platform Client cannot be started. Reason: the port configured migth be being used by another application, or Superalgos Platform Client might be already running.")
return
}
console.log('[ERROR] Platform App -> uncaughtException -> err.message = ' + err.message)
console.log('[ERROR] Platform App -> uncaughtException -> err.stack = ' + err.stack)
console.log('[ERROR] Platform App -> uncaughtException -> err = ' + err)
process.exit(1)
})
process.on('unhandledRejection', (reason, p) => {
// Signal user that a necissary node module is missing
if (reason.code == 'MODULE_NOT_FOUND') {
console.log("[ERROR] Dependency library not found. Please try running the 'node setup' command and then restart the Superalgos Platform Client.")
console.log('[ERROR] Platform App -> reason = ' + JSON.stringify(reason))
process.exit(1)
}
console.log('[ERROR] Platform App -> unhandledRejection -> reason = ' + JSON.stringify(reason))
console.log('[ERROR] Platform App -> unhandledRejection -> p = ' + JSON.stringify(p))
process.exit(1)
})
try {
/* Callbacks default responses. */
global.DEFAULT_OK_RESPONSE = {
result: "Ok",
message: "Operation Succeeded"
};
global.DEFAULT_FAIL_RESPONSE = {
result: "Fail",
message: "Operation Failed"
};
global.DEFAULT_RETRY_RESPONSE = {
result: 'Retry',
message: 'Retry Later'
let thisObject = {
run: run
}
global.CUSTOM_OK_RESPONSE = {
result: 'Ok, but check Message',
message: 'Custom Message'
return thisObject
async function run() {
process.on('uncaughtException', function (err) {
if (err.message && err.message.indexOf("EADDRINUSE") > 0) {
console.log("The Superalgos Platform Client cannot be started. Reason: the port configured migth be being used by another application, or Superalgos Platform Client might be already running.")
return
}
console.log('[ERROR] Platform App -> uncaughtException -> err.message = ' + err.message)
console.log('[ERROR] Platform App -> uncaughtException -> err.stack = ' + err.stack)
console.log('[ERROR] Platform App -> uncaughtException -> err = ' + err)
process.exit(1)
})
process.on('unhandledRejection', (reason, p) => {
// Signal user that a necissary node module is missing
if (reason.code == 'MODULE_NOT_FOUND') {
console.log("[ERROR] Dependency library not found. Please try running the 'node setup' command and then restart the Superalgos Platform Client.")
console.log('[ERROR] Platform App -> reason = ' + JSON.stringify(reason))
process.exit(1)
}
console.log('[ERROR] Platform App -> unhandledRejection -> reason = ' + JSON.stringify(reason))
console.log('[ERROR] Platform App -> unhandledRejection -> p = ' + JSON.stringify(p))
process.exit(1)
})
try {
/* Callbacks default responses. */
global.DEFAULT_OK_RESPONSE = {
result: "Ok",
message: "Operation Succeeded"
};
global.DEFAULT_FAIL_RESPONSE = {
result: "Fail",
message: "Operation Failed"
};
global.DEFAULT_RETRY_RESPONSE = {
result: 'Retry',
message: 'Retry Later'
}
global.CUSTOM_OK_RESPONSE = {
result: 'Ok, but check Message',
message: 'Custom Message'
}
global.CUSTOM_FAIL_RESPONSE = {
result: 'Fail Because',
message: 'Custom Message'
}
/* Servers */
let WEB_SERVER = require('./Client/webServer.js')
let DATA_FILE_SERVER = require('./Client/dataFileServer.js')
let PROJECT_FILE_SERVER = require('./Client/projectFileServer.js')
let UI_FILE_SERVER = require('./Client/uiFileServer.js')
let PLUGIN_SERVER = require('./Client/pluginServer.js')
let EVENT_SERVER = require('./Client/eventServer.js')
let TASK_MANAGER_SERVER = require('./Client/taskManagerServer.js')
let CCXT_SERVER = require('./Client/ccxtServer.js')
let WEB3_SERVER = require('./Client/web3Server.js')
let GITHUB_SERVER = require('./Client/githubServer.js')
/* Network Interfaces */
let WEB_SOCKETS_INTERFACE = require('./Client/webSocketsInterface.js')
let HTTP_INTERFACE = require('./Client/httpInterface.js')
/*
Setting up servers running inside this Client.
*/
PL.servers = {}
console.log('SUPERALGOS PLATFORM CLIENT SERVERS:')
console.log('')
PL.servers.WEB_SERVER = WEB_SERVER.newWebServer()
PL.servers.WEB_SERVER.initialize()
PL.servers.WEB_SERVER.run()
console.log('Web Server .................................................. Started')
PL.servers.UI_FILE_SERVER = UI_FILE_SERVER.newUIFileServer()
PL.servers.UI_FILE_SERVER.initialize()
PL.servers.UI_FILE_SERVER.run()
console.log('UI File Server .............................................. Started')
PL.servers.PROJECT_FILE_SERVER = PROJECT_FILE_SERVER.newProjectFileServer()
PL.servers.PROJECT_FILE_SERVER.initialize()
PL.servers.PROJECT_FILE_SERVER.run()
console.log('Project File Server ......................................... Started')
PL.servers.PLUGIN_SERVER = PLUGIN_SERVER.newPluginServer()
PL.servers.PLUGIN_SERVER.initialize()
PL.servers.PLUGIN_SERVER.run()
console.log('Plugin Server ............................................... Started')
PL.servers.DATA_FILE_SERVER = DATA_FILE_SERVER.newDataFileServer()
PL.servers.DATA_FILE_SERVER.initialize()
PL.servers.DATA_FILE_SERVER.run()
console.log('Data File Server ............................................ Started')
PL.servers.EVENT_SERVER = EVENT_SERVER.newEventServer()
PL.servers.EVENT_SERVER.initialize()
PL.servers.EVENT_SERVER.run()
console.log('Events Server ............................................... Started')
TASK_MANAGER_SERVER = TASK_MANAGER_SERVER.newTaskManagerServer()
TASK_MANAGER_SERVER.initialize()
TASK_MANAGER_SERVER.run()
console.log('Task Manager Server ......................................... Started')
PL.servers.CCXT_SERVER = CCXT_SERVER.newCCXTServer()
PL.servers.CCXT_SERVER.initialize()
PL.servers.CCXT_SERVER.run()
console.log('CCXT Server ................................................. Started')
PL.servers.WEB3_SERVER = WEB3_SERVER.newWeb3Server()
PL.servers.WEB3_SERVER.initialize()
PL.servers.WEB3_SERVER.run()
console.log('WEB3 Server ................................................. Started')
PL.servers.GITHUB_SERVER = GITHUB_SERVER.newGithubServer()
PL.servers.GITHUB_SERVER.initialize()
PL.servers.GITHUB_SERVER.run()
console.log('Github Server ............................................... Started')
console.log('')
console.log('SUPERALGOS PLATFORM CLIENT INTERFACES:')
console.log('')
WEB_SOCKETS_INTERFACE = WEB_SOCKETS_INTERFACE.newWebSocketsInterface()
WEB_SOCKETS_INTERFACE.initialize()
console.log('Web Sockets Interface ....................................... Listening at port ' + global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT)
HTTP_INTERFACE = HTTP_INTERFACE.newHttpInterface()
HTTP_INTERFACE.initialize()
console.log('Http Interface .............................................. Listening at port ' + global.env.CLIENT_HTTP_INTERFACE_PORT)
console.log('')
console.log("You are running Superalgos Beta 11")
console.log('')
console.log("What's new? These are the main new features in this version:")
console.log('')
console.log('Governance System ........................................... Automates the distribution of SA Tokens and allow users to vote on the direction of the project.')
console.log('TensorFlow Integration ...................................... Allows creating and training ML models and use them in trading strategies.')
console.log('')
console.log("What's next? This is the current development pipeline:")
console.log('')
console.log('Superalgos P2P Network ...................................... Will allow algo-traders to share trading signals with Superalgos users consuming these signals via a mobile app.')
console.log('Real-time Trading Signals ................................... Will allow users to emit trading signals and be rewarded with SA Tokens.')
console.log('Superalgos Mobile ........................................... Will allow users to consume trading signals for free and autonomously execute trades from their mobile phones.')
console.log('Ethereum Integration ........................................ Will allow mining data from an Ethereum network node, and bring it into the Superalgos workflow. [Looking for an Ethereum dev that would like to continue this line of development.]')
console.log('')
} catch (err) {
console.log('[ERROR] Platform App -> Error = ' + err.stack)
}
}
global.CUSTOM_FAIL_RESPONSE = {
result: 'Fail Because',
message: 'Custom Message'
}
/* Servers */
let WEB_SERVER = require('./Client/webServer.js')
let DATA_FILE_SERVER = require('./Client/dataFileServer.js')
let PROJECT_FILE_SERVER = require('./Client/projectFileServer.js')
let UI_FILE_SERVER = require('./Client/uiFileServer.js')
let PLUGIN_SERVER = require('./Client/pluginServer.js')
let EVENT_SERVER = require('./Client/eventServer.js')
let TASK_MANAGER_SERVER = require('./Client/taskManagerServer.js')
let CCXT_SERVER = require('./Client/ccxtServer.js')
let WEB3_SERVER = require('./Client/web3Server.js')
let GITHUB_SERVER = require('./Client/githubServer.js')
/* Network Interfaces */
let WEB_SOCKETS_INTERFACE = require('./Client/webSocketsInterface.js')
let HTTP_INTERFACE = require('./Client/httpInterface.js')
/*
The CL object is accesible everywhere at the Superalgos Client.
It provides access to all modules built for this Client.
*/
global.CL = {}
/*
The SA object is accesible everywhere at the Superalgos Client.
It provides access to all modules built for Superalgos in general.
*/
global.SA = {}
/*
First thing is to load the project schema file.
*/
global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA)
/*
Setting up the modules that will be available for the Servers Running inside this Client
*/
let MULTI_PROJECT = require('../MultiProject.js');
let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject()
MULTI_PROJECT_MODULE.initialize(CL, 'CL')
MULTI_PROJECT_MODULE.initialize(SA, 'SA')
/*
Setting up external dependencies.
*/
SA.nodeModules = {
fs: require('fs'),
nodeFetch: require('node-fetch'),
open: require('open'),
http: require('http'),
ccxt: require('ccxt')
}
/*
Setting up servers running inside this Client.
*/
CL.servers = {}
console.log('SUPERALGOS PLATFORM CLIENT SERVERS:')
console.log('')
CL.servers.WEB_SERVER = WEB_SERVER.newWebServer()
CL.servers.WEB_SERVER.initialize()
CL.servers.WEB_SERVER.run()
console.log('Web Server .................................................. Started')
CL.servers.UI_FILE_SERVER = UI_FILE_SERVER.newUIFileServer()
CL.servers.UI_FILE_SERVER.initialize()
CL.servers.UI_FILE_SERVER.run()
console.log('UI File Server .............................................. Started')
CL.servers.PROJECT_FILE_SERVER = PROJECT_FILE_SERVER.newProjectFileServer()
CL.servers.PROJECT_FILE_SERVER.initialize()
CL.servers.PROJECT_FILE_SERVER.run()
console.log('Project File Server ......................................... Started')
CL.servers.PLUGIN_SERVER = PLUGIN_SERVER.newPluginServer()
CL.servers.PLUGIN_SERVER.initialize()
CL.servers.PLUGIN_SERVER.run()
console.log('Plugin Server ............................................... Started')
CL.servers.DATA_FILE_SERVER = DATA_FILE_SERVER.newDataFileServer()
CL.servers.DATA_FILE_SERVER.initialize()
CL.servers.DATA_FILE_SERVER.run()
console.log('Data File Server ............................................ Started')
CL.servers.EVENT_SERVER = EVENT_SERVER.newEventServer()
CL.servers.EVENT_SERVER.initialize()
CL.servers.EVENT_SERVER.run()
console.log('Events Server ............................................... Started')
TASK_MANAGER_SERVER = TASK_MANAGER_SERVER.newTaskManagerServer()
TASK_MANAGER_SERVER.initialize()
TASK_MANAGER_SERVER.run()
console.log('Task Manager Server ......................................... Started')
CL.servers.CCXT_SERVER = CCXT_SERVER.newCCXTServer()
CL.servers.CCXT_SERVER.initialize()
CL.servers.CCXT_SERVER.run()
console.log('CCXT Server ................................................. Started')
CL.servers.WEB3_SERVER = WEB3_SERVER.newWeb3Server()
CL.servers.WEB3_SERVER.initialize()
CL.servers.WEB3_SERVER.run()
console.log('WEB3 Server ................................................. Started')
CL.servers.GITHUB_SERVER = GITHUB_SERVER.newGithubServer()
CL.servers.GITHUB_SERVER.initialize()
CL.servers.GITHUB_SERVER.run()
console.log('Github Server ............................................... Started')
console.log('')
console.log('SUPERALGOS PLATFORM CLIENT INTERFACES:')
console.log('')
WEB_SOCKETS_INTERFACE = WEB_SOCKETS_INTERFACE.newWebSocketsInterface()
WEB_SOCKETS_INTERFACE.initialize()
console.log('Web Sockets Interface ....................................... Listening at port ' + global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT)
HTTP_INTERFACE = HTTP_INTERFACE.newHttpInterface()
HTTP_INTERFACE.initialize()
console.log('Http Interface .............................................. Listening at port ' + global.env.CLIENT_HTTP_INTERFACE_PORT)
console.log('')
console.log("You are running Superalgos Beta 11")
console.log('')
console.log("What's new? These are the main new features in this version:")
console.log('')
console.log('Governance System ........................................... Automates the distribution of SA Tokens and allow users to vote on the direction of the project.')
console.log('TensorFlow Integration ...................................... Allows creating and training ML models and use them in trading strategies.')
console.log('')
console.log("What's next? This is the current development pipeline:")
console.log('')
console.log('Superalgos P2P Network ...................................... Will allow algo-traders to share trading signals with Superalgos users consuming these signals via a mobile app.')
console.log('Real-time Trading Signals ................................... Will allow users to emit trading signals and be rewarded with SA Tokens.')
console.log('Superalgos Mobile ........................................... Will allow users to consume trading signals for free and autonomously execute trades from their mobile phones.')
console.log('Ethereum Integration ........................................ Will allow mining data from an Ethereum network node, and bring it into the Superalgos workflow.')
console.log('')
} catch (err) {
console.log('[ERROR] Platform App -> Error = ' + err.stack)
}
}
+17 -18
View File
@@ -1,11 +1,10 @@
let postLoader
function newAppLoader() {
const MODULE_NAME = 'App Loader'
const INFO_LOG = false
const ERROR_LOG = true
const logger = newWebDebugLog()
let thisObject = {
loadModules: loadModules
@@ -64,16 +63,16 @@ function newAppLoader() {
let fileArray = JSON.parse(fileList)
for (let i = 0; i < fileArray.length; i++) {
let item = fileArray[i]
project = item[0]
fileName = item[1]
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Function-Libraries' + '/' + fileName)
let project = item[0]
let fileName = item[1]
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Function-Libraries' + '/' + fileName)
}
modulesArray = modulesArray.concat(urlArray)
utilities()
}
}
}
function utilities() {
let url = 'ListUtilitiesFiles'
@@ -84,16 +83,16 @@ function newAppLoader() {
let fileArray = JSON.parse(fileList)
for (let i = 0; i < fileArray.length; i++) {
let item = fileArray[i]
project = item[0]
fileName = item[1]
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Utilities' + '/' + fileName)
let project = item[0]
let fileName = item[1]
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Utilities' + '/' + fileName)
}
modulesArray = modulesArray.concat(urlArray)
globals()
}
}
}
function globals() {
let url = 'ListGlobalFiles'
@@ -104,16 +103,16 @@ function newAppLoader() {
let fileArray = JSON.parse(fileList)
for (let i = 0; i < fileArray.length; i++) {
let item = fileArray[i]
project = item[0]
fileName = item[1]
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Globals' + '/' + fileName)
let project = item[0]
let fileName = item[1]
urlArray.push('Projects' + '/' + project + '/' + 'UI' + '/' + 'Globals' + '/' + fileName)
}
modulesArray = modulesArray.concat(urlArray)
spaces()
}
}
}
function spaces() {
let url = 'ListSpaceFiles'
@@ -138,7 +137,7 @@ function newAppLoader() {
for (let i = 0; i < modulesArray.length; i++) {
let path = modulesArray[i]
REQUIREJS([path], onRequired)
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> Module Requested.') }
+26
View File
@@ -459,6 +459,32 @@ function newCanvas() {
return
}
if (
event.shiftKey === true &&
(event.ctrlKey === true || event.metaKey === true) &&
(event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.saveFloatingObjectToBeMoved || event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.saveFloatingObjectToBeMoved.toLowerCase())
) {
UI.projects.foundations.spaces.floatingSpace.saveFloatingObjectToBeMoved()
if (event.preventDefault !== undefined) {
event.preventDefault()
}
return
}
if (
event.shiftKey === true &&
(event.ctrlKey === true || event.metaKey === true) &&
(event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.moveSavedFloatingObjectToMouse || event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.moveSavedFloatingObjectToMouse.toLowerCase())
) {
UI.projects.foundations.spaces.floatingSpace.moveSavedFloatingObjectToMouse(thisObject.mouse.position)
if (event.preventDefault !== undefined) {
event.preventDefault()
}
return
}
let nodeOnFocus = await UI.projects.foundations.spaces.designSpace.workspace.getNodeThatIsOnFocus()
if (nodeOnFocus !== undefined) {
if (nodeOnFocus.payload.uiObject.codeEditor !== undefined) {
+13 -13
View File
@@ -1,5 +1,5 @@
function newEventsServerClient(networkNode) {
function newEventsServerClient(lanNetworkNode) {
/* Web Sockets Connection */
const MODULE_NAME = 'System Event Handler'
@@ -192,19 +192,19 @@ function newEventsServerClient(networkNode) {
if (thisObject.isConnected() !== true) {
if (lastTryToReconnectDatetime !== undefined) {
if (networkNode !== undefined) {
if (networkNode.payload !== undefined) {
if (networkNode.payload.uiObject !== undefined) {
networkNode.payload.uiObject.setErrorMessage('Failed to Connect to Superalgos Client via WebSockets. Retrying in 1 minute. Check at this node config if the host property has the IP address of the computer running Superalgos Client.')
if (lanNetworkNode !== undefined) {
if (lanNetworkNode.payload !== undefined) {
if (lanNetworkNode.payload.uiObject !== undefined) {
lanNetworkNode.payload.uiObject.setErrorMessage('Failed to Connect to Superalgos Platform Client via WebSockets. Retrying in 1 minute. Check at this node config if the host property has the IP address of the computer running Superalgos Platform Client.')
}
}
}
}
} else {
if (networkNode !== undefined) {
if (networkNode.payload !== undefined) {
if (networkNode.payload.uiObject !== undefined) {
networkNode.payload.uiObject.setStatus('Connected to Superalgos Client via WebSockets.')
if (lanNetworkNode !== undefined) {
if (lanNetworkNode.payload !== undefined) {
if (lanNetworkNode.payload.uiObject !== undefined) {
lanNetworkNode.payload.uiObject.setStatus('Connected to Superalgos Platform Client via WebSockets.')
retryCommandsPhysics()
}
}
@@ -220,14 +220,14 @@ function newEventsServerClient(networkNode) {
let port
/* At this point the node does not have the payload property yet, that is why we have to do this manually */
try {
let config = JSON.parse(networkNode.config)
let config = JSON.parse(lanNetworkNode.config)
host = config.host
port = config.webSocketsPort
/* Check if we really have to stablish the connection. */
if (config.autoConnect === false) { return }
} catch (err) {
networkNode.payload.uiObject.setErrorMessage(
lanNetworkNode.payload.uiObject.setErrorMessage(
'Bad configuration. Invalid JSON Format.',
undefined,
{
@@ -241,7 +241,7 @@ function newEventsServerClient(networkNode) {
}
if (host === undefined) {
networkNode.payload.uiObject.setErrorMessage(
lanNetworkNode.payload.uiObject.setErrorMessage(
'Bad configuration. Host Property Not Found.',
undefined,
{
@@ -255,7 +255,7 @@ function newEventsServerClient(networkNode) {
}
if (port === undefined) {
networkNode.payload.uiObject.setErrorMessage(
lanNetworkNode.payload.uiObject.setErrorMessage(
'Bad configuration. WebSocketsPort Property Not Found.',
undefined,
{
+3
View File
@@ -98,6 +98,9 @@ function newUniqueId () {
function splitTextIntoPhrases (text, wordsPerLine) {
try {
if (text.split === undefined) {
return []
}
let splittedLabel = text.split(' ')
let phrases = []
let phrase = ''
-3700
View File
File diff suppressed because it is too large. Load diff
-24
View File
@@ -1,24 +0,0 @@
{
"name": "Superalgos-Plarform",
"version": "0.0.11",
"description": "Superalgos Plarform",
"main": "PlatformApp.js",
"author": {
"name": "Luis-Fernando-Molina"
},
"dependencies": {
"@octokit/rest": "^18.9.0",
"ccxt": "^1.51.98",
"child_process": "^1.0.2",
"ethereumjs-common": "^1.5.2",
"ethereumjs-tx": "^2.1.2",
"ethers": "^5.4.4",
"lookpath": "^1.2.2",
"node-fetch": "^2.6.1",
"open": "^8.2.1",
"rimraf": "^3.0.2",
"simple-git": "^2.42.0",
"web3": "^1.5.2",
"ws": "^8.2.1"
}
}
+60
View File
@@ -0,0 +1,60 @@
/*
This module represents the execution root of the Platform App.
We use this module that is outside the Platform folder to
load all node dependencies and get them ready to the actual App.
*/
/*
The PL object is accesible everywhere at the Superalgos Platform Client.
It provides access to all modules built for this Client.
*/
global.PL = {}
/*
The SA object is accesible everywhere at the Superalgos Desktop App.
It provides access to all modules built for Superalgos in general.
*/
global.SA = {}
/* Load Environment Variables */
let ENVIRONMENT = require('./Environment.js');
let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment()
global.env = ENVIRONMENT_MODULE
/*
First thing is to load the project schema file.
*/
global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA)
/*
Setting up the modules that will be available, defined at the Project Schema file.
*/
let MULTI_PROJECT = require('./MultiProject.js');
let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject()
MULTI_PROJECT_MODULE.initialize(PL, 'PL')
MULTI_PROJECT_MODULE.initialize(SA, 'SA')
/*
Setting up external dependencies.
*/
SA.nodeModules = {
fs: require('fs'),
util: require('util'),
path: require('path'),
ws: require('ws'),
web3: require('web3'),
ethers: require('ethers'),
ethereumjsTx: require('ethereumjs-tx'),
ethereumjsCommon: require('ethereumjs-common'),
nodeFetch: require('node-fetch'),
open: require('open'),
http: require('http'),
ccxt: require('ccxt'),
octokit: require("@octokit/rest"),
simpleGit: require('simple-git'),
lookpath: require('lookpath')
}
run()
async function run() {
PL.app = require('./Platform/PlatformApp.js').newPlatformApp()
await PL.app.run()
console.log('Superalgos Platform App is Running!')
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

@@ -0,0 +1,34 @@
{
"type": "Docs Space Settings",
"level": 4,
"propertyNameAtParent": "docsSpaceSettings",
"attachingRules": {
"compatibleTypes": "Docs Space->"
},
"editors": {
"config": true
},
"initialValues": {
"config": "{\"indexContent\": true \n }"
},
"menuItems": [
{
"action": "Configure",
"actionFunction": "uiObject.configEditor.activate",
"label": "Configure",
"iconPathOn": "configuration",
"iconPathOff": "configuration"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity"
}
],
"addLeftIcons": true
}
@@ -0,0 +1,34 @@
{
"type": "Docs Space Style",
"level": 4,
"propertyNameAtParent": "docsSpaceStyle",
"attachingRules": {
"compatibleTypes": "Docs Space->"
},
"editors": {
"config": true
},
"initialValues": {
"config": "{\"backgroundColor\":\"UI_COLOR.BLACK\",\"node\":{\"fontSize\":16,\"imageSize\":60,\"type\":{\"fontColor\":\"UI_COLOR.WHITE\"},\"name\":{\"fontColor\":\"UI_COLOR.WHITE\"},\"menuItem\":{\"backgroundColor\":\"UI_COLOR.BLACK\",\"fontColor\":\"UI_COLOR.WHITE\",\"fontSize\":14,\"imageSize\":14}}}"
},
"menuItems": [
{
"action": "Configure",
"actionFunction": "uiObject.configEditor.activate",
"label": "Configure",
"iconPathOn": "configuration",
"iconPathOff": "configuration"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity"
}
],
"addLeftIcons": true
}
@@ -3,22 +3,25 @@
"menuItems": [
{
"action": "Add UI Object",
"actionProject": "Foundations",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "spaceStyle",
"label": "Add Space Style",
"relatedUiObject": "Space Style",
"propertyToCheckFor": "docsSpaceStyle",
"label": "Add Docs Space Style",
"relatedUiObject": "Docs Space Style",
"actionFunction": "payload.executeAction"
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "spaceSettings",
"label": "Add Space Settings",
"relatedUiObject": "Space Settings",
"propertyToCheckFor": "docsSpaceSettings",
"label": "Add Docs Space Settings",
"relatedUiObject": "Docs Space Settings",
"actionFunction": "payload.executeAction"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
@@ -32,15 +35,15 @@
"level": 0,
"childrenNodesProperties": [
{
"name": "spaceStyle",
"name": "docsSpaceStyle",
"type": "node",
"childType": "Space Style",
"childType": "Docs Space Style",
"autoAdd": true
},
{
"name": "spaceSettings",
"name": "docsSpaceSettings",
"type": "node",
"childType": "Space Settings",
"childType": "Docs Space Settings",
"autoAdd": true
}
]
@@ -0,0 +1,45 @@
{
"type": "Education Project",
"menuItems": [
{
"action": "Add UI Object",
"actionProject": "Foundations",
"label": "Add Tutorial",
"iconProject": "Education",
"relatedUiObject": "Tutorial",
"actionFunction": "payload.executeAction"
},
{
"action": "Add UI Object",
"actionProject": "Foundations",
"label": "Add Docs Space",
"relatedUiObject": "Docs Space",
"actionFunction": "payload.executeAction"
},
{
"action": "Delete UI Object",
"actionProject": "Foundations",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity"
}
],
"isProjectHead": true,
"isTitleAllwaysVisible": false,
"addLeftIcons": true,
"isPinned": true,
"positionLocked": true,
"childrenNodesProperties": [
{
"name": "projectDefinition",
"type": "node",
"childType": "Project Definition",
"project": "Foundations",
"autoAdd": true
}
],
"icon": "education"
}
@@ -0,0 +1,18 @@
{
"type": "Docs Space Settings",
"definition": {
"text": "This node allows the user to determine how the docs space will be loaded by the current workspace.",
"updated": 1631587592724
},
"paragraphs": [
{
"style": "Subtitle",
"text": "Properties",
"updated": 1631587516173
},
{
"style": "List",
"text": "indexContent defines whether the contents of the docs space will be indexed for searching upon loading the workspace. If false docs space will be disabled allowing faster load times for development."
}
]
}
@@ -0,0 +1,13 @@
{
"type": "Docs Space Style",
"definition": {
"text": "This node is currently a place holder that will eventually allow users to adjust the visual apperance of the docs space.",
"updated": 1631589004055
},
"paragraphs": [
{
"style": "Text",
"text": "Right click and select the pencil button to enter edit mode."
}
]
}
@@ -23,8 +23,8 @@ function newFoundationsDocsSearchEngine() {
*/
let docsSpaceNode = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadByNodeType('Docs Space')
if (docsSpaceNode !== undefined) {
if (docsSpaceNode.spaceSettings !== undefined) {
let indexContent = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(docsSpaceNode.spaceSettings.payload, 'indexContent')
if (docsSpaceNode.docsSpaceSettings !== undefined) {
let indexContent = UI.projects.foundations.utilities.nodeConfig.loadConfigProperty(docsSpaceNode.docsSpaceSettings.payload, 'indexContent')
if (indexContent === false) {
callbackFunction()
return
@@ -12,6 +12,7 @@ function newEducationTutorialSpace() {
playTutorialStep: playTutorialStep,
resumeTutorialStep: resumeTutorialStep,
resetTutorialProgress: resetTutorialProgress,
sidePanelTab: undefined,
container: undefined,
physics: physics,
draw: draw,
@@ -37,6 +38,8 @@ function newEducationTutorialSpace() {
resize()
let browserResizedEventSubscriptionId
let openingEventSubscriptionId
let closingEventSubscriptionId
let tutorialRootNode
let currentNode
@@ -104,6 +107,8 @@ function newEducationTutorialSpace() {
batchConfigChangesCounter = 0
workspacesCounter = 0
setupSidePanelTab()
browserResizedEventSubscriptionId = canvas.eventHandler.listenToEvent('Browser Resized', resize)
let workspace = UI.projects.foundations.spaces.designSpace.workspace
workspace.executeAction({ name: 'Play Tutorials', project: 'Foundations' })
@@ -112,6 +117,8 @@ function newEducationTutorialSpace() {
function finalize() {
canvas.eventHandler.stopListening(browserResizedEventSubscriptionId)
thisObject.sidePanelTab.container.eventHandler.stopListening(openingEventSubscriptionId)
thisObject.sidePanelTab.container.eventHandler.stopListening(closingEventSubscriptionId)
tutorialRootNode = undefined
currentNode = undefined
@@ -130,8 +137,14 @@ function newEducationTutorialSpace() {
}
function getContainer(point, purpose) {
if (thisObject.sidePanelTab === undefined) { return }
let container
container = thisObject.sidePanelTab.getContainer(point, purpose)
if (container !== undefined) { return container }
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
return thisObject.container
} else {
@@ -145,11 +158,13 @@ function newEducationTutorialSpace() {
switch (currentStatus) {
case 'Stopped': {
makeInvisible()
thisObject.sidePanelTab.close()
currentNode = undefined
break
}
case 'Playing Tutorial': {
makeVsible()
thisObject.sidePanelTab.open()
break
}
case 'Playing Topic': {
@@ -287,18 +302,28 @@ function newEducationTutorialSpace() {
function checkImage() {
let tutorialImageDiv = document.getElementById('tutorialImageDiv')
if (tutorialImageDiv !== null && tutorialImageDiv !== undefined) {
if (tutorialImageDiv !== null && tutorialImageDiv !== undefined) {
tutorialImageDiv.appendChild(htmlImage)
}
if (newImageName === undefined) { return }
if (currentImageName === newImageName) { return }
currentImageName = newImageName
let webParam = 'Icons/' + newImageProject + '/' + newImageName + '.png'
htmlImage.src = webParam
htmlImage.width = "100"
htmlImage.height = "100"
// If gathering Icon by Project and Name get it now
let icon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(newImageProject, newImageName)
if (icon !== undefined) {
htmlImage.src = icon.src
htmlImage.width = "100"
htmlImage.height = "100"
} else if (icon === undefined) {
// Legacy Code to handle icons being fetched by literal path
// Note: This if statment should be removed once all tutoials have been refactored
let webParam = 'Icons/' + newImageProject + '/' + newImageName + '.png'
htmlImage.src = webParam
htmlImage.width = "100"
htmlImage.height = "100"
}
}
function checkDocumentation() {
@@ -968,8 +993,8 @@ function newEducationTutorialSpace() {
function resumeTutorial(node) {
if (UI.projects.foundations.spaces.designSpace.workspace.isInitialized !== true) { return }
navigationStack = []
//Testing if removing the navigationStack reset here fixes the tutorial resume issues
//navigationStack = []
node.payload.uiObject.isPlaying = true
tutorialRootNode = node
currentNode = node
@@ -990,7 +1015,8 @@ function newEducationTutorialSpace() {
}
function resumeTutorialTopic(node) {
navigationStack = []
//Testing if removing the navigationStack reset here fixes the tutorial resume issues
//navigationStack = []
currentTopicNode = node
currentNode = node
currentStatus = 'Playing Topic'
@@ -1010,7 +1036,8 @@ function newEducationTutorialSpace() {
}
function resumeTutorialStep(node) {
navigationStack = []
//Testing if removing the navigationStack reset here fixes the tutorial resume issues
//navigationStack = []
currentStepNode = node
currentNode = node
currentStatus = 'Playing Step'
@@ -1499,4 +1526,37 @@ function newEducationTutorialSpace() {
function draw() {
if (isInitialized === false) { return }
}
function setupSidePanelTab() {
thisObject.sidePanelTab = UI.projects.foundations.spaces.sideSpace.createSidePanelTab(thisObject.container, 'Education', 'tutorial', 'Tutorial', 'left')
openingEventSubscriptionId = thisObject.sidePanelTab.container.eventHandler.listenToEvent('opening', onOpening)
closingEventSubscriptionId = thisObject.sidePanelTab.container.eventHandler.listenToEvent('closing', onClosing)
}
function onOpening() {
//console.log('onOpening');
if (currentStatus !== "Stopped"){return}
let nodeResume = navigationStack.pop()
switch (nodeResume.type) {
case 'Tutorial': {
resumeTutorial(nodeResume)
break
}
case 'Tutorial Topic': {
resumeTutorialTopic(nodeResume)
break
}
case 'Tutorial Step': {
resumeTutorialStep(nodeResume)
break
}
}
}
function onClosing() {
//console.log('onClosing');
stop()
}
}
@@ -21,7 +21,7 @@
}
],
"referencingRules": {
"compatibleTypes": "->Network Node->"
"compatibleTypes": "->LAN Network Node->"
},
"editors": {
"config": true
@@ -42,8 +42,8 @@ function newEthereumUtilitiesRouteToClient() {
return
}
let networkNodeConfig = JSON.parse(networkClient.payload.referenceParent.config)
let url = 'http://' + networkNodeConfig.host + ':' + networkNodeConfig.webPort + '/' + 'WEB3'
let lanNetworkNodeConfig = JSON.parse(networkClient.payload.referenceParent.config)
let url = 'http://' + lanNetworkNodeConfig.host + ':' + lanNetworkNodeConfig.webPort + '/' + 'WEB3'
return {
params: params,
@@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="350" height="350" viewBox="0 0 350 350" xml:space="preserve">
<desc>Created with Fabric.js 1.7.22</desc>
<defs>
</defs>
<g id="icon" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: none; fill-rule: nonzero; opacity: 1;" transform="translate(-1.9444444444444287 -1.9444444444444287) scale(3.89 3.89)" >
<path d="M 45 0 C 25.463 0 9.625 15.838 9.625 35.375 c 0 8.722 3.171 16.693 8.404 22.861 L 45 90 l 26.97 -31.765 c 5.233 -6.167 8.404 -14.139 8.404 -22.861 C 80.375 15.838 64.537 0 45 0 z M 45 48.705 c -8.035 0 -14.548 -6.513 -14.548 -14.548 c 0 -8.035 6.513 -14.548 14.548 -14.548 s 14.548 6.513 14.548 14.548 C 59.548 42.192 53.035 48.705 45 48.705 z" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(204,88,53); fill-rule: nonzero; opacity: 1;" transform=" matrix(1 0 0 1 0 0) " stroke-linecap="round" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="350" height="350" viewBox="0 0 350 350" xml:space="preserve">
<desc>Created with Fabric.js 1.7.22</desc>
<defs>
</defs>
<g id="icon" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: none; fill-rule: nonzero; opacity: 1;" transform="translate(-1.9444444444444287 -1.9444444444444287) scale(3.89 3.89)" >
<path d="M 77.127 81.457 h -0.373 v -2 h 0.373 c 1.239 0 2.432 -0.371 3.446 -1.072 l 1.137 1.645 C 80.36 80.964 78.775 81.457 77.127 81.457 z M 72.11 81.457 h -4.645 v -2 h 4.645 V 81.457 z M 62.822 81.457 h -4.645 v -2 h 4.645 V 81.457 z M 53.534 81.457 H 48.89 v -2 h 4.645 V 81.457 z M 44.246 81.457 h -4.644 v -2 h 4.644 V 81.457 z M 34.958 81.457 h -4.644 v -2 h 4.644 V 81.457 z M 84.813 75.85 l -1.904 -0.609 c 0.19 -0.596 0.287 -1.218 0.287 -1.852 c 0 -0.708 -0.121 -1.403 -0.36 -2.064 l 1.881 -0.68 c 0.318 0.88 0.479 1.804 0.479 2.744 C 85.195 74.229 85.066 75.058 84.813 75.85 z M 80.386 68.269 c -0.972 -0.62 -2.099 -0.948 -3.259 -0.948 h -0.634 v -2 h 0.634 c 1.542 0 3.041 0.437 4.335 1.263 L 80.386 68.269 z M 71.849 67.32 h -4.644 v -2 h 4.644 V 67.32 z M 62.561 67.32 h -4.408 c -0.092 0 -0.183 -0.001 -0.272 -0.005 l 0.074 -1.998 l 0.198 0.003 h 4.408 V 67.32 z M 53.016 65.474 c -1.37 -1.132 -2.34 -2.705 -2.732 -4.43 l 1.951 -0.443 c 0.294 1.296 1.024 2.479 2.055 3.332 L 53.016 65.474 z M 52.642 56.707 l -1.814 -0.84 c 0.744 -1.607 2.02 -2.945 3.59 -3.768 l 0.928 1.771 C 54.162 54.49 53.202 55.497 52.642 56.707 z M 64.038 53.184 h -4.645 v -2 h 4.645 V 53.184 z" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(240,162,2); fill-rule: nonzero; opacity: 1;" transform=" matrix(1 0 0 1 0 0) " stroke-linecap="round" />
<path d="M 21.094 27.868 C 9.444 27.868 0 37.311 0 48.961 c 0 5.201 1.891 9.954 5.011 13.632 l 16.082 18.941 l 16.082 -18.941 c 3.12 -3.678 5.011 -8.431 5.011 -13.632 C 42.187 37.311 32.743 27.868 21.094 27.868 z M 21.094 56.91 c -4.791 0 -8.675 -3.884 -8.675 -8.675 c 0 -4.791 3.884 -8.675 8.675 -8.675 s 8.675 3.884 8.675 8.675 C 29.768 53.026 25.885 56.91 21.094 56.91 z" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(240,162,2); fill-rule: nonzero; opacity: 1;" transform=" matrix(1 0 0 1 0 0) " stroke-linecap="round" />
<path d="M 73.577 11.624 c -9.015 0 -16.323 7.308 -16.323 16.323 c 0 4.025 1.463 7.703 3.878 10.549 l 12.445 14.657 l 12.445 -14.657 c 2.415 -2.846 3.878 -6.524 3.878 -10.549 C 89.9 18.932 82.592 11.624 73.577 11.624 z M 73.577 34.098 c -3.707 0 -6.713 -3.006 -6.713 -6.713 c 0 -3.707 3.005 -6.713 6.713 -6.713 c 3.707 0 6.713 3.006 6.713 6.713 C 80.29 31.093 77.285 34.098 73.577 34.098 z" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(240,162,2); fill-rule: nonzero; opacity: 1;" transform=" matrix(1 0 0 1 0 0) " stroke-linecap="round" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -19330,7 +19330,7 @@
},
{
"type": "Indicator Bot",
"name": "Relative Strenght Index (RSI)",
"name": "Relative Strength Index (RSI)",
"config": "{\n\"codeName\": \"RSI\"\n}",
"project": "Foundations",
"processes": [
@@ -19383,7 +19383,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Indicator Bot",
"Foundations",
"b2fc1830-30e3-407a-9cd2-ab93a9e36cc7"
@@ -19535,7 +19535,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Indicator Bot",
"Foundations",
"b2fc1830-30e3-407a-9cd2-ab93a9e36cc7"
@@ -19829,7 +19829,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Indicator Bot",
"Foundations",
"b2fc1830-30e3-407a-9cd2-ab93a9e36cc7"
@@ -19920,7 +19920,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Indicator Bot",
"Foundations",
"b2fc1830-30e3-407a-9cd2-ab93a9e36cc7"
@@ -20717,7 +20717,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -38266,7 +38266,7 @@
},
{
"type": "Plotter",
"name": "Relative Strenght Index (RSI)",
"name": "Relative Strength Index (RSI)",
"config": "{\n\"codeName\": \"Plotter RSI\"\n}",
"project": "Foundations",
"modules": [
@@ -39291,7 +39291,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -39363,7 +39363,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -39435,7 +39435,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -39507,7 +39507,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -39664,7 +39664,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -39736,7 +39736,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -39808,7 +39808,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -39880,7 +39880,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -40037,7 +40037,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -40109,7 +40109,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -40181,7 +40181,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -40253,7 +40253,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -40410,7 +40410,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -40482,7 +40482,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -40554,7 +40554,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -40626,7 +40626,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -40783,7 +40783,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -40855,7 +40855,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -41012,7 +41012,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -41084,7 +41084,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -41241,7 +41241,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -41313,7 +41313,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -41470,7 +41470,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -41542,7 +41542,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -41699,7 +41699,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -41771,7 +41771,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -41985,7 +41985,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -42057,7 +42057,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -42214,7 +42214,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -42286,7 +42286,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -42358,7 +42358,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
@@ -42430,7 +42430,7 @@
"63b3bd4b-97da-47a7-8f72-b9eaf0632ebb"
],
[
"Relative Strenght Index (RSI)",
"Relative Strength Index (RSI)",
"Plotter",
"Foundations",
"d87c1a49-c376-404b-98ff-62feac714c64"
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -4,12 +4,12 @@
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
"rootNodes": [
{
"type": "Network",
"name": "My Network",
"type": "LAN Network",
"name": "My LAN Network",
"project": "Foundations",
"networkNodes": [
"lanNetworkNodes": [
{
"type": "Network Node",
"type": "LAN Network Node",
"name": "My Computer",
"config": "{\n \"host\": \"localhost\",\n \"webPort\": \"34248\",\n \"webSocketsPort\": \"18041\"\n}",
"project": "Foundations",
@@ -4,12 +4,12 @@
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
"rootNodes": [
{
"type": "Network",
"name": "My Network",
"type": "LAN Network",
"name": "My LAN Network",
"project": "Foundations",
"networkNodes": [
"lanNetworkNodes": [
{
"type": "Network Node",
"type": "LAN Network Node",
"name": "My Computer",
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
"project": "Foundations",
@@ -166,11 +166,11 @@
},
{
"type": "Task",
"name": "Relative Strenght Index (RSI)",
"name": "Relative Strength Index (RSI)",
"project": "Foundations",
"bot": {
"type": "Indicator Bot Instance",
"name": "Relative Strenght Index (RSI)",
"name": "Relative Strength Index (RSI)",
"config": "{ \n\"parameter1\": \"Value for parameter1 defined at the Product Definition\"\n}",
"project": "Foundations",
"processes": [
@@ -2736,7 +2736,7 @@
},
{
"type": "Bot Products",
"name": "Relative Strenght Index (RSI)",
"name": "Relative Strength Index (RSI)",
"project": "Foundations",
"dataProducts": [
{
@@ -21362,7 +21362,7 @@
},
{
"type": "Bot Layers",
"name": "Relative Strenght Index (RSI)",
"name": "Relative Strength Index (RSI)",
"project": "Foundations",
"layers": [
{
@@ -31933,7 +31933,7 @@
},
{
"type": "Bot Layers",
"name": "Relative Strenght Index (RSI)",
"name": "Relative Strength Index (RSI)",
"project": "Foundations",
"layers": [
{
@@ -4,12 +4,12 @@
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
"rootNodes": [
{
"type": "Network",
"name": "My Network",
"type": "LAN Network",
"name": "My LAN Network",
"project": "Foundations",
"networkNodes": [
"lanNetworkNodes": [
{
"type": "Network Node",
"type": "LAN Network Node",
"name": "My Computer",
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
"project": "Foundations",
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -4,12 +4,12 @@
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
"rootNodes": [
{
"type": "Network",
"name": "My Network",
"type": "LAN Network",
"name": "My LAN Network",
"project": "Foundations",
"networkNodes": [
"lanNetworkNodes": [
{
"type": "Network Node",
"type": "LAN Network Node",
"name": "My Computer",
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
"project": "Foundations",
File diff suppressed because it is too large. Load diff
@@ -4,12 +4,12 @@
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
"rootNodes": [
{
"type": "Network",
"name": "My Network",
"type": "LAN Network",
"name": "My LAN Network",
"project": "Foundations",
"networkNodes": [
"lanNetworkNodes": [
{
"type": "Network Node",
"type": "LAN Network Node",
"name": "My Computer",
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
"project": "Foundations",
@@ -140433,8 +140433,8 @@
"status": "Done"
},
"referenceParent": {
"type": "Network",
"name": "My Network",
"type": "LAN Network",
"name": "My LAN Network",
"id": "3c165071-7558-4708-9999-8ffe71d346b1"
}
}
@@ -141009,8 +141009,8 @@
"status": "Done"
},
"referenceParent": {
"type": "Network",
"name": "My Network",
"type": "LAN Network",
"name": "My LAN Network",
"id": "3c165071-7558-4708-9999-8ffe71d346b1"
}
}
@@ -4,12 +4,12 @@
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
"rootNodes": [
{
"type": "Network",
"name": "My Network",
"type": "LAN Network",
"name": "My LAN Network",
"project": "Foundations",
"networkNodes": [
"lanNetworkNodes": [
{
"type": "Network Node",
"type": "LAN Network Node",
"name": "My Computer",
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
"project": "Foundations",
@@ -7994,7 +7994,7 @@
"status": "Done"
},
"referenceParent": {
"type": "Network Node",
"type": "LAN Network Node",
"name": "My Computer",
"id": "e452cf65-2b2b-44f2-9e67-bdd9d3c008e4"
}
@@ -4,12 +4,12 @@
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
"rootNodes": [
{
"type": "Network",
"name": "My Network",
"type": "LAN Network",
"name": "My LAN Network",
"project": "Foundations",
"networkNodes": [
"lanNetworkNodes": [
{
"type": "Network Node",
"type": "LAN Network Node",
"name": "My Computer",
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
"project": "Foundations",
@@ -4,12 +4,12 @@
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
"rootNodes": [
{
"type": "Network",
"name": "My Network",
"type": "LAN Network",
"name": "My LAN Network",
"project": "Foundations",
"networkNodes": [
"lanNetworkNodes": [
{
"type": "Network Node",
"type": "LAN Network Node",
"name": "My Computer",
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
"project": "Foundations",
@@ -4,12 +4,12 @@
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
"rootNodes": [
{
"type": "Network",
"name": "My Network",
"type": "LAN Network",
"name": "My LAN Network",
"project": "Foundations",
"networkNodes": [
"lanNetworkNodes": [
{
"type": "Network Node",
"type": "LAN Network Node",
"name": "My Computer",
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
"project": "Foundations",
@@ -4,12 +4,12 @@
"config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}",
"rootNodes": [
{
"type": "Network",
"name": "My Network",
"type": "LAN Network",
"name": "My LAN Network",
"project": "Foundations",
"networkNodes": [
"lanNetworkNodes": [
{
"type": "Network Node",
"type": "LAN Network Node",
"name": "My Computer",
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}",
"project": "Foundations",
@@ -2,7 +2,10 @@ exports.newFoundationsUtilitiesFilesAndDirectories = function () {
let thisObject = {
getDirectories: getDirectories,
getAllFilesInDirectoryAndSubdirectories: getAllFilesInDirectoryAndSubdirectories
getAllFilesInDirectoryAndSubdirectories: getAllFilesInDirectoryAndSubdirectories,
pathFromDate: pathFromDate,
pathFromDatetime: pathFromDatetime,
mkDirByPathSync: mkDirByPathSync
}
return thisObject
@@ -19,8 +22,8 @@ exports.newFoundationsUtilitiesFilesAndDirectories = function () {
}
function getAllFilesInDirectoryAndSubdirectories(dir, callback) {
const { promisify } = require('util');
const { resolve } = require('path');
const { promisify } = SA.nodeModules.util
const { resolve } = SA.nodeModules.path;
const fs = SA.nodeModules.fs;
const readdir = promisify(fs.readdir);
const stat = promisify(fs.stat);
@@ -51,4 +54,69 @@ exports.newFoundationsUtilitiesFilesAndDirectories = function () {
return files.reduce((a, f) => a.concat(f), []);
}
}
function pathFromDate(timestamp) {
let file = { date: new Date(timestamp) }
file.year = file.date.getUTCFullYear()
file.month = file.date.getUTCMonth() + 1
file.day = file.date.getUTCDate()
return file.year + '/' +
SA.projects.foundations.utilities.miscellaneousFunctions.pad(file.month, 2) + '/' +
SA.projects.foundations.utilities.miscellaneousFunctions.pad(file.day, 2)
}
function pathFromDatetime(timestamp) {
let file = { date: new Date(timestamp) }
file.year = file.date.getUTCFullYear()
file.month = file.date.getUTCMonth() + 1
file.day = file.date.getUTCDate()
file.hour = file.date.getUTCHours()
file.minute = file.date.getMinutes()
return file.year + '/' +
SA.projects.foundations.utilities.miscellaneousFunctions.pad(file.month, 2) + '/' +
SA.projects.foundations.utilities.miscellaneousFunctions.pad(file.day, 2) + '/' +
SA.projects.foundations.utilities.miscellaneousFunctions.pad(file.hour, 2) + '/' +
SA.projects.foundations.utilities.miscellaneousFunctions.pad(file.minute, 2)
}
/* Function to create folders of missing folders at any path. */
function mkDirByPathSync(targetDir, { isRelativeToScript = false } = {}) {
const path = SA.nodeModules.path
targetDir = targetDir.substring(0, targetDir.lastIndexOf('/') + 1);
const sep = '/';
const initDir = path.isAbsolute(targetDir) ? sep : '';
const baseDir = isRelativeToScript ? __dirname : '.';
return targetDir.split(sep).reduce((parentDir, childDir) => {
const curDir = path.resolve(baseDir, parentDir, childDir);
try {
const fs = SA.nodeModules.fs
fs.mkdirSync(curDir);
} catch (err) {
if (err.code === 'EEXIST') { // curDir already exists!
return curDir;
}
// To avoid `EISDIR` error on Mac and `EACCES`-->`ENOENT` and `EPERM` on Windows.
if (err.code === 'ENOENT') { // Throw the original parentDir error on curDir `ENOENT` failure.
throw new Error(`EACCES: permission denied, mkdir '${parentDir}'`);
}
const caughtErr = ['EACCES', 'EPERM', 'EISDIR'].indexOf(err.code) > -1;
if (!caughtErr || caughtErr && curDir === path.resolve(targetDir)) {
throw err; // Throw if it's just the last created dir.
}
}
return curDir;
}, initDir);
}
}
@@ -6,7 +6,7 @@ exports.newFoundationsUtilitiesHttpRequests = function () {
return thisObject
function getRequestBody(httpRequest, callback) { // Gets the de body from a POST httpRequest to the web server
function getRequestBody(httpRequest, httpResponse, callback) { // Gets the de body from a POST httpRequest to the web server
try {
let body = ''
@@ -26,10 +26,12 @@ exports.newFoundationsUtilitiesHttpRequests = function () {
httpRequest.on('error', function (err) {
console.log('[ERROR] getBody -> err.stack = ' + err.stack)
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(global.DEFAULT_FAIL_RESPONSE), httpResponse)
callback()
})
} catch (err) {
console.log('[ERROR] getBody -> err.stack = ' + err.stack)
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(global.DEFAULT_FAIL_RESPONSE), httpResponse)
callback()
}
}
}
@@ -1,7 +1,8 @@
exports.newFoundationsUtilitiesMiscellaneousFunctions = function () {
let thisObject = {
genereteUniqueId: genereteUniqueId
genereteUniqueId: genereteUniqueId,
pad: pad
}
return thisObject
@@ -12,4 +13,9 @@ exports.newFoundationsUtilitiesMiscellaneousFunctions = function () {
return v.toString(16)
})
}
function pad(str, max) {
str = str.toString();
return str.length < max ? pad("0" + str, max) : str;
}
}
@@ -33,32 +33,48 @@
"propertyNameAtParent": "assets",
"alternativeIcons": [
{
"codeName": "XMR",
"iconName": "monero"
"codeName": "ADA",
"iconName": "cardano"
},
{
"codeName": "USDT",
"iconName": "tether"
"codeName": "BCH",
"iconName": "bitcoin-cash"
},
{
"codeName": "TRX",
"iconName": "tron"
"codeName": "BNB",
"iconName": "binance-coin"
},
{
"codeName": "XLM",
"iconName": "stellar"
"codeName": "BTC",
"iconName": "bitcoin"
},
{
"codeName": "QTUM",
"iconName": "qtum"
"codeName": "BUSD",
"iconName": "binance-usd"
},
{
"codeName": "NEO",
"iconName": "neo"
"codeName": "CAKE",
"iconName": "cake"
},
{
"codeName": "LTC",
"iconName": "litecoin"
"codeName": "DAI",
"iconName": "dai"
},
{
"codeName": "DASH",
"iconName": "dash"
},
{
"codeName": "DOGE",
"iconName": "dogecoin"
},
{
"codeName": "DOT",
"iconName": "polkadot"
},
{
"codeName": "EOS",
"iconName": "eos"
},
{
"codeName": "ETC",
@@ -69,72 +85,76 @@
"iconName": "ethereum"
},
{
"codeName": "EOS",
"iconName": "eos"
},
{
"codeName": "DASH",
"iconName": "dash"
},
{
"codeName": "ADA",
"iconName": "cardano"
},
{
"codeName": "BCH",
"iconName": "bitcoin-cash"
},
{
"codeName": "BTC",
"iconName": "bitcoin"
},
{
"codeName": "BNB",
"iconName": "binance-coin"
},
{
"codeName": "USD",
"iconName": "us-dollar"
},
{
"codeName": "ZAR",
"iconName": "zar"
},
{
"codeName": "XRP",
"iconName": "xrp"
},
{
"codeName": "DOGE",
"iconName": "dogecoin"
},
{
"codeName": "SOL",
"iconName": "solana"
},
{
"codeName": "DOT",
"iconName": "polkadot"
},
{
"codeName": "UNI",
"iconName": "uniswap"
},
{
"codeName": "BUSD",
"iconName": "binance-usd"
},
{
"codeName": "SXP",
"iconName": "swipe"
"codeName": "EUR",
"iconName": "euro"
},
{
"codeName": "LINK",
"iconName": "chainlink"
},
{
"codeName": "EUR",
"iconName": "euro"
"codeName": "LTC",
"iconName": "litecoin"
},
{
"codeName": "NANO",
"iconName": "nano"
},
{
"codeName": "NEO",
"iconName": "neo"
},
{
"codeName": "QTUM",
"iconName": "qtum"
},
{
"codeName": "SOL",
"iconName": "solana"
},
{
"codeName": "SXP",
"iconName": "swipe"
},
{
"codeName": "TRX",
"iconName": "tron"
},
{
"codeName": "XMR",
"iconName": "monero"
},
{
"codeName": "UNI",
"iconName": "uniswap"
},
{
"codeName": "USD",
"iconName": "us-dollar"
},
{
"codeName": "USDC",
"iconName": "usdc"
},
{
"codeName": "USDT",
"iconName": "tether"
},
{
"codeName": "VET",
"iconName": "vechain"
},
{
"codeName": "XLM",
"iconName": "stellar"
},
{
"codeName": "XRP",
"iconName": "xrp"
},
{
"codeName": "ZAR",
"iconName": "zar"
}
]
}
@@ -41,6 +41,12 @@
"dontShowAtFullscreen": true,
"actionFunction": "uiObject.configEditor.activate"
},
{
"action": "Add UI Object",
"label": "Add Social Bots",
"relatedUiObject": "Social Bots",
"actionFunction": "payload.executeAction"
},
{
"action": "Add Missing Children",
"label": "Add Missing Children",
@@ -38,7 +38,7 @@
"addLeftIcons": true,
"level": 2,
"attachingRules": {
"compatibleTypes": "->Network Node->"
"compatibleTypes": "->LAN Network Node->"
},
"propertyNameAtParent": "dataStorage",
"childrenNodesProperties": [
@@ -49,7 +49,7 @@
"addLeftIcons": true,
"level": 2,
"attachingRules": {
"compatibleTypes": "->Network Node->"
"compatibleTypes": "->LAN Network Node->"
},
"propertyNameAtParent": "dataTasks",
"childrenNodesProperties": [
@@ -41,6 +41,12 @@
"dontShowAtFullscreen": true,
"actionFunction": "uiObject.configEditor.activate"
},
{
"action": "Add UI Object",
"label": "Add Social Bots",
"relatedUiObject": "Social Bots",
"actionFunction": "payload.executeAction"
},
{
"action": "Add Missing Children",
"label": "Add Missing Children",
@@ -1,5 +1,5 @@
{
"type": "Network Node",
"type": "LAN Network Node",
"menuItems": [
{
"action": "Configure",
@@ -69,7 +69,7 @@
"addLeftIcons": true,
"level": 1,
"attachingRules": {
"compatibleTypes": "->Network->"
"compatibleTypes": "->LAN Network->"
},
"childrenNodesProperties": [
{
@@ -103,5 +103,5 @@
"autoAdd": true
}
],
"propertyNameAtParent": "networkNodes"
"propertyNameAtParent": "lanNetworkNodes"
}
@@ -1,10 +1,10 @@
{
"type": "Network",
"type": "LAN Network",
"menuItems": [
{
"action": "Add UI Object",
"label": "Add Network Node",
"relatedUiObject": "Network Node",
"label": "Add LAN Network Node",
"relatedUiObject": "LAN Network Node",
"actionFunction": "payload.executeAction"
},
{
@@ -22,9 +22,9 @@
"level": 0,
"childrenNodesProperties": [
{
"name": "networkNodes",
"name": "lanNetworkNodes",
"type": "array",
"childType": "Network Node"
"childType": "LAN Network Node"
}
]
}
@@ -49,7 +49,7 @@
"addLeftIcons": true,
"level": 2,
"attachingRules": {
"compatibleTypes": "->Network Node->"
"compatibleTypes": "->LAN Network Node->"
},
"propertyNameAtParent": "learningTasks",
"childrenNodesProperties": [
@@ -41,6 +41,12 @@
"dontShowAtFullscreen": true,
"actionFunction": "uiObject.configEditor.activate"
},
{
"action": "Add UI Object",
"label": "Add Social Bots",
"relatedUiObject": "Social Bots",
"actionFunction": "payload.executeAction"
},
{
"action": "Add Missing Children",
"label": "Add Missing Children",
@@ -4,14 +4,7 @@
{
"action": "Add UI Object",
"label": "Add Network",
"relatedUiObject": "Network",
"actionFunction": "payload.executeAction"
},
{
"action": "Add UI Object",
"label": "Add Tutorial",
"iconProject": "Education",
"relatedUiObject": "Tutorial",
"relatedUiObject": "LAN Network",
"actionFunction": "payload.executeAction"
},
{
@@ -41,6 +41,12 @@
"dontShowAtFullscreen": true,
"actionFunction": "uiObject.configEditor.activate"
},
{
"action": "Add UI Object",
"label": "Add Social Bots",
"relatedUiObject": "Social Bots",
"actionFunction": "payload.executeAction"
},
{
"action": "Add Missing Children",
"label": "Add Missing Children",
@@ -49,7 +49,7 @@
"addLeftIcons": true,
"level": 0,
"attachingRules": {
"compatibleTypes": "->Network Node->"
"compatibleTypes": "->LAN Network Node->"
},
"propertyNameAtParent": "productionTradingTasks",
"childrenNodesProperties": [
@@ -9,7 +9,7 @@
"config": true
},
"initialValues": {
"config": "{\"node\":{\"distancePercentage\":60,\"radiusPercentage\":85,\"massPercentage\":100,\"animationSteps\":2,\"menuItem\":{\"widthPercentage\":100,\"heightPercentage\":60,\"radiusPercentage\":90}},\"physics\":false,\"shortcuts\":{\"toggleMapMode\":\"M\",\"toggleDrawRelationshipLines\":\"R\",\"toggleDrawParentLines\":\"C\",\"saveWorkspace\":\"S\",\"adjustAspectRatio\":\"A\"}}"
"config": "{\"node\":{\"distancePercentage\":60,\"radiusPercentage\":85,\"massPercentage\":100,\"animationSteps\":2,\"menuItem\":{\"widthPercentage\":100,\"heightPercentage\":60,\"radiusPercentage\":90}},\"physics\":false,\"shortcuts\":{\"toggleMapMode\":\"M\",\"toggleDrawRelationshipLines\":\"R\",\"toggleDrawParentLines\":\"C\",\"saveWorkspace\":\"S\",\"adjustAspectRatio\":\"A\"} \n }"
},
"menuItems": [
{
@@ -13,12 +13,6 @@
"relatedUiObject": "Design Space",
"actionFunction": "payload.executeAction"
},
{
"action": "Add UI Object",
"label": "Add Docs Space",
"relatedUiObject": "Docs Space",
"actionFunction": "payload.executeAction"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
@@ -49,7 +49,7 @@
"addLeftIcons": true,
"level": 0,
"attachingRules": {
"compatibleTypes": "->Network Node->"
"compatibleTypes": "->LAN Network Node->"
},
"propertyNameAtParent": "testingTradingTasks",
"childrenNodesProperties": [
Loaded 100 of 348 files, more files were not shown because too many files have changed in this diff. Show more