-
Notifications
You must be signed in to change notification settings - Fork 0
Feat: Integrate Backend for Experiment Tab #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Uses proxy for port communication, so the server must be running (in Docker). The query period is hardcoded to the last 24 hours for now. It should probably be made to match the time picker's range, or some other optimized solution.
Oops, the example data should fit on the graph now.
|
One additional thing I did was switch to the LTS version of Node (22.20.0), as well as the latest version of npm (11.6.1). Working off the LTS and latest npm version should probably be a standard going forward. That caused a lot of package updates, so I would appreciate if anyone could test this on their end using those versions. The instructions for initializing the client and server are above. Aside from that, I will probably merge soon so everyone can work off of this integrated version. |
Required to view the example datasets. Also more random dependency changes?
ApplePy39
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposed changes do indeed work on my system by following the instructions on the PR.
I couldn't find any bugs.
One minor addition could be to add a requirments.txt file for the /tools folder? That way running a simple 'pip install -r requirements.txt' would install all the necessary python libraries, instead of installing one by one, while also installing specified versions.
|
Thanks Anton!
That's a good suggestion. Just to keep things organized, I'd like to keep this PR focused on the client program - that's good practice to avoid merge conflicts between feature branches like this and the ADCS API one. But, if you know how to make that requirements file, feel free to do so on another branch! I can also look into it later. |
The graphs on the experiment tab now show data from the InfluxDB database, i.e. the frontend now communicates with the backend.
Main changes:
ExperimentTab.jsto see how simple it is. It also has some important features like caching which are not enabled but would be useful in the future./apifolder.api.jscontains the fetch function itself, andexperiment.jstidies up all the fetching needing for the experiment tab into one function.localhost:3000) are proxied (forwarded) to the server (localhost:5000) for development purposes.Next steps:
To test this yourself:
> npm installand> docker compose upin/server/toolsusing Python, then use thebulk_insertcommand andexamples/data_temp.csvandexamples/data_lumin.csvfor the file names.> npm installand> npm startin/clientLet me know if you find bugs or have suggestions.