1
0
Fork 0
Commit Graph

72 Commits (da58d39357475a71315bd7726f81107657a080bb)

Author SHA1 Message Date
Alfredos-Panagiotis Damkalis da58d39357 Update to Django 4
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2022-04-16 23:19:15 +03:00
Fabian P. Schmidt 49ee559251 Enable CORS headers for artifact media file requests
Fixes #495.
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2021-10-21 20:09:27 +03:00
Alfredos-Panagiotis Damkalis 283cca5e40 Add CORS headers for artifacts API requests
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-10-19 03:30:34 +03:00
Corey Shields 4141e275cc Improve testing and handling of telemetry upload API
Improved handling of input data for the telemetry API and added tests for such

ensure that we return a 400 on an empty frame, station, timestamp

return 400 when lat/lng value conversion fails or when the resulting lat/lng is
out of range.

Fixes #463

Signed-off-by: Corey Shields <cshields@gmail.com>
2021-05-16 18:54:48 -04:00
Corey Shields 292f1978db Remove old unused auth0login app
Back in d153ece we switched to the upstream backend social_core.backends.auth0.Auth0OAuth2

this commit removes the custom app we had to use for Auth0

Signed-off-by: Corey Shields <cshields@gmail.com>
2021-05-14 20:40:03 -04:00
Corey Shields cbb169e5de package and dependency updates
Upgrade to Django 3.2 LTS

add DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' for Django 3.2

un-pin urllib3 and requests as the newer releases work with auth0 now

Signed-off-by: Corey Shields <cshields@gmail.com>
2021-05-14 20:24:23 -04:00
Alfredos-Panagiotis Damkalis c75b491b9b Replace SatelliteEntry with Satellite in models
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-11 20:27:05 +03:00
Alfredos-Panagiotis Damkalis af2d04a33f Use Satellite model for satellite API endpoint
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-11 20:26:52 +03:00
Alfredos-Panagiotis Damkalis efd5dd1a96 Add setting for enabling ZeroMQ feature
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-02-18 18:04:07 +02:00
Alfredos-Panagiotis Damkalis 8ca9004fc9 Change ZEROMQ_SOCKET_URI to 127.0.0.1
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-01-20 13:40:50 +02:00
Alfredos-Panagiotis Damkalis 4b8239739a Publish new SiDS frames by using a ZeroMQ socket
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-01-20 13:06:29 +02:00
Corey Shields 131831a811 Add version field for demoddata entries
Adds an optional 'version' field which will store version details for clients that are sending it (such as some SiDS clients, even though version is not clearly indicated in the protocol pdf)

I set this as a 45 length CharField, anticipating that there may be some application names, versions, and possible git hashes included as well.

Adds a db migration for this field, blank by default.
 
also removed an unnecessary setting which was default (see !628)

Relates to #456

Signed-off-by: Corey Shields <cshields@gmail.com>
2021-01-19 19:38:54 -05:00
Corey Shields bb24e771d6 minor updates to satnogs-db-api-client
With the new drf-spectacular generated schema, need to add nulltype to the list of requirements to install

update copyright dates

Improve examples and client generated docs via drf-spectacular

