Skip to content
Snippets Groups Projects
Commit 2a43eef1 authored by Matthias Bodenbenner's avatar Matthias Bodenbenner
Browse files

reverted all path changes

parent 8d2e7234
Branches
No related tags found
No related merge requests found
Pipeline #521256 failed
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"main": "index.tsx", "main": "index.tsx",
"author": "Matthias Bodenbenner", "author": "Matthias Bodenbenner",
"license": "MIT", "license": "MIT",
"homepage": "https://soil.cluster.wzl-mq.rwth-aachen.de/", "homepage": "https://iot.wzl-mq.rwth-aachen.de/soil/",
"dependencies": { "dependencies": {
"@emotion/react": "^11.10.5", "@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5", "@emotion/styled": "^11.10.5",
......
...@@ -22,12 +22,12 @@ function App(): JSX.Element { ...@@ -22,12 +22,12 @@ function App(): JSX.Element {
// Load demo projects if there are no projects and the demo mode is enabled // Load demo projects if there are no projects and the demo mode is enabled
useEffect(() => { useEffect(() => {
if (Object.keys(projects).length === 0 && DEMO_MODE) { if (Object.keys(projects).length === 0 && DEMO_MODE) {
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])))
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])))
fetch("/lasertracker.soil").then(file => file.text()).then(lasertracker => { fetch("/soil/lasertracker.soil").then(file => file.text()).then(lasertracker => {
fetch("/base_stations.soil").then(file2 => file2.text()).then(base_stations => { fetch("/soil/base_stations.soil").then(file2 => file2.text()).then(base_stations => {
fetch("/mobile_entities.soil").then(file3 => file3.text()).then(mobile_entities => { fetch("/soil/mobile_entities.soil").then(file3 => file3.text()).then(mobile_entities => {
fetch("/utils.soil").then(file4 => file4.text()).then(utils => { 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])) dispatch(addTextModel(["Lasertracker", "lasertracker", lasertracker, "mobile_entities", mobile_entities, "base_stations", base_stations, "utils", utils]))
}) })
}) })
......
...@@ -2,8 +2,11 @@ export const DEMO_MODE = true; ...@@ -2,8 +2,11 @@ export const DEMO_MODE = true;
export const EXPERIMENTAL_MODE = true; export const EXPERIMENTAL_MODE = true;
export const DB_DISABLED = true; export const DB_DISABLED = true;
export const DEV_MODE = process.env.NODE_ENV === 'development'; 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 BASE_URL = DEV_MODE ? "http://localhost:3000" : "https://iot.wzl-mq.rwth-aachen.de/soil";
export const DATA_BACKEND = DEV_MODE ? "http://localhost:8402" : "https://soil-data.cluster.wzl-mq.rwth-aachen.de" // export const BASE_URL = DEV_MODE ? "http://localhost:3000" : "https://soil.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 DATA_BACKEND = DEV_MODE ? "http://localhost:8402" : "https://iot.wzl-mq.rwth-aachen.de/soil-data"
// export const SOIL_BACKEND = DEV_MODE ? "https://iot.wzl-mq.rwth-aachen.de/soil-backend" : "https://iot.wzl-mq.rwth-aachen.de/soil-backend" // export const DATA_BACKEND = DEV_MODE ? "http://localhost:8402" : "https://soil-data.cluster.wzl-mq.rwth-aachen.de"
\ No newline at end of file
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
...@@ -10,18 +10,18 @@ export function DemoProjects() { ...@@ -10,18 +10,18 @@ export function DemoProjects() {
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
const addRobotModel = () => { 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 = () => { 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 = () => { const addLaserTrackerModel = () => {
fetch("/../../lasertracker.soil").then(file => file.text()).then(lasertracker => { fetch("/../../soil/lasertracker.soil").then(file => file.text()).then(lasertracker => {
fetch("/../../base_stations.soil").then(file2 => file2.text()).then(base_stations => { fetch("/../../soil/base_stations.soil").then(file2 => file2.text()).then(base_stations => {
fetch("/../../mobile_entities.soil").then(file3 => file3.text()).then(mobile_entities => { fetch("/../../soil/mobile_entities.soil").then(file3 => file3.text()).then(mobile_entities => {
fetch("/../../utils.soil").then(file4 => file4.text()).then(utils => { 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])) dispatch(addTextModel(["Lasertracker", "lasertracker", lasertracker, "mobile_entities", mobile_entities, "base_stations", base_stations, "utils", utils]))
}) })
}) })
......
...@@ -7,7 +7,7 @@ import routes from './routes'; ...@@ -7,7 +7,7 @@ import routes from './routes';
function Router(): JSX.Element { function Router(): JSX.Element {
return ( return (
// Set up the BrowserRouter with the basename // Set up the BrowserRouter with the basename
<BrowserRouter basename={'/'}> <BrowserRouter basename={'/soil/'}>
{/* Use a Switch to render only the first matching route */} {/* Use a Switch to render only the first matching route */}
<Switch> <Switch>
{/* Define a route for each path in the routes array */} {/* Define a route for each path in the routes array */}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment