1
0
Fork 0
Commit Graph

551 Commits (3d96fe1e41acbffa615bd64c5b3676172e7c9ff3)

Author SHA1 Message Date
Vasilis Tsiligiannis 3d96fe1e41 Fix YAPF dict formatting
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2021-01-13 20:21:55 +02:00
Corey Shields 5e03f7c759 Epic API (doc) changes for SatNOGS DB
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>
2021-01-09 20:44:19 -05:00
Corey Shields e5ddc38e96 add https back to callback url on auto0
Signed-off-by: Corey Shields <cshields@gmail.com>
2020-12-30 17:53:30 -05:00
Corey Shields d153ece5ef Trying upstream auth0 backend in social_core
Trying the upstream backend against the ssl recursion issue we are seeing in dev.  May back out.

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-12-30 17:16:21 -05:00
Corey Shields a1aafce76b Offer a dynamic API schema view
adds the /api-schema URL which will provide the current API schema in OpenAPI format, both in rendered and downloadable formats.

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-12-29 15:00:08 -05:00
Corey Shields 0fc7107172 Tighter exception handling
Removed most of the bare Exception catches and put proper errors to catch in their place.

Reworked a bit of the gridsquare calculation, any exceptions raised should now be handled within the function.

I am purposefully leaving the 2 W0703's we have for data demodulation alone for now, as that will be quite a rabbit hole. Otherwise,

fixes #316

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-12-29 14:13:12 -05:00
Corey Shields 83f9b07e21 Updates for newer API / django rest framework
Update to Django Rest Framework 3.12.2 with improved schema generation.

However, it is still not quite complete for what we need (and what we currently postprocess for). Instead of postprocessing, this commit introduces our own extended generator to add the missing fields.

Once this is vetted good, we can remove contrib/postprocess-openapi-schema.py 

