Comp-490-SeniorProject / site

MIT License
0 stars 1 forks source link

Build component for device overview page #37

Open mndzamel opened 2 years ago

mndzamel commented 2 years ago

The device overview shows some information about every registered device of a user. For the frontend, you'll probably want to paginate the overview in case there are lots of devices registered. You're welcome to use any other alternative to pagination to handle that if you wish.

Base on the mock-up, the info should include the following:

I also have ideas for including the following info:

The API may not support all of this yet, but here's the projected workflow:

  1. Make a GET request to retrieve a list of devices for the currently logged-in user.
    • The endpoint is authenticated and will be configured to implicitly return data for the current user (i.e. you won't have to tell it the user for which you want data; it'll already know hopefully)
  2. Make a GET request to the tests endpoint to retrieve tests for a device.
  3. Calculate the next scheduled time for each test and figure out which one is the closest to the current time.
  4. Make a GET request to the test history endpoint for each sensor of a device to retrieve the most recent value.