diff --git a/package.json b/package.json index f685e95e2ad441c946d643e20032306756281090..0cb846f47683b384a9e2924d9a18ca86eb7b1cd7 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.tsx", "author": "Matthias Bodenbenner", "license": "MIT", - "homepage": "https://soil.cluster.wzl-mq.rwth-aachen.de/", + "homepage": "https://iot.wzl-mq.rwth-aachen.de/soil/", "dependencies": { "@emotion/react": "^11.10.5", "@emotion/styled": "^11.10.5", diff --git a/src/App.tsx b/src/App.tsx index fee5e3610d964bfed5714897efe962a008100e10..2bce84fda4eda380df63f37bf10f7390cbbc4eac 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -22,12 +22,12 @@ function App(): JSX.Element { // Load demo projects if there are no projects and the demo mode is enabled useEffect(() => { if (Object.keys(projects).length === 0 && DEMO_MODE) { - fetch("/robot.soil").then(e => e.text()).then(e => dispatch(addTextModel(["Robot", "Robot", e]))) - fetch("/monitoring.soil").then(e => e.text()).then(e => dispatch(addTextModel(["Monitoring", "Monitoring", e]))) - fetch("/lasertracker.soil").then(file => file.text()).then(lasertracker => { - fetch("/base_stations.soil").then(file2 => file2.text()).then(base_stations => { - fetch("/mobile_entities.soil").then(file3 => file3.text()).then(mobile_entities => { - fetch("/utils.soil").then(file4 => file4.text()).then(utils => { + fetch("/soil/robot.soil").then(e => e.text()).then(e => dispatch(addTextModel(["Robot", "Robot", e]))) + fetch("/soil/monitoring.soil").then(e => e.text()).then(e => dispatch(addTextModel(["Monitoring", "Monitoring", e]))) + fetch("/soil/lasertracker.soil").then(file => file.text()).then(lasertracker => { + fetch("/soil/base_stations.soil").then(file2 => file2.text()).then(base_stations => { + fetch("/soil/mobile_entities.soil").then(file3 => file3.text()).then(mobile_entities => { + fetch("/soil/utils.soil").then(file4 => file4.text()).then(utils => { dispatch(addTextModel(["Lasertracker", "lasertracker", lasertracker, "mobile_entities", mobile_entities, "base_stations", base_stations, "utils", utils])) }) }) diff --git a/src/const.ts b/src/const.ts index adf5947906f1ce9f0d61f81a0dd7283d5617dd78..c6abe3bd3c99c62a5d5c4e83c9663c46ea1ae54e 100644 --- a/src/const.ts +++ b/src/const.ts @@ -2,8 +2,11 @@ export const DEMO_MODE = true; export const EXPERIMENTAL_MODE = true; export const DB_DISABLED = true; export const DEV_MODE = process.env.NODE_ENV === 'development'; -export const BASE_URL = DEV_MODE ? "http://localhost:3000" : "https://soil.cluster.wzl-mq.rwth-aachen.de"; -export const DATA_BACKEND = DEV_MODE ? "http://localhost:8402" : "https://soil-data.cluster.wzl-mq.rwth-aachen.de" -// export const SOIL_BACKEND = DEV_MODE ? "http://localhost:8001" : "https://iot.wzl-mq.rwth-aachen.de/soil-backend" -export const SOIL_BACKEND = DEV_MODE ? "http://localhost:8412" : "https://soil-backend.cluster.wzl-mq.rwth-aachen.de" -// export const SOIL_BACKEND = DEV_MODE ? "https://iot.wzl-mq.rwth-aachen.de/soil-backend" : "https://iot.wzl-mq.rwth-aachen.de/soil-backend" \ No newline at end of file +export const BASE_URL = DEV_MODE ? "http://localhost:3000" : "https://iot.wzl-mq.rwth-aachen.de/soil"; +// export const BASE_URL = DEV_MODE ? "http://localhost:3000" : "https://soil.cluster.wzl-mq.rwth-aachen.de"; + +export const DATA_BACKEND = DEV_MODE ? "http://localhost:8402" : "https://iot.wzl-mq.rwth-aachen.de/soil-data" +// export const DATA_BACKEND = DEV_MODE ? "http://localhost:8402" : "https://soil-data.cluster.wzl-mq.rwth-aachen.de" + +export const SOIL_BACKEND = DEV_MODE ? "http://localhost:8001" : "https://iot.wzl-mq.rwth-aachen.de/soil-backend" +// export const SOIL_BACKEND = DEV_MODE ? "http://localhost:8412" : "https://soil-backend.cluster.wzl-mq.rwth-aachen.de" \ No newline at end of file diff --git a/src/features/demoProjects/DemoProjects.tsx b/src/features/demoProjects/DemoProjects.tsx index 5446855d80e1c58097825d7678ca4d03753eae27..aedbe0bf43add073a9644c523e1959bfa80fd2b5 100644 --- a/src/features/demoProjects/DemoProjects.tsx +++ b/src/features/demoProjects/DemoProjects.tsx @@ -10,18 +10,18 @@ export function DemoProjects() { const dispatch = useAppDispatch() const addRobotModel = () => { - fetch("/../../robot.soil").then(e => e.text()).then(e => dispatch(addTextModel(["Robot", "Robot", e]))); + fetch("/../../soil/robot.soil").then(e => e.text()).then(e => dispatch(addTextModel(["Robot", "Robot", e]))); } const addMonitoringModel = () => { - fetch("/../../monitoring.soil").then(e => e.text()).then(e => dispatch(addTextModel(["Monitoring", "Monitoring", e]))); + fetch("/../../soil/monitoring.soil").then(e => e.text()).then(e => dispatch(addTextModel(["Monitoring", "Monitoring", e]))); } const addLaserTrackerModel = () => { - fetch("/../../lasertracker.soil").then(file => file.text()).then(lasertracker => { - fetch("/../../base_stations.soil").then(file2 => file2.text()).then(base_stations => { - fetch("/../../mobile_entities.soil").then(file3 => file3.text()).then(mobile_entities => { - fetch("/../../utils.soil").then(file4 => file4.text()).then(utils => { + fetch("/../../soil/lasertracker.soil").then(file => file.text()).then(lasertracker => { + fetch("/../../soil/base_stations.soil").then(file2 => file2.text()).then(base_stations => { + fetch("/../../soil/mobile_entities.soil").then(file3 => file3.text()).then(mobile_entities => { + fetch("/../../soil/utils.soil").then(file4 => file4.text()).then(utils => { dispatch(addTextModel(["Lasertracker", "lasertracker", lasertracker, "mobile_entities", mobile_entities, "base_stations", base_stations, "utils", utils])) }) }) diff --git a/src/router/Router.tsx b/src/router/Router.tsx index 8f819190fae44ed821ed5205c4ae773bf4ac721c..340342ef6540b0fcb34ee3ce1cda51369fa8babc 100644 --- a/src/router/Router.tsx +++ b/src/router/Router.tsx @@ -7,7 +7,7 @@ import routes from './routes'; function Router(): JSX.Element { return ( // Set up the BrowserRouter with the basename - <BrowserRouter basename={'/'}> + <BrowserRouter basename={'/soil/'}> {/* Use a Switch to render only the first matching route */} <Switch> {/* Define a route for each path in the routes array */}