Mantainance

This commit is contained in:
Luis Fernando Molina committed 2020-10-20 11:35:42 +02:00
1 parent 9b25606028
commit 01e121aa59
4 files changed
+1 -636

No files matched your search

-307
View File
@@ -1,307 +0,0 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<Name>BackendServers</Name>
<RootNamespace>BackendServer</RootNamespace>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>6a53ad2e-c389-4d2c-bded-23dbab231315</ProjectGuid>
<ProjectHome>
</ProjectHome>
<StartupFile>server.js</StartupFile>
<StartWebBrowser>False</StartWebBrowser>
<SearchPath>
</SearchPath>
<WorkingDirectory>.</WorkingDirectory>
<OutputPath>.</OutputPath>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<ProjectTypeGuids>{3AF33F2E-1136-4D97-BBB7-1795711AC8B8};{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}</ProjectTypeGuids>
<StartWebBrowser>false</StartWebBrowser>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<Compile Include="eventsServer.js">
<SubType>Code</SubType>
</Compile>
<Compile Include="server.js" />
<Compile Include="taskManagerServer.js">
<SubType>Code</SubType>
</Compile>
<Compile Include="webServer.js" />
<Compile Include="WebServer\AppLoader.js" />
<Compile Include="WebServer\AppPreLoader.js" />
<Compile Include="WebServer\externalScripts\CCapture.all.min.js" />
<Compile Include="WebServer\externalScripts\gif.worker.js" />
<Compile Include="WebServer\LegacyPlotter.js" />
<Compile Include="WebServer\PlotterPanel.js" />
<Compile Include="WebServer\require.js" />
<Compile Include="webSocketsServer.js">
<SubType>Code</SubType>
</Compile>
<Content Include="package.json" />
<Content Include="README.md" />
<Content Include="WebServer\Images\favicon.ico" />
<Content Include="WebServer\Images\Icons\style-01\150-next-phase-event.png" />
<Content Include="WebServer\Images\Icons\style-01\analysis-1.png" />
<Content Include="WebServer\Images\Icons\style-01\analysis.png" />
<Content Include="WebServer\Images\Icons\style-01\angle-to-parent-000.png" />
<Content Include="WebServer\Images\Icons\style-01\angle-to-parent-045.png" />
<Content Include="WebServer\Images\Icons\style-01\angle-to-parent-090.png" />
<Content Include="WebServer\Images\Icons\style-01\angle-to-parent-180.png" />
<Content Include="WebServer\Images\Icons\style-01\angle-to-parent-360.png" />
<Content Include="WebServer\Images\Icons\style-01\approve.png" />
<Content Include="WebServer\Images\Icons\style-01\arrangement-concave.png" />
<Content Include="WebServer\Images\Icons\style-01\arrangement-convex.png" />
<Content Include="WebServer\Images\Icons\style-01\arrangement-horizontal-bottom.png" />
<Content Include="WebServer\Images\Icons\style-01\arrangement-horizontal-top.png" />
<Content Include="WebServer\Images\Icons\style-01\arrangement-vertical-left.png" />
<Content Include="WebServer\Images\Icons\style-01\arrangement-vertical-right.png" />
<Content Include="WebServer\Images\Icons\style-01\asset.png" />
<Content Include="WebServer\Images\Icons\style-01\attach.png" />
<Content Include="WebServer\Images\Icons\style-01\attractive.png" />
<Content Include="WebServer\Images\Icons\style-01\band.png" />
<Content Include="WebServer\Images\Icons\style-01\binance-coin.png" />
<Content Include="WebServer\Images\Icons\style-01\binance.png" />
<Content Include="WebServer\Images\Icons\style-01\bitcoin-cash.png" />
<Content Include="WebServer\Images\Icons\style-01\bitcoin.png" />
<Content Include="WebServer\Images\Icons\style-01\bitfinex.png" />
<Content Include="WebServer\Images\Icons\style-01\bitmex.png" />
<Content Include="WebServer\Images\Icons\style-01\bittrex.png" />
<Content Include="WebServer\Images\Icons\style-01\bot-indicator.png" />
<Content Include="WebServer\Images\Icons\style-01\bot-sensor.png" />
<Content Include="WebServer\Images\Icons\style-01\bot-trading.png" />
<Content Include="WebServer\Images\Icons\style-01\brainstorming.png" />
<Content Include="WebServer\Images\Icons\style-01\broken-link.png" />
<Content Include="WebServer\Images\Icons\style-01\calculations-procedure.png" />
<Content Include="WebServer\Images\Icons\style-01\candles.png" />
<Content Include="WebServer\Images\Icons\style-01\cardano.png" />
<Content Include="WebServer\Images\Icons\style-01\chart-point-formula.png" />
<Content Include="WebServer\Images\Icons\style-01\chart-point.png" />
<Content Include="WebServer\Images\Icons\style-01\chart-points.png" />
<Content Include="WebServer\Images\Icons\style-01\charting-space.png" />
<Content Include="WebServer\Images\Icons\style-01\chat.png" />
<Content Include="WebServer\Images\Icons\style-01\chronometer.png" />
<Content Include="WebServer\Images\Icons\style-01\clone.png" />
<Content Include="WebServer\Images\Icons\style-01\compass.png" />
<Content Include="WebServer\Images\Icons\style-01\competition.png" />
<Content Include="WebServer\Images\Icons\style-01\content.png" />
<Content Include="WebServer\Images\Icons\style-01\crypto-exchange.png" />
<Content Include="WebServer\Images\Icons\style-01\crypto-exchanges.png" />
<Content Include="WebServer\Images\Icons\style-01\dash.png" />
<Content Include="WebServer\Images\Icons\style-01\dashboard.png" />
<Content Include="WebServer\Images\Icons\style-01\data-building-procedure.png" />
<Content Include="WebServer\Images\Icons\style-01\data-dependency.png" />
<Content Include="WebServer\Images\Icons\style-01\data-entry.png" />
<Content Include="WebServer\Images\Icons\style-01\data-formula.png" />
<Content Include="WebServer\Images\Icons\style-01\data-mine.png" />
<Content Include="WebServer\Images\Icons\style-01\data-mining.png" />
<Content Include="WebServer\Images\Icons\style-01\data-product.png" />
<Content Include="WebServer\Images\Icons\style-01\data-storage.png" />
<Content Include="WebServer\Images\Icons\style-01\dataset-definition.png" />
<Content Include="WebServer\Images\Icons\style-01\dataset.png" />
<Content Include="WebServer\Images\Icons\style-01\delete.png" />
<Content Include="WebServer\Images\Icons\style-01\delink.png" />
<Content Include="WebServer\Images\Icons\style-01\design-tool.png" />
<Content Include="WebServer\Images\Icons\style-01\detach.png" />
<Content Include="WebServer\Images\Icons\style-01\distance-to-parent-000.png" />
<Content Include="WebServer\Images\Icons\style-01\distance-to-parent-025.png" />
<Content Include="WebServer\Images\Icons\style-01\distance-to-parent-050.png" />
<Content Include="WebServer\Images\Icons\style-01\distance-to-parent-100.png" />
<Content Include="WebServer\Images\Icons\style-01\distance-to-parent-150.png" />
<Content Include="WebServer\Images\Icons\style-01\distance-to-parent-200.png" />
<Content Include="WebServer\Images\Icons\style-01\eos.png" />
<Content Include="WebServer\Images\Icons\style-01\ethereum-classic.png" />
<Content Include="WebServer\Images\Icons\style-01\ethereum.png" />
<Content Include="WebServer\Images\Icons\style-01\exchange-account-asset.png" />
<Content Include="WebServer\Images\Icons\style-01\exchange-account-key.png" />
<Content Include="WebServer\Images\Icons\style-01\exchange-accounts.png" />
<Content Include="WebServer\Images\Icons\style-01\exchange-assets.png" />
<Content Include="WebServer\Images\Icons\style-01\exchange-markets.png" />
<Content Include="WebServer\Images\Icons\style-01\execution-finished-event.png" />
<Content Include="WebServer\Images\Icons\style-01\execution-started-event.png" />
<Content Include="WebServer\Images\Icons\style-01\grid.png" />
<Content Include="WebServer\Images\Icons\style-01\hand-drag.png" />
<Content Include="WebServer\Images\Icons\style-01\headphones.png" />
<Content Include="WebServer\Images\Icons\style-01\help.png" />
<Content Include="WebServer\Images\Icons\style-01\histogram.png" />
<Content Include="WebServer\Images\Icons\style-01\hitbtc.png" />
<Content Include="WebServer\Images\Icons\style-01\html.png" />
<Content Include="WebServer\Images\Icons\style-01\image.png" />
<Content Include="WebServer\Images\Icons\style-01\initial-definition.png" />
<Content Include="WebServer\Images\Icons\style-01\key-a.png" />
<Content Include="WebServer\Images\Icons\style-01\key-alt.png" />
<Content Include="WebServer\Images\Icons\style-01\key-ctrl.png" />
<Content Include="WebServer\Images\Icons\style-01\key-down.png" />
<Content Include="WebServer\Images\Icons\style-01\key-left.png" />
<Content Include="WebServer\Images\Icons\style-01\key-m.png" />
<Content Include="WebServer\Images\Icons\style-01\key-r.png" />
<Content Include="WebServer\Images\Icons\style-01\key-right.png" />
<Content Include="WebServer\Images\Icons\style-01\key-shift.png" />
<Content Include="WebServer\Images\Icons\style-01\key-up.png" />
<Content Include="WebServer\Images\Icons\style-01\kraken.png" />
<Content Include="WebServer\Images\Icons\style-01\kucoin.png" />
<Content Include="WebServer\Images\Icons\style-01\layer-manager.png" />
<Content Include="WebServer\Images\Icons\style-01\layout.png" />
<Content Include="WebServer\Images\Icons\style-01\liquid.png" />
<Content Include="WebServer\Images\Icons\style-01\litecoin.png" />
<Content Include="WebServer\Images\Icons\style-01\loading.png" />
<Content Include="WebServer\Images\Icons\style-01\login.png" />
<Content Include="WebServer\Images\Icons\style-01\market.png" />
<Content Include="WebServer\Images\Icons\style-01\master-script.png" />
<Content Include="WebServer\Images\Icons\style-01\menu-backup.png" />
<Content Include="WebServer\Images\Icons\style-01\menu-fix-pinned.png" />
<Content Include="WebServer\Images\Icons\style-01\menu-fix-unpinned.png" />
<Content Include="WebServer\Images\Icons\style-01\menu-mobility-freeze.png" />
<Content Include="WebServer\Images\Icons\style-01\menu-mobility-unfreeze.png" />
<Content Include="WebServer\Images\Icons\style-01\menu-share.png" />
<Content Include="WebServer\Images\Icons\style-01\menu-tensor-fixed-angles.png" />
<Content Include="WebServer\Images\Icons\style-01\menu-tensor-free-angles.png" />
<Content Include="WebServer\Images\Icons\style-01\menu-tree-minus.png" />
<Content Include="WebServer\Images\Icons\style-01\menu-tree-plus.png" />
<Content Include="WebServer\Images\Icons\style-01\monero.png" />
<Content Include="WebServer\Images\Icons\style-01\mouse-left-click.png" />
<Content Include="WebServer\Images\Icons\style-01\mouse-pointer.png" />
<Content Include="WebServer\Images\Icons\style-01\mouse-right-click.png" />
<Content Include="WebServer\Images\Icons\style-01\mouse-wheel-click.png" />
<Content Include="WebServer\Images\Icons\style-01\mouse-wheel-down.png" />
<Content Include="WebServer\Images\Icons\style-01\mouse-wheel-up.png" />
<Content Include="WebServer\Images\Icons\style-01\mouse-wheel.png" />
<Content Include="WebServer\Images\Icons\style-01\moving-average.png" />
<Content Include="WebServer\Images\Icons\style-01\neo.png" />
<Content Include="WebServer\Images\Icons\style-01\network-node.png" />
<Content Include="WebServer\Images\Icons\style-01\network.png" />
<Content Include="WebServer\Images\Icons\style-01\next-phase-event.png" />
<Content Include="WebServer\Images\Icons\style-01\oscillator.png" />
<Content Include="WebServer\Images\Icons\style-01\output-dataset.png" />
<Content Include="WebServer\Images\Icons\style-01\pantone.png" />
<Content Include="WebServer\Images\Icons\style-01\paper-plane.png" />
<Content Include="WebServer\Images\Icons\style-01\photo-camera.png" />
<Content Include="WebServer\Images\Icons\style-01\piggy-bank.png" />
<Content Include="WebServer\Images\Icons\style-01\pipette.png" />
<Content Include="WebServer\Images\Icons\style-01\pixel.png" />
<Content Include="WebServer\Images\Icons\style-01\placeholder.png" />
<Content Include="WebServer\Images\Icons\style-01\planning.png" />
<Content Include="WebServer\Images\Icons\style-01\plotter-module.png" />
<Content Include="WebServer\Images\Icons\style-01\plotter-panel.png" />
<Content Include="WebServer\Images\Icons\style-01\plotter.png" />
<Content Include="WebServer\Images\Icons\style-01\poloniex.png" />
<Content Include="WebServer\Images\Icons\style-01\procedure-initialization.png" />
<Content Include="WebServer\Images\Icons\style-01\procedure-loop.png" />
<Content Include="WebServer\Images\Icons\style-01\process-definition.png" />
<Content Include="WebServer\Images\Icons\style-01\process-dependencies.png" />
<Content Include="WebServer\Images\Icons\style-01\process-output.png" />
<Content Include="WebServer\Images\Icons\style-01\process.png" />
<Content Include="WebServer\Images\Icons\style-01\product-definition.png" />
<Content Include="WebServer\Images\Icons\style-01\production-environment.png" />
<Content Include="WebServer\Images\Icons\style-01\promotion.png" />
<Content Include="WebServer\Images\Icons\style-01\pyramid.png" />
<Content Include="WebServer\Images\Icons\style-01\qtum.png" />
<Content Include="WebServer\Images\Icons\style-01\quality.png" />
<Content Include="WebServer\Images\Icons\style-01\rate-scale.png" />
<Content Include="WebServer\Images\Icons\style-01\record-definition.png" />
<Content Include="WebServer\Images\Icons\style-01\record-property.png" />
<Content Include="WebServer\Images\Icons\style-01\responsive.png" />
<Content Include="WebServer\Images\Icons\style-01\schedule.png" />
<Content Include="WebServer\Images\Icons\style-01\scripts-library.png" />
<Content Include="WebServer\Images\Icons\style-01\search.png" />
<Content Include="WebServer\Images\Icons\style-01\security.png" />
<Content Include="WebServer\Images\Icons\style-01\session-backtesting.png" />
<Content Include="WebServer\Images\Icons\style-01\session-based-data.png" />
<Content Include="WebServer\Images\Icons\style-01\session-forward-testing.png" />
<Content Include="WebServer\Images\Icons\style-01\session-independent-data.png" />
<Content Include="WebServer\Images\Icons\style-01\session-live-trading.png" />
<Content Include="WebServer\Images\Icons\style-01\session-paper-trading.png" />
<Content Include="WebServer\Images\Icons\style-01\session-reference.png" />
<Content Include="WebServer\Images\Icons\style-01\settings.png" />
<Content Include="WebServer\Images\Icons\style-01\shapes-polygon-body.png" />
<Content Include="WebServer\Images\Icons\style-01\shapes-polygon-border.png" />
<Content Include="WebServer\Images\Icons\style-01\shapes-polygon-vertex.png" />
<Content Include="WebServer\Images\Icons\style-01\shapes-polygon.png" />
<Content Include="WebServer\Images\Icons\style-01\shapes.png" />
<Content Include="WebServer\Images\Icons\style-01\single-market-data.png" />
<Content Include="WebServer\Images\Icons\style-01\sitemap.png" />
<Content Include="WebServer\Images\Icons\style-01\social-bot.png" />
<Content Include="WebServer\Images\Icons\style-01\stage-close.png" />
<Content Include="WebServer\Images\Icons\style-01\stage-open-position-size.png" />
<Content Include="WebServer\Images\Icons\style-01\stage-open-postion-rate.png" />
<Content Include="WebServer\Images\Icons\style-01\stage-open-take-profit.png" />
<Content Include="WebServer\Images\Icons\style-01\stage-open.png" />
<Content Include="WebServer\Images\Icons\style-01\stage-trigger-take-position.png" />
<Content Include="WebServer\Images\Icons\style-01\stage-trigger-trigger-off.png" />
<Content Include="WebServer\Images\Icons\style-01\stage-trigger-trigger-on.png" />
<Content Include="WebServer\Images\Icons\style-01\stage-trigger.png" />
<Content Include="WebServer\Images\Icons\style-01\startup.png" />
<Content Include="WebServer\Images\Icons\style-01\status-dependency.png" />
<Content Include="WebServer\Images\Icons\style-01\status-report.png" />
<Content Include="WebServer\Images\Icons\style-01\stellar.png" />
<Content Include="WebServer\Images\Icons\style-01\stop.png" />
<Content Include="WebServer\Images\Icons\style-01\style-condition.png" />
<Content Include="WebServer\Images\Icons\style-01\style.png" />
<Content Include="WebServer\Images\Icons\style-01\super-action.png" />
<Content Include="WebServer\Images\Icons\style-01\super-scripts.png" />
<Content Include="WebServer\Images\Icons\style-01\support.png" />
<Content Include="WebServer\Images\Icons\style-01\tap.png" />
<Content Include="WebServer\Images\Icons\style-01\targeting.png" />
<Content Include="WebServer\Images\Icons\style-01\task-manager.png" />
<Content Include="WebServer\Images\Icons\style-01\task.png" />
<Content Include="WebServer\Images\Icons\style-01\template-script.png" />
<Content Include="WebServer\Images\Icons\style-01\template-structure.png" />
<Content Include="WebServer\Images\Icons\style-01\template-target.png" />
<Content Include="WebServer\Images\Icons\style-01\testing-environment.png" />
<Content Include="WebServer\Images\Icons\style-01\testing.png" />
<Content Include="WebServer\Images\Icons\style-01\tether.png" />
<Content Include="WebServer\Images\Icons\style-01\text.png" />
<Content Include="WebServer\Images\Icons\style-01\time-frame-scale.png" />
<Content Include="WebServer\Images\Icons\style-01\time-line-chart.png" />
<Content Include="WebServer\Images\Icons\style-01\time-machine.png" />
<Content Include="WebServer\Images\Icons\style-01\time-period.png" />
<Content Include="WebServer\Images\Icons\style-01\time-scale.png" />
<Content Include="WebServer\Images\Icons\style-01\timeline.png" />
<Content Include="WebServer\Images\Icons\style-01\toggle-auto-scale-auto-max.png" />
<Content Include="WebServer\Images\Icons\style-01\toggle-auto-scale-auto-min-max.png" />
<Content Include="WebServer\Images\Icons\style-01\toggle-auto-scale-auto-min.png" />
<Content Include="WebServer\Images\Icons\style-01\toggle-auto-scale-manual.png" />
<Content Include="WebServer\Images\Icons\style-01\toggle-auto-time-scale-auto-max.png" />
<Content Include="WebServer\Images\Icons\style-01\toggle-auto-time-scale-auto-min-max.png" />
<Content Include="WebServer\Images\Icons\style-01\toggle-auto-time-scale-auto-min.png" />
<Content Include="WebServer\Images\Icons\style-01\toggle-auto-time-scale-manual.png" />
<Content Include="WebServer\Images\Icons\style-01\toggle-panel-off.png" />
<Content Include="WebServer\Images\Icons\style-01\tools.png" />
<Content Include="WebServer\Images\Icons\style-01\trend.png" />
<Content Include="WebServer\Images\Icons\style-01\tron.png" />
<Content Include="WebServer\Images\Icons\style-01\upbit.png" />
<Content Include="WebServer\Images\Icons\style-01\upload.png" />
<Content Include="WebServer\Images\Icons\style-01\us-dollar.png" />
<Content Include="WebServer\Images\Icons\style-01\user-account.png" />
<Content Include="WebServer\Images\Icons\style-01\user-assets.png" />
<Content Include="WebServer\Images\Icons\style-01\user-keys.png" />
<Content Include="WebServer\Images\Icons\style-01\vector.png" />
<Content Include="WebServer\Images\Icons\style-01\video-player.png" />
<Content Include="WebServer\Images\Icons\style-01\viewport.png" />
<Content Include="WebServer\Images\Icons\style-01\volume.png" />
<Content Include="WebServer\Images\superalgos-header-background.png" />
<Content Include="WebServer\Images\superalgos-logo-for-color-background.png" />
<Content Include="WebServer\Images\superalgos-logo.png" />
<Content Include="WebServer\Images\superalgos-platform.jpg" />
<Content Include="WebServer\index.html" />
</ItemGroup>
<ItemGroup>
<Folder Include="WebServer\" />
<Folder Include="WebServer\externalScripts\" />
<Folder Include="WebServer\Images\" />
<Folder Include="WebServer\Images\Icons\" />
<Folder Include="WebServer\Images\Icons\style-01\" />
</ItemGroup>
<!-- Do not delete the following Import Project. While this appears to do nothing it is a marker for setting TypeScript properties before our import that depends on them. -->
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="False" />
<Import Project="$(VSToolsPath)\Node.js Tools\Microsoft.NodejsTools.targets" />
</Project>
-170
View File
@@ -1,170 +0,0 @@
let postLoader
function newAppLoader() {
const MODULE_NAME = 'App Loader'
const INFO_LOG = false
const ERROR_LOG = true
const logger = newWebDebugLog()
logger.fileName = MODULE_NAME
let thisObject = {
loadModules: loadModules
}
return thisObject
async function loadModules() {
try {
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> Entering function.') }
let plotters
let modulesArray = []
plotters = defaultPlotters()
modulesArray = modulesArray.concat([
'Globals.js',
'Workspace.js',
'Files/SingleFile.js',
'Files/FileCloud.js',
'Files/MarketFiles.js',
'Files/DailyFiles.js',
'Files/FileCursor.js',
'Files/FileSequence.js',
'Files/FileStorage.js',
'EventsServerClient.js',
'LegacyPlotter.js',
'PlotterPanel.js',
'VideoRecorder.js',
'ProductStorage.js',
'Canvas.js',
'EventHandler.js',
'Frame.js',
'Animation.js',
'Container.js',
'Utilities.js',
'PostLoader.js'
])
modulesArray = modulesArray.concat(plotters)
functionLibraries()
function functionLibraries() {
let url = 'ListFunctionLibraries'
callWebServer(undefined, url, onResponse)
function onResponse(err, fileList) {
let urlArray = []
let fileArray = JSON.parse(fileList)
for (let i = 0; i < fileArray.length; i++) {
let item = fileArray[i]
project = item[0]
fileName = item[1]
urlArray.push('Projects' + '/' + project + '/' + 'Function-Libraries' + '/' + fileName)
}
modulesArray = modulesArray.concat(urlArray)
utilities()
}
}
function utilities() {
let url = 'ListUtilitiesFiles'
callWebServer(undefined, url, onResponse)
function onResponse(err, fileList) {
let urlArray = []
let fileArray = JSON.parse(fileList)
for (let i = 0; i < fileArray.length; i++) {
let item = fileArray[i]
project = item[0]
fileName = item[1]
urlArray.push('Projects' + '/' + project + '/' + 'Utilities' + '/' + fileName)
}
modulesArray = modulesArray.concat(urlArray)
spaces()
}
}
function spaces() {
let url = 'ListSpaceFiles'
callWebServer(undefined, url, onResponse)
function onResponse(err, fileList) {
let urlArray = []
let fileArray = JSON.parse(fileList)
for (let i = 0; i < fileArray.length; i++) {
let path = fileArray[i]
urlArray.push('Projects' + '/' + path)
}
modulesArray = modulesArray.concat(urlArray)
downloadIncludedFiles()
}
}
function downloadIncludedFiles() {
let downloadedCounter = 0
for (let i = 0; i < modulesArray.length; i++) {
let path = modulesArray[i]
REQUIREJS([path], onRequired)
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> Module Requested.') }
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> path = ' + path) }
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> total requested = ' + (i + 1)) }
function onRequired(pModule) {
try {
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> Entering function.') }
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> Module Downloaded.') }
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> path = ' + path) }
downloadedCounter++
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> downloadedCounter = ' + downloadedCounter) }
if (downloadedCounter === modulesArray.length) {
if (INFO_LOG === true) { logger.write('[INFO] loadModules -> onRequired -> Starting Advanced Algos Platform.') }
setTimeout(() => {
postLoader = newPostLoader()
postLoader.start()
}, 500)
}
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] loadModules -> onRequired -> err = ' + err.stack) }
}
}
}
}
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] loadModules -> err = ' + err.stack) }
}
}
function defaultPlotters() {
return [
'Plotters/Masters/Plotters-Candles-Volumes/Candles.js',
'Plotters/Masters/Plotters-Candles-Volumes/CandlePanel.js',
'Plotters/Masters/Plotters-Candles-Volumes/Volumes.js',
'Plotters/Masters/Plotters-Candles-Volumes/VolumePanel.js',
'Plotters/Masters/Plotters-Bollinger-Bands/BollingerBands.js',
'Plotters/Masters/Plotters-Bollinger-Bands/BollingerBandsPanel.js',
'Plotters/Masters/Plotters-Bollinger-Bands/PercentageBandwidth.js'
]
}
}
-158
View File
@@ -1,158 +0,0 @@
/* Callbacks default responses. */
let GLOBAL = {};
GLOBAL.DEFAULT_OK_RESPONSE = {
result: "Ok",
message: "Operation Succeeded"
};
GLOBAL.DEFAULT_FAIL_RESPONSE = {
result: "Fail",
message: "Operation Failed"
};
GLOBAL.DEFAULT_RETRY_RESPONSE = {
result: "Retry",
message: "Retry Later"
};
GLOBAL.CUSTOM_OK_RESPONSE = {
result: "Ok, but check Message",
message: "Custom Message"
};
GLOBAL.CUSTOM_FAIL_RESPONSE = {
result: "Fail Because",
message: "Custom Message"
};
let browserCanvas; // This is the canvas object of the browser.
function spacePad(str, max) {
str = str.toString();
return str.length < max ? spacePad(" " + str, max) : str;
}
function loadSuperalgos() {
const MODULE_NAME = "App Pre-Loader";
const INFO_LOG = false;
setupHTMLTextArea()
setupHTMLInput()
setupHTMLCanvas()
loadDebugModule()
function setupHTMLTextArea() {
let textArea = document.createElement('textarea');
textArea.id = "textArea";
textArea.spellcheck = false;
textArea.style = 'resize: none;' +
' border: none;' +
' outline: none;' +
'box-shadow: none;' +
'overflow:hidden;' +
'font-family: ' + 'Saira' + ';' +
'font-size: 12px;' +
'background-color: rgb(255, 255, 255);' +
'color:rgb(255, 255, 255);' +
'width: ' + 600 + 'px;' +
'height: ' + 400 + 'px'
let textAreaDiv = document.getElementById('textAreaDiv');
textAreaDiv.appendChild(textArea);
textAreaDiv.style = 'position:fixed; top:' + -1500 + 'px; left:' + 500 + 'px; z-index:10; '
}
function setupHTMLInput() {
let input = document.createElement('input');
input.id = "input";
input.spellcheck = false;
input.style = "border: none; outline: none; box-shadow: none; overflow:hidden; width: 0px; height: 0px;";
let inputDiv = document.getElementById('inputDiv');
inputDiv.appendChild(input);
}
function setupHTMLCanvas() {
let canvas = document.createElement('canvas');
canvas.id = "canvas";
canvas.width = 1400;
canvas.height = 600;
canvas.style.border = "0";
canvas.style = "position:absolute; top:0px; left:0px; z-index:1";
let canvasApp = document.getElementById('canvasApp');
canvasApp.appendChild(canvas);
browserCanvas = document.getElementById('canvas');
browserCanvas.width = window.innerWidth;
browserCanvas.height = window.innerHeight;
browserCanvas.style.border = "none";
browserCanvas.style.top = 0 + 'px';
}
function loadDebugModule() {
let path = "WebDebugLog.js";
REQUIREJS([path], onRequired);
function onRequired(pModule) {
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] " + path + " downloaded."); }
setUpProjects();
}
}
function setUpProjects() {
let url = 'ProjectNames'
callWebServer(undefined, url, onResponse)
function onResponse(err, projects) {
window.PROJECTS = JSON.parse(projects)
loadModules()
}
}
/* And Finally, we start loading all the scripts we will inmediatelly need. */
function loadModules() {
let path = "WebServer/AppLoader.js";
REQUIREJS([path], onRequired);
function onRequired(pModule) {
if (INFO_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[INFO] " + path + " downloaded."); }
let APP_LOADER_MODULE = newAppLoader();
APP_LOADER_MODULE.loadModules();
}
}
}
function callWebServer(pContentToSend, pPath, callBackFunction) {
let xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState === 4 && this.status === 200) {
callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE, xhttp.responseText);
return;
} else if (this.readyState === 4 && this.status === 404) {
callBackFunction({ result: "Fail", message: xhttp.responseText.trim(), code: xhttp.responseText.trim() });
return;
}
};
if (pContentToSend === undefined) {
xhttp.open("GET", pPath, true);
xhttp.send();
} else {
try {
let blob = new Blob([pContentToSend], { type: 'text/plain' });
xhttp.open("POST", pPath, true);
xhttp.send(blob);
} catch (err) {
if (ERROR_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[ERROR] callServer -> err.message = " & err.message); }
callBackFunction({ result: "Fail", message: err.message })
}
}
}
+1 -1
View File
@@ -8,7 +8,7 @@
<link rel="stylesheet" href="font-awasome.css" type="text/css" />
<link rel="shortcut icon" type="image/png/ico" href="Images/favicon.ico" />
<script type="text/javascript" src="WebServer/require.js"></script>
<script type="text/javascript" src="WebServer/AppPreLoader.js"></script>
<script type="text/javascript" src="AppPreLoader.js"></script>
<script src="externalScripts/CCapture.all.min.js"></script>
<!-- Documentation Style Sheets -->