Also added better comments to api/views.py which will end up in schema docs

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-12-29 07:48:58 -05:00
deckbsd c07696c80e fix satellite structured data
fixes #431

Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-12-19 12:14:02 +00:00
Papadeas Pierros 9e8e1b169f Fix analytics code inclusion
Signed-off-by: Papadeas Pierros <pierros@papadeas.gr>
2020-12-11 13:11:03 +02:00
Vasilis Tsiligiannis 8d60968729 Fix catching of Kaitai decoding exceptions
Kaitai Struct exceptions inherit from 'BaseException' instead of
'Exception' class. This issue is fixed upstream but did not make it
to the release of Kaitai Struct (see PR #53).

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2020-12-08 23:58:57 +02:00
deckbsd 3ccc3ef0fd fix wrong dates showed on last 30 days data graph
Fixes #444

Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-12-03 17:29:35 +01:00
Corey Shields c7772f4c78 Show uplink mode
Show the uplink mode in the transmitter card when it exists.

Fixes #437

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-11-14 08:57:57 -05:00
Vasilis Tsiligiannis b98cb87f4d sentry: Set release from version
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2020-10-31 00:59:34 +02:00
Vasilis Tsiligiannis d435eef416 sentry: Set environment tag
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2020-10-31 00:02:04 +02:00
Corey Shields b44b618c04 set TLE object relationship to NULL when satellite is deleted
Changes CASCADE to SET_NULL when upstream satellite object is deleted, preserving the TLE history in DB. 

Tested locally with a deletion

Fixes #435

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-10-11 10:13:07 -04:00
Corey Shields 2400c6b4f6 Add sorting by status to satellites view
Adds the ability to sort on the 'status' column (which today does nothing) by setting the field by which datatables will sort on to sat.status

This also has the benefit of filtering on sat.status as well, though one would need to know the backend statuses to use (ie: 'alive' vs 'dead'). Not sure that is ideal but this is a quick fix.

Fixes #428 

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-10-11 09:51:45 -04:00
Corey Shields a653f0697c Fix export last week bug
As reported in #433 there was a bug causing export requests for the last week to be treated as a last month export.

Fixes #433 by treating the period variable as the int that it is. Also makes the preceding check a little easier to understand by being explicit against the None case. 

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-10-11 08:57:07 -04:00
Fabian P. Schmidt 3ed0d750db transmitters-chart: Show satellite name in tooltip
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-10-08 22:02:08 +02:00
Pierros Papadeas 2835df9553 Add transmitters chart
Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2020-10-03 15:35:16 +03:00
Alfredos-Panagiotis Damkalis 8e52ab8e8d Update last_modified field on LatestTleSet object update
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-30 09:09:58 +03:00
Vasilis Tsiligiannis f85273a592 isort: Fix line length configuration
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2020-09-29 00:19:55 +03:00
Alfredos-Panagiotis Damkalis f53d240f5b Generate observer in DemodData object in api/view
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-28 12:08:21 +03:00
Alfredos-Panagiotis Damkalis 387affac12 Fix AttributeError on decode_data function
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-28 10:06:49 +03:00
Alfredos-Panagiotis Damkalis 2b594d427c Stop triggering signals during DemodData decoding
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-28 04:23:46 +03:00
Alfredos-Panagiotis Damkalis b31d40809f Fix race condition in DemodData decoding
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-27 22:43:44 +03:00
Alfredos-Panagiotis Damkalis ed0a22503d Improve performance when update LatestTleSet entries
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-26 22:55:03 +03:00
Alfredos-Panagiotis Damkalis 815d56a6f8 Ignore set TLE sources from latest TLE calculations
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-25 20:34:29 +03:00
Patrick Dohmen cb0b00e304
Fix wrong break statements and optimize django query
Fixes issue 427

Signed-off-by: Patrick Dohmen <dl4pd@darc.de>
2020-09-25 10:42:44 +02:00
Alfredos-Panagiotis Damkalis 8e2f52a59f Fix datetime format in Tle API endpoint
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-25 04:59:18 +03:00
Patrick Dohmen 1e9b695569 Issue #422: fix character field size
Includes migration.
Fixes issue #422

Signed-off-by: Patrick Dohmen <dl4pd@darc.de>
2020-09-23 16:55:50 +00:00
Alfredos-Panagiotis Damkalis 09e630890f Add absolute path to logo image on 5xx pages
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-23 17:04:40 +03:00
Alfredos-Panagiotis Damkalis a841bd48d5 Add static html pages for 501, 503 and 504 errors
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-23 13:33:27 +03:00
Alfredos-Panagiotis Damkalis 63e1c50f8d Add custom admin save/delete methods for Tle model
As currently the only way to add/delete manually Tle objects is
through admin panel, I've replaced Tle signal receivers with custom
admin save/delete methods in order to trigger updating of
LatestTleSet objects more efficently.

Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-22 22:25:23 +03:00
Alfredos-Panagiotis Damkalis e38fa63079 Add list_filter on LatestTleSet admin view
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-22 22:18:17 +03:00
Alfredos-Panagiotis Damkalis 87d5329c36 Fix tle_source field in satellite view template
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-22 22:18:17 +03:00
Patrick Dohmen 6dd9bff360
Move signal handlers to separate files
Signed-off-by: Patrick Dohmen <dl4pd@darc.de>
2020-09-22 21:02:46 +02:00
Patrick Dohmen 2ef400acf9
Add task to decode a currently stored frame
Signed-off-by: Patrick Dohmen <dl4pd@darc.de>
2020-09-22 21:02:46 +02:00
Alfredos-Panagiotis Damkalis 6a12f76a26 Remove LatestTle model and introduce LatestTleSet model
LatestTle model was a proxy model on Tle one, using it for API adds a
significant delay to respond on the API requests. For this reason
LatestTle model is removed and LatestTleSet model takes its place.

LatestTleSet is updated asynchronously and keeping references to
latest TLE sets of Tle model. This allows to retrieve the TLE sets
faster.

Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-22 17:37:55 +03:00
Alfredos-Panagiotis Damkalis ae48ac7008 Move app's signals and methods to seperate file
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-22 17:23:29 +03:00
Alfredos-Panagiotis Damkalis 74fd41b2a8 Remove Tle model constaint
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-22 17:23:18 +03:00
Alfredos-Panagiotis Damkalis e27fbb09b9 Add status "future" migration
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-21 19:17:54 +03:00
Pierros Papadeas 5c01c5d72b Add satellite status 'future'
fixes issue 409

Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2020-09-21 18:26:13 +03:00
Alfredos-Panagiotis Damkalis 45eb948f57 Add button to update TLE sets in Tle admin panel
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-18 04:47:35 +03:00
Alfredos-Panagiotis Damkalis 816ab8cd49 Add 'norad_follow_id' field to Satellite model
The 'norad_follow_id' field is used for aquiring TLE sets for a
satellite with a temporary NORAD ID.

Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-17 20:35:44 +03:00
Alfredos-Panagiotis Damkalis 09bb5b0875 Remove satellite TLE fields in favor of Tle model
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-15 21:05:43 +03:00
Alfredos-Panagiotis Damkalis dd10892eaf Use new model for TLE sets
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-15 21:05:43 +03:00
Vasilis Tsiligiannis 37cc41d86c Make file uploads world readable
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2020-09-14 22:38:18 +03:00
Corey Shields 0dbb1df42d Stats page improvements
Various improvements to the stats page:

Added a legend of top chart items to the footer of bands and modes charts. Fixes #408

Added a (cached) count of decoded frames to the Satellites table. Fixes #400

Added a note about the cached nature of stats. Fixes #403

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-09-12 17:10:06 -04:00
Corey Shields 2e25763185 Make contributor list scrollable
Hooray for success - we have tons of contributors in a 24 hr leaderboard!! Making this fit the screen a bit better and scrollable.

Fixes #402

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-09-12 14:33:45 -04:00
Corey Shields b5dd2eb4ea Fix TLE formatting in Satellite Data tab
Have to make this card a full width, even at col-xl-6 size it can shrink to stretch past the edge of the card. Adjusted a little more to make better visual use of the space as well.

Fixes #426

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-09-12 14:03:45 -04:00