Process Refactoring

This commit is contained in:
Luis Fernando Molina committed 2019-10-27 21:22:30 +01:00
1 parent b419d3cf92
commit 4b82e5d57c
11 files changed
+23 -23

No files matched your search

@@ -170,7 +170,7 @@ function newAttachDetach () {
completeDetachment(node, rootNodes)
return
}
case 'Process': {
case 'Process Instance': {
let payload = node.payload
for (let i = 0; i < payload.parentNode.processes.length; i++) {
let process = payload.parentNode.processes[i]
@@ -444,7 +444,7 @@ function newAttachDetach () {
completeAttachment(node, rootNodes)
}
break
case 'Process': {
case 'Process Instance': {
node.payload.parentNode = attachToNode
node.payload.chainParent = attachToNode
node.payload.parentNode.processes.push(node)
@@ -47,7 +47,7 @@ function newNodeChildren () {
case 'Trading Bot Instance': {
return countChildrenTradingBotInstance(parentNode, childNode)
}
case 'Process': {
case 'Process Instance': {
return countChildrenProcess(parentNode, childNode)
}
case 'Backtesting Session': {
@@ -113,7 +113,7 @@ function newNodeDeleter () {
deleteBotInstance(rootNode, rootNodes)
break
}
case 'Process': {
case 'Process Instance': {
deleteProcess(rootNode, rootNodes)
break
}
@@ -588,7 +588,7 @@ function newOnFocus () {
return
}
}
case 'Process': {
case 'Process Instance': {
let child
child = getNodeThatIsOnFocus(node.session)
if (child !== undefined) {
@@ -850,7 +850,7 @@ function newProtocolNode () {
}
return object
}
case 'Process': {
case 'Process Instance': {
let object = {
type: node.type,
subType: node.subType,
@@ -589,7 +589,7 @@ function newShortcutKeys () {
return
}
}
case 'Process': {
case 'Process Instance': {
let child
child = getNodeByShortcutKey(node.session, searchingKey)
if (child !== undefined) {
@@ -489,7 +489,7 @@ function newUiObjectsFromNodes () {
}
return
}
case 'Process': {
case 'Process Instance': {
if (parentNode !== undefined) {
switch (parentNode.type) {
case 'Sensor Bot Instance': {
@@ -506,7 +506,7 @@ function newUiObjectsFromNodes () {
}
}
}
createUiObject('Process', node.name, node, parentNode, chainParent, 'Process')
createUiObject('Process Instance', node.name, node, parentNode, chainParent, 'Process Instance')
if (node.session !== undefined) {
createUiObjectFromNode(node.session, node, node)
}
@@ -730,7 +730,7 @@ function newUiObjectsFromNodes () {
}
}
node.processes.push(process)
createUiObject('Process', process.name, process, node, node, 'Process')
createUiObject('Process Instance', process.name, process, node, node, 'Process Instance')
return process
}
+6 -6
View File
@@ -232,19 +232,19 @@ function newUiObject () {
compatibleSubType = '->' + 'Trading Engine Process' + '->'
break
case 'Backtesting Session':
compatibleType = '->' + 'Process' + '->'
compatibleType = '->' + 'Process Instance' + '->'
compatibleSubType = '->' + 'Trading Engine Process' + '->'
break
case 'Live Trading Session':
compatibleType = '->' + 'Process' + '->'
compatibleType = '->' + 'Process Instance' + '->'
compatibleSubType = '->' + 'Trading Engine Process' + '->'
break
case 'Paper Trading Session':
compatibleType = '->' + 'Process' + '->'
compatibleType = '->' + 'Process Instance' + '->'
compatibleSubType = '->' + 'Trading Engine Process' + '->'
break
case 'Fordward Testing Session':
compatibleType = '->' + 'Process' + '->'
compatibleType = '->' + 'Process Instance' + '->'
compatibleSubType = '->' + 'Trading Engine Process' + '->'
break
case 'Base Asset':
@@ -307,7 +307,7 @@ function newUiObject () {
compatibleType = '->' + 'Task' + '->'
compatibleSubType = undefined
break
case 'Process':
case 'Process Instance':
switch (thisObject.payload.node.subType) {
case 'Sensor Process': {
compatibleType = '->' + 'Sensor Bot Instance' + '->'
@@ -426,7 +426,7 @@ function newUiObject () {
if (thisObject.payload.node.type === 'Sensor Bot Instance' && nearbyNode.bot !== undefined) { continue }
if (thisObject.payload.node.type === 'Indicator Bot Instance' && nearbyNode.bot !== undefined) { continue }
if (thisObject.payload.node.type === 'Trading Bot Instance' && nearbyNode.bot !== undefined) { continue }
if (thisObject.payload.node.type === 'Process' && nearbyNode.process !== undefined) { continue }
if (thisObject.payload.node.type === 'Process Instance' && nearbyNode.process !== undefined) { continue }
if (thisObject.payload.node.type === 'Trading System' && nearbyNode.tradingSystem !== undefined) { continue }
if (thisObject.payload.node.type === 'Personal Data' && nearbyNode.personalData !== undefined) { continue }
if (thisObject.payload.node.type === 'Parameters' && nearbyNode.parameters !== undefined) { continue }
+5 -5
View File
@@ -853,7 +853,7 @@ function newUiObjectConstructor () {
actionFunction: payload.onMenuItemClick,
label: 'Add Process',
visible: true,
relatedUiObject: 'Process',
relatedUiObject: 'Process Instance',
rawRadius: 8,
targetRadius: 0,
currentRadius: 0,
@@ -920,7 +920,7 @@ function newUiObjectConstructor () {
actionFunction: payload.onMenuItemClick,
label: 'Add Process',
visible: true,
relatedUiObject: 'Process',
relatedUiObject: 'Process Instance',
rawRadius: 8,
targetRadius: 0,
currentRadius: 0,
@@ -987,7 +987,7 @@ function newUiObjectConstructor () {
actionFunction: payload.onMenuItemClick,
label: 'Add Process',
visible: true,
relatedUiObject: 'Process',
relatedUiObject: 'Process Instance',
rawRadius: 8,
targetRadius: 0,
currentRadius: 0,
@@ -1041,7 +1041,7 @@ function newUiObjectConstructor () {
)
break
}
case 'Process': {
case 'Process Instance': {
uiObject.codeEditor = newCodeEditor()
uiObject.codeEditor.isVisibleFunction = uiObject.isVisibleFunction
uiObject.codeEditor.initialize()
@@ -3246,7 +3246,7 @@ function newUiObjectConstructor () {
level_3()
break
}
case 'Process': {
case 'Process Instance': {
level_2()
break
}
+1 -1
View File
@@ -93,7 +93,7 @@ function newUiObjectTitle () {
case 'Trading Bot Instance': {
break
}
case 'Process': {
case 'Process Instance': {
break
}
case 'Backtesting Session': {
+1 -1
View File
@@ -52,7 +52,7 @@ function newDesignerSpace () {
['Sensor Bot Instance', 'bot-sensor'],
['Indicator Bot Instance', 'bot-indicator'],
['Trading Bot Instance', 'trading-engine'],
['Process', 'process'],
['Process Instance', 'process'],
['Backtesting Session', 'session-backtesting'],
['Live Trading Session', 'session-live-trading'],
['Fordward Testing Session', 'session-forward-testing'],