Deep Scan 2

This commit is contained in:
Luis Fernando Molina committed 2020-10-09 09:54:18 +02:00
1 parent 4df4ce2016
commit 8e0babd8a0
20 files changed
+45 -126

No files matched your search

-55
View File
@@ -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@/@module@.js'
const htmlLinePlotterPanel = 'PlotterPanels/@dataMine@/@repo@/@module@.js'
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
}
}
-2
View File
@@ -1,7 +1,5 @@
exports.newTaskManagerServer = function newTaskManagerServer(WEB_SOCKETS_SERVER, EVENTS_SERVER) {
const MODULE = "Task Manager Server"
let thisObject = {
initialize: initialize,
finalize: finalize,
+1 -3
View File
@@ -1,7 +1,5 @@
exports.newWebServer = function newWebServer(EVENTS_SERVER) {
const MODULE = "Web Server"
let thisObject = {
initialize: initialize,
finalize: finalize,
@@ -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
+18 -24
View File
@@ -14,7 +14,6 @@ function newCanvas() {
let containerDragStarted = false
let floatingObjectDragStarted = false
let floatingObjectBeingDragged
let containerBeingDragged
let viewPortBeingDragged = false
let ignoreNextClick = false
@@ -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 {
@@ -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) {
@@ -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) {
+1 -4
View File
@@ -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) {
+1 -3
View File
@@ -1,8 +1,6 @@
function newTimelineChart() {
const MODULE_NAME = 'Timeline Chart'
const INFO_LOG = false
const INTENSIVE_LOG = false
const ERROR_LOG = true
let logger = newWebDebugLog()
logger.fileName = MODULE_NAME
+1 -1
View File
@@ -47,7 +47,7 @@ function newViewport() {
initialize: initialize,
finalize: finalize
}
let increment = 0.035
let position = {
x: 0,
y: 0
@@ -27,11 +27,10 @@ function newReferenceAttachDetach() {
}
}
}
}
node.payload.referenceParent = undefined
if (node.savedPayload !== undefined) {
node.savedPayload.referenceParent = undefined
node.payload.referenceParent = undefined
if (node.savedPayload !== undefined) {
node.savedPayload.referenceParent = undefined
}
}
}
}
@@ -434,15 +434,15 @@ function newTaskFunctions() {
}
}
function addMissingMarketDataTasks(node, rootNodes, functionLibraryUiObjectsFromNodes) {
addMissingMarketTasks(node, rootNodes, 'Market Data Tasks', functionLibraryUiObjectsFromNodes)
function addMissingMarketDataTasks(node, functionLibraryUiObjectsFromNodes) {
addMissingMarketTasks(node, 'Market Data Tasks', functionLibraryUiObjectsFromNodes)
}
function addMissingMarketTradingTasks(node, rootNodes, functionLibraryUiObjectsFromNodes) {
addMissingMarketTasks(node, rootNodes, 'Market Trading Tasks', functionLibraryUiObjectsFromNodes)
function addMissingMarketTradingTasks(node, functionLibraryUiObjectsFromNodes) {
addMissingMarketTasks(node, 'Market Trading Tasks', functionLibraryUiObjectsFromNodes)
}
function addMissingMarketTasks(node, rootNodes, newNodeType, functionLibraryUiObjectsFromNodes) {
function addMissingMarketTasks(node, newNodeType, functionLibraryUiObjectsFromNodes) {
if (node.payload === undefined) { return }
if (node.payload.referenceParent === undefined) { return }
if (node.payload.referenceParent.exchangeMarkets === undefined) { return }
+2 -2
View File
@@ -680,7 +680,7 @@ function newWorkspace() {
break
case 'Add Missing Market Data Tasks':
{
functionLibraryTaskFunctions.addMissingMarketDataTasks(payload.node, thisObject.workspaceNode.rootNodes, functionLibraryUiObjectsFromNodes)
functionLibraryTaskFunctions.addMissingMarketDataTasks(payload.node, functionLibraryUiObjectsFromNodes)
}
break
case 'Add Missing Data Mine Tasks':
@@ -695,7 +695,7 @@ function newWorkspace() {
break
case 'Add Missing Market Trading Tasks':
{
functionLibraryTaskFunctions.addMissingMarketTradingTasks(payload.node, thisObject.workspaceNode.rootNodes, functionLibraryUiObjectsFromNodes)
functionLibraryTaskFunctions.addMissingMarketTradingTasks(payload.node, functionLibraryUiObjectsFromNodes)
}
break
case 'Add Missing Trading Mine Tasks':
+6 -6
View File
@@ -1544,7 +1544,7 @@ function newUiObject() {
if (thisObject.isOnFocus === true) {
labelPoint = {
x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 5,
y: position.y + radius * 2 / 3 + lineSeparator * 1 + 15
y: position.y + radius * 2 / 3 + lineSeparator * 1+ 30
}
} else {
labelPoint = {
@@ -1554,7 +1554,7 @@ function newUiObject() {
}
if (canvas.floatingSpace.inMapMode === true) {
labelPoint.y = position.y + 50 / 2 + lineSeparator * 1
labelPoint.y = position.y + 50 / 2 + lineSeparator * 2
}
browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY
@@ -1623,7 +1623,7 @@ function newUiObject() {
if (thisObject.isOnFocus === true) {
labelPoint = {
x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 5,
y: position.y + radius * 2 / 3 + lineSeparator * 5 + 15
y: position.y + radius * 2 / 3 + lineSeparator * 6+ 30
}
} else {
labelPoint = {
@@ -1698,7 +1698,7 @@ function newUiObject() {
if (thisObject.isOnFocus === true) {
labelPoint = {
x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 10,
y: position.y + radius * 2 / 3 + lineSeparator * 3 + 15
y: position.y + radius * 2 / 3 + lineSeparator * 4+ 30
}
} else {
labelPoint = {
@@ -1751,7 +1751,7 @@ function newUiObject() {
if (thisObject.isOnFocus === true) {
labelPoint = {
x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 5,
y: position.y + radius * 2 / 3 + lineSeparator * 4 + 15
y: position.y + radius * 2 / 3 + lineSeparator * 5+ 30
}
} else {
labelPoint = {
@@ -1802,7 +1802,7 @@ function newUiObject() {
if (thisObject.isOnFocus === true) {
labelPoint = {
x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 10,
y: position.y + radius * 2 / 3 + lineSeparator * 2 + 15
y: position.y + radius * 2 / 3 + lineSeparator * 3+ 30
}
} else {
labelPoint = {
-1
View File
@@ -128,7 +128,6 @@ function newLeftRightButton() {
}
function getContainer(point, purpose) {
let container
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
return thisObject.container
}
-1
View File
@@ -2,7 +2,6 @@
function newPlotterPanel() {
const MODULE_NAME = 'Plotter Panel'
const ERROR_LOG = true
const INTENSIVE_LOG = false
const logger = newWebDebugLog()
logger.fileName = MODULE_NAME
-1
View File
@@ -1,7 +1,6 @@
function newPlotter() {
const MODULE_NAME = 'Plotter'
const ERROR_LOG = true
const INTENSIVE_LOG = false
const logger = newWebDebugLog()
logger.fileName = MODULE_NAME
+2 -3
View File
@@ -11,7 +11,6 @@ let CONCEPT_SCHEMA_ARRAY = []
function newDashboard() {
const MODULE_NAME = 'Dashboard'
const ERROR_LOG = true
const INTENSIVE_LOG = false
const logger = newWebDebugLog()
logger.fileName = MODULE_NAME
@@ -89,9 +88,9 @@ function newDashboard() {
/* handles backspace and refresh(F5) from keyboard */
window.manageBackRefresh = function (event) {
var tag = event.target.tagName.toLowerCase()
if (event.keyCode == 8 && tag != 'input' && tag != 'textarea') { // Backbutton pressed
if (event.keyCode === 8 && tag !== 'input' && tag !== 'textarea') { // Backbutton pressed
saveWorkspace()
} else if (event.keyCode == 116) { // F5 pressed
} else if (event.keyCode === 116) { // F5 pressed
saveWorkspace()
}
}
+1 -2
View File
@@ -92,8 +92,7 @@ function newAutoScaleButton() {
}
}
function onMouseWheel(event) {
let factor
let delta = event.wheelDelta
let delta = event.wheelDelta
if (delta < 0) {
delta = -1
} else {
-1
View File
@@ -20,7 +20,6 @@ function newTimeFrameScale() {
const FILES_PERIOD_DEFAULT_VALUE = 0
const TIME_PERIOD_DEFAULT_VALUE = 0
const MIN_HEIGHT = 50
let displayingRealTimeFrame = true
let greyOutCoverLayer = false
+3 -2
View File
@@ -33,9 +33,10 @@ function newSidePanelTab() {
function initialize(screenside, index) {
thisObject.screenside = screenside
if (index !== undefined) [
if (index !== undefined) {
thisObject.index = index
]
}
switch (thisObject.screenside) {
case 'left': {
thisObject.pointerDirection = 'left'
-4
View File
@@ -193,10 +193,6 @@ function newCockpitSpace() {
}
function getContainer(point) {
let container
// container = thisObject.fullscreen.getContainer(point)
// if (container !== undefined) { return container }
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
thisObject.container.space = 'Cockpit Space'
-1
View File
@@ -34,7 +34,6 @@ function newMarketFiles() {
thisObject.eventHandler = newEventHandler()
let intervalHandle
let finalized = false
let eventSubscriptionIdDatasetUpdated = []