Environment reaching the UI at the Platform

This commit is contained in:
Luis Fernando Molina committed 2021-10-25 12:55:50 +02:00
1 parent bd9fa1d162
commit 216dbbc7d2
5 files changed
+25 -4

No files matched your search

+1
View File
@@ -8,6 +8,7 @@ if (process.env.PACKAGED_PATH) {
exports.newEnvironment = function () {
let thisObject = {
DEMO_MODE: false,
BASE_PATH: basePath,
WEB_SERVER_URL: 'localhost',
PLATFORM_WEB_SOCKETS_INTERFACE_PORT: 18041,
+5 -1
View File
@@ -44,7 +44,11 @@ exports.newHttpInterface = function newHttpInterface() {
let endpointOrFile = requestPath[1]
switch (endpointOrFile) {
case 'Environment':
{
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(global.env), httpResponse)
}
break
case 'WEB3':
{
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
+9
View File
@@ -16,7 +16,16 @@ function newAppPostLoader() {
try {
// autoSaveWhenClosingTheBrowser()
setupEnvironment()
function setupEnvironment() {
httpRequest(undefined, 'Environment', onResponse)
function onResponse(err, file) {
UI.environment = JSON.parse(file)
setupProjectsSchema()
}
}
function setupProjectsSchema() {
httpRequest(undefined, 'ProjectsSchema', onResponse)
+2 -1
View File
@@ -5,7 +5,8 @@ let PROJECTS_SCHEMA
let SCHEMAS_BY_PROJECT = new Map()
/* New Root object*/
let UI = {
projects: {}
projects: {},
environment: {}
}
/* User Interface Colors */
+8 -2
View File
@@ -26,13 +26,14 @@ if (
console.log('')
console.log('TELEGRAM COMMUNITY: https://t.me/superalgoscommunity')
console.log('')
console.log('USAGE: node platform [help] [noBrowser] [minMemo]')
console.log('USAGE: node platform [help] [noBrowser] [minMemo] [demoMode]')
console.log('')
console.log('OPTIONS:')
console.log('')
console.log(' help: Optional. Use it to see this helping information.')
console.log(' noBrowser: Optional. Use it to launch Superalgos Platform Client only. The Superalgos Platform UI will not be loaded.')
console.log(' minMemo: Optional. Use it when your hardware has less than 8 Gb or memory.')
console.log(' demoMode: Optional. Use it to launch Superalgos in Demo Mode. Users will be able to use the UI but not run Tasks.')
console.log('')
console.log('If you are having an error while trying to run the Superalgos Platform Client, consider this:')
@@ -68,7 +69,6 @@ console.log('OPTIONS ACCEPTED:')
console.log('')
let optionsAccepted = 0
if (process.argv.includes("minMemo")) {
optionsAccepted++
console.log('minMemo ..................................................... Running with Minimun Required Memory.')
@@ -79,9 +79,15 @@ if (process.argv.includes("noBrowser")) {
console.log('noBrowser ................................................... Running without User Interface.')
}
if (process.argv.includes("demoMode")) {
optionsAccepted++
console.log('demoMode .................................................... Running without User Interface.')
}
if (optionsAccepted === 0) {
console.log('none ........................................................ Running without any command line options.')
}
console.log('')
console.log('')