diff --git a/.vscode/Desktop-App-1.code-workspace b/.vscode/Desktop-App-1.code-workspace new file mode 100644 index 000000000..97e2d4c8f --- /dev/null +++ b/.vscode/Desktop-App-1.code-workspace @@ -0,0 +1,10 @@ +{ + "folders": [ + { + "path": "C:\\Superalgos" + } + ], + "settings": { + "search.maintainFileSearchCache": true + } +} \ No newline at end of file diff --git a/.vscode/Desktop-App-2.code-workspace b/.vscode/Desktop-App-2.code-workspace new file mode 100644 index 000000000..97e2d4c8f --- /dev/null +++ b/.vscode/Desktop-App-2.code-workspace @@ -0,0 +1,10 @@ +{ + "folders": [ + { + "path": "C:\\Superalgos" + } + ], + "settings": { + "search.maintainFileSearchCache": true + } +} \ No newline at end of file diff --git a/.vscode/Desktop-App-3.code-workspace b/.vscode/Desktop-App-3.code-workspace new file mode 100644 index 000000000..97e2d4c8f --- /dev/null +++ b/.vscode/Desktop-App-3.code-workspace @@ -0,0 +1,10 @@ +{ + "folders": [ + { + "path": "C:\\Superalgos" + } + ], + "settings": { + "search.maintainFileSearchCache": true + } +} \ No newline at end of file diff --git a/Desktop/DesktopApp.js b/Desktop/DesktopApp.js index 5da36f492..ad3aa22dd 100644 --- a/Desktop/DesktopApp.js +++ b/Desktop/DesktopApp.js @@ -17,8 +17,8 @@ exports.newDesktopApp = function newDesktopApp() { async function run() { - setupNetwork() - setupServices() + await setupNetwork() + await setupServices() async function setupNetwork() { /* @@ -59,11 +59,11 @@ exports.newDesktopApp = function newDesktopApp() { */ thisObject.webSocketsInterface = DK.projects.socialTrading.modules.webSocketsInterface.newDesktopModulesWebSocketsInterface() thisObject.webSocketsInterface.initialize() - console.log('Desktop Client Web Sockets Interface ....................................... Listening at port ' + global.env.DESKTOP_WEB_SOCKETS_INTERFACE_PORT) + console.log('Desktop Client Web Sockets Interface ......................................... Listening at port ' + JSON.parse(DK.desktopApp.p2pNetworkClient.node.config).webSocketsPort) thisObject.httpInterface = DK.projects.socialTrading.modules.httpInterface.newDesktopModulesHttpInterface() thisObject.httpInterface.initialize() - console.log('Desktop Client Http Interface .............................................. Listening at port ' + global.env.DESKTOP_HTTP_INTERFACE_PORT) + console.log('Desktop Client Http Interface ................................................ Listening at port ' + JSON.parse(DK.desktopApp.p2pNetworkClient.node.config).webPort) } } } diff --git a/Desktop/UI/Globals.js b/Desktop/UI/Globals.js index 4599bca36..2c5646491 100644 --- a/Desktop/UI/Globals.js +++ b/Desktop/UI/Globals.js @@ -4,6 +4,7 @@ let UI = { projects: {}, schemas: { projectSchema: undefined }, environment: undefined, + clientNode: undefined, running: {} } diff --git a/Desktop/UI/WebAppPreLoader.js b/Desktop/UI/WebAppPreLoader.js index 0c691e566..548e3da05 100644 --- a/Desktop/UI/WebAppPreLoader.js +++ b/Desktop/UI/WebAppPreLoader.js @@ -22,6 +22,15 @@ function loadSuperalgos() { function onResponse(err, file) { UI.environment = JSON.parse(file) + setupClientNode() + } + } + + function setupClientNode() { + httpRequest(undefined, 'ClientNode', onResponse) + + function onResponse(err, file) { + UI.clientNode = JSON.parse(file) setupProjectsSchema() } } diff --git a/DesktopRoot.js b/DesktopRoot.js index ee7267baf..5a95acdf1 100644 --- a/DesktopRoot.js +++ b/DesktopRoot.js @@ -10,7 +10,7 @@ exports.newDesktopRoot = function newDesktopRoot() { return thisObject - async function run() { + async function run(debugSettings) { /* The DK object is accessible everywhere at the Superalgos Desktop App. It provides access to all modules built for this App. @@ -25,6 +25,10 @@ exports.newDesktopRoot = function newDesktopRoot() { let ENVIRONMENT = require('./Environment.js'); let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment() global.env = ENVIRONMENT_MODULE + + if (debugSettings !== undefined && debugSettings.DESKTOP_APP_SIGNING_ACCOUNT !== undefined) { + global.env.DESKTOP_APP_SIGNING_ACCOUNT = debugSettings.DESKTOP_APP_SIGNING_ACCOUNT + } /* First thing is to load the project schema file. */ diff --git a/Environment.js b/Environment.js index 04b9a78a4..311a33c80 100644 --- a/Environment.js +++ b/Environment.js @@ -11,12 +11,12 @@ exports.newEnvironment = function () { DEMO_MODE: false, BASE_PATH: basePath, WEB_SERVER_URL: 'localhost', - PLATFORM_WEB_SOCKETS_INTERFACE_PORT: 16042, - DESKTOP_WEB_SOCKETS_INTERFACE_PORT: 17042, - NETWORK_WEB_SOCKETS_INTERFACE_PORT: 18042, + PLATFORM_WEB_SOCKETS_INTERFACE_PORT: 18041, + NETWORK_WEB_SOCKETS_INTERFACE_PORT: 17041, + DESKTOP_WEB_SOCKETS_INTERFACE_PORT: 16041, DESKTOP_WEB_SOCKETS_INTERFACE_HOST: 'localhost', PLATFORM_HTTP_INTERFACE_PORT: 34248, - DESKTOP_HTTP_INTERFACE_PORT: 34249, + DESKTOP_HTTP_INTERFACE_PORT: 33248, PATH_TO_DATA_STORAGE: path.join(basePath, './Platform/My-Data-Storage'), PATH_TO_PROJECTS: path.join(basePath, './Projects'), PATH_TO_LOG_FILES: path.join(basePath, './Platform/My-Log-Files'), diff --git a/Network/NetwokNode.js b/Network/NetwokNode.js index 8edc1c6f4..4bd5f705c 100644 --- a/Network/NetwokNode.js +++ b/Network/NetwokNode.js @@ -64,7 +64,7 @@ exports.newNetworkNode = function newNetworkNode() { */ thisObject.webSocketsInterface = NT.projects.network.modules.webSocketsInterface.newNetworkModulesWebSocketsInterface() thisObject.webSocketsInterface.initialize() - console.log('Network Node Web Sockets Interface ....................................... Listening at port ' + JSON.parse(NT.networkNode.p2pNetworkNode.node.config).webSocketsPort) + console.log('Network Node Web Sockets Interface ........................................... Listening at port ' + JSON.parse(NT.networkNode.p2pNetworkNode.node.config).webSocketsPort) } } } diff --git a/Projects/Community-Plugins/Schemas/App-Schema/plugin-data-mines.json b/Projects/Community-Plugins/Schemas/App-Schema/plugin-data-mines.json index 46374ebc2..5bd222c5e 100644 --- a/Projects/Community-Plugins/Schemas/App-Schema/plugin-data-mines.json +++ b/Projects/Community-Plugins/Schemas/App-Schema/plugin-data-mines.json @@ -13,6 +13,17 @@ "actionFunction": "payload.executeAction", "actionProject": "Community-Plugins" }, + { + "action": "Add Specified Plugin Data Mine", + "label": "Add Specified Plugin Data Mine", + "iconPathOn": "data-mine", + "iconPathOff": "data-mine", + "iconProject": "Data-Mining", + "actionProject": "Community-Plugins", + "relatedUiObject": "Data Mine", + "dontShowAtFullscreen": true, + "actionFunction": "payload.executeAction" + }, { "action": "Delete UI Object", "actionProject": "Visual-Scripting", @@ -27,6 +38,9 @@ "addLeftIcons": true, "level": 1, "propertyNameAtParent": "pluginDataMines", + "editors": { + "list": true + }, "attachingRules": { "compatibleTypes": "->Plugin Project->" }, diff --git a/Projects/Community-Plugins/UI/Function-Libraries/ActionSwitch.js b/Projects/Community-Plugins/UI/Function-Libraries/ActionSwitch.js index 943e994f8..e4abaad4d 100644 --- a/Projects/Community-Plugins/UI/Function-Libraries/ActionSwitch.js +++ b/Projects/Community-Plugins/UI/Function-Libraries/ActionSwitch.js @@ -38,6 +38,11 @@ function newCommunityPluginsActionSwitch() { UI.projects.communityPlugins.functionLibraries.pluginsFunctions.addMissingPluginDataMines(action.node, action.rootNodes) } break + case 'Add Specified Plugin Data Mine': + { + UI.projects.communityPlugins.functionLibraries.pluginsFunctions.addSpecifiedPluginDataMine(action.node, action.rootNodes) + } + break case 'Add Missing Plugin Trading Mines': { UI.projects.communityPlugins.functionLibraries.pluginsFunctions.addMissingPluginTradingMines(action.node, action.rootNodes) diff --git a/Projects/Community-Plugins/UI/Function-Libraries/PluginsFunctions.js b/Projects/Community-Plugins/UI/Function-Libraries/PluginsFunctions.js index 66039c4be..1ebd67368 100644 --- a/Projects/Community-Plugins/UI/Function-Libraries/PluginsFunctions.js +++ b/Projects/Community-Plugins/UI/Function-Libraries/PluginsFunctions.js @@ -3,6 +3,7 @@ function newPluginsFunctionLibraryPluginsFunctions() { addMissingPluginProjects: addMissingPluginProjects, addMissingPluginTypes: addMissingPluginTypes, addMissingPluginDataMines: addMissingPluginDataMines, + addSpecifiedPluginDataMine: addSpecifiedPluginDataMine, addMissingPluginTradingMines: addMissingPluginTradingMines, addMissingPluginTradingSystems: addMissingPluginTradingSystems, addMissingPluginTradingEngines: addMissingPluginTradingEngines, @@ -68,6 +69,32 @@ function newPluginsFunctionLibraryPluginsFunctions() { } } + function addSpecifiedPluginDataMine(node, rootNodes) { + let action = { node: node } + + let projectName = UI.projects.communityPlugins.utilities.plugins.getProjectName(node) + if (projectName === "" || projectName === undefined) { + if (node.payload.parentNode !== undefined) { + node.payload.parentNode.payload.uiObject.setErrorMessage("Config codeName must have the name of the project.") + return + } + } + + UI.projects.communityPlugins.utilities.plugins.getPluginFileNames(projectName, 'Data-Mines', onNamesArrived) + + function onNamesArrived(fileNames) { + let eventSubscriptionId = node.payload.uiObject.container.eventHandler.listenToEvent('listSelectorClicked', onListSelect) + node.payload.uiObject.listSelector.activate(action, fileNames, eventSubscriptionId) + + function onListSelect(event) { + let selectedArray = [] + selectedArray.push(event.selectedNode) + UI.projects.communityPlugins.utilities.plugins.addMissingPluginFiles(node, selectedArray, 'Data-Mines', 'Data Mine', 'Data-Mining') + node.payload.uiObject.container.eventHandler.stopListening('listSelectorClicked') + } + } + } + function addMissingPluginTradingMines(node, rootNodes) { let projectName = UI.projects.communityPlugins.utilities.plugins.getProjectName(node) if (projectName === "" || projectName === undefined) { diff --git a/Projects/Foundations/Schemas/App-Schema/sensor-bot-instance.json b/Projects/Foundations/Schemas/App-Schema/sensor-bot-instance.json index 10da7e392..0cd0a1478 100644 --- a/Projects/Foundations/Schemas/App-Schema/sensor-bot-instance.json +++ b/Projects/Foundations/Schemas/App-Schema/sensor-bot-instance.json @@ -34,7 +34,7 @@ "config": true }, "initialValues": { - "config": "{ \n\"startDate\": \"2020-01-01\"\n}" + "config": "{ \n\"startDate\": \"2021-01-01\"\n}" }, "level": 3, "attachingRules": { diff --git a/Projects/Foundations/UI/Spaces/Floating-Space/ListSelector.js b/Projects/Foundations/UI/Spaces/Floating-Space/ListSelector.js index 9ffcc847b..f88bbc83a 100644 --- a/Projects/Foundations/UI/Spaces/Floating-Space/ListSelector.js +++ b/Projects/Foundations/UI/Spaces/Floating-Space/ListSelector.js @@ -47,6 +47,8 @@ function newListSelector() { const SIZE = 36 const FONT_SIZE = 24 + const MAX_LABELS = 7 + let VISIBLE_LABELS = 7 let selected = 0 @@ -107,7 +109,7 @@ function newListSelector() { deactivate() } - if (optionsList.length < VISIBLE_LABELS) { + if (optionsList.length < MAX_LABELS) { VISIBLE_LABELS = optionsList.length } diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 8b9800284..14668a46b 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -17012,17 +17012,17 @@ "signingAccountChild": { "type": "Social Trading Desktop App", "name": "Social Trading Desktop App # 1", - "config": "{\n \"codeName\": \"Social-Trading-Desktop-App-1\"\n}", + "config": "{\n \"codeName\": \"Social-Trading-Desktop-App-1\",\n \"host\": \"localhost\",\n \"webPort\": \"33248\",\n \"webSocketsPort\": \"17042\"\n}", "project": "Governance", "id": "012c74dd-1a61-4784-bc8a-e18555b4974e", "savedPayload": { "position": { - "x": 32588.466416509047, - "y": 18618.508094196695 + "x": 32596.44477289305, + "y": 18664.939393355322 }, "targetPosition": { - "x": 32885.89987492119, - "y": 18579.35023653068 + "x": 32889.88905311319, + "y": 18602.565886109995 }, "floatingObject": { "isPinned": false, @@ -17040,8 +17040,8 @@ "id": "3863ebb9-c69f-40b2-8bbd-eb8f2b60a49c", "savedPayload": { "position": { - "x": 32885.89987492119, - "y": 18579.35023653068 + "x": 32889.88905311319, + "y": 18602.565886109995 }, "targetPosition": { "x": 33183.333333333336, @@ -17068,17 +17068,17 @@ "signingAccountChild": { "type": "Social Trading Mobile App", "name": "Social Trading Mobile App # 1", - "config": "{\n \"codeName\": \"Social-Trading-Mobile-App-1\"\n}", + "config": "{\n \"codeName\": \"Social-Trading-Mobile-App-1\",\n \"host\": \"localhost\",\n \"webSocketsPort\": \"15042\"\n}", "project": "Governance", "id": "2d03d11f-b553-4b01-9291-9e13da15dd54", "savedPayload": { "position": { - "x": 32603.777837559894, - "y": 18384.900951803153 + "x": 32586.62019611237, + "y": 18477.475300904072 }, "targetPosition": { - "x": 32893.555585446615, - "y": 18462.54666533391 + "x": 32884.97676472285, + "y": 18508.83383988437 }, "floatingObject": { "isPinned": false, @@ -17096,8 +17096,8 @@ "id": "c84e9e64-7527-4dec-ac58-93696e19a756", "savedPayload": { "position": { - "x": 32893.555585446615, - "y": 18462.54666533391 + "x": 32884.97676472285, + "y": 18508.83383988437 }, "targetPosition": { "x": 33183.333333333336, @@ -17124,17 +17124,17 @@ "signingAccountChild": { "type": "Social Trading Server App", "name": "Social Trading Server App # 1", - "config": "{\n \"codeName\": \"Social-Trading-Server-App-1\"\n}", + "config": "{\n \"codeName\": \"Social-Trading-Server-App-1\",\n \"host\": \"localhost\",\n \"webSocketsPort\": \"16042\"\n}", "project": "Governance", "id": "c3d218ee-119f-4bd9-9349-8a194844ecd9", "savedPayload": { "position": { - "x": 32707.321329158593, - "y": 18174.935521459432 + "x": 32635.20605874777, + "y": 18296.15039301919 }, "targetPosition": { - "x": 32945.327331245964, - "y": 18357.56395016205 + "x": 32909.26969604055, + "y": 18418.17138594193 }, "floatingObject": { "isPinned": false, @@ -17152,8 +17152,8 @@ "id": "75f17a55-bf33-4e69-b842-b424a6f517e8", "savedPayload": { "position": { - "x": 32945.327331245964, - "y": 18357.56395016205 + "x": 32909.26969604055, + "y": 18418.17138594193 }, "targetPosition": { "x": 33183.333333333336, @@ -17185,12 +17185,12 @@ "id": "bcffb701-754d-4685-ad09-8bf3f09265d9", "savedPayload": { "position": { - "x": 32883.333333333336, - "y": 18020.577136594 + "x": 32737.446438046896, + "y": 18138.71401504935 }, "targetPosition": { - "x": 33033.333333333336, - "y": 18280.384757729335 + "x": 32960.389885690114, + "y": 18339.45319695701 }, "floatingObject": { "isPinned": false, @@ -17208,8 +17208,8 @@ "id": "377ee3ed-49e4-415d-87b3-946024f0a1ef", "savedPayload": { "position": { - "x": 33033.333333333336, - "y": 18280.384757729335 + "x": 32960.389885690114, + "y": 18339.45319695701 }, "targetPosition": { "x": 33183.333333333336, @@ -17241,12 +17241,12 @@ "id": "bb0f0417-9dfb-47a3-941f-dcfa82fbaea1", "savedPayload": { "position": { - "x": 33105.0176180013, - "y": 17945.325462040382 + "x": 32883.333333333336, + "y": 18020.577136594 }, "targetPosition": { - "x": 33144.17547566732, - "y": 18242.758920452525 + "x": 33033.333333333336, + "y": 18280.384757729335 }, "floatingObject": { "isPinned": false, @@ -17264,8 +17264,8 @@ "id": "7c5f14f9-63c2-42fa-98ee-1d4a36590cf4", "savedPayload": { "position": { - "x": 33144.17547566732, - "y": 18242.758920452525 + "x": 33033.333333333336, + "y": 18280.384757729335 }, "targetPosition": { "x": 33183.333333333336, @@ -17297,12 +17297,12 @@ "id": "76fa8a24-9ab4-4eaf-82f2-458ba557b204", "savedPayload": { "position": { - "x": 33338.62476039485, - "y": 17960.636883091225 + "x": 33058.58631884268, + "y": 17953.303818424385 }, "targetPosition": { - "x": 33260.97904686409, - "y": 18250.414630977946 + "x": 33120.95982608801, + "y": 18246.748098644526 }, "floatingObject": { "isPinned": false, @@ -17320,8 +17320,8 @@ "id": "48544424-5b62-417b-897d-9164b26fcd56", "savedPayload": { "position": { - "x": 33260.97904686409, - "y": 18250.414630977946 + "x": 33120.95982608801, + "y": 18246.748098644526 }, "targetPosition": { "x": 33183.333333333336, @@ -17353,12 +17353,12 @@ "id": "297e57c2-3c1a-4170-b710-d2705804205b", "savedPayload": { "position": { - "x": 33548.59019073856, - "y": 18064.180374689924 + "x": 33246.05041129393, + "y": 17943.479241643705 }, "targetPosition": { - "x": 33365.96176203595, - "y": 18302.186376777296 + "x": 33214.69187231363, + "y": 18241.835810254186 }, "floatingObject": { "isPinned": false, @@ -17376,8 +17376,120 @@ "id": "b39e1c4d-4170-4134-ae85-fc9fa7f3eb47", "savedPayload": { "position": { - "x": 33365.96176203595, - "y": 18302.186376777296 + "x": 33214.69187231363, + "y": 18241.835810254186 + }, + "targetPosition": { + "x": 33183.333333333336, + "y": 18540.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + { + "type": "Signing Account", + "name": "New Signing Account", + "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xa21640401c1e1ab44678fd6024654d6200025d75998a38d06a2dbb84d2b965b4\",\n \"s\": \"0x7c1308809675605bf120654214f7566a833158cc54471e8eefbee64e8031a5ce\",\n \"signature\": \"0xa21640401c1e1ab44678fd6024654d6200025d75998a38d06a2dbb84d2b965b47c1308809675605bf120654214f7566a833158cc54471e8eefbee64e8031a5ce1b\"\n }\n}", + "project": "Governance", + "signingAccountChild": { + "type": "Social Trading Desktop App", + "name": "Social Trading Desktop App # 2", + "config": "{\n \"codeName\": \"Social-Trading-Desktop-App-2\",\n \"host\": \"localhost\",\n \"webPort\": \"33249\",\n \"webSocketsPort\": \"17043\"\n}", + "project": "Governance", + "id": "e6f2b6f6-5e40-42d2-92d8-fdd17680a1c7", + "savedPayload": { + "position": { + "x": 33427.37531917882, + "y": 17992.065104279107 + }, + "targetPosition": { + "x": 33305.35432625608, + "y": 18266.128741571887 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "530b3376-a820-4710-a7a0-bab877e4c4be", + "savedPayload": { + "position": { + "x": 33305.35432625608, + "y": 18266.128741571887 + }, + "targetPosition": { + "x": 33183.333333333336, + "y": 18540.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + { + "type": "Signing Account", + "name": "New Signing Account", + "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x4e4870f2f0061fa5a6e5fca672f1543420e140944a65a294ea25f1c2ef1c5dbe\",\n \"s\": \"0x58ba993a911c9092967b51da47be22ad85062d5ce49c6b2de4f6a593c67850c6\",\n \"signature\": \"0x4e4870f2f0061fa5a6e5fca672f1543420e140944a65a294ea25f1c2ef1c5dbe58ba993a911c9092967b51da47be22ad85062d5ce49c6b2de4f6a593c67850c61c\"\n }\n}", + "project": "Governance", + "signingAccountChild": { + "type": "Social Trading Desktop App", + "name": "Social Trading Desktop App # 3", + "config": "{\n \"codeName\": \"Social-Trading-Desktop-App-3\",\n \"host\": \"localhost\",\n \"webPort\": \"33250\",\n \"webSocketsPort\": \"17044\"\n}", + "project": "Governance", + "id": "00ca860e-bb19-42b4-8bce-b67f9a1f9af7", + "savedPayload": { + "position": { + "x": 33584.81169714865, + "y": 18094.30548357823 + }, + "targetPosition": { + "x": 33384.072515240994, + "y": 18317.24893122145 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "72de2a17-d6f1-491b-847b-4e110a122cf6", + "savedPayload": { + "position": { + "x": 33384.072515240994, + "y": 18317.24893122145 }, "targetPosition": { "x": 33183.333333333336, diff --git a/Projects/Governance/Plugins/User-Profiles/NAmorim.json b/Projects/Governance/Plugins/User-Profiles/NAmorim.json index e8ece8cf9..964fef0da 100644 --- a/Projects/Governance/Plugins/User-Profiles/NAmorim.json +++ b/Projects/Governance/Plugins/User-Profiles/NAmorim.json @@ -233,7 +233,9 @@ "referenceParentCombinedNodePath": [ [ "Luis-Fernando-Molina", - "User Profile" + "User Profile", + "Governance", + "a8de78f0-c3e4-4a2a-b7e8-f659073969db" ] ] } @@ -1012,7 +1014,9 @@ "referenceParentCombinedNodePath": [ [ "cozed-gh", - "User Profile" + "User Profile", + "Governance", + "07f0b13a-a50f-4488-8a2c-a3f8f08e889d" ] ] } @@ -1258,7 +1262,9 @@ "referenceParentCombinedNodePath": [ [ "PLuv", - "User Profile" + "User Profile", + "Governance", + "142f5de2-3762-4f55-a839-22eac5c03c8f" ] ] } @@ -1367,7 +1373,7 @@ "votesAndClaimsPrograms": { "type": "Votes And Claims Programs", "name": "New Votes And Claims Programs", - "config": "{\n \"percentage\": 32\n}", + "config": "{\n \"percentage\": 26\n}", "project": "Governance", "votingProgram": { "type": "Voting Program", @@ -6874,27 +6880,39 @@ "referenceParentCombinedNodePath": [ [ "cozed-gh", - "User Profile" + "User Profile", + "Governance", + "07f0b13a-a50f-4488-8a2c-a3f8f08e889d" ], [ "New Token Power Switch", - "Token Power Switch" + "Token Power Switch", + "Governance", + "e0ed557e-bd72-458f-9f88-f7a8aeb20905" ], [ "New Votes And Claims Programs", - "Votes And Claims Programs" + "Votes And Claims Programs", + "Governance", + "638049d6-5c82-47ce-8837-7c6f8e461cff" ], [ "New Claims Program", - "Claims Program" + "Claims Program", + "Governance", + "f1bb5d1d-5d33-46d3-a223-c8103a4b2bb6" ], [ "Data Mining Project Position Class", - "Position Claims Folder" + "Position Claims Folder", + "Governance", + "0377d112-8545-4694-9c74-5205b2919ac3" ], [ "3 Project Contributors Alexandru cozed-gh(Carl) Quantum8 PLuv Data Mining Project", - "Position Contribution Claim" + "Position Contribution Claim", + "Governance", + "667d2fb7-ef65-4ffd-adb9-aad819d5a065" ] ] } @@ -6931,23 +6949,33 @@ "referenceParentCombinedNodePath": [ [ "cozed-gh", - "User Profile" + "User Profile", + "Governance", + "07f0b13a-a50f-4488-8a2c-a3f8f08e889d" ], [ "New Token Power Switch", - "Token Power Switch" + "Token Power Switch", + "Governance", + "e0ed557e-bd72-458f-9f88-f7a8aeb20905" ], [ "New Votes And Claims Programs", - "Votes And Claims Programs" + "Votes And Claims Programs", + "Governance", + "638049d6-5c82-47ce-8837-7c6f8e461cff" ], [ "New Claims Program", - "Claims Program" + "Claims Program", + "Governance", + "f1bb5d1d-5d33-46d3-a223-c8103a4b2bb6" ], [ "Data Mining Project Position Class", - "Position Claims Folder" + "Position Claims Folder", + "Governance", + "0377d112-8545-4694-9c74-5205b2919ac3" ] ] } @@ -19478,7 +19506,7 @@ "liquidityPrograms": { "type": "Liquidity Programs", "name": "New Liquidity Programs", - "config": "{\"percentage\": 0}", + "config": "{\n \"percentage\": 0\n}", "project": "Governance", "liquidityProgram": [ { @@ -19491,6 +19519,61 @@ "name": "New Tokens Awarded", "project": "Governance", "id": "1f168cf5-73ee-44bc-a797-9aba9fbe5e6f", + "savedPayload": { + "position": { + "x": 11909.841210059156, + "y": 24335.099048196847 + }, + "targetPosition": { + "x": 11620.063462172435, + "y": 24257.45333466609 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "9da80d2e-2d07-4156-ad67-2fc0359051fc", + "savedPayload": { + "position": { + "x": 11620.063462172435, + "y": 24257.45333466609 + }, + "targetPosition": { + "x": 11164.285714285714, + "y": 23859.807621135333 + }, + "floatingObject": { + "isPinned": true, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + { + "type": "Liquidity Program", + "name": "BNB", + "config": "{\n \"asset\": \"BNB\"\n}", + "project": "Governance", + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "4e97a99e-c95c-4640-af3d-e4cf370623dc", "savedPayload": { "position": { "x": 11464.285714285714, @@ -19513,7 +19596,7 @@ } } }, - "id": "9da80d2e-2d07-4156-ad67-2fc0359051fc", + "id": "0f6b8c74-679e-4ce2-8b2b-f9a00a14a87e", "savedPayload": { "position": { "x": 11314.285714285714, @@ -19535,6 +19618,61 @@ "isRunning": false } } + }, + { + "type": "Liquidity Program", + "name": "BUSD", + "config": "{\n \"asset\": \"BUSD\"\n}", + "project": "Governance", + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "9904b483-e4c4-435f-a9ec-2aaaf3dccf64", + "savedPayload": { + "position": { + "x": 11008.994287224203, + "y": 24439.363116908775 + }, + "targetPosition": { + "x": 11086.640000754958, + "y": 24149.585369022054 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "7d9a8349-5055-4075-847a-dc80226f3e93", + "savedPayload": { + "position": { + "x": 11086.640000754958, + "y": 24149.585369022054 + }, + "targetPosition": { + "x": 11164.285714285714, + "y": 23859.807621135333 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } } ], "id": "d3789d9f-90a9-472b-acdf-45de0f311db1", diff --git a/Projects/Governance/Schemas/App-Schema/social-trading-desktop-app.json b/Projects/Governance/Schemas/App-Schema/social-trading-desktop-app.json index d984011d3..32a0a255f 100644 --- a/Projects/Governance/Schemas/App-Schema/social-trading-desktop-app.json +++ b/Projects/Governance/Schemas/App-Schema/social-trading-desktop-app.json @@ -25,7 +25,7 @@ "config": true }, "initialValues": { - "config": "{}" + "config": "{ \n\"codeName\": \"localhost\", \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"17042\"\n}" }, "addLeftIcons": true, "level": 1, diff --git a/Projects/Governance/Schemas/App-Schema/social-trading-mobile-app.json b/Projects/Governance/Schemas/App-Schema/social-trading-mobile-app.json index 7fa33665c..97202f837 100644 --- a/Projects/Governance/Schemas/App-Schema/social-trading-mobile-app.json +++ b/Projects/Governance/Schemas/App-Schema/social-trading-mobile-app.json @@ -25,7 +25,7 @@ "config": true }, "initialValues": { - "config": "{}" + "config": "{ \n\"codeName\": \"localhost\", \n\"host\": \"localhost\", \n\"webSocketsPort\": \"15042\"\n}" }, "addLeftIcons": true, "level": 1, diff --git a/Projects/Governance/Schemas/App-Schema/social-trading-server-app.json b/Projects/Governance/Schemas/App-Schema/social-trading-server-app.json index 5e15298e5..45d284b28 100644 --- a/Projects/Governance/Schemas/App-Schema/social-trading-server-app.json +++ b/Projects/Governance/Schemas/App-Schema/social-trading-server-app.json @@ -25,7 +25,7 @@ "config": true }, "initialValues": { - "config": "{}" + "config": "{ \n\"codeName\": \"localhost\", \n\"host\": \"localhost\", \n\"webSocketsPort\": \"16042\"\n}" }, "addLeftIcons": true, "level": 1, diff --git a/Projects/Network/SA/Modules/WebSocketsNetworkClient.js b/Projects/Network/SA/Modules/WebSocketsNetworkClient.js index 1542e743f..65efc4a74 100644 --- a/Projects/Network/SA/Modules/WebSocketsNetworkClient.js +++ b/Projects/Network/SA/Modules/WebSocketsNetworkClient.js @@ -55,7 +55,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb thisObject.socket = new SA.nodeModules.ws('ws://' + thisObject.host + ':' + thisObject.port) await setUpWebSocketClient() - console.log('Websockets Client Connected to Network Node via Web Sockets ................ Connected to ' + thisObject.p2pNetworkNode.userProfile.userProfileHandle + ' -> ' + thisObject.p2pNetworkNode.node.name + ' -> ' + thisObject.host + ':' + thisObject.port) + console.log('Websockets Client Connected to Network Node via Web Sockets .................. Connected to ' + thisObject.p2pNetworkNode.userProfile.userProfileHandle + ' -> ' + thisObject.p2pNetworkNode.node.name + ' -> ' + thisObject.host + ':' + thisObject.port) thisObject.isConnected = true } @@ -223,7 +223,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb function onConnectionClosed() { if (thisObject.isConnected === true) { - console.log('Websockets Client Disconnected from Network Node via Web Sockets ......... Disconnected from ' + thisObject.p2pNetworkNode.userProfile.userProfileHandle + ' -> ' + thisObject.p2pNetworkNode.node.name + ' -> ' + thisObject.host + ':' + thisObject.port) + console.log('Websockets Client Disconnected from Network Node via Web Sockets ............. Disconnected from ' + thisObject.p2pNetworkNode.userProfile.userProfileHandle + ' -> ' + thisObject.p2pNetworkNode.node.name + ' -> ' + thisObject.host + ':' + thisObject.port) } if (thisObject.onConnectionClosedCallBack !== undefined) { thisObject.onConnectionClosedCallBack(thisObject.id) diff --git a/Projects/Social-Trading/DK/modules/WebSocketsInterface.js b/Projects/Social-Trading/DK/modules/WebSocketsInterface.js index a3f2111be..d1e363c3b 100644 --- a/Projects/Social-Trading/DK/modules/WebSocketsInterface.js +++ b/Projects/Social-Trading/DK/modules/WebSocketsInterface.js @@ -22,7 +22,9 @@ exports.newDesktopModulesWebSocketsInterface = function newDesktopModulesWebSock } function initialize() { - socketServer = new SA.nodeModules.ws.Server({ port: global.env.DESKTOP_WEB_SOCKETS_INTERFACE_PORT }) + let port = JSON.parse(DK.desktopApp.p2pNetworkClient.node.config).webSocketsPort + + socketServer = new SA.nodeModules.ws.Server({ port: port }) webAppInterface = DK.projects.socialTrading.modules.webAppInterface.newSocialTradingModulesWebAppInterface() setUpWebSocketServer() @@ -45,7 +47,7 @@ exports.newDesktopModulesWebSocketsInterface = function newDesktopModulesWebSock webApp = { socket: socket } - console.log('Desktop Web App Connected to Web Sockets Interface ......................... Connected to port ' + global.env.DESKTOP_WEB_SOCKETS_INTERFACE_PORT) + console.log('Desktop Web App Connected to Web Sockets Interface ............................. Connected to port ' + global.env.DESKTOP_WEB_SOCKETS_INTERFACE_PORT) webApp.socket.on('close', onConnectionClosed) webApp.socket.on('message', onMenssage) diff --git a/Projects/Social-Trading/DK/modules/httpInterface.js b/Projects/Social-Trading/DK/modules/httpInterface.js index f99ebcd87..639e1e360 100644 --- a/Projects/Social-Trading/DK/modules/httpInterface.js +++ b/Projects/Social-Trading/DK/modules/httpInterface.js @@ -15,15 +15,16 @@ exports.newDesktopModulesHttpInterface = function newDesktopModulesHttpInterface } function initialize() { + let port = JSON.parse(DK.desktopApp.p2pNetworkClient.node.config).webPort /* We will create an HTTP Server and leave it running forever. */ - SA.nodeModules.http.createServer(onHttpRequest).listen(global.env.DESKTOP_HTTP_INTERFACE_PORT) + SA.nodeModules.http.createServer(onHttpRequest).listen(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) + SA.nodeModules.open('http://localhost:' + port) } } @@ -39,6 +40,11 @@ exports.newDesktopModulesHttpInterface = function newDesktopModulesHttpInterface SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(global.env), httpResponse) } break + case 'ClientNode': + { + SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(DK.desktopApp.p2pNetworkClient.node), httpResponse) + } + break case 'ProjectsSchema': { let path = global.env.PATH_TO_PROJECTS + '/' + 'ProjectsSchema.json' diff --git a/Projects/Social-Trading/UI/modules/WebSocketsWebClient.js b/Projects/Social-Trading/UI/modules/WebSocketsWebClient.js index e0512c462..da9fb2730 100644 --- a/Projects/Social-Trading/UI/modules/WebSocketsWebClient.js +++ b/Projects/Social-Trading/UI/modules/WebSocketsWebClient.js @@ -24,7 +24,7 @@ function newSocialTradingModulesWebSocketsWebClient() { async function initialize() { - socketClient = new WebSocket('ws://' + UI.environment.DESKTOP_WEB_SOCKETS_INTERFACE_HOST + ':' + UI.environment.DESKTOP_WEB_SOCKETS_INTERFACE_PORT) + socketClient = new WebSocket('ws://' + JSON.parse(UI.clientNode.config).host + ':' + JSON.parse(UI.clientNode.config).webSocketsPort) await setUpWebsocketClient() } diff --git a/desktop-app-1.js b/desktop-app-1.js new file mode 100644 index 000000000..fb4dd79c1 --- /dev/null +++ b/desktop-app-1.js @@ -0,0 +1,8 @@ +/* +This is to start a new instance of a test desktop app running with identity #1 as +defined at the Environment.js file. +*/ + +let APP_ROOT = require('./DesktopRoot.js') +let APP_ROOT_MODULE = APP_ROOT.newDesktopRoot() +APP_ROOT_MODULE.run({DESKTOP_APP_SIGNING_ACCOUNT: 'Social-Trading-Desktop-App-1'}) \ No newline at end of file diff --git a/desktop-app-2.js b/desktop-app-2.js new file mode 100644 index 000000000..85e705d77 --- /dev/null +++ b/desktop-app-2.js @@ -0,0 +1,8 @@ +/* +This is to start a new instance of a test desktop app running with identity #2 as +defined at the Environment.js file. +*/ + +let APP_ROOT = require('./DesktopRoot.js') +let APP_ROOT_MODULE = APP_ROOT.newDesktopRoot() +APP_ROOT_MODULE.run({DESKTOP_APP_SIGNING_ACCOUNT: 'Social-Trading-Desktop-App-2'}) \ No newline at end of file diff --git a/desktop-app-3.js b/desktop-app-3.js new file mode 100644 index 000000000..215b8a445 --- /dev/null +++ b/desktop-app-3.js @@ -0,0 +1,8 @@ +/* +This is to start a new instance of a test desktop app running with identity #3 as +defined at the Environment.js file. +*/ + +let APP_ROOT = require('./DesktopRoot.js') +let APP_ROOT_MODULE = APP_ROOT.newDesktopRoot() +APP_ROOT_MODULE.run({DESKTOP_APP_SIGNING_ACCOUNT: 'Social-Trading-Desktop-App-3'}) \ No newline at end of file diff --git a/network-node-1.js b/network-node-1.js index ffb2ccd1e..1e58b469f 100644 --- a/network-node-1.js +++ b/network-node-1.js @@ -1,14 +1,6 @@ /* -The Superalgos Network offers 3 types of services: - - * Social Graph Service - * Search Index Service - * Private Message Service - -Users can decide which services to run at their node.(TODO) - -This module represents the Nodejs command that users have to start the Network Node.. - +This is to start a new instance of a test node running with Node identity #1 as +defined at the Environment.js file. */ let APP_ROOT = require('./NetworkRoot.js') diff --git a/network-node-2.js b/network-node-2.js index 0f36a5e2d..5d28e627c 100644 --- a/network-node-2.js +++ b/network-node-2.js @@ -1,14 +1,6 @@ /* -The Superalgos Network offers 3 types of services: - - * Social Graph Service - * Search Index Service - * Private Message Service - -Users can decide which services to run at their node.(TODO) - -This module represents the Nodejs command that users have to start the Network Node.. - +This is to start a new instance of a test node running with Node identity #2 as +defined at the Environment.js file. */ let APP_ROOT = require('./NetworkRoot.js') diff --git a/network-node-3.js b/network-node-3.js index f8a3ac41e..30d2c5141 100644 --- a/network-node-3.js +++ b/network-node-3.js @@ -1,14 +1,6 @@ /* -The Superalgos Network offers 3 types of services: - - * Social Graph Service - * Search Index Service - * Private Message Service - -Users can decide which services to run at their node.(TODO) - -This module represents the Nodejs command that users have to start the Network Node.. - +This is to start a new instance of a test node running with Node identity #3 as +defined at the Environment.js file. */ let APP_ROOT = require('./NetworkRoot.js')