Merge pull request #1681 from Superalgos/develop
Develop into Plugins Docs
This commit is contained in:
238 files changed
+30494
-10591
No files matched your search
@@ -12,3 +12,4 @@ Projects/Foundations/Icons/Thumbs.db
|
||||
*.exe
|
||||
node_modules
|
||||
launch.json
|
||||
.idea
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "C:\\Superalgos"
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"search.maintainFileSearchCache": true
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -10,6 +10,7 @@
|
||||
"**/Data-Storage": true,
|
||||
"**/Documentation": true,
|
||||
"**/Log-Files": true,
|
||||
"**/node_modules": true,
|
||||
"**/Deprecated-Code": true
|
||||
},
|
||||
"search.maintainFileSearchCache": true
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
<h2 id="trading-engine">Trading Engine</h2>
|
||||
|
||||
<table class="definitionTable"><tr><td>
|
||||
|
||||
<img src="images/icons/nodes/png150/trading-engine.png" />
|
||||
|
||||
</td><td>
|
||||
|
||||
<strong>The trading engine hierarchy is the data structure used by the trading bot to keep runtime information highly accessible and exposed to others.</strong>
|
||||
|
||||
</td></tr></table>
|
||||
|
||||
<p>You will use this hierarchy for two main purposes:</p>
|
||||
|
||||
<p>The hierarchy exposes—literally—all the information processed by the trading bot, providing a comprehensive feedback loop to trading systems and analysis capabilities to users. The hierarchy exposes—literally—all the information processed by the trading bot, providing a comprehensive feedback loop to trading systems and analysis capabilities to users.</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>To let your trading systems:</strong> This allows strategies to keep track of and react to current and past events—including those involving the exchange, such as orders placed or filled—as the bot is running.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>To keep track of the actions:</strong> By analyzing runtime information, you may gain a detailed understanding of what happens, when, and why, throughout a trading session.</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>The hierarchy exposes—literally—all the information processed by the trading bot, providing a comprehensive feedback loop to trading systems and analysis capabilities to users.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-success">Este callout se usa para resaltar una idea particularmente importante. Algo se sobresale, como una conclusion, o algo por el estilo.</div>
|
||||
|
||||
<p>The hierarchy exposes all the information processed by the trading bot, providing a comprehensive feedback loop to trading systems and analysis capabilities to users. The hierarchy exposes all the information processed by the trading bot, providing a comprehensive feedback loop to trading systems and analysis capabilities to users.</p>
|
||||
|
||||
<div class="alert alert-info" role="alert"><i class="fa fa-info-circle"></i> <b>Note:</b> Esto es una nota, algo noteworthy.</div>
|
||||
|
||||
<div class="alert alert-success" role="alert"><i class="fa fa-check-square-o"></i> <b>Tip:</b> Esto es un tip.</div>
|
||||
|
||||
<div class="alert alert-warning" role="alert"><i class="fa fa-warning"></i> <b>Important:</b> Esto es algo importante.</div>
|
||||
|
||||
<div class="alert alert-danger" role="alert"><i class="fa fa-exclamation-circle"></i> <b>Warning:</b> Esto es una aviso de alerta.</div>
|
||||
|
||||
<h4 id="adding-a-trading-engine-node">Adding a Trading Engine Node</h4>
|
||||
|
||||
<p>Calculo que con este segundo nivel de titulo alcanza.</p>
|
||||
|
||||
<h4 id="este-es-otro-formato-tipico-de-la-doc--trading-engine">Este es otro formato tipico de la doc: Trading Engine</h4>
|
||||
|
||||
<table class="definitionTable"><tr><td>
|
||||
|
||||
<img src="images/icons/nodes/png50/trading-engine.png" />
|
||||
|
||||
</td><td>
|
||||
|
||||
The trading engine hierarchy is the data structure used by the trading bot to keep runtime information highly accessible and exposed to others.
|
||||
|
||||
</td></tr></table>
|
||||
File diff suppressed because it is too large.
Load diff
+51
-4
@@ -11,11 +11,29 @@ exports.newDesktopApp = function newDesktopApp() {
|
||||
let socialGraphService = NT.projects.network.modules.socialGraph.newSocialGraph()
|
||||
await socialGraphService.initialize()
|
||||
*/
|
||||
|
||||
/*
|
||||
Let's start the Network Interfaces
|
||||
This is the Web Sockets client that interacts with the Superalgos Network.
|
||||
*/
|
||||
DK.webSocketsClient = SA.projects.network.modules.webSocketsClient.newNetworkModulesWebSocketsClient()
|
||||
await DK.webSocketsClient.initialize()
|
||||
//DK.webSocketsClient = SA.projects.network.modules.webSocketsClient.newNetworkModulesWebSocketsClient()
|
||||
//await DK.webSocketsClient.initialize()
|
||||
|
||||
/* These are the Network Interfaces by which the UI interacts with the Desktop App.*/
|
||||
//let WEB_SOCKETS_INTERFACE = require('./webSocketsInterface.js')
|
||||
let HTTP_INTERFACE = require('./httpInterface.js')
|
||||
|
||||
/*
|
||||
WEB_SOCKETS_INTERFACE = WEB_SOCKETS_INTERFACE.newWebSocketsInterface()
|
||||
WEB_SOCKETS_INTERFACE.initialize()
|
||||
console.log('Web Sockets Interface ....................................... Listening at port ' + global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT)
|
||||
*/
|
||||
|
||||
HTTP_INTERFACE = HTTP_INTERFACE.newHttpInterface()
|
||||
HTTP_INTERFACE.initialize()
|
||||
console.log('Http Interface .............................................. Listening at port ' + global.env.DESKTOP_HTTP_INTERFACE_PORT)
|
||||
|
||||
return
|
||||
|
||||
|
||||
let queryMessage
|
||||
let query
|
||||
@@ -41,8 +59,37 @@ exports.newDesktopApp = function newDesktopApp() {
|
||||
.then(showProfiles)
|
||||
.catch(onError)
|
||||
|
||||
function showProfiles(profiles) {
|
||||
async function showProfiles(profiles) {
|
||||
console.log(profiles)
|
||||
|
||||
for (let i = 0; i < profiles.length; i++) {
|
||||
let profile = profiles[i]
|
||||
|
||||
/*
|
||||
Test Following Profiles.
|
||||
*/
|
||||
let eventMessage = {
|
||||
eventId: SA.projects.foundations.utilities.miscellaneousFunctions.genereteUniqueId(),
|
||||
eventType: SA.projects.socialTrading.globals.eventTypes.FOLLOW_USER_PROFILE,
|
||||
emitterUserProfileId: DK.TEST_NETWORK_CLIENT_USER_PROFILE_ID,
|
||||
targetUserProfileId: profile.userProfileId
|
||||
}
|
||||
|
||||
let event = {
|
||||
requestType: 'Event',
|
||||
eventMessage: JSON.stringify(eventMessage)
|
||||
}
|
||||
|
||||
await DK.webSocketsClient.sendMessage(
|
||||
JSON.stringify(event)
|
||||
)
|
||||
.then(followAdded)
|
||||
.catch(onError)
|
||||
|
||||
function followAdded() {
|
||||
console.log("User Profile " + profile.userProfileHandle + " followed.")
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
Test Query User Profile Stats.
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,34 @@
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Saira';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: local('Saira Light'), local('Saira-Light'), url(Fonts/Saira.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Saira Condensed';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: local('Saira Condensed Light'), local('SairaCondensed-Light'), url(Fonts/Saira-Condensed.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: segoeui;
|
||||
src: url(Fonts/segoeui.woff) format('woff');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 2px 8px;
|
||||
font-size: 125%;
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
background-color: #bcd643;
|
||||
border-radius: 5px;
|
||||
border-style: outset;
|
||||
border-width: 1px;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Superalgos Desktop</title>
|
||||
<meta name="description" content="Free and Open Source Crypto Social Trading">
|
||||
<link rel="stylesheet" href="main.css" type="text/css" charset="utf-8" />
|
||||
<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="AppPreLoader.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function loadApp() {
|
||||
// Prevent click-jacking
|
||||
try {
|
||||
if (window == window.top || window.chrome && chrome.app && chrome.app.window) {
|
||||
document.documentElement.style.display = 'block'
|
||||
} else {
|
||||
top.location = self.location
|
||||
}
|
||||
} catch (e) { console.error('CJ protection', e) }
|
||||
|
||||
try {
|
||||
loadSuperalgos()
|
||||
} catch (err) {
|
||||
console.log("[ERROR] UI can not be started. Please check that WebServer is running.", err);
|
||||
}
|
||||
}
|
||||
|
||||
function onResize() {
|
||||
try {
|
||||
if (page === undefined) { return }
|
||||
if (page.eventHandler === undefined) { return }
|
||||
if (DISABLE_BROWSER_RESIZE_EVENT === true) { return }
|
||||
page.eventHandler.raiseEvent('Browser Resized')
|
||||
} catch (err) {
|
||||
console.log('Error Resizing. ' + err.stack)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body id="body" onload="loadApp()"
|
||||
onresize="onResize()">
|
||||
Hello World!
|
||||
<div id="masterApp"></div>
|
||||
<div id="canvasApp"></div>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
File renamed without changes.
@@ -0,0 +1,68 @@
|
||||
exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
/*
|
||||
This module represent the HTTP API of the
|
||||
Desktop App. All HTTP request are processed
|
||||
by this module.
|
||||
*/
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
/*
|
||||
We will create an HTTP Server and leave it running forever.
|
||||
*/
|
||||
SA.nodeModules.http.createServer(onHttpRequest).listen(global.env.DESKTOP_HTTP_INTERFACE_PORT)
|
||||
/* Starting the browser now is optional */
|
||||
if (process.argv.includes("noBrowser")) {
|
||||
//Running Client only with no UI.
|
||||
} else {
|
||||
SA.nodeModules.open('http://localhost:' + global.env.DESKTOP_HTTP_INTERFACE_PORT)
|
||||
}
|
||||
}
|
||||
|
||||
function onHttpRequest(httpRequest, httpResponse) {
|
||||
try {
|
||||
let requestPathAndParameters = httpRequest.url.split('?') // Remove version information
|
||||
let requestPath = requestPathAndParameters[0].split('/')
|
||||
let endpointOrFile = requestPath[1]
|
||||
|
||||
switch (endpointOrFile) {
|
||||
case 'Images': // This means the Images folder.
|
||||
{
|
||||
let path = global.env.PATH_TO_CLIENT + '/WebServer/Images/' + requestPath[2]
|
||||
|
||||
if (requestPath[3] !== undefined) {
|
||||
path = path + '/' + requestPath[3]
|
||||
}
|
||||
|
||||
if (requestPath[4] !== undefined) {
|
||||
path = path + '/' + requestPath[4]
|
||||
}
|
||||
|
||||
if (requestPath[5] !== undefined) {
|
||||
path = path + '/' + requestPath[5]
|
||||
}
|
||||
|
||||
path = unescape(path)
|
||||
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithImage(path, httpResponse)
|
||||
}
|
||||
break
|
||||
default:
|
||||
{
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithWebFile(httpResponse, endpointOrFile, global.env.PATH_TO_DESKTOP)
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err.stack)
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-5
@@ -3,19 +3,17 @@ exports.newEnvironment = function () {
|
||||
let thisObject = {
|
||||
WEB_SERVER_URL: 'localhost',
|
||||
CLIENT_WEB_SOCKETS_INTERFACE_PORT: 18041,
|
||||
HTTP_INTERFACE_PORT: 34248,
|
||||
CLIENT_HTTP_INTERFACE_PORT: 34248,
|
||||
PATH_TO_TASK_SERVER: './TaskServer',
|
||||
PATH_TO_DATA_STORAGE: './Data-Storage',
|
||||
PATH_TO_PROJECTS: './Projects',
|
||||
PATH_TO_LOG_FILES: './Log-Files',
|
||||
PATH_TO_PROJECTS_REQUIRED: './Projects',
|
||||
PATH_TO_PROJECT_SCHEMA: '../Projects/ProjectsSchema.json',
|
||||
PATH_TO_UI: './UI',
|
||||
PATH_TO_DATA_FILES: './UI/Data-Files/src',
|
||||
PATH_TO_CLIENT: './Client/',
|
||||
PATH_TO_CLIENT: './Platform',
|
||||
PATH_TO_DEFAULT_WORKSPACE: './Projects/Foundations/Plugins/Workspaces',
|
||||
PATH_TO_MY_WORKSPACES: './My-Workspaces',
|
||||
PATH_TO_FONTS: './Client/WebServer/Fonts'
|
||||
PATH_TO_FONTS: './Platform/WebServer/Fonts'
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
@@ -4,19 +4,19 @@ exports.newEnvironment = function () {
|
||||
WEB_SERVER_URL: 'localhost',
|
||||
CLIENT_WEB_SOCKETS_INTERFACE_PORT: 18041,
|
||||
NETWORK_WEB_SOCKETS_INTERFACE_PORT: 18042,
|
||||
HTTP_INTERFACE_PORT: 34248,
|
||||
CLIENT_HTTP_INTERFACE_PORT: 34248,
|
||||
DESKTOP_HTTP_INTERFACE_PORT: 34249,
|
||||
PATH_TO_TASK_SERVER: './TaskServer',
|
||||
PATH_TO_DATA_STORAGE: './Data-Storage',
|
||||
PATH_TO_PROJECTS: './Projects',
|
||||
PATH_TO_LOG_FILES: './Log-Files',
|
||||
PATH_TO_PROJECTS_REQUIRED: './Projects',
|
||||
PATH_TO_PROJECT_SCHEMA: './Projects/ProjectsSchema.json',
|
||||
PATH_TO_UI: './UI',
|
||||
PATH_TO_DATA_FILES: './UI/Data-Files/src',
|
||||
PATH_TO_CLIENT: './Client/',
|
||||
PATH_TO_CLIENT: './Platform',
|
||||
PATH_TO_DESKTOP: './Desktop',
|
||||
PATH_TO_DEFAULT_WORKSPACE: './Projects/Foundations/Plugins/Workspaces',
|
||||
PATH_TO_MY_WORKSPACES: './My-Workspaces',
|
||||
PATH_TO_FONTS: './Client/WebServer/Fonts'
|
||||
PATH_TO_FONTS: './Platform/WebServer/Fonts'
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
Vendored
+1
@@ -10,6 +10,7 @@
|
||||
"**/Data-Storage": true,
|
||||
"**/Documentation": true,
|
||||
"**/Log-Files": true,
|
||||
"**/node_modules": true,
|
||||
"**/Deprecated-Code": true
|
||||
},
|
||||
"search.maintainFileSearchCache": true
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File diff suppressed because it is too large.
Load diff
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -4,8 +4,7 @@
|
||||
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
finalize: finalize,
|
||||
run: run
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
const WEB_SOCKET = require('ws')
|
||||
@@ -15,15 +14,11 @@
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
|
||||
socketServer = undefined
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
|
||||
}
|
||||
|
||||
function run() {
|
||||
setUpWebSocketServer()
|
||||
setUpWebSocketServer()
|
||||
}
|
||||
|
||||
function setUpWebSocketServer() {
|
||||
@@ -47,8 +42,8 @@
|
||||
if (LOG_INFO === true) {
|
||||
console.log('Message Received: ' + message.substring(0, 1000))
|
||||
}
|
||||
|
||||
let messageArray = message.split('|*|')
|
||||
|
||||
let messageArray = message.toString().split('|*|')
|
||||
|
||||
let origin = messageArray[0]
|
||||
let nonce = messageArray[1]
|
||||
@@ -6,71 +6,71 @@ global.env = ENVIRONMENT_MODULE
|
||||
|
||||
process.on('uncaughtException', function (err) {
|
||||
if (err.message && err.message.indexOf("EADDRINUSE") > 0) {
|
||||
console.log("A Superalgos Client cannot be started. Reason: the port configured migth be being used by another application.")
|
||||
console.log("The Superalgos Platform Client cannot be started. Reason: the port configured migth be being used by another application, or Superalgos Platform Client might be already running.")
|
||||
return
|
||||
}
|
||||
console.log('[ERROR] Client -> client-> uncaughtException -> err.message = ' + err.message)
|
||||
console.log('[ERROR] Client -> client-> uncaughtException -> err.stack = ' + err.stack)
|
||||
console.log('[ERROR] Client -> client-> uncaughtException -> err = ' + err)
|
||||
console.log('[ERROR] Platform App -> uncaughtException -> err.message = ' + err.message)
|
||||
console.log('[ERROR] Platform App -> uncaughtException -> err.stack = ' + err.stack)
|
||||
console.log('[ERROR] Platform App -> uncaughtException -> err = ' + err)
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
process.on('unhandledRejection', (reason, p) => {
|
||||
// Signal user that a necissary node module is missing
|
||||
if (reason.code == 'MODULE_NOT_FOUND') {
|
||||
console.log("[ERROR] Dependency library not found. Please try running the 'node setup' command and then restart the Client.")
|
||||
console.log('[ERROR] Client -> client-> reason = ' + JSON.stringify(reason))
|
||||
console.log("[ERROR] Dependency library not found. Please try running the 'node setup' command and then restart the Superalgos Platform Client.")
|
||||
console.log('[ERROR] Platform App -> reason = ' + JSON.stringify(reason))
|
||||
process.exit(1)
|
||||
}
|
||||
console.log('[ERROR] Client -> client-> unhandledRejection -> reason = ' + JSON.stringify(reason))
|
||||
console.log('[ERROR] Client -> client-> unhandledRejection -> p = ' + JSON.stringify(p))
|
||||
console.log('[ERROR] Platform App -> unhandledRejection -> reason = ' + JSON.stringify(reason))
|
||||
console.log('[ERROR] Platform App -> unhandledRejection -> p = ' + JSON.stringify(p))
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
/* Callbacks default responses. */
|
||||
|
||||
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'
|
||||
}
|
||||
|
||||
/* Servers */
|
||||
let WEB_SERVER = require('./webServer.js')
|
||||
let DATA_FILE_SERVER = require('./dataFileServer.js')
|
||||
let PROJECT_FILE_SERVER = require('./projectFileServer.js')
|
||||
let UI_FILE_SERVER = require('./uiFileServer.js')
|
||||
let PLUGIN_SERVER = require('./pluginServer.js')
|
||||
let EVENT_SERVER = require('./eventServer.js')
|
||||
let TASK_MANAGER_SERVER = require('./taskManagerServer.js')
|
||||
let CCXT_SERVER = require('./ccxtServer.js')
|
||||
let WEB3_SERVER = require('./web3Server.js')
|
||||
let GITHUB_SERVER = require('./githubServer.js')
|
||||
|
||||
/* Network Interfaces */
|
||||
let WEB_SOCKETS_INTERFACE = require('./webSocketsInterface.js')
|
||||
let HTTP_INTERFACE = require('./httpInterface.js')
|
||||
|
||||
try {
|
||||
/* Callbacks default responses. */
|
||||
|
||||
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'
|
||||
}
|
||||
|
||||
/* Servers */
|
||||
let WEB_SERVER = require('./Client/webServer.js')
|
||||
let DATA_FILE_SERVER = require('./Client/dataFileServer.js')
|
||||
let PROJECT_FILE_SERVER = require('./Client/projectFileServer.js')
|
||||
let UI_FILE_SERVER = require('./Client/uiFileServer.js')
|
||||
let PLUGIN_SERVER = require('./Client/pluginServer.js')
|
||||
let EVENT_SERVER = require('./Client/eventServer.js')
|
||||
let TASK_MANAGER_SERVER = require('./Client/taskManagerServer.js')
|
||||
let CCXT_SERVER = require('./Client/ccxtServer.js')
|
||||
let WEB3_SERVER = require('./Client/web3Server.js')
|
||||
let GITHUB_SERVER = require('./Client/githubServer.js')
|
||||
|
||||
/* Network Interfaces */
|
||||
let WEB_SOCKETS_INTERFACE = require('./Client/webSocketsInterface.js')
|
||||
let HTTP_INTERFACE = require('./Client/httpInterface.js')
|
||||
|
||||
|
||||
/*
|
||||
The CL object is accesible everywhere at the Superalgos Client.
|
||||
It provides access to all modules built for this Client.
|
||||
@@ -97,13 +97,16 @@ try {
|
||||
*/
|
||||
SA.nodeModules = {
|
||||
fs: require('fs'),
|
||||
nodeFetch: require('node-fetch')
|
||||
nodeFetch: require('node-fetch'),
|
||||
open: require('open'),
|
||||
http: require('http'),
|
||||
ccxt: require('ccxt')
|
||||
}
|
||||
/*
|
||||
Setting up servers running inside this Client.
|
||||
*/
|
||||
CL.servers = {}
|
||||
console.log('CLIENT SERVERS:')
|
||||
console.log('SUPERALGOS PLATFORM CLIENT SERVERS:')
|
||||
console.log('')
|
||||
|
||||
CL.servers.WEB_SERVER = WEB_SERVER.newWebServer()
|
||||
@@ -157,18 +160,16 @@ try {
|
||||
console.log('Github Server ............................................... Started')
|
||||
|
||||
console.log('')
|
||||
console.log('CLIENT INTERFACES:')
|
||||
console.log('SUPERALGOS PLATFORM CLIENT INTERFACES:')
|
||||
console.log('')
|
||||
|
||||
WEB_SOCKETS_INTERFACE = WEB_SOCKETS_INTERFACE.newWebSocketsInterface()
|
||||
WEB_SOCKETS_INTERFACE.initialize()
|
||||
WEB_SOCKETS_INTERFACE.run()
|
||||
console.log('Web Sockets Interface ....................................... Listening at port ' + global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT)
|
||||
|
||||
HTTP_INTERFACE = HTTP_INTERFACE.newHttpInterface()
|
||||
HTTP_INTERFACE.initialize()
|
||||
HTTP_INTERFACE.run()
|
||||
console.log('Http Interface .............................................. Listening at port ' + global.env.HTTP_INTERFACE_PORT)
|
||||
console.log('Http Interface .............................................. Listening at port ' + global.env.CLIENT_HTTP_INTERFACE_PORT)
|
||||
|
||||
console.log('')
|
||||
console.log("You are running Superalgos Beta 11")
|
||||
@@ -188,6 +189,6 @@ try {
|
||||
console.log('')
|
||||
|
||||
} catch (err) {
|
||||
console.log('[ERROR] Client -> Error = ' + err.stack)
|
||||
console.log('[ERROR] Platform App -> Error = ' + err.stack)
|
||||
}
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,190 @@
|
||||
let postLoader
|
||||
|
||||
function newAppLoader() {
|
||||
const MODULE_NAME = 'App Loader'
|
||||
const INFO_LOG = false
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
|
||||
|
||||
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',
|
||||
'AppPostLoader.js'
|
||||
])
|
||||
|
||||
modulesArray = modulesArray.concat(plotters)
|
||||
|
||||
functionLibraries()
|
||||
|
||||
function functionLibraries() {
|
||||
let url = 'ListFunctionLibraries'
|
||||
httpRequest(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 + '/' + 'UI' + '/' + 'Function-Libraries' + '/' + fileName)
|
||||
}
|
||||
|
||||
modulesArray = modulesArray.concat(urlArray)
|
||||
utilities()
|
||||
}
|
||||
}
|
||||
|
||||
function utilities() {
|
||||
let url = 'ListUtilitiesFiles'
|
||||
httpRequest(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 + '/' + 'UI' + '/' + 'Utilities' + '/' + fileName)
|
||||
}
|
||||
|
||||
modulesArray = modulesArray.concat(urlArray)
|
||||
globals()
|
||||
}
|
||||
}
|
||||
|
||||
function globals() {
|
||||
let url = 'ListGlobalFiles'
|
||||
httpRequest(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 + '/' + 'UI' + '/' + 'Globals' + '/' + fileName)
|
||||
}
|
||||
|
||||
modulesArray = modulesArray.concat(urlArray)
|
||||
spaces()
|
||||
}
|
||||
}
|
||||
|
||||
function spaces() {
|
||||
let url = 'ListSpaceFiles'
|
||||
httpRequest(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 = newAppPostLoader()
|
||||
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/Foundations/Candles/Plotters-Candles-Volumes/Candles.js',
|
||||
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/CandlePanel.js',
|
||||
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/Volumes.js',
|
||||
'Plotters/Foundations/Candles/Plotters-Candles-Volumes/VolumePanel.js',
|
||||
'Plotters/Foundations/Bollinger/Plotters-Bollinger-Bands/BollingerBands.js',
|
||||
'Plotters/Foundations/Bollinger/Plotters-Bollinger-Bands/BollingerBandsPanel.js',
|
||||
'Plotters/Foundations/Bollinger/Plotters-Bollinger-Bands/PercentageBandwidth.js'
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -2,7 +2,7 @@
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Superalgos</title>
|
||||
<title>Superalgos Platform</title>
|
||||
<meta name="description" content="Free and Open Source Crypto Trading Tools">
|
||||
<link rel="stylesheet" href="main.css" type="text/css" charset="utf-8" />
|
||||
<link rel="stylesheet" href="credits.css" type="text/css" charset="utf-8" />
|
||||
@@ -18,11 +18,8 @@
|
||||
<script src="externalScripts/CCapture.all.min.js"></script>
|
||||
<script src="externalScripts/prism.js"></script>
|
||||
|
||||
<!-- Documentation Style Sheets -->
|
||||
<!-- -->
|
||||
|
||||
<script type="text/javascript">
|
||||
function loadCanvas() {
|
||||
function loadApp() {
|
||||
// Prevent click-jacking
|
||||
try {
|
||||
if (window == window.top || window.chrome && chrome.app && chrome.app.window) {
|
||||
@@ -109,7 +106,7 @@
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body id="body" onload="loadCanvas()"
|
||||
<body id="body" onload="loadApp()"
|
||||
style="overflow:hidden; background: url(Images/superalgos-platform.jpg); background-size: cover;"
|
||||
onresize="onResize()">
|
||||
<div id="splash-text" class="credits">
|
||||
File diff suppressed because it is too large.
Load diff
+566
-418
File diff suppressed because it is too large.
Load diff
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "client",
|
||||
"version": "0.0.6",
|
||||
"description": "BackendServer",
|
||||
"main": "client.js",
|
||||
"name": "Superalgos-Plarform",
|
||||
"version": "0.0.11",
|
||||
"description": "Superalgos Plarform",
|
||||
"main": "PlatformApp.js",
|
||||
"author": {
|
||||
"name": "Luis-Fernando-Molina"
|
||||
},
|
||||
@@ -14,11 +14,11 @@
|
||||
"ethereumjs-tx": "^2.1.2",
|
||||
"ethers": "^5.4.4",
|
||||
"lookpath": "^1.2.2",
|
||||
"node-fetch": "2.6.1",
|
||||
"open": "^6.4.0",
|
||||
"node-fetch": "^2.6.1",
|
||||
"open": "^8.2.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"simple-git": "^2.42.0",
|
||||
"web3": "^1.5.0",
|
||||
"ws": "^7.4.6"
|
||||
"web3": "^1.5.2",
|
||||
"ws": "^8.2.1"
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,8 @@
|
||||
{
|
||||
"language": "ES",
|
||||
"text": "La jerarquía del tutorial presenta una disposición libre de los nodos Tutorial Topic y Tutorial Step que componen un tutorial. Cada nodo de la jerarquía, incluido el nodo del tutorial principal, representa una página HTML que puede superponerse en la parte superior de ambos Design Space y el Charting Space.",
|
||||
"updated": 1627245866146
|
||||
"updated": 1627245866146,
|
||||
"style": "Definition"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -285,8 +286,8 @@
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "The page property is where you define which Docs Page must be loaded. You must specify the Project, the Docs Page Category, and the \"type\" which is the complete name of the page. The optional property anchor allows you to points the user to a specific paragraph in the page with the Docs Anchor Style.",
|
||||
"updated": 1617649332425
|
||||
"text": "The page property is where you define which Docs Page must be loaded. You must specify the Project, the Docs Page Category, and the \"type\" which is the complete name of the page. The optional property anchor allows you to point the user to a specific paragraph in the page with the Docs Anchor Style.",
|
||||
"updated": 1630752089891
|
||||
},
|
||||
{
|
||||
"style": "Json",
|
||||
|
||||
@@ -720,7 +720,7 @@ function newEducationTutorialSpace() {
|
||||
}
|
||||
|
||||
function makeVsible() {
|
||||
const HEIGHT = 650
|
||||
const HEIGHT = 675
|
||||
const WIDTH = 400
|
||||
const MARGIN = 100
|
||||
const FORM_HEIGHT = 40
|
||||
|
||||
Loaded 100 of 238 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user