Bug fixes
This commit is contained in:
1 parent
f8a858e1d9
commit
2917dbbb91
4 files changed
+37
-17
No files matched your search
@@ -13,6 +13,8 @@ function newWorkspace() {
|
||||
eventsServerClients: new Map(),
|
||||
replaceWorkspaceByLoadingOne: replaceWorkspaceByLoadingOne,
|
||||
save: saveWorkspace,
|
||||
backup: backupWorkspace,
|
||||
share: shareWorkspace,
|
||||
getHierarchyHeads: getHierarchyHeads,
|
||||
getHierarchyHeadsById: getHierarchyHeadsById,
|
||||
getHierarchyHeadsByType: getHierarchyHeadsByType,
|
||||
@@ -120,6 +122,7 @@ function newWorkspace() {
|
||||
let rootNode = thisObject.workspaceNode.rootNodes[i]
|
||||
|
||||
if (rootNode.type === 'Network') {
|
||||
if (rootNode.networkNodes === undefined) { continue }
|
||||
for (let j = 0; j < rootNode.networkNodes.length; j++) {
|
||||
let networkNode = rootNode.networkNodes[j]
|
||||
|
||||
@@ -183,6 +186,22 @@ function newWorkspace() {
|
||||
}
|
||||
}
|
||||
|
||||
function backupWorkspace(action) {
|
||||
let text = stringifyWorkspace(false)
|
||||
let fileName = 'Backup - ' + action.node.type + ' - ' + action.node.name + '.json'
|
||||
if (text !== undefined) {
|
||||
downloadText(fileName, text)
|
||||
}
|
||||
}
|
||||
|
||||
function shareWorkspace(action) {
|
||||
let text = stringifyWorkspace(true)
|
||||
let fileName = 'Share - ' + action.node.type + ' - ' + action.node.name + '.json'
|
||||
if (text !== undefined) {
|
||||
downloadText(fileName, text)
|
||||
}
|
||||
}
|
||||
|
||||
async function getNodeById(nodeId) {
|
||||
return await executeAction({ name: 'Get Node By Id', project: 'Superalgos', relatedNodeId: nodeId })
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user