diff --git a/Images/Bands-Banner.png b/Images/Bands-Banner.png new file mode 100644 index 000000000..02ceca94b Binary files /dev/null and b/Images/Bands-Banner.png differ diff --git a/Images/Default-Banner.png b/Images/Default-Banner.png new file mode 100644 index 000000000..448df61e2 Binary files /dev/null and b/Images/Default-Banner.png differ diff --git a/Images/Histogram-Banner.png b/Images/Histogram-Banner.png new file mode 100644 index 000000000..448df61e2 Binary files /dev/null and b/Images/Histogram-Banner.png differ diff --git a/Images/Icons/style-01/chart-point.png b/Images/Icons/style-01/chart-point.png index 01453bbae..9069eee60 100644 Binary files a/Images/Icons/style-01/chart-point.png and b/Images/Icons/style-01/chart-point.png differ diff --git a/Images/Icons/style-01/data-entry.png b/Images/Icons/style-01/data-entry.png new file mode 100644 index 000000000..47f1740f8 Binary files /dev/null and b/Images/Icons/style-01/data-entry.png differ diff --git a/Images/Icons/style-01/data-formula.png b/Images/Icons/style-01/data-formula.png new file mode 100644 index 000000000..58eca845b Binary files /dev/null and b/Images/Icons/style-01/data-formula.png differ diff --git a/Images/Icons/style-01/plotter-module.png b/Images/Icons/style-01/plotter-module.png index bcbc7a4bc..476f02301 100644 Binary files a/Images/Icons/style-01/plotter-module.png and b/Images/Icons/style-01/plotter-module.png differ diff --git a/Images/Icons/style-01/plotter-panel.png b/Images/Icons/style-01/plotter-panel.png index affa8253a..001875359 100644 Binary files a/Images/Icons/style-01/plotter-panel.png and b/Images/Icons/style-01/plotter-panel.png differ diff --git a/Images/Icons/style-01/shapes.png b/Images/Icons/style-01/shapes.png index 761c16f1d..67644126d 100644 Binary files a/Images/Icons/style-01/shapes.png and b/Images/Icons/style-01/shapes.png differ diff --git a/Images/Moving-Average-Banner.png b/Images/Moving-Average-Banner.png new file mode 100644 index 000000000..6fdd07e01 Binary files /dev/null and b/Images/Moving-Average-Banner.png differ diff --git a/Images/Oscilator-Banner.png b/Images/Oscilator-Banner.png new file mode 100644 index 000000000..de16667cc Binary files /dev/null and b/Images/Oscilator-Banner.png differ diff --git a/index.html b/index.html index bbaffdf5f..235a84671 100644 --- a/index.html +++ b/index.html @@ -28,7 +28,7 @@ sessionToken: '', visible: true, topMargin: 60, - urlPrefix: 'http://localhost:VIRTUAL_PORT/', + urlPrefix: 'http://localhost:WEB_SERVER_PORT/', graphQL: { masterAppApiUrl: 'https://demo-api-dev.superalgos.org/graphql', }, diff --git a/server.js b/server.js index 367d80b05..3de831252 100644 --- a/server.js +++ b/server.js @@ -32,8 +32,25 @@ global.CUSTOM_FAIL_RESPONSE = { message: 'Custom Message' } +let port = process.env.WEB_SERVER_PORT + +process.on('uncaughtException', function (err) { + if (err.message.indexOf("EADDRINUSE") > 0) { + console.log("Superalgos Web Server cannot be started. Reason: the port " + port + " is already in use by another application. The web server cannot be started until either you stop the other application or you change the port number at the WebServer/.env file for an unused one. (variable name WEB_SERVER_PORT)") + return + } + console.log('[ERROR] Web Server -> server -> uncaughtException -> err.message = ' + err.message) + console.log('[ERROR] Web Server -> server -> uncaughtException -> err.stack = ' + err.stack) + process.exit(1) +}) + +process.on('unhandledRejection', (reason, p) => { + console.log('[ERROR] Web Server -> server -> unhandledRejection -> reason = ' + JSON.stringify(reason)) + console.log('[ERROR] Web Server -> server -> unhandledRejection -> p = ' + JSON.stringify(p)) + process.exit(1) +}) + let http = require('http') -let port = process.env.VIRTUAL_PORT || 1337 let isHttpServerStarted = false let cloneExecutorChildProcess @@ -49,8 +66,8 @@ function startHtttpServer () { open('http://localhost:' + port) console.log('Web Server Started.') } - } catch (err) { - console.log('[ERROR] server -> startHtttpServer -> Error = ' + err.stack) + } catch (err) { + console.log('[ERROR] server -> startHtttpServer -> Error = ' + err.stack) } } @@ -426,7 +443,7 @@ function onBrowserRequest (request, response) { try { let fileContent = file.toString() - fileContent = fileContent.replace('VIRTUAL_PORT', process.env.VIRTUAL_PORT) + fileContent = fileContent.replace('WEB_SERVER_PORT', process.env.WEB_SERVER_PORT) respondWithContent(fileContent, response) } catch (err) { console.log('[ERROR] server -> onBrowserRequest -> File Not Found: ' + fileName + ' or Error = ' + err.stack)