Relocating the UI folder

This commit is contained in:
Luis Fernando Molina committed 2021-09-05 10:36:52 +02:00
1 parent cf0e6ebd4f
commit d6f4981278
27 files changed
+17 -21

No files matched your search

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+7 -7
View File
@@ -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':
+1 -1
View File
@@ -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]
+1 -3
View File
@@ -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'
+2 -4
View File
@@ -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'
@@ -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
}
}