Skip to content

Commit

Permalink
comment resloves
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHughes-dev committed Oct 18, 2024
1 parent 5eab532 commit c47f0f8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ As we do not have means to collect context data yet, we use a dummy context with

This react-strap based website is responsible for gathering all context and data relating to the bikes and all events<br>

Ideally, mechies will just download the files and run it on their computer. This includes running both the website and backend api that goes along with it.<br>
Ideally, MECE's will just download the files and run it on their computer. This includes running both the website and backend api that goes along with it.<br>

In the future, I hope to host at least the backend restful api, and eventually the website itself, on a web server, but that is not going to happen for a long time. To anyone that works on this in the future, if this message is still here, that means I never went back and fixed the mess I made, and for that I sincerely apologize for. This was meant to be quick and dirty, but I attempted to follow best practices and self document the code where I could. <br>

Expand Down
2 changes: 2 additions & 0 deletions TelemetrySite/client/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Route, Routes, BrowserRouter as Router } from "react-router-dom";
import ContextForm from "./contextForm/ContextForm"; // Import other components
import DataUpload from "./DataUpload/DataUpload";
import "./App.css";
import Page404 from "./404/404";
import { CheckServerStatus } from "./ServerCall";
Expand Down Expand Up @@ -46,6 +47,7 @@ function App() {
{ServerStatus ? (
<Routes>
<Route path='/' element={<ContextForm />} />

<Route path='*' element={<Page404 />} />
</Routes>
) : null}
Expand Down
4 changes: 4 additions & 0 deletions TelemetrySite/client/src/contextForm/ContextForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import "./ContextForm.css";
import ContextJSONIdValues from "./jsonFiles/ContextForm.json";
//all elements to have as input field and their properties
import ContextJSONFormElements from "./jsonFiles/FormElementFormat.json";
import { useNavigate } from "react-router-dom";

/**
* Create needed context forms. Return the configured elements
Expand Down Expand Up @@ -94,6 +95,7 @@ function ContextForm() {

let FormId = "ContextForm";

let navigate = useNavigate();
/* -------------------------------------------------------------------------- */
/* ----------------------------- Const Functions ---------------------------- */
/* -------------------------------------------------------------------------- */
Expand Down Expand Up @@ -326,6 +328,8 @@ function ContextForm() {
PostContextData(collectedData).then((result) => {
if (result) {
document.getElementById(FormId).reset();
//switch to new screen
navigate("/DataUpload");
} else {
throw new Error("An error has occurred while submitting data");
}
Expand Down
4 changes: 2 additions & 2 deletions TelemetrySite/server/Context/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ def put(self):

def post(self):


#setup later to adjust data
return jsonify(["Post Called"])

def delete(self):


#setup later to deactivate data
return jsonify(["Delete Called"])


Expand Down

0 comments on commit c47f0f8

Please sign in to comment.