Comp-490-SeniorProject / site

MIT License
0 stars 1 forks source link

Build component for calendar/schedule page #38

Open mndzamel opened 2 years ago

mndzamel commented 2 years ago

The plan is to implement the calendar using Bootstrap. I'm assuming there's something built-in for this, or a Bootstrap plugin that makes this easy.

The calendar should display both upcoming tests and tests that ran in the past. Furthermore, there should be a way to easily bring up the form to schedule a new test by clicking on a date in the calendar.

Clicking on a test in the calendar should show information about that test. If it's an old test, it can show the test status, when the test finished, and maybe even the data that resulted from the test. For upcoming tests, it can show the exact time it's going to run, the interval, and which parameter/sensor is being tested. It also has a description, but it'd probably be too much clutter to include that in the calendar. All this data should be available by doing a GET request to the test and test history endpoints. You can refer to the models for them to see what field are available.

It should be possible to delete a test by clicking on any scheduled or past run of it. This just involves sending a DELETE request to the API. For now, this will delete all historic data for that test and delete all scheduled runs. It's not possible to only cancel one run or delete all future runs but keep historic data. That might get implemented later though.

It should be possible to schedule a new test by clicking on the calendar. This should bring up the form for adding a new test. Refer to the test model to see which fields are required and which are optional. Once the form is filled in, there needs to be a POST request to the test endpoint in order to actually create the new test.