nycmeshnet / meshdb

A convenient, stable, and sane database for tracking Members and Nodes for use with robots and humans
https://db.mesh.nycmesh.net
MIT License
8 stars 13 forks source link

Add readonly optional fields to fill Device information from UISP API #460

Open WillNilges opened 1 month ago

WillNilges commented 1 month ago

We can add a property decorator on a function on the Device Model object that will let us back certain Device fields with the UISP API. Implementing it this way would mean that doing things like branching in the UI/Admin Panel code based on having this info would be trivial.

Relates to: #404

Andrew-Dickinson commented 1 month ago

We should probably cache the UISP API response JSON in memory on the model object, and only fetch it if needed the first time, rather than making an HTTP call for every field separately

WillNilges commented 1 month ago

383