I've decided to change things up in API schema and doc generation.
Work is not quite complete but its enough for testing in dev and feedback.
Major changes:
* Renaming of api.view classes to match ViewSet inheritance (minor annoyance)
* Introduce drf-spectacular for schema generation and doc UI via swagger-ui
* lots of doc changes for the API to provide a good experience with the above.
New schema generation should work seamlessly in gitlab ci, as well as via /api/schema dynamically.
The new swagger ui view is available via /api/schema/docs/
Signed-off-by: Corey Shields <cshields@gmail.com>
Relates to #233Fixes#364
More improvements to the transmitter submission process to auto-convert PPB to Hz and back, as well as popover.js tooltips from help_text in the model.
Signed-off-by: Corey Shields <cshields@gmail.com>
Re-implementing the case-on-type of the prior db UI.
To keep CSP happy along with the fact that we dynamically load the modal with django-bootstrap-modal, the javascript for these modals is in a new file, and that file's hash is kept in the CSP.
Also re-introduces child_src to test fixing a safari mapbox bug
Relates to #233Fixes#387
Initial commit of new UI. There is still some work to be done before this goes into dev, but here is the work so far:
* Updated dependencies to latest 2.x django
* Updated to Bootstrap 4
* New home screen to display most recent satellite entries, most recent data, and contributors
* Adopted django-bootstrap-modal-forms for handling satellite and transmitter creation and update, with more of an emphasis on django's model/view/form model - and a dynamic flow where the modals and details are only loaded when the proper icon is clicked, reducing the overall page size
* Adopted AdminLTE 3.x framework atop Bootstrap 4
* Created reusable cards for satellite and transmitters
* Cards and Modals are organized into subdirectories for template includes and base templates, respectively
* New stats display widgets using BS4 and AdminLTE 3
* Satellite search is redesigned and now accessible from any page of the site
* Introduced datatables for an "All Satellites" view and a modification of the new "All Transmitters" view
* Focus on all UI scaling down to mobile devices
* New model created for Operator (/ Owner): name, names, description, website
* Added django-countries for support of CountryField
* Satellite model expanded to include: Operator, (satellite) website, countries, launched datetime, deployed datetime
* Transmitter suggestions can now be approved in the UI by superusers
* Satellite entries can now be edited in the UI by users with the change satellite permission
* Satellite page is now broken into 'tabbed' panels (Profile, Map, Transmitters, etc) - with the tab menu options appearing in the sidebar or at the top depending on screen size
* Other cleanup and changes that I'm missing for sure.
Signed-off-by: Corey Shields <cshields@gmail.com>
API endpoints that are behind authentication check, are now
accessible by logged in users.
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
Fix some spacing issues and import syntax introduced by my linting changes.
The inline pylint disable for C0412 clashes with isort, there is no combination there that works for both.
Signed-off-by: Corey Shields <cshields@gmail.com>
There are clashes between the positioning and ordering of our imports between pylint and isort, just ignoring them on the pylint side for now..
Signed-off-by: Corey Shields <cshields@gmail.com>
This makes static files and templates source paths relative to the
application instead of current working directory.
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
Introduces the following:
- decoding of DemodData through decoders that are compiled from kaitai structs and stored in base/decoders/*.py
- storage of the decoded data will either be in the payload_decoded field (default) or into influxdb if USE_INFLUX=True and the proper settings are met
- A scheduled task is set */15 to look for the last 4 hours of submitted frames for anything not decoded, and then decodes it. (we will want to tweak these numbers as we get a good feel for any race conditions that may occur)
- 2 new commands in the admin console, one that will reset all decoded data for a satellite, and another that will trigger decoding of all frames in the db for a satellite. These could be useful when making fixes or improvements to a decoder, or when a new decoder is initially added to the db.