Signed-off-by: Corey Shields <cshields@gmail.com>
2021-01-17 11:45:52 -05:00
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
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
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
Vasilis Tsiligiannis 37cc41d86c Make file uploads world readable
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2020-09-14 22:38:18 +03:00
Alfredos-Panagiotis Damkalis e2b916f3ed Add task for fetching and saving TLE sets
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-08-11 15:11:51 +03:00
Corey Shields 0ba46f0913 More transmitter submission improvements
Relates to #233
Fixes #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>
2020-08-01 23:08:13 -04:00
Corey Shields 2b80a3a88f make transmitter creation and edit forms dyanmic based on type
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 #233
Fixes #387
2020-08-01 18:50:17 -04:00
Corey Shields a7141c5b30 New SatNOGS DB user interface
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>
2020-07-25 22:08:44 +00:00
deckbsd 317eed5a34 fix bad login redirection on new trans modal
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-07-19 07:20:51 +00:00
Alfredos-Panagiotis Damkalis 504392d1e7 Allow access to API endpoints for logged in users
API endpoints that are behind authentication check, are now
accessible by logged in users.

Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-07-16 06:11:09 +03:00
Alfredos-Panagiotis Damkalis 6094847432 Fix python warnings
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-07-13 13:32:45 +03:00
Alfredos-Panagiotis Damkalis aef8d5c33b Update python libraries
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-07-13 13:32:45 +03:00
Pierros Papadeas ef1e315984 Add transmitter table view
Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2020-07-09 20:19:23 +03:00
deckbsd ef1c4313aa Remove python3 migration remnants
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-05-27 20:54:39 +02:00
Alfredos-Panagiotis Damkalis 4891efd75e Remove old exported framesets from filesystem
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-05-20 18:14:23 +03:00
Vasilis Tsiligiannis 79efc9a1c3 Add support for configuring CSP through environment variables
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2020-04-21 22:14:50 +03:00
Vasilis Tsiligiannis 2e59bc3acc Allow overriding of static and media URLs through environment variables
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2020-04-21 20:31:16 +03:00
Alfredos-Panagiotis Damkalis 3f4e5fe03f Support sentry celery and redis integrations
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-01-20 19:19:08 +02:00
Alfredos-Panagiotis Damkalis d0440e4155 settings: Allow configuration of 'FILE_UPLOAD_TEMP_DIR'
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-01-14 03:57:05 +02:00
Vasilis Tsiligiannis 5c8c9fb663 Add support for setting InfluxDB client SSL verification
This patch fixes a warning of 'urllib3' when SSL is enabled.

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-12-16 22:16:25 +02:00
Fabian P. Schmidt 4278c6caa0 Add latest TLE to UI if possible
Fixes #264.

[v2:- Added docstrings]
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-12-07 22:33:25 +01:00
Vasilis Tsiligiannis 8710a2df3b Install and enable Django Debug Toolbar when in debug mode
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-10-07 23:35:42 +03:00
Corey Shields 6920bbab03 move py2 lint exceptions to .pylintrc
Ignore py2-specific linting errors in .pylintrc while testing them in .pylintrc3

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-08-10 15:53:00 -04:00
Corey Shields f80f207c78 Flake and isort fixes
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>
2019-07-27 15:55:20 -04:00
Corey Shields fc8f9a8c35 Linting for C0412
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>
2019-07-27 14:45:19 -04:00
Corey Shields 2ec2fd2a4d pylint C0111 docstrings
phew, fixed all of the missing-docstring and found some other things along the way (for future changes)
2019-07-12 22:36:18 -04:00
Corey Shields d4fb5189d1 future imports and remove unicode strings
adds from __future__ import unicode_literals, absolute_import, division, print_function to all files, removes unicode strings from RTD conf.py (none other were found in our codebase)

See also https://docs.djangoproject.com/en/1.11/topics/python3/#unicode-literals

fixes #290

tested locally in docker
2019-06-30 19:23:55 -04:00
Vasilis Tsiligiannis 4bb87e2e6a isort: Do not skip install in order to correctly detect third-party imports
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-05-09 20:49:10 +03:00
Vasilis Tsiligiannis 655f98f39c Use 'isort' to fix order of imports
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-04-27 14:08:11 +03:00
Vasilis Tsiligiannis 140180b6b3 Reformat code with 'yapf', check format using 'tox'
Use configration based on Django coding style guidelines

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-04-27 12:32:33 +03:00
Kevin Pak 4c6ee89cd7 Add db version to footer. Create function inside context_processors file to display version in template. In addition, added decoders version below db version. Signed-off-by: Kevin Pak <kedpak10@gmail.com> 2019-04-15 04:30:06 +00:00
Vasilis Tsiligiannis 453c7a77a6 Fix invalid template error due to missing application
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-01-03 00:05:20 +02:00
Corey Shields f0e8de3cc8 Support influxdb ssl connections
Adds a setting, INFLUX_SSL which when set to True will use SSL in the connection to influxdb.

Signed-off-by: Corey Shields <cshields@gmail.com>
2018-12-29 20:03:58 -05:00