Bug Fixes + Folders

This commit is contained in:
Luis Fernando Molina committed 2020-09-01 21:00:40 +02:00
1 parent 17fe6ca50f
commit cb61cc1ef0
39 files changed
+1333 -299

No files matched your search

@@ -0,0 +1,50 @@
function newChartingSpaceFunctions() {
thisObject = {
addAllDataMineLayers: addAllDataMineLayers
}
return thisObject
function addAllDataMineLayers(node, functionLibraryUiObjectsFromNodes) {
/* Validations to see if we can do this or not. */
if (node.payload === undefined) { return }
if (node.payload.uiObject === undefined) { return }
if (node.payload.referenceParent === undefined) {
node.payload.uiObject.setErrorMessage('You need to have a reference parent node to execute this action.')
return
}
if (node.payload.referenceParent.payload === undefined) {
node.payload.uiObject.setErrorMessage('You need to have a reference parent node to execute this action.')
return
}
/*
We are going to go through the referenced branch and recreate the structure
we find there inside the layers manager. We will end up having at the end
all layers referencing the data products inside the referenced branch.
*/
let dataMine = node.payload.referenceParent
scanBotArray(dataMine.botProducts)
function scanBotArray(botArray) {
for (let i = 0; i < botArray.length; i++) {
let bot = botArray[i]
let botLayers = functionLibraryUiObjectsFromNodes.addUIObject(node, 'Bot Layers')
botLayers.name = bot.name
asymetricalFolderStructureCloning(
bot,
botLayers,
'dataProducts',
'dataProductFolders',
'layerFolders',
'Layer',
'Layer Folder',
undefined,
functionLibraryUiObjectsFromNodes
)
}
}
}
}