From cd40e8ec4865d4fc1d5ff96ebb6517519e037ed2 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 8 Oct 2021 10:24:18 +0200 Subject: [PATCH 1/4] Logging improved --- .../UI/Function-Libraries/ReferenceAttachDetach.js | 3 +++ .../Foundations/UI/Function-Libraries/UiObjectsFromNodes.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js index 60c293b6a..1842d2068 100644 --- a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js +++ b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js @@ -20,6 +20,7 @@ function newFoundationsFunctionLibraryReferenceAttachDetach() { // Store the path to the reference parent to make restoring it possible if the reference parent is updated and given a new id function storeAttachNodePath(node, attachToNode) { + if (node === undefined) { return } if (node.payload === undefined) { return } let attachNodePath = UI.projects.foundations.utilities.hierarchy.getNodeNameTypePath(attachToNode) // Remove unused node id, and project tag from stored path @@ -33,6 +34,8 @@ function newFoundationsFunctionLibraryReferenceAttachDetach() { // Clear the path to reference parent when the reference is cleared function cleanAttachNodePath(node) { + if (node === undefined) { return } + if (node.payload === undefined) { return } if (node.payload !== undefined) { node.payload.referenceParentCombinedNodePath = undefined if (node.savedPayload !== undefined) { diff --git a/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js b/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js index 3b4ad930c..bb32b8d12 100644 --- a/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js +++ b/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js @@ -599,7 +599,7 @@ function newFoundationsFunctionLibraryUiObjectsFromNodes() { let schemaDocument = getSchemaDocument(object, project) if (schemaDocument === undefined) { - console.log('Cannot addUIOBject of ' + type + ' because that type it is not defined at the APP_SCHEMA.') + console.log('Cannot addUIOBject of type "' + type + '" and project "' + project + '"because that type it is not defined at the APP_SCHEMA.') return } @@ -627,7 +627,7 @@ function newFoundationsFunctionLibraryUiObjectsFromNodes() { parentSchemaDocument = getSchemaDocument(parentNode, parentNode.project) if (parentSchemaDocument === undefined) { - console.log('Cannot addUIOBject from parent of ' + type + ' because that type it is not defined at the APP_SCHEMA.') + console.log('Cannot addUIOBject from parent of type "' + type + '" and project "' + parentNode.project + '" because that type it is not defined at the APP_SCHEMA.') return } checkChainToSelfTypeCollection() From 5e2e370c41542c5010545c650c6839a5388e1298 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 8 Oct 2021 10:46:20 +0200 Subject: [PATCH 2/4] Update UiObjectsFromNodes.js --- .../Foundations/UI/Function-Libraries/UiObjectsFromNodes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js b/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js index bb32b8d12..32e8bfe62 100644 --- a/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js +++ b/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js @@ -599,7 +599,7 @@ function newFoundationsFunctionLibraryUiObjectsFromNodes() { let schemaDocument = getSchemaDocument(object, project) if (schemaDocument === undefined) { - console.log('Cannot addUIOBject of type "' + type + '" and project "' + project + '"because that type it is not defined at the APP_SCHEMA.') + console.log('Cannot addUIOBject of type "' + type + '" and project "' + project + '" because that type it is not defined at the APP_SCHEMA.') return } From 0d7fe359289e9f8105178692c56468324205972a Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 8 Oct 2021 11:22:25 +0200 Subject: [PATCH 3/4] Bug Fixes Installing Markets --- .../UI/Function-Libraries/ChartingSpaceFunctions.js | 2 ++ .../UI/Function-Libraries/DataStorageFunctions.js | 3 +++ Projects/ProjectsSchema.json | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/Projects/Foundations/UI/Function-Libraries/ChartingSpaceFunctions.js b/Projects/Foundations/UI/Function-Libraries/ChartingSpaceFunctions.js index bbd74b0a3..c6c5808c9 100644 --- a/Projects/Foundations/UI/Function-Libraries/ChartingSpaceFunctions.js +++ b/Projects/Foundations/UI/Function-Libraries/ChartingSpaceFunctions.js @@ -340,6 +340,8 @@ function newFoundationsFunctionLibraryChartingSpaceFunctions() { let projectDefinition = PROJECTS_SCHEMA[k] let project = projectDefinition.name + if (projectDefinition.products === undefined) { continue } + for (let j = 0; j < rootNodes.length; j++) { let rootNode = rootNodes[j] if (rootNode.type === project + ' Project') { diff --git a/Projects/Foundations/UI/Function-Libraries/DataStorageFunctions.js b/Projects/Foundations/UI/Function-Libraries/DataStorageFunctions.js index b2e6a086f..7bf27bfe0 100644 --- a/Projects/Foundations/UI/Function-Libraries/DataStorageFunctions.js +++ b/Projects/Foundations/UI/Function-Libraries/DataStorageFunctions.js @@ -233,6 +233,9 @@ function newFoundationsFunctionLibraryDataStorageFunctions() { let projectDefinition = PROJECTS_SCHEMA[k] let project = projectDefinition.name + if (projectDefinition.products === undefined) { continue } + if (projectDefinition.products.includes(newNodeType.replace('Project ', '')) === false) { continue } + for (let j = 0; j < rootNodes.length; j++) { let rootNode = rootNodes[j] if (rootNode.type === project + ' Project') { diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index ae089280b..a8544b17a 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -839,6 +839,11 @@ "plugins": [ "Tutorials", "API Maps" + ], + "products": [ + "Data Products", + "Trading Products", + "Learning Products" ] }, { From 2df3a569b4985c02a9b1fceb195a82b3e023b608 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 8 Oct 2021 11:25:35 +0200 Subject: [PATCH 4/4] DeepScan Bug Fix --- .../UI/Function-Libraries/ReferenceAttachDetach.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js index 1842d2068..30c48db0e 100644 --- a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js +++ b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js @@ -36,11 +36,10 @@ function newFoundationsFunctionLibraryReferenceAttachDetach() { function cleanAttachNodePath(node) { if (node === undefined) { return } if (node.payload === undefined) { return } - if (node.payload !== undefined) { - node.payload.referenceParentCombinedNodePath = undefined - if (node.savedPayload !== undefined) { - node.savedPayload.referenceParentCombinedNodePath = undefined - } + + node.payload.referenceParentCombinedNodePath = undefined + if (node.savedPayload !== undefined) { + node.savedPayload.referenceParentCombinedNodePath = undefined } }