Demo Mode implemented at the UI
This commit is contained in:
1 parent
216dbbc7d2
commit
40772b09af
4 files changed
+42
-1
No files matched your search
+1
-1
@@ -8,7 +8,7 @@ if (process.env.PACKAGED_PATH) {
|
||||
exports.newEnvironment = function () {
|
||||
|
||||
let thisObject = {
|
||||
DEMO_MODE: false,
|
||||
DEMO_MODE: true,
|
||||
BASE_PATH: basePath,
|
||||
WEB_SERVER_URL: 'localhost',
|
||||
PLATFORM_WEB_SOCKETS_INTERFACE_PORT: 18041,
|
||||
|
||||
@@ -42,6 +42,13 @@ function newAlgorithmicTradingFunctionLibraryTradingSessionFunctions() {
|
||||
}
|
||||
|
||||
function runSession(node, resume, callBackFunction) {
|
||||
|
||||
if (UI.environment.DEMO_MODE === true) {
|
||||
node.payload.uiObject.setWarningMessage('Superalgos is running is DEMO MODE. This means that you can not RUN Sessions.', 5)
|
||||
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
|
||||
return
|
||||
}
|
||||
|
||||
let validationsResult = validations(node)
|
||||
if (validationsResult === undefined) {
|
||||
/* If something fails at validations we just quit. */
|
||||
@@ -195,6 +202,13 @@ function newAlgorithmicTradingFunctionLibraryTradingSessionFunctions() {
|
||||
}
|
||||
|
||||
function stopSession(node, callBackFunction) {
|
||||
|
||||
if (UI.environment.DEMO_MODE === true) {
|
||||
node.payload.uiObject.setWarningMessage('Superalgos is running is DEMO MODE. This means that you can not STOP Sessions.', 5)
|
||||
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
|
||||
return
|
||||
}
|
||||
|
||||
let validationsResult = validations(node)
|
||||
if (validationsResult === undefined) {
|
||||
/* If something fails at validations we just quit. */
|
||||
|
||||
@@ -90,6 +90,12 @@ function newFoundationsFunctionLibraryTaskFunctions() {
|
||||
|
||||
function runTask(node, isDebugging, callBackFunction) {
|
||||
|
||||
if (UI.environment.DEMO_MODE === true) {
|
||||
node.payload.uiObject.setWarningMessage('Superalgos is running is DEMO MODE. This means that you can not RUN Tasks.', 5)
|
||||
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
|
||||
return
|
||||
}
|
||||
|
||||
let lanNetworkNode = validations(node)
|
||||
if (lanNetworkNode === undefined) {
|
||||
/* This means that the validations failed. */
|
||||
@@ -218,6 +224,13 @@ function newFoundationsFunctionLibraryTaskFunctions() {
|
||||
}
|
||||
|
||||
function stopTask(node, callBackFunction) {
|
||||
|
||||
if (UI.environment.DEMO_MODE === true) {
|
||||
node.payload.uiObject.setWarningMessage('Superalgos is running is DEMO MODE. This means that you can not STOP Tasks.', 5)
|
||||
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
|
||||
return
|
||||
}
|
||||
|
||||
let lanNetworkNode = validations(node)
|
||||
if (lanNetworkNode === undefined) {
|
||||
/* This means that the validations failed. */
|
||||
|
||||
@@ -42,6 +42,13 @@ function newMachineLearningFunctionLibraryLearningSessionFunctions() {
|
||||
}
|
||||
|
||||
function runSession(node, resume, callBackFunction) {
|
||||
|
||||
if (UI.environment.DEMO_MODE === true) {
|
||||
node.payload.uiObject.setWarningMessage('Superalgos is running is DEMO MODE. This means that you can not execute Sessions.', 5)
|
||||
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
|
||||
return
|
||||
}
|
||||
|
||||
let validationsResult = validations(node)
|
||||
if (validationsResult === undefined) {
|
||||
/* If something fails at validations we just quit. */
|
||||
@@ -169,6 +176,13 @@ function newMachineLearningFunctionLibraryLearningSessionFunctions() {
|
||||
}
|
||||
|
||||
function stopSession(node, callBackFunction) {
|
||||
|
||||
if (UI.environment.DEMO_MODE === true) {
|
||||
node.payload.uiObject.setWarningMessage('Superalgos is running is DEMO MODE. This means that you can not STOP Sessions.', 5)
|
||||
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
|
||||
return
|
||||
}
|
||||
|
||||
let validationsResult = validations(node)
|
||||
if (validationsResult === undefined) {
|
||||
/* If something fails at validations we just quit. */
|
||||
|
||||
Reference in new issue
Block a user