Merge pull request #2641 from Luis-Fernando-Molina/develop
Contribution: Demo Mode Improvements
This commit is contained in:
5 files changed
+21
-2
No files matched your search
@@ -9,6 +9,7 @@ exports.newEnvironment = function () {
|
||||
|
||||
let thisObject = {
|
||||
DEMO_MODE: false,
|
||||
DEMO_MODE_HOST: "super-super-uzzdd68dwm9w-22a320db4ede63aa.elb.us-east-2.amazonaws.com",
|
||||
BASE_PATH: basePath,
|
||||
WEB_SERVER_URL: 'localhost',
|
||||
PLATFORM_WEB_SOCKETS_INTERFACE_PORT: 18041,
|
||||
|
||||
@@ -225,6 +225,10 @@ function newEventsServerClient(lanNetworkNode) {
|
||||
port = config.webSocketsPort
|
||||
extwsurl = config.webSocketsExternalURL
|
||||
|
||||
if (UI.environment.DEMO_MODE === true) {
|
||||
host = UI.environment.DEMO_MODE_HOST
|
||||
}
|
||||
|
||||
/* Check if we really have to establish the connection. */
|
||||
if (config.autoConnect === false) { return }
|
||||
} catch (err) {
|
||||
|
||||
@@ -177,6 +177,11 @@ function newPlottersManager() {
|
||||
let scheme = 'http'
|
||||
if (host === undefined) { host = window.location.hostname }
|
||||
if (webPort === undefined) { webPort = window.location.port }
|
||||
|
||||
if (UI.environment.DEMO_MODE === true) {
|
||||
host = UI.environment.DEMO_MODE_HOST
|
||||
}
|
||||
|
||||
if (extWSURL !== undefined) {
|
||||
host = window.location.hostname
|
||||
webPort = window.location.port
|
||||
|
||||
@@ -138,8 +138,13 @@ function newFoundationsCockpitSpace() {
|
||||
statusCounter--
|
||||
if (statusCounter < 0) {
|
||||
statusCounter = 0
|
||||
statusText = undefined,
|
||||
statusType = undefined
|
||||
statusText = undefined
|
||||
statusType = undefined
|
||||
|
||||
if (UI.environment.DEMO_MODE === true) {
|
||||
statusText = 'You are running Superalgos in DEMO MODE. That means that you will not be able to run or stop tasks. Remember Tutorials were designed for the full version, when you download the software.'
|
||||
statusType = STATUS_TYPES.WARNING
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -179,6 +179,10 @@ function newWorkspace() {
|
||||
}
|
||||
|
||||
async function saveWorkspace(callBackFunction) {
|
||||
if (UI.environment.DEMO_MODE === true) {
|
||||
return
|
||||
}
|
||||
|
||||
let workspace = UI.projects.foundations.spaces.designSpace.workspace.workspaceNode
|
||||
|
||||
/* Validation if it is too early to save. */
|
||||
|
||||
Reference in new issue
Block a user