Node Children

This commit is contained in:
Luis Fernando Molina committed 2021-10-11 13:15:31 +02:00
1 parent 46d7472ac8
commit 5e8e4f5f73
9 files changed
+39 -39

No files matched your search

@@ -129,7 +129,7 @@ function newFoundationsFunctionLibraryChartingSpaceFunctions() {
if (environment.id !== node.payload.referenceParent.id) { continue }
let market = UI.projects.foundations.utilities.meshes.findNodeInNodeMesh(session, 'Market Trading Tasks', undefined, true, false, true, false)
if (market.payload.referenceParent === undefined) { continue }
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(node, session, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, session, true) === true) {
createTimeMachine(node, session, market.payload.referenceParent, lanNetworkNode, rootNodes)
}
}
@@ -320,13 +320,13 @@ function newFoundationsFunctionLibraryChartingSpaceFunctions() {
let testingTradingTasks = UI.projects.foundations.utilities.branches.findInBranch(lanNetworkNode, 'Testing Trading Tasks', node, true)
let productionTradingTasks = UI.projects.foundations.utilities.branches.findInBranch(lanNetworkNode, 'Production Trading Tasks', node, true)
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(node, testingTradingTasks, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, testingTradingTasks, true) === true) {
let dashboard = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Dashboard')
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(dashboard, testingTradingTasks)
dashboard.name = testingTradingTasks.type + ' ' + lanNetworkNode.name
}
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(node, productionTradingTasks, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, productionTradingTasks, true) === true) {
let dashboard = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Dashboard')
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(dashboard, productionTradingTasks)
dashboard.name = productionTradingTasks.type + ' ' + lanNetworkNode.name
@@ -347,7 +347,7 @@ function newFoundationsFunctionLibraryChartingSpaceFunctions() {
if (rootNode.type === project + ' Project') {
let projectDefinition = rootNode.projectDefinition
if (projectDefinition !== undefined) {
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(node, projectDefinition, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, projectDefinition, true) === true) {
let projectTasks = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Project Dashboards', undefined, project)
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(projectTasks, projectDefinition)
}
@@ -290,9 +290,9 @@ function newFoundationsFunctionLibraryCryptoEcosystemFunctions() {
}
function installTheRestOfTheBranch(projectDataTasks) {
let exchangeDataTasks = UI.projects.foundations.utilities.nodeChildren.findOrCreateChildWithReference(projectDataTasks, 'Exchange Data Tasks', cryptoExchange)
let exchangeDataTasks = UI.projects.visualScripting.utilities.nodeChildren.findOrCreateChildWithReference(projectDataTasks, 'Exchange Data Tasks', cryptoExchange)
exchangeDataTasks.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180
let marketDataTask = UI.projects.foundations.utilities.nodeChildren.findAndRecreateChildWithReference(exchangeDataTasks, 'Market Data Tasks', market, rootNodes)
let marketDataTask = UI.projects.visualScripting.utilities.nodeChildren.findAndRecreateChildWithReference(exchangeDataTasks, 'Market Data Tasks', market, rootNodes)
UI.projects.foundations.utilities.menu.menuClick(marketDataTask, 'Add Missing Data Mine Tasks', true)
UI.projects.foundations.utilities.menu.menuClickOfNodeArray(marketDataTask.dataMineTasks, 'Add All Tasks', true)
@@ -323,9 +323,9 @@ function newFoundationsFunctionLibraryCryptoEcosystemFunctions() {
}
function installTheRestOfTheBranch(projectLearningTasks) {
let exchangeLearningTasks = UI.projects.foundations.utilities.nodeChildren.findOrCreateChildWithReference(projectLearningTasks, 'Exchange Learning Tasks', cryptoExchange)
let exchangeLearningTasks = UI.projects.visualScripting.utilities.nodeChildren.findOrCreateChildWithReference(projectLearningTasks, 'Exchange Learning Tasks', cryptoExchange)
exchangeLearningTasks.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180
let marketLearningTask = UI.projects.foundations.utilities.nodeChildren.findAndRecreateChildWithReference(exchangeLearningTasks, 'Market Learning Tasks', market, rootNodes)
let marketLearningTask = UI.projects.visualScripting.utilities.nodeChildren.findAndRecreateChildWithReference(exchangeLearningTasks, 'Market Learning Tasks', market, rootNodes)
UI.projects.foundations.utilities.menu.menuClick(marketLearningTask, 'Add Missing Learning Mine Tasks', true)
UI.projects.foundations.utilities.menu.menuClickOfNodeArray(marketLearningTask.learningMineTasks, 'Add All Tasks', true)
@@ -377,9 +377,9 @@ function newFoundationsFunctionLibraryCryptoEcosystemFunctions() {
}
function installTheRestOfTheBranch(projectTradingTasks) {
let exchangeTradingTasks = UI.projects.foundations.utilities.nodeChildren.findOrCreateChildWithReference(projectTradingTasks, 'Exchange Trading Tasks', cryptoExchange)
let exchangeTradingTasks = UI.projects.visualScripting.utilities.nodeChildren.findOrCreateChildWithReference(projectTradingTasks, 'Exchange Trading Tasks', cryptoExchange)
exchangeTradingTasks.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180
let marketTradingTask = UI.projects.foundations.utilities.nodeChildren.findAndRecreateChildWithReference(exchangeTradingTasks, 'Market Trading Tasks', market, rootNodes)
let marketTradingTask = UI.projects.visualScripting.utilities.nodeChildren.findAndRecreateChildWithReference(exchangeTradingTasks, 'Market Trading Tasks', market, rootNodes)
UI.projects.foundations.utilities.menu.menuClick(marketTradingTask, 'Add Missing Trading Mine Tasks', true)
UI.projects.foundations.utilities.menu.menuClickOfNodeArray(marketTradingTask.tradingMineTasks, 'Add All Tasks', true)
@@ -429,9 +429,9 @@ function newFoundationsFunctionLibraryCryptoEcosystemFunctions() {
}
function installTheRestOfTheBranch(projectDataProducts) {
let exchangeDataProducts = UI.projects.foundations.utilities.nodeChildren.findOrCreateChildWithReference(projectDataProducts, 'Exchange Data Products', cryptoExchange)
let exchangeDataProducts = UI.projects.visualScripting.utilities.nodeChildren.findOrCreateChildWithReference(projectDataProducts, 'Exchange Data Products', cryptoExchange)
exchangeDataProducts.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180
let marketDataProducts = UI.projects.foundations.utilities.nodeChildren.findAndRecreateChildWithReference(exchangeDataProducts, 'Market Data Products', market, rootNodes)
let marketDataProducts = UI.projects.visualScripting.utilities.nodeChildren.findAndRecreateChildWithReference(exchangeDataProducts, 'Market Data Products', market, rootNodes)
marketDataProducts.payload.floatingObject.collapseToggle()
UI.projects.foundations.utilities.menu.menuClick(marketDataProducts, 'Add All Data Mine Products', true)
@@ -469,16 +469,16 @@ function newFoundationsFunctionLibraryCryptoEcosystemFunctions() {
function installTheRestOfTheBranch(projectLearningProducts) {
let exchangeLearningProducts = UI.projects.foundations.utilities.nodeChildren.findOrCreateChildWithReference(projectLearningProducts, 'Exchange Learning Products', cryptoExchange)
let exchangeLearningProducts = UI.projects.visualScripting.utilities.nodeChildren.findOrCreateChildWithReference(projectLearningProducts, 'Exchange Learning Products', cryptoExchange)
exchangeLearningProducts.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180
let marketLearningProducts = UI.projects.foundations.utilities.nodeChildren.findAndRecreateChildWithReference(exchangeLearningProducts, 'Market Learning Products', market, rootNodes)
let marketLearningProducts = UI.projects.visualScripting.utilities.nodeChildren.findAndRecreateChildWithReference(exchangeLearningProducts, 'Market Learning Products', market, rootNodes)
marketLearningProducts.payload.floatingObject.collapseToggle()
/*
Create the new session references.
*/
for (let i = 0; i < learningSessionsCreatedArray.length; i++) {
let session = learningSessionsCreatedArray[i]
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(marketLearningProducts, session, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(marketLearningProducts, session, true) === true) {
UI.projects.foundations.functionLibraries.dataStorageFunctions.createSessionReference(marketLearningProducts, session, 'Learning Session Reference')
}
}
@@ -524,16 +524,16 @@ function newFoundationsFunctionLibraryCryptoEcosystemFunctions() {
function installTheRestOfTheBranch(projectTradingProducts) {
let exchangeTradingProducts = UI.projects.foundations.utilities.nodeChildren.findOrCreateChildWithReference(projectTradingProducts, 'Exchange Trading Products', cryptoExchange)
let exchangeTradingProducts = UI.projects.visualScripting.utilities.nodeChildren.findOrCreateChildWithReference(projectTradingProducts, 'Exchange Trading Products', cryptoExchange)
exchangeTradingProducts.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180
let marketTradingProducts = UI.projects.foundations.utilities.nodeChildren.findAndRecreateChildWithReference(exchangeTradingProducts, 'Market Trading Products', market, rootNodes)
let marketTradingProducts = UI.projects.visualScripting.utilities.nodeChildren.findAndRecreateChildWithReference(exchangeTradingProducts, 'Market Trading Products', market, rootNodes)
marketTradingProducts.payload.floatingObject.collapseToggle()
/*
Create the new session references.
*/
for (let i = 0; i < tradingSessionsCreatedArray.length; i++) {
let session = tradingSessionsCreatedArray[i]
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(marketTradingProducts, session, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(marketTradingProducts, session, true) === true) {
UI.projects.foundations.functionLibraries.dataStorageFunctions.createSessionReference(marketTradingProducts, session, 'Trading Session Reference')
}
}
@@ -574,7 +574,7 @@ function newFoundationsFunctionLibraryCryptoEcosystemFunctions() {
If the Dashboard we need is not already there we create a new one.
*/
let arrayItem = dashboardsArray[i]
let dashboard = UI.projects.foundations.utilities.nodeChildren.findOrCreateChildWithReference(projectDashboards, 'Dashboard', arrayItem.environmentNode)
let dashboard = UI.projects.visualScripting.utilities.nodeChildren.findOrCreateChildWithReference(projectDashboards, 'Dashboard', arrayItem.environmentNode)
dashboard.name = arrayItem.environmentNode.type + ' ' + arrayItem.lanNetworkNode.name
/*
We delete all the existing Time Machines related to the market we are currently installing.
@@ -123,7 +123,7 @@ function newFoundationsFunctionLibraryDataStorageFunctions() {
/* We will filter out all the sessions that does not belong to the market we are in */
let marketTradingTasks = UI.projects.foundations.utilities.meshes.findNodeInNodeMesh(session, 'Market Trading Tasks', undefined, true, false, true, false)
if (node.payload.referenceParent.id !== marketTradingTasks.payload.referenceParent.id) { continue }
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(node, session, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, session, true) === true) {
createSessionReference(node, session, 'Trading Session Reference')
}
}
@@ -146,7 +146,7 @@ function newFoundationsFunctionLibraryDataStorageFunctions() {
/* We will filter out all the sessions that does not belong to the market we are in */
let marketLearningTasks = UI.projects.foundations.utilities.meshes.findNodeInNodeMesh(session, 'Market Learning Tasks', undefined, true, false, true, false)
if (node.payload.referenceParent.id !== marketLearningTasks.payload.referenceParent.id) { continue }
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(node, session, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, session, true) === true) {
createSessionReference(node, session, 'Learning Session Reference')
}
}
@@ -177,7 +177,7 @@ function newFoundationsFunctionLibraryDataStorageFunctions() {
for (let i = 0; i < marketsArray.length; i++) {
let market = marketsArray[i]
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(node, market, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, market, true) === true) {
let marketDataProducts = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, newNodeType)
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(marketDataProducts, market)
}
@@ -205,7 +205,7 @@ function newFoundationsFunctionLibraryDataStorageFunctions() {
let cryptoExchanges = cryptoEcosystem.cryptoExchanges[j]
for (let k = 0; k < cryptoExchanges.exchanges.length; k++) {
let cryptoExchange = cryptoExchanges.exchanges[k]
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(node, cryptoExchange, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, cryptoExchange, true) === true) {
let exchange = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, newNodeType)
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(exchange, cryptoExchange)
}
@@ -241,7 +241,7 @@ function newFoundationsFunctionLibraryDataStorageFunctions() {
if (rootNode.type === project + ' Project') {
let projectDefinition = rootNode.projectDefinition
if (projectDefinition !== undefined) {
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(node, projectDefinition, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, projectDefinition, true) === true) {
let projectTasks = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, newNodeType, undefined, project)
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(projectTasks, projectDefinition)
}
@@ -612,7 +612,7 @@ function newFoundationsFunctionLibraryTaskFunctions() {
if (rootNode.type === project + ' Project') {
let projectDefinition = rootNode.projectDefinition
if (projectDefinition !== undefined) {
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(node, projectDefinition, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, projectDefinition, true) === true) {
let projectTasks = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, newNodeType, undefined, node.project)
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(projectTasks, projectDefinition)
}
@@ -643,7 +643,7 @@ function newFoundationsFunctionLibraryTaskFunctions() {
let cryptoExchanges = cryptoEcosystem.cryptoExchanges[j]
for (let k = 0; k < cryptoExchanges.exchanges.length; k++) {
let cryptoExchange = cryptoExchanges.exchanges[k]
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(node, cryptoExchange, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, cryptoExchange, true) === true) {
let exchangeTasks = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, newNodeType)
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(exchangeTasks, cryptoExchange)
}
@@ -675,7 +675,7 @@ function newFoundationsFunctionLibraryTaskFunctions() {
for (let i = 0; i < markets.length; i++) {
let market = markets[i]
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(node, market, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, market, true) === true) {
let marketDataTasks = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, newNodeType)
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(marketDataTasks, market)
}
@@ -700,7 +700,7 @@ function newFoundationsFunctionLibraryTaskFunctions() {
if (rootNode.type === rootNodeType) {
let mine = rootNode
if (UI.projects.foundations.utilities.nodeChildren.isMissingChildrenById(node, mine, true) === true) {
if (UI.projects.visualScripting.utilities.nodeChildren.isMissingChildrenById(node, mine, true) === true) {
let dataMineTasks = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, newNodeType)
UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(dataMineTasks, mine)
}