From e494dd8ad9c544ffe9151a72a48a24c97f79ceb0 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 21 Sep 2020 10:19:50 +0200 Subject: [PATCH] Includes Implemented --- .env | 15 +- AppSchema.json | 282 +++++++++++++++++- BackendServers/WebServer/AppLoader.js | 3 +- BackendServers/WebServer/index.html | 8 +- BackendServers/webServer.js | 148 +++++---- .../FunctionLibraries/IncludesFunctions.js | 84 ++++++ .../FunctionLibraries/UiObjectsFromNodes.js | 219 +++++--------- CanvasApp/DesignSpace/Workspace/Workspace.js | 52 +++- CanvasApp/FloatingSpace/UiObjectTitle.js | 8 + CanvasApp/Utilities/NodeChildren.js | 41 +++ .../Data-Mines}/Alpha.json | 0 .../Data-Mines}/Buddha.json | 0 .../Data-Mines}/Masters.json | 0 Includes/Data-Mines/Samurai.json | 1 + .../Data-Mines}/Sparta.json | 0 .../Super-Scripts}/Masters.json | 0 .../Trading-Engines}/Low-Frequency.json | 0 .../Trading-Mines}/Masters.json | 0 .../Masters-Lightning-Strike.json | 1 + .../Sparta-BBTB-BTC-USDT.json | 0 .../Trading-Systems}/Sparta-WHB-BTC-USDT.json | 0 Includes/Workspaces/Default.json | 1 + Includes/Workspaces/Simple Workspace.json | 1 + .../Workspaces/WHB-BBTB-Paper Trading.json | 1 + Includes/Workspaces/WHB-BBTB.json | 1 + Simple Workspace.json | 1 - TaskServer/DataDependencies.js | 10 +- .../LowFrequencyTrading/TradingProcess.js | 6 + .../LowFrequencyTrading/TradingSimulation.js | 1 + TaskServer/server.js | 13 + Workspace.json | 1 - 31 files changed, 681 insertions(+), 217 deletions(-) create mode 100644 CanvasApp/DesignSpace/Workspace/FunctionLibraries/IncludesFunctions.js rename {Data-Mines => Includes/Data-Mines}/Alpha.json (100%) rename {Data-Mines => Includes/Data-Mines}/Buddha.json (100%) rename {Data-Mines => Includes/Data-Mines}/Masters.json (100%) create mode 100644 Includes/Data-Mines/Samurai.json rename {Data-Mines => Includes/Data-Mines}/Sparta.json (100%) rename {Super-Scripts => Includes/Super-Scripts}/Masters.json (100%) rename {Trading-Engines => Includes/Trading-Engines}/Low-Frequency.json (100%) rename {Trading-Mines => Includes/Trading-Mines}/Masters.json (100%) create mode 100644 Includes/Trading-Systems/Masters-Lightning-Strike.json rename {Trading-Systems => Includes/Trading-Systems}/Sparta-BBTB-BTC-USDT.json (100%) rename {Trading-Systems => Includes/Trading-Systems}/Sparta-WHB-BTC-USDT.json (100%) create mode 100644 Includes/Workspaces/Default.json create mode 100644 Includes/Workspaces/Simple Workspace.json create mode 100644 Includes/Workspaces/WHB-BBTB-Paper Trading.json create mode 100644 Includes/Workspaces/WHB-BBTB.json delete mode 100644 Simple Workspace.json delete mode 100644 Workspace.json diff --git a/.env b/.env index a564cc89a..a45401a87 100644 --- a/.env +++ b/.env @@ -13,11 +13,14 @@ TASK_SERVER_PATH=./TaskServer INTER_PROCESS_FILES_PATH=./Inter-Process-Files STORAGE_PATH=./Data-Storage PLOTTERS_PATH=./Legacy-Code -DATA_MINES_PATH=./Data-Mines -TRADING_MINES_PATH=./Trading-Mines -TRADING_SYSTEMS_PATH=./Trading-Systems -SUPER_SCRIPTS_PATH=./Super-Scripts -TRADING_ENGINES_PATH=./Trading-Engines + +DATA_MINES_PATH=./Includes/Data-Mines +TRADING_MINES_PATH=./Includes/Trading-Mines +TRADING_SYSTEMS_PATH=./Includes/Trading-Systems +SUPER_SCRIPTS_PATH=./Includes/Super-Scripts +TRADING_ENGINES_PATH=./Includes/Trading-Engines +TUTORIALS_PATH=./Includes/Tutorials +WORKSPACES_PATH=./Includes/Workspaces WRITE_LOGS_TO_FILES=true BOTS_PATH=./Legacy-Code @@ -36,6 +39,6 @@ PATH_TO_FILES_COMPONENT=./Files-Component/src PATH_TO_WEB_SERVER=./BackendServers/ APP_SCHEMA_PATH=./ -WORKSPACE_PATH=./ +DEFAULT_WORKSPACE_PATH=./Includes/Workspaces MY_WORKSPACES_PATH=./My-Workspaces PATH_TO_FONTS=./BackendServers/WebServer/Fonts \ No newline at end of file diff --git a/AppSchema.json b/AppSchema.json index cf5384577..5eef5387c 100644 --- a/AppSchema.json +++ b/AppSchema.json @@ -14299,22 +14299,296 @@ { "name": "includedTradingSystems", "type": "node", - "childType": "Included Trading Mines", + "childType": "Included Trading Systems", "autoAdd": false }, { "name": "includedTradingEngines", "type": "node", - "childType": "Included Trading Mines", + "childType": "Included Trading Engines", "autoAdd": false }, { "name": "includedSuperScripts", "type": "node", - "childType": "Included Trading Mines", + "childType": "Included Super Scripts", + "autoAdd": false + }, + { + "name": "includedTutorials", + "type": "node", + "childType": "Included Tutorials", "autoAdd": false } - ] + ], + "icon": "bitcoin" + }, + { + "type": "Included Data Mines", + "menuItems": [ + { + "action": "Include Missing Data Mines", + "label": "Include Missing Data Mines", + "askConfirmation": true, + "confirmationLabel": "Confirm to Proceed", + "workDoneLabel": "Done", + "relatedUiObject": "Data Mine", + "actionFunction": "payload.onMenuItemClick" + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete", + "iconPathOff": "delete", + "actionFunction": "payload.onMenuItemClick" + } + ], + "addLeftIcons": true, + "level": 1, + "propertyNameAtParent": "includedDataMines", + "properties": [ + { + "name": "includedFiles", + "type": "array", + "childType": "Included File", + "autoAdd": false + } + ], + "icon": "bitcoin" + }, + { + "type": "Included Trading Mines", + "menuItems": [ + { + "action": "Include Missing Trading Mines", + "label": "Include Missing Trading Mines", + "askConfirmation": true, + "confirmationLabel": "Confirm to Proceed", + "workDoneLabel": "Done", + "relatedUiObject": "Trading Mine", + "actionFunction": "payload.onMenuItemClick" + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete", + "iconPathOff": "delete", + "actionFunction": "payload.onMenuItemClick" + } + ], + "addLeftIcons": true, + "level": 1, + "propertyNameAtParent": "includedTradingMines", + "properties": [ + { + "name": "includedFiles", + "type": "array", + "childType": "Included File", + "autoAdd": false + } + ], + "icon": "bitcoin" + }, + { + "type": "Included Trading Systems", + "menuItems": [ + { + "action": "Include Missing Trading Systems", + "label": "Include Missing Trading Systems", + "askConfirmation": true, + "confirmationLabel": "Confirm to Proceed", + "workDoneLabel": "Done", + "relatedUiObject": "Trading System", + "actionFunction": "payload.onMenuItemClick" + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete", + "iconPathOff": "delete", + "actionFunction": "payload.onMenuItemClick" + } + ], + "addLeftIcons": true, + "level": 1, + "propertyNameAtParent": "includedTradingSystems", + "properties": [ + { + "name": "includedFiles", + "type": "array", + "childType": "Included File", + "autoAdd": false + } + ], + "icon": "bitcoin" + }, + { + "type": "Included Trading Engines", + "menuItems": [ + { + "action": "Include Missing Trading Engines", + "label": "Include Missing Trading Engines", + "askConfirmation": true, + "confirmationLabel": "Confirm to Proceed", + "workDoneLabel": "Done", + "relatedUiObject": "Trading Engine", + "actionFunction": "payload.onMenuItemClick" + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete", + "iconPathOff": "delete", + "actionFunction": "payload.onMenuItemClick" + } + ], + "addLeftIcons": true, + "level": 1, + "propertyNameAtParent": "includedTradingEngines", + "properties": [ + { + "name": "includedFiles", + "type": "array", + "childType": "Included File", + "autoAdd": false + } + ], + "icon": "bitcoin" + }, + { + "type": "Included Super Scripts", + "menuItems": [ + { + "action": "Include Missing Super Scripts", + "label": "Include Missing Super Scripts", + "askConfirmation": true, + "confirmationLabel": "Confirm to Proceed", + "workDoneLabel": "Done", + "relatedUiObject": "Super Scripts", + "actionFunction": "payload.onMenuItemClick" + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete", + "iconPathOff": "delete", + "actionFunction": "payload.onMenuItemClick" + } + ], + "addLeftIcons": true, + "level": 1, + "propertyNameAtParent": "includedSuperScripts", + "properties": [ + { + "name": "includedFiles", + "type": "array", + "childType": "Included File", + "autoAdd": false + } + ], + "icon": "bitcoin" + }, + { + "type": "Included Tutorials", + "menuItems": [ + { + "action": "Include Missing Tutorials", + "label": "Include Missing Tutorials", + "askConfirmation": true, + "confirmationLabel": "Confirm to Proceed", + "workDoneLabel": "Done", + "relatedUiObject": "Tutorial", + "actionFunction": "payload.onMenuItemClick" + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete", + "iconPathOff": "delete", + "actionFunction": "payload.onMenuItemClick" + } + ], + "addLeftIcons": true, + "level": 1, + "propertyNameAtParent": "includedTutorials", + "properties": [ + { + "name": "includedFiles", + "type": "array", + "childType": "Included File", + "autoAdd": false + } + ], + "icon": "bitcoin" + }, + { + "type": "Included File", + "menuItems": [ + { + "action": "Add UI Object", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "includedFilePosition", + "actionFunction": "payload.onMenuItemClick", + "label": "Add Included File Position", + "relatedUiObject": "Included File Position", + }, + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete", + "iconPathOff": "delete", + "actionFunction": "payload.onMenuItemClick" + } + ], + "addLeftIcons": true, + "level": 2, + "propertyNameAtParent": "includedFiles", + "properties": [ + { + "name": "includedFilePosition", + "type": "node", + "childType": "Included File Position", + "autoAdd": false + } + ], + "icon": "bitcoin" + }, + { + "type": "Included File Position", + "menuItems": [ + { + "action": "Delete UI Object", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete", + "iconPathOff": "delete", + "actionFunction": "payload.onMenuItemClick" + } + ], + "title": [ + "Use Parent" + ], + "addLeftIcons": true, + "level": 3, + "propertyNameAtParent": "includedFilePosition", + "properties": [ + ], + "icon": "bitcoin" }, { "type": "Tutorial", diff --git a/BackendServers/WebServer/AppLoader.js b/BackendServers/WebServer/AppLoader.js index 889dc6884..7c82084be 100644 --- a/BackendServers/WebServer/AppLoader.js +++ b/BackendServers/WebServer/AppLoader.js @@ -57,7 +57,8 @@ function newAppLoader() { 'DesignSpace/Workspace/FunctionLibraries/DataMineFunctions.js', 'DesignSpace/Workspace/FunctionLibraries/DataStorageFunctions.js', 'DesignSpace/Workspace/FunctionLibraries/ChartingSpaceFunctions.js', - 'DesignSpace/Workspace/FunctionLibraries/TutorialFunctions.js', + 'DesignSpace/Workspace/FunctionLibraries/TutorialFunctions.js', + 'DesignSpace/Workspace/FunctionLibraries/IncludesFunctions.js', 'Utilities/CoordinateTransformations.js', 'Utilities/DateRateTransformations.js', diff --git a/BackendServers/WebServer/index.html b/BackendServers/WebServer/index.html index 4e77c1241..392752278 100644 --- a/BackendServers/WebServer/index.html +++ b/BackendServers/WebServer/index.html @@ -11,10 +11,10 @@ - ---> +