Multi Project

This commit is contained in:
Luis Fernando Molina committed 2020-11-08 18:16:44 +01:00
1 parent 497cd50d7c
commit 9cd2273b20
5 files changed
+188 -16

No files matched your search

+9
View File
@@ -13,6 +13,15 @@
"label": "Add Decentralized Application",
"relatedUiObject": "Decentralized Application",
"actionFunction": "payload.executeAction"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete",
"iconPathOff": "delete"
}
],
"isProjectHead": true,
@@ -26,6 +26,7 @@ function newSuperalgosActionSwitch() {
let functionLibraryDataStorageFunctions = newDataStorageFunctions()
let functionLibraryChartingSpaceFunctions = newChartingSpaceFunctions()
let functionLibraryPluginsFunctions = newPluginsFunctions()
let functionLibraryWorkspaceFunctions = newWorkspaceFunctions()
return thisObject
@@ -50,6 +51,7 @@ function newSuperalgosActionSwitch() {
functionLibraryDataStorageFunctions = undefined
functionLibraryChartingSpaceFunctions = undefined
functionLibraryPluginsFunctions = undefined
functionLibraryWorkspaceFunctions = undefined
}
function initialize() {
@@ -649,6 +651,11 @@ function newSuperalgosActionSwitch() {
functionLibraryPluginsFunctions.pluginMissingTutorials(action.node, action.rootNodes, functionLibraryUiObjectsFromNodes)
}
break
case 'Add Missing Workspace Projects':
{
functionLibraryWorkspaceFunctions.addMissingWorkspaceProjects(action.node, action.rootNodes, functionLibraryUiObjectsFromNodes)
}
break
}
}
}
@@ -2,7 +2,7 @@ function newUiObjectsFromNodes() {
thisObject = {
syncronizeTasksFoundAtWorkspaceWithBackEnd: syncronizeTasksFoundAtWorkspaceWithBackEnd,
syncronizeTradingSessionsFoundAtWorkspaceWithBackEnd: syncronizeTradingSessionsFoundAtWorkspaceWithBackEnd,
syncronizeLearningSessionsFoundAtWorkspaceWithBackEnd: syncronizeLearningSessionsFoundAtWorkspaceWithBackEnd,
syncronizeLearningSessionsFoundAtWorkspaceWithBackEnd: syncronizeLearningSessionsFoundAtWorkspaceWithBackEnd,
playTutorials: playTutorials,
recreateWorkspace: recreateWorkspace,
getNodeById: getNodeById,
@@ -362,7 +362,7 @@ function newUiObjectsFromNodes() {
}
}
if (nodeDefinition.isHierarchyHead === true) {
if (nodeDefinition.isHierarchyHead === true || nodeDefinition.isProjectHead) {
rootNodes.push(object)
createUiObject(true, object.type, object.name, object, parentNode, undefined)
return object
@@ -0,0 +1,32 @@
function newWorkspaceFunctions() {
thisObject = {
addMissingWorkspaceProjects: addMissingWorkspaceProjects
}
return thisObject
function addMissingWorkspaceProjects(node, rootNodes, functionLibraryUiObjectsFromNodes) {
let url = 'ProjectNames'
callWebServer(undefined, url, onResponse)
function onResponse(err, pProjects) {
let projects = JSON.parse(pProjects)
for (let i = 0; i < projects.length; i++) {
let project = projects[i]
let alreadyExist = false
for (let j = 0; j < rootNodes.length; j++) {
let rootNode = rootNodes[j]
if (rootNode.type === project + ' Project') {
alreadyExist = true
}
}
if (alreadyExist === false) {
let child = functionLibraryUiObjectsFromNodes.addUIObject(node, project + ' Project', rootNodes)
child.project = project
}
}
}
}
}
+138 -14
View File
@@ -1,19 +1,85 @@
[
{
"type": "Superalgos Project",
"menuItems": [
{
"action": "Add Missing Children",
"label": "Add Missing Children",
"relatedUiObject": "Superalgos Project",
"actionFunction": "payload.executeAction"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete",
"iconPathOff": "delete"
}
],
"isProjectHead": true,
"isTitleAllwaysVisible": false,
"addLeftIcons": true,
"isPinned": true,
"positionLocked": true,
"icon": "superalgos",
"properties": [
{
"name": "spaces",
"type": "node",
"childType": "Spaces",
"autoAdd": true
},
{
"name": "mines",
"type": "node",
"childType": "Mines",
"autoAdd": true
},
{
"name": "otherHierarchies",
"type": "node",
"childType": "Other Hierarchies",
"autoAdd": true
}
]
},
{
"type": "Spaces",
"menuItems": [
{
"action": "Add UI Object",
"label": "Add Trading System",
"relatedUiObject": "Trading System",
"label": "Add Charting Space",
"relatedUiObject": "Charting Space",
"actionFunction": "payload.executeAction"
},
{
"action": "Add UI Object",
"label": "Add Network",
"relatedUiObject": "Network",
"label": "Add Design Space",
"relatedUiObject": "Design Space",
"actionFunction": "payload.executeAction"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete",
"iconPathOff": "delete"
}
],
"isTitleAllwaysVisible": false,
"addLeftIcons": true,
"isPinned": false,
"level": 2,
"propertyNameAtParent": "spaces",
"icon": "bitcoin"
},
{
"type": "Mines",
"menuItems": [
{
"action": "Add UI Object",
"label": "Add Data Mine",
@@ -32,6 +98,38 @@
"relatedUiObject": "Learning Mine",
"actionFunction": "payload.executeAction"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete",
"iconPathOff": "delete"
}
],
"isTitleAllwaysVisible": false,
"addLeftIcons": true,
"isPinned": false,
"level": 2,
"propertyNameAtParent": "mines",
"icon": "bitcoin"
},
{
"type": "Other Hierarchies",
"menuItems": [
{
"action": "Add UI Object",
"label": "Add Trading System",
"relatedUiObject": "Trading System",
"actionFunction": "payload.executeAction"
},
{
"action": "Add UI Object",
"label": "Add Network",
"relatedUiObject": "Network",
"actionFunction": "payload.executeAction"
},
{
"action": "Add UI Object",
"label": "Add Super Scripts",
@@ -49,14 +147,23 @@
"label": "Add Tutorial",
"relatedUiObject": "Tutorial",
"actionFunction": "payload.executeAction"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete",
"iconPathOff": "delete"
}
],
"isProjectHead": true,
"isTitleAllwaysVisible": false,
"addLeftIcons": true,
"isPinned": true,
"positionLocked": true,
"icon": "superalgos"
"isPinned": false,
"level": 2,
"propertyNameAtParent": "otherHierarchies",
"icon": "bitcoin"
},
{
"type": "Workspace",
@@ -14323,7 +14430,16 @@
"label": "Add Space Settings",
"relatedUiObject": "Space Settings",
"actionFunction": "payload.executeAction"
}
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete",
"iconPathOff": "delete"
}
],
"isHierarchyHead": true,
"addLeftIcons": true,
@@ -14450,6 +14566,15 @@
"workDoneLabel": "Done",
"relatedUiObject": "Dashboard",
"actionFunction": "payload.executeAction"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"actionFunction": "payload.executeAction",
"label": "Delete",
"iconPathOn": "delete",
"iconPathOff": "delete"
}
],
"isHierarchyHead": true,
@@ -14985,7 +15110,7 @@
"childType": "Layer Panel"
}
],
"icon": "bitcoin"
"icon": "under-construction"
},
{
"type": "Layer Panel",
@@ -15027,7 +15152,7 @@
},
"propertyNameAtParent": "layerPanels",
"properties": [],
"icon": "bitcoin"
"icon": "under-construction"
},
{
"type": "Layer Polygons",
@@ -15067,7 +15192,7 @@
"childType": "Layer Polygon"
}
],
"icon": "bitcoin"
"icon": "under-construction"
},
{
"type": "Layer Polygon",
@@ -15109,7 +15234,7 @@
},
"propertyNameAtParent": "layerPolygons",
"properties": [],
"icon": "bitcoin"
"icon": "under-construction"
},
{
"type": "Bot Layers",
@@ -17104,7 +17229,6 @@
"autoAdd": false
}
],
"icon": "bitcoin",
"alternativeIcons": [
{
"codeName": "Superalgos",