Lastest Review

This commit is contained in:
Luis Fernando Molina committed 2020-10-14 11:38:58 +02:00
1 parent f97a36f4cd
commit 1ba794084b
29 files changed
+15269 -232

No files matched your search

+1 -3
View File
@@ -34,13 +34,11 @@ CONSOLE_LOG=false
CONSOLE_ERROR_LOG=true
LOG_FILE_CONTENT=false
PROJECTS_PATH=./Projects
PATH_TO_CANVAS_APP=./CanvasApp
PATH_TO_FILES_COMPONENT=./Files-Component/src
PATH_TO_WEB_SERVER=./BackendServers/
APP_SCHEMA_PATH=./
DOC_SCHEMA_PATH=./
CONCEPT_SCHEMA_PATH=./
DEFAULT_WORKSPACE_PATH=./Plugins/Workspaces
MY_WORKSPACES_PATH=./My-Workspaces
PATH_TO_FONTS=./BackendServers/WebServer/Fonts
-1
View File
@@ -152,7 +152,6 @@ function newAppLoader() {
'VideoRecorder.js',
'ProductStorage.js',
'SplashScreen.js',
'Canvas.js',
'EventHandler.js',
'Frame.js',
+3 -3
View File
@@ -491,19 +491,19 @@ exports.newWebServer = function newWebServer(EVENTS_SERVER) {
case 'AppSchema.js':
{
sendSchema(process.env.APP_SCHEMA_PATH, 'AppSchema', 'getAppSchema')
sendSchema(process.env.PROJECTS_PATH + '/Superalgos/Schemas/', 'AppSchema', 'getAppSchema')
}
break
case 'DocSchema.js':
{
sendSchema(process.env.DOC_SCHEMA_PATH, 'DocSchema', 'getDocSchema')
sendSchema(process.env.PROJECTS_PATH + '/Superalgos/Schemas/', 'DocSchema', 'getDocSchema')
}
break
case 'ConceptSchema.js':
{
sendSchema(process.env.CONCEPT_SCHEMA_PATH, 'ConceptSchema', 'getConceptSchema')
sendSchema(process.env.PROJECTS_PATH + '/Superalgos/Schemas/', 'ConceptSchema', 'getConceptSchema')
}
break
+1 -1
View File
@@ -167,7 +167,7 @@ function newAnimation() {
}
function clearBrowserCanvas() {
if (canWeDraw === false) { return }
if (CAN_SPACES_DRAW === false) { return }
browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.WHITE + ', 1)'
browserCanvasContext.clearRect(0, 0, browserCanvas.width, browserCanvas.height)
}
-8
View File
@@ -1,9 +1,6 @@
let browserCanvasContext // The context of the canvas object.
let stepsInitializationCounter = 0 // This counter the initialization steps required to be able to turn off the splash screen.
let marketInitializationCounter = 0 // This counter the initialization of markets required to be able to turn off the splash screen.
function newCanvas() {
const MODULE_NAME = 'Canvas'
const ERROR_LOG = true
@@ -39,7 +36,6 @@ function newCanvas() {
panelsSpace: undefined,
cockpitSpace: undefined,
designSpace: undefined,
splashScreen: undefined,
animation: undefined,
mouse: undefined,
shorcutNumbers: new Map(),
@@ -92,7 +88,6 @@ function newCanvas() {
browserCanvas.detachEvent('onmousewheel', onMouseWheel) // IE 6/7/8
}
thisObject.splashScreen = undefined
lastContainerMouseOver = undefined
thisObject.mouse = undefined
@@ -138,8 +133,6 @@ function newCanvas() {
thisObject.tutorialSpace = newTutorialSpace()
thisObject.tutorialSpace.initialize()
thisObject.splashScreen = newSplashScreen()
let animation = newAnimation()
animation.initialize()
@@ -167,7 +160,6 @@ function newCanvas() {
animation.addCallBackFunction('Doc Space Draw', thisObject.docSpace.draw)
//animation.addCallBackFunction('Chat Space Draw', thisObject.chatSpace.draw)
animation.addCallBackFunction('Tutorial Space Draw', thisObject.tutorialSpace.draw)
animation.addCallBackFunction('Splash Screen Draw', thisObject.splashScreen.draw)
animation.start()
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] initialize -> err = ' + err.stack) }
+1 -1
View File
@@ -126,7 +126,7 @@ function newWorkspace() {
runTasksAndSessions()
thisObject.enabled = true
canvas.cockpitSpace.initializePosition()
canvas.splashScreen.initialize()
CAN_SPACES_DRAW = true
savingWorkspaceIntervalId = setInterval(saveWorkspace, 60000)
isInitialized = true
}
+26 -26
View File
@@ -174,34 +174,34 @@ function newUiObjectConstructor() {
uiObject.isVisibleFunction = canvas.floatingSpace.isThisPointVisible
let menuItemsInitialValues = getMenuItemsInitialValues(uiObject, floatingObject, payload)
for (let i = 0; i < APP_SCHEMA_ARRAY.length; i++) {
let schemaNode = APP_SCHEMA_ARRAY[i]
if (schemaNode.type === payload.node.type) {
let menuItems = schemaNode.menuItems
for (let j = 0; j < menuItems.length; j++) {
let item = menuItems[j]
item.angle = undefined
if (item.action.indexOf('Add Missing Children') >= 0) {
item.action = 'Add Missing Children'
}
if (item.action.indexOf('Delete ') >= 0) {
// item.action = 'Delete UI Object'
}
if (item.action.indexOf('Configure ') >= 0) {
if (schemaNode.editors.config === true) {
// item.actionFunction = 'uiObject.configEditor.activate'
}
}
if (item.action.indexOf('Edit ') >= 0) {
if (schemaNode.editors.code === true) {
// item.actionFunction = 'uiObject.codeEditor.activate'
}
}
if (item.actionFunction === undefined) {
// item.actionFunction = 'payload.onMenuItemClick'
}
let schemaNode = getNodeDefinition(payload.node)
if (schemaNode === undefined) {
console.log(payload.node.type + ' node found at App Schema. This node will not be created. ')
return
}
let menuItems = schemaNode.menuItems
for (let j = 0; j < menuItems.length; j++) {
let item = menuItems[j]
item.angle = undefined
if (item.action.indexOf('Add Missing Children') >= 0) {
item.action = 'Add Missing Children'
}
if (item.action.indexOf('Delete ') >= 0) {
// item.action = 'Delete UI Object'
}
if (item.action.indexOf('Configure ') >= 0) {
if (schemaNode.editors.config === true) {
// item.actionFunction = 'uiObject.configEditor.activate'
}
}
if (item.action.indexOf('Edit ') >= 0) {
if (schemaNode.editors.code === true) {
// item.actionFunction = 'uiObject.codeEditor.activate'
}
}
if (item.actionFunction === undefined) {
// item.actionFunction = 'payload.onMenuItemClick'
}
}
uiObject.initialize(payload, menuItemsInitialValues)
+1 -1
View File
@@ -231,7 +231,7 @@ let ARE_WE_RECORDING_A_MARKET_PANORAMA = false
let PANORAMA_WAS_PANNED = false
let CURRENT_PANORAMA_POSITION = 0
let canWeDraw = false // This global variable regulates when spaces can or can not draw their contents.
let CAN_SPACES_DRAW = false // This global variable regulates when spaces can or can not draw their contents.
function toRadians(angle) {
return angle * (Math.PI / 180);
+3 -5
View File
@@ -18,8 +18,6 @@ function newDashboard() {
start: start
}
const DEBUG_START_UP_DELAY = 0 // 3000; // This is a waiting time in case there is a need to debug the very first steps of initialization, to be able to hit F12 on time.
return thisObject
function start() {
@@ -54,14 +52,14 @@ function newDashboard() {
if (canvas !== undefined) { canvas.finalize() }
setTimeout(delayedStart, DEBUG_START_UP_DELAY)
startSuperalgos()
}
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] start -> err = ' + err.stack) }
}
}
function delayedStart() {
function startSuperalgos() {
try {
/* For now, we are supporting only one market. */
@@ -78,7 +76,7 @@ function newDashboard() {
canvas = newCanvas()
canvas.initialize()
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] delayedStart -> err = ' + err.stack) }
if (ERROR_LOG === true) { logger.write('[ERROR] startSuperalgos -> err = ' + err.stack) }
}
}
+1 -1
View File
@@ -414,7 +414,7 @@ function newChartingSpace() {
}
function draw() {
if (canWeDraw === false) { return }
if (CAN_SPACES_DRAW === false) { return }
if (thisObject.visible === false) { return }
drawBackground()
+1 -1
View File
@@ -118,7 +118,7 @@ function newChatSpace() {
}
function draw() {
if (canWeDraw === false) { return }
if (CAN_SPACES_DRAW === false) { return }
if (isInitialized === false) { return }
borders()
thisObject.sidePanelTab.draw()
+1 -1
View File
@@ -203,7 +203,7 @@ function newCockpitSpace() {
}
function draw() {
if (canWeDraw === false) { return }
if (CAN_SPACES_DRAW === false) { return }
thisObject.container.frame.draw(false, false)
drawBackground()
+1 -1
View File
@@ -109,7 +109,7 @@ function newDesignSpace() {
function draw() {
if (thisObject.workspace === undefined) { return }
if (canWeDraw === false) { return }
if (CAN_SPACES_DRAW === false) { return }
thisObject.workspace.draw()
}
}
+1 -1
View File
@@ -116,7 +116,7 @@ function newDocSpace() {
}
function draw() {
if (canWeDraw === false) { return }
if (CAN_SPACES_DRAW === false) { return }
if (isInitialized === false) { return }
borders()
thisObject.sidePanelTab.draw()
+1 -1
View File
@@ -554,7 +554,7 @@ function newFloatingSpace() {
}
function draw() {
if (canWeDraw === false) { return }
if (CAN_SPACES_DRAW === false) { return }
if (visible === false) { return }
drawBackground()
thisObject.floatingLayer.draw()
+1 -1
View File
@@ -336,7 +336,7 @@ function newPanelsSpace() {
}
function draw() {
if (canWeDraw === false) { return }
if (CAN_SPACES_DRAW === false) { return }
if (thisObject.visible !== true) { return }
thisObject.container.frame.draw(false, false)
+1 -1
View File
@@ -91,7 +91,7 @@ function newSideSpace() {
}
function draw() {
if (canWeDraw === false) { return }
if (CAN_SPACES_DRAW === false) { return }
if (isInitialized === false) { return }
borders()
thisObject.sidePanelTab.draw()
+1 -1
View File
@@ -54,7 +54,7 @@ function newTopSpace() {
}
function draw() {
if (canWeDraw === false) { return }
if (CAN_SPACES_DRAW === false) { return }
thisObject.container.frame.draw(false, false)
drawBackground()
-160
View File
@@ -1,160 +0,0 @@
/*
The Splash Screen is to show some 'loading...' controls while the app is being loaded on the background. After the loading is complete the Splash Screens dissapears for good.
*/
function newSplashScreen() {
let thisObject = {
container: undefined,
draw: draw,
timeMachines: [],
getContainer: getContainer, // returns the inner most container that holds the point received by parameter.
initialize: initialize
}
let container = newContainer()
container.initialize()
thisObject.container = container
resize()
container.frame.containerName = 'Splash Screen'
container.frame.position.x = 0
container.frame.position.y = 0
container.isDraggeable = false
let fadeOutCounter = 0
let opacity = 1
let logo
let canDrawLogo = false
let isInitialized = false
let splashScreenNeeded = true
return thisObject
function initialize() {
logo = new Image()
logo.onload = onImageLoad
function onImageLoad() {
canDrawLogo = true
}
logo.src = 'Images/superalgos-logo.png'
canvas.eventHandler.listenToEvent('Browser Resized', resize)
isInitialized = true
}
function resize() {
thisObject.container.frame.width = browserCanvas.width
thisObject.container.frame.height = browserCanvas.height
}
function draw() {
if (isInitialized === false) { return }
if (splashScreenNeeded === false) {
stepsInitializationCounter = 100
canDrawLogo = false
fadeOutCounter++
if (fadeOutCounter > 2) {
return
}
opacity = opacity - 1
}
thisObject.container.frame.draw(false, false)
/* Set the background. */
browserCanvasContext.beginPath()
browserCanvasContext.rect(0, 0, thisObject.container.frame.width, thisObject.container.frame.height)
browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.WHITE + ', ' + opacity + ')'
browserCanvasContext.closePath()
browserCanvasContext.fill()
if (canDrawLogo === false) { return }
/* First the AA Logo. */
let imageHeight = 192 / 2
let imageWidth = 720 / 2
let yDisplacement = -60
let xDisplacement = -60
let imagePoint = {
x: thisObject.container.frame.width * 1 / 2 - imageWidth / 2 + xDisplacement,
y: thisObject.container.frame.height * 1 / 2 - imageHeight / 2 + yDisplacement
}
imagePoint = thisObject.container.frame.frameThisPoint(imagePoint)
browserCanvasContext.drawImage(logo, imagePoint.x, imagePoint.y, imageWidth, imageHeight)
/* Second the % of Advance. */
let label = '' + Math.trunc(stepsInitializationCounter) + ' %'
stepsInitializationCounter = stepsInitializationCounter + 5.0
if (stepsInitializationCounter > 99) {
splashScreenNeeded = false
canWeDraw = true
stepsInitializationCounter = 99
}
let fontSize = 15
let labelPoint = {
x: thisObject.container.frame.width / 2 - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 22,
y: thisObject.container.frame.height / 2 + fontSize / 2 + fontSize * 0.1 + 90 + yDisplacement
}
browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY
browserCanvasContext.fillStyle = 'rgba(0, 0, 0, ' + opacity + ')'
browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y)
let title
let titlePoint
/* Algo Bots Competitions Sub Title */
fontSize = 35
title = 'Beta 6'
titlePoint = {
x: thisObject.container.frame.width / 2 - title.length / 2 * fontSize * FONT_ASPECT_RATIO - 20,
y: thisObject.container.frame.height / 2 + 70 + yDisplacement
}
browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY
browserCanvasContext.font = 'Saira Condensed'
browserCanvasContext.fillStyle = 'rgba(0, 0, 0, ' + opacity + ')'
browserCanvasContext.fillText(title, titlePoint.x, titlePoint.y)
}
function getContainer(point) {
var container
/* First we check if this point is inside this space. */
if (thisObject.container.frame.isThisPointHere(point) === true) {
/* Now we see which is the inner most container that has it */
// add validation of inner most containers here.
/* The point does not belong to any inner container, so we return the current container. */
return thisObject.container
} else {
/* This point does not belong to this space. */
return undefined
}
}
}
+4 -4
View File
@@ -10,9 +10,9 @@ function nodeBranchToArray(node, nodeType) {
return resultArray
function scanNodeBranch(startingNode) {
if (startingNode === undefined) {return}
let nodeDefinition = APP_SCHEMA_MAP.get(startingNode.type)
if (startingNode === undefined) { return }
let nodeDefinition = getNodeDefinition(startingNode)
if (nodeDefinition === undefined) { return }
if (startingNode.type === nodeType) {
@@ -24,7 +24,7 @@ function nodeBranchToArray(node, nodeType) {
let lastNodePropertyName
for (let i = 0; i < nodeDefinition.properties.length; i++) {
let property = nodeDefinition.properties[i]
if (lastNodePropertyName === property.name) {continue} // Some nodes have a single property por multiple child node types. We need to check repeated properties only once so as no to duplicate results.
if (lastNodePropertyName === property.name) { continue } // Some nodes have a single property por multiple child node types. We need to check repeated properties only once so as no to duplicate results.
switch (property.type) {
case 'node': {
scanNodeBranch(startingNode[property.name])
+1 -1
View File
@@ -14,7 +14,7 @@ function getHiriarchyMap(rootNode) {
hiriatchyMap.set(node.id, node)
/* Now we go down through all this node children */
let nodeDefinition = APP_SCHEMA_MAP.get(node.type)
let nodeDefinition = getNodeDefinition(node)
if (nodeDefinition === undefined) { return }
if (nodeDefinition.properties !== undefined) {
+1 -1
View File
@@ -17,7 +17,7 @@ function findNodeInNodeMesh(node, nodeType, nodeName, connectedViaPayload, findI
if (nodeFound !== undefined) { return }
if (depth >= MAX_DEPTH) {return}
let nodeDefinition = APP_SCHEMA_MAP.get(startingNode.type)
let nodeDefinition = getNodeDefinition(startingNode)
if (nodeDefinition === undefined) { return }
if (nodeType !== undefined) {
+4 -4
View File
@@ -6,7 +6,7 @@ function isMissingChildren(startingNode, checkNode, checkReferenceParent) {
if (startingNode === undefined) { return }
if (checkNode === undefined) { return }
let nodeDefinition = APP_SCHEMA_MAP.get(startingNode.type)
let nodeDefinition = getNodeDefinition(startingNode)
if (nodeDefinition === undefined) { return }
/* We scan through this node children */
@@ -69,7 +69,7 @@ function findChildReferencingThisNode(startingNode, checkNode) {
if (startingNode === undefined) { return }
if (checkNode === undefined) { return }
let nodeDefinition = APP_SCHEMA_MAP.get(startingNode.type)
let nodeDefinition = getNodeDefinition(startingNode)
if (nodeDefinition === undefined) { return }
/* We scan through this node children */
@@ -156,7 +156,7 @@ function findChildIndexAtParentNode(startingNode) {
let parentNode = startingNode.payload.parentNode
let nodeDefinition = APP_SCHEMA_MAP.get(parentNode.type)
let nodeDefinition = getNodeDefinition(parentNode)
if (nodeDefinition === undefined) { return }
/* We scan through this parent node children */
@@ -194,7 +194,7 @@ function isMissingChildrenByName(startingNode, nodeName) {
*/
if (startingNode === undefined) { return }
let nodeDefinition = APP_SCHEMA_MAP.get(startingNode.type)
let nodeDefinition = getNodeDefinition(startingNode)
if (nodeDefinition === undefined) { return }
/* We scan through this node children */
+1 -1
View File
@@ -1 +1 @@
{"type":"Workspace","name":"Getting-Started","rootNodes":[{"type":"Network","name":"My Network","networkNodes":[{"type":"Network Node","name":"My Computer","config":"{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}","dataMining":{"type":"Data Mining","name":"New Data Mining","exchangeDataTasks":[{"type":"Exchange Data Tasks","name":"Binance","marketDataTasks":[{"type":"Market Data Tasks","name":"Binance BTC/USDT","dataMineTasks":[{"type":"Data Mine Tasks","name":"Masters","taskManagers":[{"type":"Task Manager","name":"Masters","tasks":[{"type":"Task","name":"Exchange Raw Data","bot":{"type":"Sensor Bot Instance","name":"Exchange Raw Data","config":"{ \n\"startDate\": \"2020-01-01\"\n}","processes":[{"type":"Sensor Process Instance","name":"Exchange Raw Data Historic-OHLCVs","id":"d244c564-4e86-43c7-9796-dc3b6294ec8b","savedPayload":{"position":{"x":23993.925629940142,"y":29195.742554406977},"targetPosition":{"x":24261.227587196652,"y":29331.93970432884},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Historic-OHLCVs","id":"5eb11d6a-022e-4f60-97c4-d6cf90b249dc"}}}],"id":"343313ae-5705-484d-8bf8-aed25ba61cfa","savedPayload":{"position":{"x":24261.227587196652,"y":29331.93970432884},"targetPosition":{"x":24528.529544453162,"y":29468.136854250704},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"a8f38508-1cac-4ab1-815f-d338fc813377","savedPayload":{"position":{"x":24528.529544453162,"y":29468.136854250704},"targetPosition":{"x":24795.831501709672,"y":29604.334004172568},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Candles Volumes","bot":{"type":"Indicator Bot Instance","name":"Candles Volumes","config":"{}","processes":[{"type":"Indicator Process Instance","name":"Candles Volumes Multi-Period-Market","id":"f0ef12ed-f0fd-4b88-8e15-27cf24265a5f","savedPayload":{"position":{"x":24387.47785744149,"y":28832.96091248782},"targetPosition":{"x":24610.421305084707,"y":29033.700094395477},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"9f683143-a33f-42c1-9fa8-c601f01ee4e1"}}},{"type":"Indicator Process Instance","name":"Candles Volumes Multi-Period-Daily","id":"7c8b312c-09bf-4c59-853f-1592391a9c57","savedPayload":{"position":{"x":24672.794812330034,"y":28740.255814175336},"targetPosition":{"x":24610.421305084707,"y":29033.700094395477},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"980ceb1d-7be6-454f-90d9-01ba1fd4a65d"}}}],"id":"8d58e84b-d7ef-464f-8079-0ec0887e3da3","savedPayload":{"position":{"x":24610.421305084707,"y":29033.700094395477},"targetPosition":{"x":24703.12640339719,"y":29319.017049284023},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"bf29e3bd-9386-408b-9091-042da0c53e81","savedPayload":{"position":{"x":24703.12640339719,"y":29319.017049284023},"targetPosition":{"x":24795.831501709672,"y":29604.334004172568},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Resistances and Supports","bot":{"type":"Indicator Bot Instance","name":"Resistances and Supports","config":"{}","processes":[{"type":"Indicator Process Instance","name":"Resistances and Supports Multi-Period-Market","id":"a707814e-b81b-4102-9b5b-4e2fe969324f","savedPayload":{"position":{"x":25052.525014680516,"y":28770.141229233177},"targetPosition":{"x":25068.2258015534,"y":29069.730089659548},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"5d9b2729-43fb-4e7e-aa4f-b8477c424e51"}}},{"type":"Indicator Process Instance","name":"Resistances and Supports Multi-Period-Daily","id":"c5395fbe-4b5a-4492-a7fb-e2d259905e27","savedPayload":{"position":{"x":25319.826971937026,"y":28906.33837915504},"targetPosition":{"x":25068.2258015534,"y":29069.730089659548},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distLine truncated
{"type":"Workspace","name":"Getting-Started","rootNodes":[{"type":"Network","name":"My Network","networkNodes":[{"type":"Network Node","name":"My Computer","config":"{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}","dataMining":{"type":"Data Mining","name":"New Data Mining","exchangeDataTasks":[{"type":"Exchange Data Tasks","name":"Binance","marketDataTasks":[{"type":"Market Data Tasks","name":"Binance BTC/USDT","dataMineTasks":[{"type":"Data Mine Tasks","name":"Masters","taskManagers":[{"type":"Task Manager","name":"Masters","tasks":[{"type":"Task","name":"Exchange Raw Data","bot":{"type":"Sensor Bot Instance","name":"Exchange Raw Data","config":"{ \n\"startDate\": \"2020-01-01\"\n}","processes":[{"type":"Sensor Process Instance","name":"Exchange Raw Data Historic-OHLCVs","id":"d244c564-4e86-43c7-9796-dc3b6294ec8b","savedPayload":{"position":{"x":23993.925629940142,"y":29195.742554406977},"targetPosition":{"x":24261.227587196652,"y":29331.93970432884},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Historic-OHLCVs","id":"5eb11d6a-022e-4f60-97c4-d6cf90b249dc"}}}],"id":"343313ae-5705-484d-8bf8-aed25ba61cfa","savedPayload":{"position":{"x":24261.227587196652,"y":29331.93970432884},"targetPosition":{"x":24528.529544453162,"y":29468.136854250704},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"a8f38508-1cac-4ab1-815f-d338fc813377","savedPayload":{"position":{"x":24528.529544453162,"y":29468.136854250704},"targetPosition":{"x":24795.831501709672,"y":29604.334004172568},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Candles Volumes","bot":{"type":"Indicator Bot Instance","name":"Candles Volumes","config":"{}","processes":[{"type":"Indicator Process Instance","name":"Candles Volumes Multi-Period-Market","id":"f0ef12ed-f0fd-4b88-8e15-27cf24265a5f","savedPayload":{"position":{"x":24387.47785744149,"y":28832.96091248782},"targetPosition":{"x":24610.421305084707,"y":29033.700094395477},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"9f683143-a33f-42c1-9fa8-c601f01ee4e1"}}},{"type":"Indicator Process Instance","name":"Candles Volumes Multi-Period-Daily","id":"7c8b312c-09bf-4c59-853f-1592391a9c57","savedPayload":{"position":{"x":24672.794812330034,"y":28740.255814175336},"targetPosition":{"x":24610.421305084707,"y":29033.700094395477},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"980ceb1d-7be6-454f-90d9-01ba1fd4a65d"}}}],"id":"8d58e84b-d7ef-464f-8079-0ec0887e3da3","savedPayload":{"position":{"x":24610.421305084707,"y":29033.700094395477},"targetPosition":{"x":24703.12640339719,"y":29319.017049284023},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"bf29e3bd-9386-408b-9091-042da0c53e81","savedPayload":{"position":{"x":24703.12640339719,"y":29319.017049284023},"targetPosition":{"x":24795.831501709672,"y":29604.334004172568},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Resistances and Supports","bot":{"type":"Indicator Bot Instance","name":"Resistances and Supports","config":"{}","processes":[{"type":"Indicator Process Instance","name":"Resistances and Supports Multi-Period-Market","id":"a707814e-b81b-4102-9b5b-4e2fe969324f","savedPayload":{"position":{"x":25052.525014680516,"y":28770.141229233177},"targetPosition":{"x":25068.2258015534,"y":29069.730089659548},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"5d9b2729-43fb-4e7e-aa4f-b8477c424e51"}}},{"type":"Indicator Process Instance","name":"Resistances and Supports Multi-Period-Daily","id":"c5395fbe-4b5a-4492-a7fb-e2d259905e27","savedPayload":{"position":{"x":25319.826971937026,"y":28906.33837915504},"targetPosition":{"x":25068.2258015534,"y":29069.730089659548},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distLine truncated
+120
View File
@@ -0,0 +1,120 @@
[
{
"type": "Ethereum",
"menuItems": [
{
"action": "Pin / Unpin",
"currentStatus": true,
"iconPathOn": "unpinned",
"iconPathOff": "pinned",
"actionFunction": "payload.onMenuItemClick",
"ring": 1
},
{
"action": "Add UI Object",
"label": "Add Network",
"relatedUiObject": "Network",
"actionFunction": "payload.onMenuItemClick"
}
],
"isTitleAllwaysVisible": true,
"addLeftIcons": false,
"isPinned": true,
"positionLocked": true
},
{
"type": "Network",
"menuItems": [
{
"action": "Add UI Object",
"label": "Add Network Node",
"relatedUiObject": "Network Node",
"actionFunction": "payload.onMenuItemClick"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete",
"iconPathOff": "delete",
"actionFunction": "payload.onMenuItemClick"
}
],
"isHierarchyHead": true,
"addLeftIcons": true,
"level": 0,
"properties": [
{
"name": "networkNodes",
"type": "array",
"childType": "Network Node"
}
]
},
{
"type": "Network Node",
"menuItems": [
{
"action": "Configure",
"label": "Configure",
"iconPathOn": "configuration",
"iconPathOff": "configuration",
"dontShowAtFullscreen": true,
"actionFunction": "uiObject.configEditor.activate"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete",
"iconPathOff": "delete",
"actionFunction": "payload.onMenuItemClick"
}
],
"editors": {
"config": true
},
"initialValues": {
"config": "{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"8081\"\n}"
},
"isTitleAllwaysVisible": true,
"addLeftIcons": true,
"level": 1,
"chainAttachesTo": {
"compatibleTypes": "->Network->"
},
"propertyNameAtParent": "networkNodes"
},
{
"type": "Ethereum Project",
"menuItems": [
{
"action": "Add UI Object",
"label": "Add Smart Contract",
"relatedUiObject": "Smart Contract",
"actionFunction": "payload.onMenuItemClick"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete",
"iconPathOff": "delete",
"actionFunction": "payload.onMenuItemClick"
}
],
"isHierarchyHead": true,
"addLeftIcons": true,
"level": 0,
"properties": [
{
"name": "networkNodes",
"type": "array",
"childType": "Network Node"
}
]
},
]
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,8 @@
[
{
"type": "Concept 1",
"definition": "This is concept 1 definition"
}
]
@@ -0,0 +1 @@
[{"type":"Plotter Module","definition":"A plotter module is a device within a plotter that contains the definitions to create the visualization for a product definition.","content":["\r","\r","A single plotter may have several modules. Different modules may be used to plot each product of the bot, or as best suits the expected use-pattern.\r","\r","[![Plotter-Module-01](https://user-images.githubusercontent.com/13994516/71016077-eab41180-20f4-11ea-87e7-7262ff10a1ab.gif)](https://user-images.githubusercontent.com/13994516/71016077-eab41180-20f4-11ea-87e7-7262ff10a1ab.gif)\r","\r","{% include important.html content=\"For a bot to use a plotter, the corresponding product definition must establish a reference with the plotter module built to interpret the dataset.\" %}\r","\r","[![Plotter-Module-02-Product-Link](https://user-images.githubusercontent.com/13994516/71016079-eab41180-20f4-11ea-8afb-96321f9c68d8.gif)](https://user-images.githubusercontent.com/13994516/71016079-eab41180-20f4-11ea-8afb-96321f9c68d8.gif)\r","\r"],"folderName":"data_mine","adding":["\r","\r","To add a plotter module, select *Add Plotter Module* on the plotter node menu.\r","\r"],"configuring":["\r","\r","Select *Configure Plotter Module* on the menu to access the configuration.\r","\r","```json\r","{\r"," \"codeName\": \"Module Name\",\r"," \"isLegacy\": true,\r"," \"icon\": \"histogram\"\r","}\r","```\r","\r","* ```codeName``` is the name used in the code to refer to the module.\r","\r","* ```isLegacy``` is ```true``` for plotters modules developed entirely in JavaScript, and is ```false``` or doesn't show in the configuration for plotters built with the tools featured in the data mine hierarchy.\r","\r","* ```icon``` is the name of the image that illustrates the corresponding layer in the Layers Panel. In case the banner is not specified, the *default banner* is used. Current possible values are:\r","\r","\r","| Value | Image|\r","| :---: | :---: |\r","| ```default``` | ![Default-Banner](https://user-images.githubusercontent.com/13994516/70896073-5bbdd100-1ff0-11ea-84e3-5bd90475976f.png) |\r","| ```histogram``` | ![Histogram-Banner](https://user-images.githubusercontent.com/13994516/70896074-5bbdd100-1ff0-11ea-8dad-ccc6cfe64beb.png) |\r","| ```band``` | ![Bands-Banner](https://user-images.githubusercontent.com/13994516/70896072-5bbdd100-1ff0-11ea-8626-61c36bd22a3c.png) |\r","| ```moving-average``` | ![Moving-Average-Banner](https://user-images.githubusercontent.com/13994516/70896075-5bbdd100-1ff0-11ea-9909-dae33e57f65f.png) |\r","| ```oscillator``` | ![Oscillator-Banner](https://user-images.githubusercontent.com/13994516/70896076-5c566780-1ff0-11ea-8a5b-20077257c560.png) |\r","| ```trend``` | ![trends-banner](https://user-images.githubusercontent.com/13994516/70989177-744aeb80-20c3-11ea-88f5-d10473fa79b9.png) |\r","\r","Custom images may be added too. To do that:\r","\r","1. name the image in the following format: ```image-name.png```;\r","\r","1. place images in the ```WebServer\\Images\\Icons``` folder;\r","\r","1. in the configuration of the module, use the name as is (e.g.: ```\"icon\": \"image-name\"```)\r","\r"],"starting":["\r","\r","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r","\r"]},{"type":"Nodes Values"},{"type":"Nodes Highlights"},{"type":"Nodes Errors"},{"type":"Nodes Warnings"},{"type":"Nodes Infos"},{"type":"Nodes Status"},{"type":"Nodes Progress"},{"type":"Nodes Running"},{"type":"Nodes Announcements"},{"type":"Record Values"},{"type":"Shapes","definition":"The shapes node contains definitions of polygons and styles to be rendered on a per-period basis over the charts.","content":["\r","\r","A plotter recursively renders graphics for each period or candle. This means that a definition of what shapes need to be drawn for a single period is required. The plotter does the same thing for every period or candle that is visible on the screen at any point in time, for any time frame, as long as the corresponding data is available.\r","\r","[![Shapes-01-show-off](https://user-images.githubusercontent.com/13994516/71016080-eab41180-20f4-11ea-84c6-a514b87d568f.gif)](https://user-images.githubusercontent.com/13994516/71016080-eab41180-20f4-11ea-84c6-a514b87d568f.gif)\r","\r","In general terms, the process of defining what is going to be rendered on the screen consist of the following four steps:\r","\r"," 1. Identifying points defined by ```[x,y]``` coordinates\r"," 2. Defining polygons\r"," 3. Defining default styles\r"," 4. Defining conditional styles\r","\r"],"folderName":"data_mine","adding":["\r","\r","To add a shapes node, select *Add Shapes* on the plotter module menu.\r","\r"],"configuring":["\r","\r","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r","\r"],"starting":["\r","\r","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r","\r"]},{"type":"Plotter Panel","definition":"A plotter panel usually shows numerical representations of data over the charts on a small window or panel. Line truncated
+3 -3
View File
@@ -106,10 +106,10 @@
/* Checking if we should process this loop or not.*/
if (bot.STOP_SESSION === true) {
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] run -> loop -> Waiting for " + bot.processNode.session.type + " " + bot.processNode.session.name + " to be ran."); }
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] run -> loop -> Waiting for " + bot.processNode.session.type + " " + bot.processNode.session.name + " to be run."); }
console.log(new Date().toISOString() + " " + pad(bot.codeName, 20) + " " + pad(bot.process, 30)
+ " Waiting for " + bot.processNode.session.type + " " + bot.processNode.session.name + " to be ran. ");
+ " Waiting for " + bot.processNode.session.type + " " + bot.processNode.session.name + " to be run. ");
nextWaitTime = 'Waiting for Session';
loopControl(nextWaitTime);
@@ -551,7 +551,7 @@
waitingTime = waitTime / 1000
label = 'seconds'
}
processHeartBeat(undefined, undefined, "Waiting " + waitingTime + " " + label + " for " + bot.processNode.session.type + " " + bot.processNode.session.name + " to be ran. ")
processHeartBeat(undefined, undefined, "Waiting " + waitingTime + " " + label + " for " + bot.processNode.session.type + " " + bot.processNode.session.name + " to be run. ")
logger.persist();
}
break