From d6f4981278600a59cfa37f97f29e02d35e8f4468 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 5 Sep 2021 10:36:52 +0200 Subject: [PATCH] Relocating the UI folder --- {UI => Client/UI}/.vscode/settings.json | 0 {UI => Client/UI}/Animation.js | 0 {UI => Client/UI}/AppLoader.js | 0 {UI => Client/UI}/AppPostLoader.js | 0 {UI => Client/UI}/AppPreLoader.js | 0 {UI => Client/UI}/Canvas.js | 0 {UI => Client/UI}/Container.js | 0 {UI => Client/UI}/Data-Files/src/DailyFiles.js | 0 {UI => Client/UI}/Data-Files/src/FileCloud.js | 0 {UI => Client/UI}/Data-Files/src/FileCursor.js | 0 {UI => Client/UI}/Data-Files/src/FileSequence.js | 0 {UI => Client/UI}/Data-Files/src/FileStorage.js | 0 {UI => Client/UI}/Data-Files/src/MarketFiles.js | 0 {UI => Client/UI}/Data-Files/src/SingleFile.js | 0 {UI => Client/UI}/EventHandler.js | 0 {UI => Client/UI}/EventsServerClient.js | 0 {UI => Client/UI}/Frame.js | 0 {UI => Client/UI}/Globals.js | 0 {UI => Client/UI}/ProductStorage.js | 0 {UI => Client/UI}/Utilities.js | 0 {UI => Client/UI}/VideoRecorder.js | 0 {UI => Client/UI}/WebDebugLog.js | 0 Client/httpInterface.js | 14 +++++++------- Desktop/httpInterface.js | 2 +- Environment.js | 4 +--- EnvironmentForDebug.js | 6 ++---- Projects/Foundations/SA/Utilities/HttpResponses.js | 12 ++++++------ 27 files changed, 17 insertions(+), 21 deletions(-) rename {UI => Client/UI}/.vscode/settings.json (100%) rename {UI => Client/UI}/Animation.js (100%) rename {UI => Client/UI}/AppLoader.js (100%) rename {UI => Client/UI}/AppPostLoader.js (100%) rename {UI => Client/UI}/AppPreLoader.js (100%) rename {UI => Client/UI}/Canvas.js (100%) rename {UI => Client/UI}/Container.js (100%) rename {UI => Client/UI}/Data-Files/src/DailyFiles.js (100%) rename {UI => Client/UI}/Data-Files/src/FileCloud.js (100%) rename {UI => Client/UI}/Data-Files/src/FileCursor.js (100%) rename {UI => Client/UI}/Data-Files/src/FileSequence.js (100%) rename {UI => Client/UI}/Data-Files/src/FileStorage.js (100%) rename {UI => Client/UI}/Data-Files/src/MarketFiles.js (100%) rename {UI => Client/UI}/Data-Files/src/SingleFile.js (100%) rename {UI => Client/UI}/EventHandler.js (100%) rename {UI => Client/UI}/EventsServerClient.js (100%) rename {UI => Client/UI}/Frame.js (100%) rename {UI => Client/UI}/Globals.js (100%) rename {UI => Client/UI}/ProductStorage.js (100%) rename {UI => Client/UI}/Utilities.js (100%) rename {UI => Client/UI}/VideoRecorder.js (100%) rename {UI => Client/UI}/WebDebugLog.js (100%) diff --git a/UI/.vscode/settings.json b/Client/UI/.vscode/settings.json similarity index 100% rename from UI/.vscode/settings.json rename to Client/UI/.vscode/settings.json diff --git a/UI/Animation.js b/Client/UI/Animation.js similarity index 100% rename from UI/Animation.js rename to Client/UI/Animation.js diff --git a/UI/AppLoader.js b/Client/UI/AppLoader.js similarity index 100% rename from UI/AppLoader.js rename to Client/UI/AppLoader.js diff --git a/UI/AppPostLoader.js b/Client/UI/AppPostLoader.js similarity index 100% rename from UI/AppPostLoader.js rename to Client/UI/AppPostLoader.js diff --git a/UI/AppPreLoader.js b/Client/UI/AppPreLoader.js similarity index 100% rename from UI/AppPreLoader.js rename to Client/UI/AppPreLoader.js diff --git a/UI/Canvas.js b/Client/UI/Canvas.js similarity index 100% rename from UI/Canvas.js rename to Client/UI/Canvas.js diff --git a/UI/Container.js b/Client/UI/Container.js similarity index 100% rename from UI/Container.js rename to Client/UI/Container.js diff --git a/UI/Data-Files/src/DailyFiles.js b/Client/UI/Data-Files/src/DailyFiles.js similarity index 100% rename from UI/Data-Files/src/DailyFiles.js rename to Client/UI/Data-Files/src/DailyFiles.js diff --git a/UI/Data-Files/src/FileCloud.js b/Client/UI/Data-Files/src/FileCloud.js similarity index 100% rename from UI/Data-Files/src/FileCloud.js rename to Client/UI/Data-Files/src/FileCloud.js diff --git a/UI/Data-Files/src/FileCursor.js b/Client/UI/Data-Files/src/FileCursor.js similarity index 100% rename from UI/Data-Files/src/FileCursor.js rename to Client/UI/Data-Files/src/FileCursor.js diff --git a/UI/Data-Files/src/FileSequence.js b/Client/UI/Data-Files/src/FileSequence.js similarity index 100% rename from UI/Data-Files/src/FileSequence.js rename to Client/UI/Data-Files/src/FileSequence.js diff --git a/UI/Data-Files/src/FileStorage.js b/Client/UI/Data-Files/src/FileStorage.js similarity index 100% rename from UI/Data-Files/src/FileStorage.js rename to Client/UI/Data-Files/src/FileStorage.js diff --git a/UI/Data-Files/src/MarketFiles.js b/Client/UI/Data-Files/src/MarketFiles.js similarity index 100% rename from UI/Data-Files/src/MarketFiles.js rename to Client/UI/Data-Files/src/MarketFiles.js diff --git a/UI/Data-Files/src/SingleFile.js b/Client/UI/Data-Files/src/SingleFile.js similarity index 100% rename from UI/Data-Files/src/SingleFile.js rename to Client/UI/Data-Files/src/SingleFile.js diff --git a/UI/EventHandler.js b/Client/UI/EventHandler.js similarity index 100% rename from UI/EventHandler.js rename to Client/UI/EventHandler.js diff --git a/UI/EventsServerClient.js b/Client/UI/EventsServerClient.js similarity index 100% rename from UI/EventsServerClient.js rename to Client/UI/EventsServerClient.js diff --git a/UI/Frame.js b/Client/UI/Frame.js similarity index 100% rename from UI/Frame.js rename to Client/UI/Frame.js diff --git a/UI/Globals.js b/Client/UI/Globals.js similarity index 100% rename from UI/Globals.js rename to Client/UI/Globals.js diff --git a/UI/ProductStorage.js b/Client/UI/ProductStorage.js similarity index 100% rename from UI/ProductStorage.js rename to Client/UI/ProductStorage.js diff --git a/UI/Utilities.js b/Client/UI/Utilities.js similarity index 100% rename from UI/Utilities.js rename to Client/UI/Utilities.js diff --git a/UI/VideoRecorder.js b/Client/UI/VideoRecorder.js similarity index 100% rename from UI/VideoRecorder.js rename to Client/UI/VideoRecorder.js diff --git a/UI/WebDebugLog.js b/Client/UI/WebDebugLog.js similarity index 100% rename from UI/WebDebugLog.js rename to Client/UI/WebDebugLog.js diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 537bd72e3..b7f5e2296 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1075,17 +1075,17 @@ exports.newHttpInterface = function newHttpInterface() { break case 'LegacyPlotter.js': { - SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + 'WebServer/LegacyPlotter.js', httpResponse) + SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/WebServer/LegacyPlotter.js', httpResponse) } break case 'PlotterPanel.js': { - SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + 'WebServer/PlotterPanel.js', httpResponse) + SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/WebServer/PlotterPanel.js', httpResponse) } break case 'Images': // This means the Images folder. { - let path = global.env.PATH_TO_CLIENT + 'WebServer/Images/' + requestPath[2] + let path = global.env.PATH_TO_CLIENT + '/WebServer/Images/' + requestPath[2] if (requestPath[3] !== undefined) { path = path + '/' + requestPath[3] @@ -1167,12 +1167,12 @@ exports.newHttpInterface = function newHttpInterface() { break case 'WebServer': // This means the WebServer folder. { - SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + 'WebServer/' + requestPath[2], httpResponse) + SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/WebServer/' + requestPath[2], httpResponse) } break case 'externalScripts': // This means the WebServer folder. { - SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + 'WebServer/externalScripts/' + requestPath[2], httpResponse) + SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/WebServer/externalScripts/' + requestPath[2], httpResponse) } break case 'Plotters': // This means the plotter folder, not to be confused with the Plotters script! @@ -1187,12 +1187,12 @@ exports.newHttpInterface = function newHttpInterface() { break case 'ChartLayers': { - SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_UI + '/' + endpointOrFile + '/' + requestPath[2], httpResponse) + SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/UI/' + endpointOrFile + '/' + requestPath[2], httpResponse) } break case 'Files': { - SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_DATA_FILES + '/' + requestPath[2], httpResponse) + SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/UI/Data-Files/src/' + requestPath[2], httpResponse) } break case 'Fonts': diff --git a/Desktop/httpInterface.js b/Desktop/httpInterface.js index 0fb3b12a5..ddbddda7e 100644 --- a/Desktop/httpInterface.js +++ b/Desktop/httpInterface.js @@ -37,7 +37,7 @@ exports.newHttpInterface = function newHttpInterface() { switch (endpointOrFile) { case 'Images': // This means the Images folder. { - let path = global.env.PATH_TO_CLIENT + 'WebServer/Images/' + requestPath[2] + let path = global.env.PATH_TO_CLIENT + '/WebServer/Images/' + requestPath[2] if (requestPath[3] !== undefined) { path = path + '/' + requestPath[3] diff --git a/Environment.js b/Environment.js index a237cf14f..04a9bd49d 100644 --- a/Environment.js +++ b/Environment.js @@ -10,9 +10,7 @@ exports.newEnvironment = function () { PATH_TO_LOG_FILES: './Log-Files', PATH_TO_PROJECTS_REQUIRED: './Projects', PATH_TO_PROJECT_SCHEMA: '../Projects/ProjectsSchema.json', - PATH_TO_UI: './UI', - PATH_TO_DATA_FILES: './UI/Data-Files/src', - PATH_TO_CLIENT: './Client/', + PATH_TO_CLIENT: './Client', PATH_TO_DEFAULT_WORKSPACE: './Projects/Foundations/Plugins/Workspaces', PATH_TO_MY_WORKSPACES: './My-Workspaces', PATH_TO_FONTS: './Client/WebServer/Fonts' diff --git a/EnvironmentForDebug.js b/EnvironmentForDebug.js index d92780a6e..e792280ee 100644 --- a/EnvironmentForDebug.js +++ b/EnvironmentForDebug.js @@ -12,10 +12,8 @@ exports.newEnvironment = function () { PATH_TO_LOG_FILES: './Log-Files', PATH_TO_PROJECTS_REQUIRED: './Projects', PATH_TO_PROJECT_SCHEMA: './Projects/ProjectsSchema.json', - PATH_TO_UI: './UI', - PATH_TO_DATA_FILES: './UI/Data-Files/src', - PATH_TO_CLIENT: './Client/', - PATH_TO_DESKTOP: './Desktop/', + PATH_TO_CLIENT: './Client', + PATH_TO_DESKTOP: './Desktop', PATH_TO_DEFAULT_WORKSPACE: './Projects/Foundations/Plugins/Workspaces', PATH_TO_MY_WORKSPACES: './My-Workspaces', PATH_TO_FONTS: './Client/WebServer/Fonts' diff --git a/Projects/Foundations/SA/Utilities/HttpResponses.js b/Projects/Foundations/SA/Utilities/HttpResponses.js index 987e4f9c7..e14637245 100644 --- a/Projects/Foundations/SA/Utilities/HttpResponses.js +++ b/Projects/Foundations/SA/Utilities/HttpResponses.js @@ -113,9 +113,9 @@ exports.newFoundationsUtilitiesHttpResponses = function () { httpResponse.end('\n') } - function respondWithStyleSheet(httpResponse, path, fileName) { + function respondWithStyleSheet(httpResponse, pathToApp, fileName) { let fs = SA.nodeModules.fs - let filePath = path + 'WebServer/css/' + fileName + let filePath = pathToApp + '/WebServer/css/' + fileName fs.readFile(filePath, onFileRead) function onFileRead(err, file) { @@ -173,7 +173,7 @@ exports.newFoundationsUtilitiesHttpResponses = function () { } } - function respondWithWebFile(httpResponse, fileNameReceived, path) { + function respondWithWebFile(httpResponse, fileNameReceived, pathToApp) { if (fileNameReceived === '') { /* @@ -181,7 +181,7 @@ exports.newFoundationsUtilitiesHttpResponses = function () { */ let fs = SA.nodeModules.fs - let fileName = path + 'WebServer/index.html' + let fileName = pathToApp + '/WebServer/index.html' fs.readFile(fileName, onFileRead) function onFileRead(err, file) { @@ -200,12 +200,12 @@ exports.newFoundationsUtilitiesHttpResponses = function () { switch (fileExtension) { case 'js': { - let path = global.env.PATH_TO_UI + '/' + completeFileName + let path = pathToApp + '/UI/' + completeFileName SA.projects.foundations.utilities.httpResponses.respondWithFile(path, httpResponse) break } case 'css': { - SA.projects.foundations.utilities.httpResponses.respondWithStyleSheet(httpResponse, path, completeFileName) + SA.projects.foundations.utilities.httpResponses.respondWithStyleSheet(httpResponse, pathToApp, completeFileName) break } }