From 6b6ef06b44fae8080f3b75d80a2c6b2ea21082b8 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 24 Apr 2020 12:03:37 +0200 Subject: [PATCH] Remote Data Implemented --- .../Workspace/FunctionLibraries/ProtocolNode.js | 16 ++++++---------- .../Workspace/FunctionLibraries/TaskFunctions.js | 16 ++++++++++------ DesignSpace/Workspace/Workspace.js | 2 +- EventsServerClient.js | 4 ++-- FloatingSpace/UiObject.js | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/DesignSpace/Workspace/FunctionLibraries/ProtocolNode.js b/DesignSpace/Workspace/FunctionLibraries/ProtocolNode.js index 3fff812a4..73d626530 100644 --- a/DesignSpace/Workspace/FunctionLibraries/ProtocolNode.js +++ b/DesignSpace/Workspace/FunctionLibraries/ProtocolNode.js @@ -24,23 +24,19 @@ function newProtocolNode () { /* Children Nodes */ if (nodeDefinition.properties !== undefined) { - let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children. for (let i = 0; i < nodeDefinition.properties.length; i++) { let property = nodeDefinition.properties[i] switch (property.type) { case 'node': { if (node[property.name] !== undefined) { - if (property.name !== previousPropertyName) { - if (lightingPath === undefined) { - object[property.name] = getProtocolNode(node[property.name], removePersonalData, parseCode, includeIds, includeReferencesInSavedPayload, includePayload) - } else { - let newLightingPath = getNewLightingPath(lightingPath, node.type, property.childType) - if (newLightingPath !== undefined) { - object[property.name] = getProtocolNode(node[property.name], removePersonalData, parseCode, includeIds, includePayload, includeReferencesInSavedPayload, newLightingPath) - } + if (lightingPath === undefined) { + object[property.name] = getProtocolNode(node[property.name], removePersonalData, parseCode, includeIds, includeReferencesInSavedPayload, includePayload) + } else { + let newLightingPath = getNewLightingPath(lightingPath, node.type, property.childType) + if (newLightingPath !== undefined) { + object[property.name] = getProtocolNode(node[property.name], removePersonalData, parseCode, includeIds, includePayload, includeReferencesInSavedPayload, newLightingPath) } - previousPropertyName = property.name } } break diff --git a/DesignSpace/Workspace/FunctionLibraries/TaskFunctions.js b/DesignSpace/Workspace/FunctionLibraries/TaskFunctions.js index a63fef7db..54af3c9c7 100644 --- a/DesignSpace/Workspace/FunctionLibraries/TaskFunctions.js +++ b/DesignSpace/Workspace/FunctionLibraries/TaskFunctions.js @@ -58,14 +58,18 @@ function newTaskFunctions () { let taskDefinition = functionLibraryProtocolNode.getProtocolNode(node, false, true, true, false, false, taskLightingPath) - let networkLightingPath = '->Task->Task Manager->' + - 'Exchange Tasks->' + - 'Data Mining->Testing Environment->Production Environment->' + - 'Network Node->Network->Network Node->' + + let networkLightingPath = '->Network->Network Node->' + 'Data Storage->Session Independent Data->Exchange Data Products->' + - 'Single Market Data->Data Product->Product Definition->' + 'Single Market Data->Data Product->Product Definition->' + + 'Data Mining->Testing Environment->Production Environment->' + + 'Exchange Tasks->Crypto Exchange->' + + 'Task Manager->Task->' + + 'Indicator Bot Instance->Sensor Bot Instance->' + + 'Indicator Process Instance->Sensor Process Instance->' + + 'Market Reference->Market->' + + 'Process Definition->' - let networkDefinition = functionLibraryProtocolNode.getProtocolNode(node, false, true, true, false, false, networkLightingPath) + let networkDefinition = functionLibraryProtocolNode.getProtocolNode(networkNode.payload.parentNode, false, true, true, false, false, networkLightingPath) let event = { taskId: node.id, diff --git a/DesignSpace/Workspace/Workspace.js b/DesignSpace/Workspace/Workspace.js index a58fb46a1..b8e4062f4 100644 --- a/DesignSpace/Workspace/Workspace.js +++ b/DesignSpace/Workspace/Workspace.js @@ -126,7 +126,7 @@ function newWorkspace () { if (host === undefined) { host = 'localhost' } if (webSocketsPort === undefined) { webSocketsPort = '8080' } - let eventsServerClient = newEventsServerClient(host, webSocketsPort) + let eventsServerClient = newEventsServerClient(host, webSocketsPort, networkNode.name) eventsServerClient.initialize() thisObject.eventsServerClients.set(networkNode.id, eventsServerClient) diff --git a/EventsServerClient.js b/EventsServerClient.js index f54bfb477..1c5301e37 100644 --- a/EventsServerClient.js +++ b/EventsServerClient.js @@ -1,5 +1,5 @@ -function newEventsServerClient (host, port) { +function newEventsServerClient (host, port, hostName) { /* Web Sockets Connection */ const MODULE_NAME = 'System Event Handler' @@ -153,7 +153,7 @@ function newEventsServerClient (host, port) { } if (thisObject.isConnected() !== true) { - canvas.cockpitSpace.setStatus('Connecting to ' + host + '. Please hold on until the connection can be stablished.', 100, canvas.cockpitSpace.statusTypes.WARNING) + canvas.cockpitSpace.setStatus('Connecting to ' + hostName + ' Network Node. Please hold on until the connection can be stablished.', 100, canvas.cockpitSpace.statusTypes.WARNING) } else { retryCommandsPhysics() } diff --git a/FloatingSpace/UiObject.js b/FloatingSpace/UiObject.js index 136c3c9a0..574fd4a4c 100644 --- a/FloatingSpace/UiObject.js +++ b/FloatingSpace/UiObject.js @@ -1424,7 +1424,7 @@ function newUiObject () { let label if (radius > 6) { - const MAX_LABEL_LENGTH = 65 + const MAX_LABEL_LENGTH = 100 label = currentStatus