Post Loader

This commit is contained in:
Luis Fernando Molina committed 2020-10-14 18:18:23 +02:00
1 parent fa326dadb6
commit e660e5f84e
5 files changed
+21 -47

No files matched your search

@@ -25,7 +25,8 @@ function newNodeCloning() {
type: node.type,
name: node.name,
code: node.code,
config: node.config
config: node.config,
project: node.project
}
/* Children Nodes */
@@ -78,7 +79,8 @@ function newNodeCloning() {
type: node.type,
name: node.name,
code: node.code,
config: node.config
config: node.config,
project: node.project
}
/* Children Nodes */
@@ -20,7 +20,8 @@ function newProtocolNode() {
type: node.type,
name: node.name,
code: node.code,
config: node.config
config: node.config,
project: node.project
}
/* Children Nodes */
@@ -216,15 +216,6 @@ function newUiObjectsFromNodes() {
}
function createUiObjectFromNode(node, parentNode, chainParent, positionOffset) {
/* Code needed to Migrante from Beta 5 to Beta 6 a Trading System
if (node.type === 'Take Profit') {
node.type = 'Managed Take Profit'
}
if (node.type === 'Stop') {
node.type = 'Managed Stop Loss'
}
*/
/*
This function can be called with a positionOffset to change the node
saved position and all of its descendants positions as well with an
@@ -323,7 +314,8 @@ function newUiObjectsFromNodes() {
function addUIObject(parentNode, type) {
let object = {
name: 'New ' + type,
type: type
type: type,
project: parentNode.project
}
let parentNodeDefinition = getNodeDefinition(parentNode)
+9 -2
View File
@@ -1,6 +1,14 @@
/* Canvas is the root object that will contain all spaces and everything inside. */
let canvas
let APP_SCHEMA_MAP = new Map()
let APP_SCHEMA_ARRAY = []
let DOC_SCHEMA_MAP = new Map()
let DOC_SCHEMA_ARRAY = []
let CONCEPT_SCHEMA_MAP = new Map()
let CONCEPT_SCHEMA_ARRAY = []
/* User Interface Colors */
const UI_COLOR = {
DARK: "48, 48, 54",
LIGHT: "234, 226, 222",
@@ -20,7 +28,6 @@ const UI_COLOR = {
};
/* User Interface Fonts */
const UI_FONT = {
PRIMARY: "Saira Condensed",
SECONDARY: "Source Code Pro"
+4 -32
View File
@@ -1,15 +1,7 @@
let canvas
let markets
let APP_SCHEMA_MAP = new Map()
let APP_SCHEMA_ARRAY = []
let DOC_SCHEMA_MAP = new Map()
let DOC_SCHEMA_ARRAY = []
let CONCEPT_SCHEMA_MAP = new Map()
let CONCEPT_SCHEMA_ARRAY = []
function newDashboard() {
const MODULE_NAME = 'Dashboard'
function newPostLoader() {
const MODULE_NAME = 'Post Loader'
const ERROR_LOG = true
const logger = newWebDebugLog()
logger.fileName = MODULE_NAME
@@ -52,34 +44,14 @@ function newDashboard() {
if (canvas !== undefined) { canvas.finalize() }
startSuperalgos()
canvas = newCanvas()
canvas.initialize()
}
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] start -> err = ' + err.stack) }
}
}
function startSuperalgos() {
try {
/* For now, we are supporting only one market. */
let market = {
id: 2,
baseAsset: 'USDT',
quotedAsset: 'BTC'
}
markets = new Map()
markets.set(market.id, market)
canvas = newCanvas()
canvas.initialize()
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] startSuperalgos -> err = ' + err.stack) }
}
}
function setBrowserEvents() {
window.onbeforeunload = saveWorkspace