Environment reaching the UI at the Platform
This commit is contained in:
1 parent
bd9fa1d162
commit
216dbbc7d2
5 files changed
+28
-7
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -4,7 +4,7 @@ function newAppPostLoader() {
|
||||
const MODULE_NAME = 'Post Loader'
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
|
||||
|
||||
|
||||
let thisObject = {
|
||||
start: start
|
||||
@@ -14,9 +14,18 @@ function newAppPostLoader() {
|
||||
|
||||
function start() {
|
||||
try {
|
||||
|
||||
|
||||
// autoSaveWhenClosingTheBrowser()
|
||||
setupProjectsSchema()
|
||||
setupEnvironment()
|
||||
|
||||
function setupEnvironment() {
|
||||
httpRequest(undefined, 'Environment', onResponse)
|
||||
|
||||
function onResponse(err, file) {
|
||||
UI.environment = JSON.parse(file)
|
||||
setupProjectsSchema()
|
||||
}
|
||||
}
|
||||
|
||||
function setupProjectsSchema() {
|
||||
httpRequest(undefined, 'ProjectsSchema', onResponse)
|
||||
|
||||
@@ -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
@@ -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('')
|
||||
|
||||
|
||||
Reference in new issue
Block a user