From b5a6153a9bf7518cb8aa0691550d16abb389b312 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Apr 2018 08:04:40 +0200 Subject: [PATCH] DebugLog Introduced in some modules --- .vs/AAWeb/v15/.suo | Bin 65024 -> 59904 bytes Canvas.js | 29 +++++++++++++++++++++++++- Dashboard.js | 2 ++ DebugLog.js | 16 +++++++++++++++ Project.njsproj | 3 +++ Spaces/ChartSpace.js | 9 +++++++- TimeMachine.js | 17 +++++++++++++++ TimelineChart.js | 48 +++++++++++++++++++++++++++++++++++++++++++ index.html | 2 ++ server.js | 2 +- 10 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 DebugLog.js diff --git a/.vs/AAWeb/v15/.suo b/.vs/AAWeb/v15/.suo index f520f8a1767b039fdefebf6bb9802dd6979169de..5b6ce0a02a201e8eb5166fb8d88bc2d050ecf3b4 100644 GIT binary patch delta 5286 zcmeHK3s98T75?u&U>9Lsc?&2HMG<`L0`gLE*Ikf`DBwmBL0ECaqr7AnO{j!rbTXzA z%kF7ftuI_!TN@w1Z&=gm^GGIEaE{-8qAd4TDHgxT1aZ&84q> z@+US6^_moD@@QhegWIAt>^*o@oGtS}^>_q~FvNHmu+lUV?ubL!bX#6fODwi=N}&W| zJ<`>dpo~C_MraV!AqZtS!r#>%g>nIcCLfFNMT8;7AmR{Nh+zmd!VeLTh(b758yrmI zxE4-0>kxWG24Xg1F(L#J zikO3#%YENDVGcItA?71;5qXGw1WlBQ@+HI~1T9*CvItR#Sb|uJC`ObZsDCL+BVrk% z3}HghII}G;nLV%>6YQdDMMvqm$wb){G!kW^p_I*mVQb%+X&ds40)@eipO5$(=!W%J^!%5gC4)GAalEWEjdyKsBg>X|?gY{ZO9ikqw0?~l5AZU_Clq(Ud5U(I!1vV_)?$wpE z2OHgpeTXguO-SIezTee8fbyWL{tn7Rt~&L5cS!vK-1q9V)tB16b#jiOfheQ6WJjRU zyM_H0ZsYIU(C7mo^ZL~bTHEq)HQxmicWMxpU2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!?CTNbXzF=dkx9h7O@Y?) zv`*!H>%6?Jd&Tha`cW}Taa?CbC2e>%4x1?tt$^;t1hq;UnB#OE#JF@Fux-RuB|g`| zR*DB(dMA{BSb}>Xi=5`F_qb{*z7c+e$;GrxYk_0B+tuK9lzOV%4tJY_hqB{?Jh*;CCh_#q2nVnYk#we|Ng0D*MWN0lPFBjO%&k&jU`N4OUT;bFTc(Rd%>6m?`=&a z*M`$wU@SDBSS=nMf7?#>B(;Dyf1#?m_@l{9U!1mI(fKPHPB(jy+s$C$6~5*w)up(P zKhtef`HkKq(Np;xm1Eeev;JrHlzpUaGBWJvuyIr^Q;k7aRB(?@No_B*x>2ZMW22A%1G)bG7^pO9c7p9ZA^ON;285vxkmk~u5S_d@?hLkFa@pQx|5@H2MEo6Pfvw? z@XMvU6oc`@N(kI)#0)6rV7k21PYSlcCF(~J$>WQHS#)tVa&wO18Hhb3S&4}_`q3-I zdPw^d$&6BqIV71aOXPl#qxAF~^dpR_Z+J=iHoiHkrHBp|y3-{fLN5m3TrnhL=7lJ+ zkIi!Ra`C_Z_Qs>^M>kowL%d{59~g;XUY`y-5BHDzWYIoFVbQ;j1fQy11m@#sbr)JC6Ky8x2aoVPNsC@cvNK(DX753$VSvg~K;& zLd})iJhbkx{C@}W3m|Zp>vrTb?I6_byS;1PK^}C+a)nKw{Eorz4TFW1*RF>P^RBij z;MU&3g7#z#V|FOtZxzm;y2RKlRL4VErxGg9#6bI5n~-z%91k7)l!Efyb|%d0IL|+G X|2z1L$mhABIwTVcZs0e3gwyaJ0S^rQ diff --git a/Canvas.js b/Canvas.js index 729aea881..66507e299 100644 --- a/Canvas.js +++ b/Canvas.js @@ -1,4 +1,6 @@ -/* + + +/* Whithin this sub-system, the canvas object represents a layer on top of the browser canvas object. @@ -34,6 +36,11 @@ let splashScreenNeeded = true; function newCanvas() { + const MODULE_NAME = "Canvas"; + const FULL_LOG = false; + const logger = newDebugLog(); + logger.fileName = MODULE_NAME; + /* Mouse event related variables. */ let containerDragStarted = false; @@ -68,6 +75,8 @@ function newCanvas() { function initialize() { + if (FULL_LOG === true) { logger.write("[INFO] initialize -> Entering function."); } + initializeBrowserCanvas(); addCanvasEvents(); @@ -111,6 +120,8 @@ function newCanvas() { function initializeBrowserCanvas() { + if (FULL_LOG === true) { logger.write("[INFO] initializeBrowserCanvas -> Entering function."); } + browserCanvas = document.getElementById('canvas'); browserCanvasContext = browserCanvas.getContext('2d'); @@ -125,12 +136,16 @@ function newCanvas() { function clearBrowserCanvas() { + if (FULL_LOG === true) { logger.write("[INFO] clearBrowserCanvas -> Entering function."); } + browserCanvasContext.clearRect(0, 0, browserCanvas.width, browserCanvas.height); } function addCanvasEvents() { + if (FULL_LOG === true) { logger.write("[INFO] addCanvasEvents -> Entering function."); } + /* Mouse down and up events to control the drag of the canvas. */ browserCanvas.addEventListener('mousedown', onMouseDown, false); @@ -153,6 +168,8 @@ function newCanvas() { function onMouseDown(event) { + if (FULL_LOG === true) { logger.write("[INFO] onMouseDown -> Entering function."); } + /* There are four types of elements that can be dragged. @@ -212,6 +229,8 @@ function newCanvas() { function onMouseClick(event) { + if (FULL_LOG === true) { logger.write("[INFO] onMouseClick -> Entering function."); } + let point = { x: event.pageX, y: event.pageY @@ -253,6 +272,8 @@ function newCanvas() { function onMouseUp(event) { + if (FULL_LOG === true) { logger.write("[INFO] onMouseUp -> Entering function."); } + if (containerDragStarted || viewPortBeingDragged || ballDragStarted) { thisObject.eventHandler.raiseEvent("Drag Finished", undefined); @@ -273,6 +294,8 @@ function newCanvas() { function onMouseMove(event) { + if (FULL_LOG === true) { logger.write("[INFO] onMouseMove -> Entering function."); } + viewPort.mousePosition.x = event.pageX; viewPort.mousePosition.y = event.pageY; @@ -301,6 +324,8 @@ function newCanvas() { function onMouseWheel(event) { + if (FULL_LOG === true) { logger.write("[INFO] onMouseWheel -> Entering function."); } + // cross-browser wheel delta var event = window.event || event; // old IE support let delta = Math.max(-1, Math.min(1, event.wheelDelta || -event.detail)); @@ -343,6 +368,8 @@ function newCanvas() { function checkDrag() { + if (FULL_LOG === true) { logger.write("[INFO] checkDrag -> Entering function."); } + if (containerDragStarted === true || ballDragStarted === true || viewPortBeingDragged === true) { browserCanvas.style.cursor = "grabbing"; diff --git a/Dashboard.js b/Dashboard.js index 8a15eff40..8c31925bf 100644 --- a/Dashboard.js +++ b/Dashboard.js @@ -1,11 +1,13 @@  + /* The Dashboard is the root object that contains all the other stuff in it. Some of that stuff is visible, some other is invisible. */ let canvas; let markets; let ecosystem = newEcosystem(); + let marketFilesPeriods = '[' + '[' + 24 * 60 * 60 * 1000 + ',' + '"24-hs"' + ']' + ',' + diff --git a/DebugLog.js b/DebugLog.js new file mode 100644 index 000000000..34ef99a0c --- /dev/null +++ b/DebugLog.js @@ -0,0 +1,16 @@ + +function newDebugLog() { + + let thisObject = { + write: write, + fileName: undefined + } + + return thisObject; + + function write(pText) { + + console.log(thisObject.fileName + " : " + pText); + + } +} \ No newline at end of file diff --git a/Project.njsproj b/Project.njsproj index 901f9c08f..b99fb808d 100644 --- a/Project.njsproj +++ b/Project.njsproj @@ -44,6 +44,9 @@ Code + + Code + Code diff --git a/Spaces/ChartSpace.js b/Spaces/ChartSpace.js index 544202a37..1cc135f08 100644 --- a/Spaces/ChartSpace.js +++ b/Spaces/ChartSpace.js @@ -8,6 +8,11 @@ changes, then all charts in it are replotted with the corresponging data. function newChartSpace() { + const MODULE_NAME = "Chart Space"; + const FULL_LOG = true; + const logger = newDebugLog(); + logger.fileName = MODULE_NAME; + var chartSpace = { container: undefined, draw: draw, @@ -36,6 +41,7 @@ function newChartSpace() { function initialize() { + if (FULL_LOG === true) { logger.write("[INFO] initialize -> Entering function."); } /* We create the first of many possible time machines that could live at the Chart Space. */ @@ -58,7 +64,6 @@ function newChartSpace() { this.timeMachines.push(timeMachine); - } function draw() { @@ -78,6 +83,8 @@ function newChartSpace() { function getContainer(point) { + if (FULL_LOG === true) { logger.write("[INFO] getContainer -> Entering function."); } + var container; /* First we check if this point is inside this space. */ diff --git a/TimeMachine.js b/TimeMachine.js index 1824c45bd..ab9ee6d25 100644 --- a/TimeMachine.js +++ b/TimeMachine.js @@ -11,6 +11,11 @@ each one with it own charts, and each one positioned at an especific point in ti function newTimeMachine() { + const MODULE_NAME = "Time Machine"; + const FULL_LOG = false; + const logger = newDebugLog(); + logger.fileName = MODULE_NAME; + let thisObject = { container: undefined, draw: draw, @@ -34,6 +39,8 @@ function newTimeMachine() { function initialize() { + if (FULL_LOG === true) { logger.write("[INFO] initialize -> Entering function."); } + /* Each Time Machine has a Control Panel. */ controlPanelHandle = canvas.panelsSpace.createNewPanel("Time Control Panel"); @@ -65,6 +72,8 @@ function newTimeMachine() { function onDefaultMarketInitialized() { + if (FULL_LOG === true) { logger.write("[INFO] initialize -> onDefaultMarketInitialized -> Entering function."); } + thisObject.charts.push(timelineChart); controlPanel.container.eventHandler.listenToEvent('Datetime Changed', timelineChart.setDatetime, undefined); @@ -76,10 +85,14 @@ function newTimeMachine() { function initializeTheRestOfTheMarkets() { + if (FULL_LOG === true) { logger.write("[INFO] initialize -> initializeTheRestOfTheMarkets -> Entering function."); } + markets.forEach(initializeTimelineChart); function initializeTimelineChart(item, key, mapObj) { + if (FULL_LOG === true) { logger.write("[INFO] initialize -> initializeTheRestOfTheMarkets -> initializeTimelineChart -> Entering function."); } + if (key === INITIAL_DEFAULT_MARKET) { // We skip this market since it has already been initialized. return; @@ -104,6 +117,8 @@ function newTimeMachine() { function finalSteps() { + if (FULL_LOG === true) { logger.write("[INFO] initialize -> initializeTheRestOfTheMarkets -> initializeTimelineChart -> finalSteps -> Entering function."); } + thisObject.charts.push(timelineChart); controlPanel.container.eventHandler.listenToEvent('Datetime Changed', timelineChart.setDatetime, undefined); @@ -130,6 +145,8 @@ function newTimeMachine() { function getContainer(point) { + if (FULL_LOG === true) { logger.write("[INFO] getContainer -> Entering function."); } + let container; /* First we check if this point is inside this space. */ diff --git a/TimelineChart.js b/TimelineChart.js index 1041b5235..e50b18b11 100644 --- a/TimelineChart.js +++ b/TimelineChart.js @@ -1,5 +1,10 @@ function newTimelineChart() { + const MODULE_NAME = "Timeline Chart"; + const FULL_LOG = false; + const logger = newDebugLog(); + logger.fileName = MODULE_NAME; + const CONSOLE_LOG = false; let productPlotters = []; @@ -40,6 +45,8 @@ function initialize(exchange, market, pProductsPanel, callBackFunction) { + if (FULL_LOG === true) { logger.write("[INFO] initialize -> Entering function."); } + /* Remember the Products Panel */ productsPanel = pProductsPanel; @@ -75,6 +82,11 @@ function initializeCompetitionPlotters() { + if (FULL_LOG === true) { logger.write("[INFO] initializeCompetitionPlotters -> Entering function."); } + + if (FULL_LOG === true) { logger.write("[INFO] initializeCompetitionPlotters -> Aborting function until Competition Plotter is ready."); } + return; + /* At this current version of the platform, we will support only one competition with only one plotter. */ const COMPETITION_HOST = "AAArena"; @@ -90,6 +102,8 @@ function onStorageInitialized() { + if (FULL_LOG === true) { logger.write("[INFO] initializeCompetitionPlotters -> onStorageInitialized -> Entering function."); } + /* Now we have all the initial data loaded and ready to be delivered to the new instance of the plotter. */ let plotter = getNewPlotter(competition.plotter.host, competition.plotter.codeName, competition.plotter.moduleName); @@ -109,6 +123,8 @@ function onPlotterInizialized() { + if (FULL_LOG === true) { logger.write("[INFO] initializeCompetitionPlotters -> onStorageInitialized -> onPlotterInizialized -> Entering function."); } + if (CONSOLE_LOG === true) { console.log(competition.plotter.host, competition.plotter.repo, competition.plotter.moduleName + " Initialized. "); @@ -130,6 +146,8 @@ function initializeProductPlotters() { + if (FULL_LOG === true) { logger.write("[INFO] initializeProductPlotters -> Entering function."); } + /* Lets get all the cards that needs to be loaded. */ let loadingProductCards = productsPanel.getLoadingProductCards(); @@ -145,11 +163,15 @@ function initializeProductPlotter(pProductCard) { + if (FULL_LOG === true) { logger.write("[INFO] initializeProductPlotter -> Entering function."); } + /* Before Initializing a Plotter, we need the Storage it will use, loaded with the files it will initially need. */ let objName = pProductCard.devTeam.codeName + "-" + pProductCard.bot.codeName + "-" + pProductCard.product.codeName; let storage = newProductStorage(objName); + if (FULL_LOG === true) { logger.write("[INFO] initializeProductPlotter -> objName = " + objName); } + /* Before Initializing the Storage, we will put the Product Card to listen to the events the storage will raise every time a file is loaded, @@ -188,6 +210,8 @@ function onStorageInitialized() { + if (FULL_LOG === true) { logger.write("[INFO] initializeProductPlotter -> onStorageInitialized -> Entering function."); } + /* Now we have all the initial data loaded and ready to be delivered to the new instance of the plotter. */ let plotter = getNewPlotter(pProductCard.product.plotter.devTeam, pProductCard.product.plotter.codeName, pProductCard.product.plotter.moduleName); @@ -207,6 +231,8 @@ function onPlotterInizialized() { + if (FULL_LOG === true) { logger.write("[INFO] initializeProductPlotter -> onStorageInitialized -> onPlotterInizialized -> Entering function."); } + if (CONSOLE_LOG === true) { console.log(pProductCard.product.plotter.devTeam + '->' + pProductCard.product.plotter.repo + '->' + pProductCard.product.plotter.moduleName + " Initialized. "); @@ -283,6 +309,8 @@ function onProductCardStatusChanged(pProductCard) { + if (FULL_LOG === true) { logger.write("[INFO] onProductCardStatusChanged -> Entering function."); } + if (pProductCard.status === PRODUCT_CARD_STATUS.LOADING) { /* Lets see if we can find the Plotter of this card on our Active Plotters list, other wise we will initialize it */ @@ -338,6 +366,8 @@ function onZoomChanged(event) { + if (FULL_LOG === true) { logger.write("[INFO] onZoomChanged -> Entering function."); } + if (initializationReady === true) { level = event.newLevel; // for debugging purposes only @@ -376,6 +406,8 @@ function onDragFinished() { + if (FULL_LOG === true) { logger.write("[INFO] onDragFinished -> Entering function."); } + if (initializationReady === true) { if (thisObject.container.frame.isInViewPort() && tooSmall() === false) { @@ -388,6 +420,8 @@ function onOffsetChanged() { + if (FULL_LOG === true) { logger.write("[INFO] onOffsetChanged -> Entering function."); } + if (initializationReady === true) { if (thisObject.container.frame.isInViewPort()) { @@ -401,6 +435,8 @@ function recalculateCurrentDatetime() { + if (FULL_LOG === true) { logger.write("[INFO] recalculateCurrentDatetime -> Entering function."); } + /* The view port was moved or the view port zoom level was changed and the center of the screen points to a different datetime that me @@ -445,6 +481,8 @@ function getContainer(point) { + if (FULL_LOG === true) { logger.write("[INFO] getContainer -> Entering function."); } + var container; /* First we check if this point is inside this space. */ @@ -464,6 +502,8 @@ function setDatetime(pDatetime) { + if (FULL_LOG === true) { logger.write("[INFO] setDatetime -> Entering function."); } + /* This function is used when the time is changed through the user interface, but without zooming or panning. */ /* No matter if the day changed or not, we need to inform all visible Plotters. */ @@ -528,6 +568,8 @@ function recalculateScale() { + if (FULL_LOG === true) { logger.write("[INFO] recalculateScale -> Entering function."); } + var minValue = { x: EARLIEST_DATE.valueOf(), y: 0 @@ -550,6 +592,8 @@ function tooTiny() { + if (FULL_LOG === true) { logger.write("[INFO] tooTiny -> Entering function."); } + if (viewPort.zoomLevel < Math.trunc(-28.25 * 100) / 100) { return true; } else { @@ -560,6 +604,8 @@ function tooSmall() { + if (FULL_LOG === true) { logger.write("[INFO] tooSmall -> Entering function."); } + if (viewPort.zoomLevel < Math.trunc(-27.25 * 100) / 100) { return true; } else { @@ -643,6 +689,8 @@ function moveViewPortToCurrentDatetime() { + if (FULL_LOG === true) { logger.write("[INFO] moveViewPortToCurrentDatetime -> Entering function."); } + let targetPoint = { x: datetime.valueOf(), y: 0 // we wont touch the y axis here. diff --git a/index.html b/index.html index 34a68fef1..8d975c9ca 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,7 @@ Advanced Algos + @@ -54,6 +55,7 @@ + diff --git a/server.js b/server.js index 1cf8bb361..330817bd6 100644 --- a/server.js +++ b/server.js @@ -6,7 +6,7 @@ if (CONSOLE_LOG === true) { } -const DEBUG_MODE = false; // This forces the server to read Plotters from the local drive. +const DEBUG_MODE = true; // This forces the server to read Plotters from the local drive. if (CONSOLE_LOG === true && DEBUG_MODE === true) {