Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions AppSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8321,7 +8321,7 @@
"Use Reference Parent"
],
"addLeftIcons": true,
"level": 5,
"level": 4,
"chainAttachesTo": {
"compatibleTypes": "->Task->"
},
Expand Down Expand Up @@ -9617,7 +9617,7 @@
}
],
"addLeftIcons": true,
"level": 5,
"level": 4,
"chainAttachesTo": {
"compatibleTypes": "->Calculations Procedure->Data Building Procedure->"
},
Expand Down Expand Up @@ -9661,7 +9661,7 @@
}
],
"addLeftIcons": true,
"level": 5,
"level": 4,
"chainAttachesTo": {
"compatibleTypes": "->Product Definition->"
},
Expand Down Expand Up @@ -10584,7 +10584,7 @@
}
],
"addLeftIcons": true,
"level": 5,
"level": 4,
"chainAttachesTo": {
"compatibleTypes": "->Initial Targets->"
},
Expand Down Expand Up @@ -10620,7 +10620,7 @@
}
],
"addLeftIcons": true,
"level": 5,
"level": 4,
"chainAttachesTo": {
"compatibleTypes": "->Limit Buy Order->Limit Sell Order->"
},
Expand Down Expand Up @@ -10654,7 +10654,7 @@
}
],
"addLeftIcons": true,
"level": 5,
"level": 4,
"chainAttachesTo": {
"compatibleTypes": "->Open Stage->"
},
Expand Down Expand Up @@ -12898,9 +12898,9 @@
{
"action": "Add UI Object",
"disableIfPropertyIsDefined": true,
"propertyToCheckFor": "layersManager",
"label": "Add Layers Manager",
"relatedUiObject": "Layers Manager",
"propertyToCheckFor": "layerManager",
"label": "Add Layer Manager",
"relatedUiObject": "Layer Manager",
"actionFunction": "payload.onMenuItemClick"
},
{
Expand Down Expand Up @@ -12935,15 +12935,15 @@
"childType": "Time Frame Scale"
},
{
"name": "layersManager",
"name": "layerManager",
"type": "node",
"childType": "Layers Manager",
"childType": "Layer Manager",
"autoAdd": true
}
]
},
{
"type": "Layers Manager",
"type": "Layer Manager",
"menuItems": [
{
"action": "Configure",
Expand Down Expand Up @@ -12995,7 +12995,7 @@
"referenceAttachesTo": {
"compatibleTypes": "->Data Mine Products->"
},
"propertyNameAtParent": "layersManager",
"propertyNameAtParent": "layerManager",
"properties": [
{
"name": "layers",
Expand Down Expand Up @@ -13056,7 +13056,7 @@
"compatibleTypes": "->Data Product->"
},
"chainAttachesTo": {
"compatibleTypes": "->Layers Manager->Bot Layers->Layer Folder->"
"compatibleTypes": "->Layer Manager->Bot Layers->Layer Folder->"
},
"propertyNameAtParent": "layers",
"properties": [
Expand Down Expand Up @@ -13095,7 +13095,7 @@
"addLeftIcons": true,
"level": 3,
"chainAttachesTo": {
"compatibleTypes": "->Layers Manager->"
"compatibleTypes": "->Layer Manager->"
},
"propertyNameAtParent": "botLayers",
"properties": [
Expand Down
55 changes: 0 additions & 55 deletions BackendServers/WebServer/AppLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,60 +214,5 @@ function newAppLoader() {
'Plotters/Masters/Plotters-Bollinger-Bands/PercentageBandwidth.js'
]
}

function getPlotters(ecosystem) {
if (INFO_LOG === true) { console.log('[INFO] server -> onBrowserRequest -> onFileRead -> addPlotters -> Entering function.') }

let plotters = []
let dataMines = ecosystem.dataMines
let hosts = ecosystem.hosts

plotters = plotters.concat(addScript(dataMines))
plotters = plotters.concat(addScript(hosts))

return plotters
}

function addScript(pDataMinesOrHosts) {
if (INFO_LOG === true) { console.log('[INFO] server -> onBrowserRequest -> onFileRead -> addPlotters -> addScript -> Entering function.') }
const htmlLinePlotter = 'Plotters/@dataMine@/@repo@/@[email protected]'
const htmlLinePlotterPanel = 'PlotterPanels/@dataMine@/@repo@/@[email protected]'
let plotters = []

for (let i = 0; i < pDataMinesOrHosts.length; i++) {
let dataMine = pDataMinesOrHosts[i]
for (let j = 0; j < dataMine.plotters.length; j++) {
let plotter = dataMine.plotters[j]
if (plotter.modules !== undefined) {
for (let k = 0; k < plotter.modules.length; k++) {
let module = plotter.modules[k]
let htmlLineCopy = htmlLinePlotter

let stringToInsert
stringToInsert = htmlLineCopy.replace('@dataMine@', dataMine.codeName)
stringToInsert = stringToInsert.replace('@repo@', plotter.repo)
stringToInsert = stringToInsert.replace('@module@', module.moduleName)

plotters.push(stringToInsert)

if (module.panels !== undefined) {
for (let l = 0; l < module.panels.length; l++) {
let panel = module.panels[l]
let htmlLineCopy = htmlLinePlotterPanel

let stringToInsert
stringToInsert = htmlLineCopy.replace('@dataMine@', dataMine.codeName)
stringToInsert = stringToInsert.replace('@repo@', plotter.repo)
stringToInsert = stringToInsert.replace('@module@', panel.moduleName)

plotters.push(stringToInsert)
}
}
}
}
}
}
return plotters
}
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion BackendServers/WebServer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@
onresize="onResize()">
<div id="contributors" class="credits">
<p>Superalgos is <span class="red">open-source</span> and <span class="red">free</span> thanks to the generosity of contributors:</p>
<p>Luis Fernando Molina, Julian Molina, Andreja Cobeljic, Matías Benitez, Ira Miller, Eduardo Remis, Jeff Braun, rico4dev, Barry Low, Nikola Bjelogrlic, Hirajin Koizuko, and Francisco J. Santillán.</p>
<p>Luis Fernando Molina, Julian Molina, Andreja Cobeljic, Matías Benitez, Ira Miller, Eduardo Remis,
Jeff Braun, rico4dev, Barry Low, Nikola Bjelogrlic, Hirajin Koizuko, Francisco J. Santillán, Viktoria B.,
Javier A., Gustavo J., Romina, Pedro P., Thais M., Loui M., Natalia M., Bashar A., Carlos V., Diego M.,
Sebastian E., Bogdan P., Marko V., Igor S., Niksa K., Rodrigo M. and Nicanor M.</p>
<p><span class="red">Help us keep Superalgos free for all. Become a contributor!</span></p>
</div>
<div id="masterApp"></div>
Expand Down
2 changes: 1 addition & 1 deletion BackendServers/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ try {
WEB_SERVER.initialize()
WEB_SERVER.run()

console.log("You are running Superalgos Backend Beta 6.")
console.log("You are running Superalgos Beta 6 SP2.")

} catch (err) {
console.log('[ERROR] BackendServers -> Task Manager -> server -> Error = ' + err.stack)
Expand Down
2 changes: 0 additions & 2 deletions BackendServers/taskManagerServer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
exports.newTaskManagerServer = function newTaskManagerServer(WEB_SOCKETS_SERVER, EVENTS_SERVER) {

const MODULE = "Task Manager Server"

let thisObject = {
initialize: initialize,
finalize: finalize,
Expand Down
8 changes: 3 additions & 5 deletions BackendServers/webServer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
exports.newWebServer = function newWebServer(EVENTS_SERVER) {

const MODULE = "Web Server"

let thisObject = {
initialize: initialize,
finalize: finalize,
Expand All @@ -19,7 +17,7 @@ exports.newWebServer = function newWebServer(EVENTS_SERVER) {

let http = require('http')
let isHttpServerStarted = false
let cloneExecutorChildProcess

let webhook = new Map()

return thisObject
Expand Down Expand Up @@ -514,7 +512,7 @@ exports.newWebServer = function newWebServer(EVENTS_SERVER) {
let fs = require('fs')

try {
let filePath = process.env.DEFAULT_WORKSPACE_PATH + '/Default.json'
let filePath = process.env.DEFAULT_WORKSPACE_PATH + '/Getting-Started.json'
fs.readFile(filePath, onFileRead)
} catch (e) {
console.log('[ERROR] Error reading the Workspace.', e)
Expand Down Expand Up @@ -549,7 +547,7 @@ exports.newWebServer = function newWebServer(EVENTS_SERVER) {
} else {
let updatedFileList = []
for (let i = 0; i < fileList.length; i++) {
let name = 'Plugin -> ' + fileList[i]
let name = 'Plugin \u2192 ' + fileList[i]
updatedFileList.push(name)
}
allWorkspaces = allWorkspaces.concat(updatedFileList)
Expand Down
46 changes: 19 additions & 27 deletions CanvasApp/Canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ function newCanvas() {

let containerDragStarted = false
let floatingObjectDragStarted = false
let floatingObjectBeingDragged
let containerBeingDragged
let viewPortBeingDragged = false
let ignoreNextClick = false
Expand Down Expand Up @@ -81,12 +80,12 @@ function newCanvas() {
browserCanvas.removeEventListener('mousemove', onMouseMove, false)
browserCanvas.removeEventListener('click', onMouseClick, false)
browserCanvas.removeEventListener('mouseout', onMouseOut, false)

browserCanvas.removeEventListener('dragenter', onDragEnter, false)
browserCanvas.removeEventListener('dragleave', onDragLeave, false)
browserCanvas.removeEventListener('dragover', onDragOver, false)
browserCanvas.removeEventListener('drop', onDragDrop, false)

browserCanvas.removeEventListener('keydown', onKeyDown, false)
browserCanvas.removeEventListener('keyup', onKeyUp, false)
} else {
Expand Down Expand Up @@ -186,29 +185,30 @@ function newCanvas() {

function addCanvasEvents() {
try {
canvas.eventHandler.listenToEvent('Browser Resized', browserResized)

/* Keyboard events */
window.addEventListener('keydown', onKeyDown, true)
window.addEventListener('keyup', onKeyUp, true)

/* Mouse Events */
browserCanvas.addEventListener('mousedown', onMouseDown, false)
browserCanvas.addEventListener('mouseup', onMouseUp, false)
browserCanvas.addEventListener('mousemove', onMouseMove, false)
browserCanvas.addEventListener('click', onMouseClick, false)
browserCanvas.addEventListener('mouseout', onMouseOut, false)

if (browserCanvas.addEventListener) {
canvas.eventHandler.listenToEvent('Browser Resized', browserResized)

/* Mouse Events */
browserCanvas.addEventListener('mousedown', onMouseDown, false)
browserCanvas.addEventListener('mouseup', onMouseUp, false)
browserCanvas.addEventListener('mousemove', onMouseMove, false)
browserCanvas.addEventListener('click', onMouseClick, false)
browserCanvas.addEventListener('mouseout', onMouseOut, false)

browserCanvas.addEventListener('mousewheel', onMouseWheel, false) // IE9, Chrome, Safari, Opera
browserCanvas.addEventListener('DOMMouseScroll', onMouseWheel, false) // Firefox
} else browserCanvas.attachEvent('onmousewheel', onMouseWheel)// IE 6/7/8

/* Dragging Files Over the Canvas */
browserCanvas.addEventListener('dragenter', onDragEnter, false)
browserCanvas.addEventListener('dragleave', onDragLeave, false)
browserCanvas.addEventListener('dragover', onDragOver, false)
browserCanvas.addEventListener('drop', onDragDrop, false)
/* Dragging Files Over the Canvas */
browserCanvas.addEventListener('dragenter', onDragEnter, false)
browserCanvas.addEventListener('dragleave', onDragLeave, false)
browserCanvas.addEventListener('dragover', onDragOver, false)
browserCanvas.addEventListener('drop', onDragDrop, false)

} else browserCanvas.attachEvent('onmousewheel', onMouseWheel)// IE 6/7/8

// Disables the context menu when you right mouse click the canvas.
browserCanvas.oncontextmenu = function (e) {
Expand Down Expand Up @@ -529,12 +529,6 @@ function newCanvas() {

let nodeUsingThisKey = canvas.designSpace.workspace.getNodeByShortcutKey(event.key)

if (nodeOnFocus === undefined && nodeUsingThisKey !== undefined) {
/* Then we displace the whole workspace to center it at the node using this key */
nodeUsingThisKey = canvas.floatingSpace.positionAtNode(nodeUsingThisKey)
return
}

/* If there is a node in focus, we try to assign the key to it. */
if (nodeUsingThisKey !== undefined && nodeOnFocus !== undefined) {
if (nodeUsingThisKey.id === nodeOnFocus.id) {
Expand Down Expand Up @@ -769,9 +763,7 @@ function newCanvas() {
return
} else {
if (container.isClickeable === false) {
if (event.buttons === 2) {
viewPortBeingDragged = true
}
viewPortBeingDragged = true
}
return
}
Expand Down
18 changes: 11 additions & 7 deletions CanvasApp/ChartingSpace/CoordinateSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ function newCoordinateSystem() {
thisObject.eventHandler = undefined
}

function initialize(minValue, maxValue, pMaxWidth, pMaxHeight) {
function initialize(minValue, maxValue, maxWidth, maxHeight) {
/* Defines the min and max value of rate that we are going to transport to the available screen at the center position. */
thisObject.min.x = minValue.x
thisObject.max.x = maxValue.x

thisObject.min.y = minValue.y
thisObject.max.y = maxValue.y

thisObject.maxWidth = pMaxWidth
thisObject.maxHeight = pMaxHeight
thisObject.maxWidth = maxWidth
thisObject.maxHeight = maxHeight

recalculateScale()
}
Expand All @@ -122,14 +122,18 @@ function newCoordinateSystem() {
}

function reportYValue(value) {
/* We will try to create a margin on the y axis so that in auto mode the charts dont get into the scales */
const TOP_MARGIN_FACTOR = 1.01
const BOTTOM_MARGIN_FACTOR = 0.99

if (thisObject.autoMinYScale === true) {
if (value < newYMin) {
newYMin = value
if (value * BOTTOM_MARGIN_FACTOR < newYMin) {
newYMin = value * BOTTOM_MARGIN_FACTOR
}
}
if (thisObject.autoMaxYScale === true) {
if (value > newYMax) {
newYMax = value
if (value * TOP_MARGIN_FACTOR> newYMax) {
newYMax = value * TOP_MARGIN_FACTOR
}
}
}
Expand Down
5 changes: 1 addition & 4 deletions CanvasApp/ChartingSpace/PlottersManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,7 @@ function newPlottersManager() {
}
}
if (found === false) {
initializePlotter(layer, onProductPlotterInitialized)
function onProductPlotterInitialized(err) {
/* There is no policy yet of what to do if this fails. */
}
initializePlotter(layer)
}
}
if (layer.status === LAYER_STATUS.OFF) {
Expand Down
Loading