Project Dashboards Implemented
This commit is contained in:
1 parent
d109210b5a
commit
9e15f17be6
3 files changed
+80
-7
No files matched your search
@@ -492,6 +492,11 @@ function newSuperalgosActionSwitch() {
|
||||
UI.projects.superalgos.functionLibraries.chartingSpaceFunctions.addMissingDashboards(action.node, action.rootNodes)
|
||||
}
|
||||
break
|
||||
case 'Add Missing Project Dashboards':
|
||||
{
|
||||
UI.projects.superalgos.functionLibraries.chartingSpaceFunctions.addMissingProjectDashboards(action.node, action.rootNodes)
|
||||
}
|
||||
break
|
||||
case 'Play Tutorial':
|
||||
{
|
||||
UI.projects.superalgos.spaces.tutorialSpace.playTutorial(action.node)
|
||||
|
||||
@@ -4,6 +4,7 @@ function newSuperalgosFunctionLibraryChartingSpaceFunctions() {
|
||||
addAllLayerPolygons: addAllLayerPolygons,
|
||||
addAllMineLayers: addAllMineLayers,
|
||||
addMissingDashboards: addMissingDashboards,
|
||||
addMissingProjectDashboards: addMissingProjectDashboards,
|
||||
addMissingTimeMachines: addMissingTimeMachines,
|
||||
createTimeMachine: createTimeMachine
|
||||
}
|
||||
@@ -304,6 +305,26 @@ function newSuperalgosFunctionLibraryChartingSpaceFunctions() {
|
||||
}
|
||||
}
|
||||
|
||||
function addMissingProjectDashboards(node, rootNodes) {
|
||||
for (let k = 0; k < PROJECTS_SCHEMA.length; k++) {
|
||||
let projectDefinition = PROJECTS_SCHEMA[k]
|
||||
let project = projectDefinition.name
|
||||
|
||||
for (let j = 0; j < rootNodes.length; j++) {
|
||||
let rootNode = rootNodes[j]
|
||||
if (rootNode.type === project + ' Project') {
|
||||
let projectDefinition = rootNode.projectDefinition
|
||||
if (projectDefinition !== undefined) {
|
||||
if (UI.projects.superalgos.utilities.children.isMissingChildren(node, projectDefinition, true) === true) {
|
||||
let projectTasks = UI.projects.superalgos.functionLibraries.uiObjectsFromNodes.addUIObject(node, 'Project Dashboards')
|
||||
projectTasks.payload.referenceParent = projectDefinition
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function addAllLayerPanels(node) {
|
||||
if (validateReferences(node) !== true) { return }
|
||||
let layerNode = node.payload.parentNode
|
||||
|
||||
@@ -14591,17 +14591,17 @@
|
||||
},
|
||||
{
|
||||
"action": "Add UI Object",
|
||||
"label": "Add Dashboard",
|
||||
"relatedUiObject": "Dashboard",
|
||||
"label": "Add Project Dashboards",
|
||||
"relatedUiObject": "Project Dashboards",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Add Missing Dashboards",
|
||||
"label": "Add Missing Dashboards",
|
||||
"action": "Add Missing Project Dashboards",
|
||||
"label": "Add Missing Projects",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Proceed",
|
||||
"workDoneLabel": "Done",
|
||||
"relatedUiObject": "Dashboard",
|
||||
"relatedUiObject": "Project Dashboards",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
@@ -14636,12 +14636,59 @@
|
||||
"childType": "Space Settings",
|
||||
"autoAdd": true
|
||||
},
|
||||
{
|
||||
"name": "projectDashboards",
|
||||
"type": "array",
|
||||
"childType": "Project Dashboards"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Project Dashboards",
|
||||
"menuItems": [
|
||||
{
|
||||
"action": "Add UI Object",
|
||||
"label": "Add Dashboard",
|
||||
"relatedUiObject": "Dashboard",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Add Missing Dashboards",
|
||||
"label": "Add Missing Dashboards",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Proceed",
|
||||
"workDoneLabel": "Done",
|
||||
"relatedUiObject": "Dashboard",
|
||||
"actionFunction": "payload.executeAction"
|
||||
},
|
||||
{
|
||||
"action": "Delete UI Object",
|
||||
"askConfirmation": true,
|
||||
"confirmationLabel": "Confirm to Delete",
|
||||
"label": "Delete",
|
||||
"iconPathOn": "delete",
|
||||
"iconPathOff": "delete",
|
||||
"actionFunction": "payload.executeAction"
|
||||
}
|
||||
],
|
||||
"title": [
|
||||
"Use Reference Parent"
|
||||
],
|
||||
"alternativeIcons": "Use Reference Parent Parent",
|
||||
"addLeftIcons": true,
|
||||
"level": 2,
|
||||
"referenceAttachesTo": {
|
||||
"compatibleTypes": "->Project Definition->"
|
||||
},
|
||||
"propertyNameAtParent": "projectDashboards",
|
||||
"properties": [
|
||||
{
|
||||
"name": "dashboards",
|
||||
"type": "array",
|
||||
"childType": "Dashboard"
|
||||
}
|
||||
]
|
||||
],
|
||||
"icon": "bitcoin"
|
||||
},
|
||||
{
|
||||
"type": "Dashboard",
|
||||
@@ -14677,7 +14724,7 @@
|
||||
"compatibleTypes": "->Testing Trading Tasks->Production Trading Tasks->"
|
||||
},
|
||||
"chainAttachesTo": {
|
||||
"compatibleTypes": "->Charting Space->"
|
||||
"compatibleTypes": "->Project Dashboards->"
|
||||
},
|
||||
"propertyNameAtParent": "dashboards",
|
||||
"properties": [
|
||||
|
||||
Reference in new issue
Block a user