1
0
Fork 0
Commit Graph

661 Commits (spacecruft)

Author SHA1 Message Date
deckbsd 01d9602693 fix map button remains active issue
Fixes #396

Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-08-02 09:35:02 +02:00
Alfredos-Panagiotis Damkalis 7938239120 Remove python 2 combatibility code
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-08-02 09:05:41 +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 b41b77be94 Remove news link (for now)
Pushing off the idea of SatNOGS DB having a 'news' component to > 1.0, removing this link for now.

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-08-01 10:59:54 -04:00
deckbsd 768779ec6a add stage notice for -dev #392
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-08-01 14:44:48 +00:00
deckbsd ee7c8fdcef fix dashboard link on sat page
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-08-01 14:31:27 +00:00
Pierros Papadeas c444bf3645 Cleanup unused images and html
Fix #393

Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2020-08-01 11:06:29 +03:00
deckbsd 461c8af026 include search as initial data in search box
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-08-01 07:23:17 +00:00
Corey Shields c1d57a79cb Fix recent data submitters in satellite page
The intent of the "5 recent submitters" on the satellite page is to show the 5 most recent stations and their last submitted time, whereas this was showing the last 5 submissions regardless of the ground station.

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-07-31 20:52:14 -04:00
Corey Shields 95e89dc4b5 Fix up js dependencies
Use upstream admin-lte 'plugins' instead of managing these js/css dependencies ourselves.

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-07-31 23:17:11 +00:00
Corey Shields 508a22acf0 Show transmitter submission only for logged in users
Fixes regression where 'submit transmitter' link and modal were visible and partly accessible when not authenticated. Also tightens the satellite edit modal similarly.

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-07-31 17:38:07 -04:00
Pierros Papadeas c17c7104f8 Replace SatNOGS DB logo
Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2020-07-31 21:38:36 +03:00
Pierros Papadeas a1fe08f352 Remove uneeded JS
Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2020-07-31 10:02:26 +03:00
Corey Shields ff3d88001e Refacter transmitter_card fields and kaitai struct decoder info
Removes the field.html include - and the frequent inclusion of that in the transmitter cards.

Fix a bug in satellite.js where input not recognized as an integer

Add gitlab links to the version info

Removes the manually-entered kaitai struct field from view (will need removed from db in a later change) - replacing with a procedurally generated list of fields from the class imported through satnogsdecoders.

Fixes #385

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-07-30 18:51:48 -04:00
deckbsd faa38e3960 add unit on frequency fields on transmitter modal
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-07-30 10:54:23 +00:00
deckbsd f9baf45aa1 Add checks for high and low freq on transmitter model
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-07-30 07:31:01 +00:00
Pierros Papadeas 1f6f74be64 Consolidate all info in About page
Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2020-07-30 00:33:10 +03:00
deckbsd ead89b6d03 add model validators
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-07-29 13:12:54 +00:00
deckbsd f0bee6eda9 fix exception when accessing search page without q parameter
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-07-29 12:01:23 +00:00
deckbsd 60f2356c73 migrate url uses to path
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-07-29 06:25:27 +00:00
Corey Shields b7d2392c35 Use datatables for stats page and other tweaks
Implement datatables for ground stations and satellites stat pages.

Fix ground stations icon

Improve datatables footer spacings all around

Tweak spacing around gravatar

Fixes #380

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-07-28 20:32:07 -04:00
Corey Shields 4c3147d4c5 Fix transmitter card titles for long titles
Fix the case where a long transmitter title will push the icons down into a wrapped row.

Fixes #271
2020-07-28 19:29:15 -04:00
deckbsd 05d4f8a705 make large badge number human readable
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-07-28 10:06:29 +02:00
Corey Shields cbd0ec096a Bring back transmitter uuid
Bring transmitter uuid and copy-to-clipboard back to new UI.

Also fixes tooltips in new UI

Also fixes a typo in new 404 screen.

Fixes #382

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-07-26 21:21:36 -04:00
Corey Shields 122baae403 Improved error pages
Improves the look and feel of 404/500 pages to match with BS4/LTE look and feel.

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-07-26 19:09:10 -04:00
Corey Shields 68e1e20a4e New UI fixes: data export, transmitters count, sat data leaderboard
Fixes #384 - by cleaning up the data export links

Fixes #379 - simple fontawesome change

Fixes #308 - adds 'most recent 5' observation submitters (regardless of number of submissions or staggering of submissions)

Changes the queryset for satellites to pull the properly 'approved'/valid transmitters as approved_transmitters which can be used to count transmitters with |length and reduce queries at the same time. As such:

Fixes #365
Fixes #381

Thanks to @deckbsd and @adamkalis for their assistance on these!

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-07-26 17:21:05 -04:00
deckbsd 999bab50c6 add the new sat fields trough the sat api endpoint
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-07-26 16:28:49 +02: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 63a93fa1ed change used sat id for caching from norad to pk
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-07-25 17:21:52 +00:00
deckbsd 5122729752 create one stats cache per satellites
Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>

replace the for loop by one big query

Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>

Undo the modification made for test

Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-07-25 17:21:52 +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 8c319bfe62 Add browsable API for jsonld format
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-07-16 06:26:23 +03:00
Alfredos-Panagiotis Damkalis f5e61c0124 Fix broken jsonld endpoint on unauthenticated request
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-07-16 06:25:47 +03: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
Alfredos-Panagiotis Damkalis 118cb7cadc Remove python 2 compatibility code
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-07-13 13:32:45 +03:00
Pierros Papadeas 980ef8abe2 Add custom sorter for frequencies on transmitters list
Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2020-07-12 14:38:33 +03:00
Pierros Papadeas a0d398f129 Add filter control on transmitter table
Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2020-07-12 12:14:26 +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
Alfredos-Panagiotis Damkalis 67f229d2ed Add json-ld format on API endpoints
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-07-01 17:14:46 +03:00
Pierros Papadeas c98aea69fc Filter transmitters in admin by description
Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2020-06-21 12:54:53 +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
Pierros Papadeas d8aef58025 Add artifact model and API endpoint for new waterfall artifacts
Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2020-05-20 19:42:31 +03: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
Alfredos-Panagiotis Damkalis 6a81937465 Create ExportedFrameset model and fix exported frames url
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-05-20 18:14:23 +03:00
Pierros Papadeas 9f76d3cb25 Add filters in demod_data admin view
Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2020-04-29 15:35:17 +03:00
Vasilis Tsiligiannis b7d2d4ff95 Fix typo in exported frames notification template
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2020-04-22 22:49:35 +03:00
Vasilis Tsiligiannis ddf62bf660 Fix download URL of frames exports
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2020-04-22 22:44:53 +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 4ba7b8cfa9 Increase character limit on mode name
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-04-10 14:50:18 +03:00
Alfredos-Panagiotis Damkalis 1f0f0767f9 Fix dashboard URL
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-04-10 11:53:59 +03:00
deckbsd 1d1c72edf4 Add link to the dashboard on satellite page
remove migration tests

Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>

use urlfield instead of texfield on sat model

Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>

remove the initialization of the url field

Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
2020-04-09 12:22:06 +00:00
Vasilis Tsiligiannis e9334d89e1 tox: Bump environment dependencies version
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2020-03-28 22:43:08 +02:00
Alfredos-Panagiotis Damkalis fcf1e0852e Skip frame during decoding on binascii.Error
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-02-14 16:13:16 +02:00
Alfredos-Panagiotis Damkalis 36a339f6a3 Update tox version in .gitlab-ci.yml
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-02-02 01:09:20 +02:00
Alfredos-Panagiotis Damkalis 9b5da399fa Add id column in Satellite admin panel
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-02-02 00:53:18 +02:00
Alfredos-Panagiotis Damkalis 1ec0da8355 Increase character limit of name in Mode model
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-02-02 00:53:18 +02:00
Fabian P. Schmidt e681e825e2 {api|base}/tests.py: Change import order
The last dependency update changed the required import order apparently
so the 'isort' command failed.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2020-02-01 23:06:32 +01: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
Alfredos-Panagiotis Damkalis 4b721a4488 Use API Key for accessing telemetry API endpoint
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-01-14 03:45:31 +02:00
Vasilis Tsiligiannis 4a4f96f352 Update fixtures after model changes
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-12-17 12:26:27 +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
deckbsd 2967e608c3 Populate decoder attribute in API
Signed-off-by: Flawinne Julien flawinne.julien@protonmail.com
2019-12-07 15:49:22 +00:00
deckbsd 062152aeec add uplink_mode field for transciever and transponder transmitter type
Signed-off-by: Flawinne Julien flawinne.julien at protonmail dot com

add uplink_mode field for transciever and transponder
Signed-off-by: Flawinne Julien flawinne.julien@protonmail.com

adapt unit test for transmitter model

Update migration for taking account of the invert value

update uplink_mode migration condition

Not request TLE with NORAD ID above 99000

Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>

rename mode transmitter field to downlink_mode

adapt unit test for transmitter model

update uplink_mode migration condition

add uplink_mode field for transciever and transponder transmitter type
Signed-off-by: Flawinne Julien flawinne.julien at protonmail dot com

keep mode id

add forgotten field mode id

add missing ,

fix yapf error
2019-12-01 09:43:44 +00:00
Alfredos-Panagiotis Damkalis 34f2641bef Not request TLE with NORAD ID above 99000
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-11-18 02:55:10 +02:00
deckbsd fbd0fbf34e change transmitter panel color regarding sat
Signed-off-by: Flawinne Julien flawinne.julien@protonmail.com
2019-10-18 11:41:59 -07:00
Corey Shields 72e5d728a2 Django 2.2(.6) upgrade
This change bumps DB up to django 2.2.6 and resolves dependencies.  No migrations are necessary.  I've tested in my own environment, time to test in db-dev!

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-10-14 02:59:52 -04:00
Corey Shields e7e400e49a Revert "Django 2.2(.6) upgrade"
This reverts commit 8cae425ac9
2019-10-12 14:55:37 +00:00
Corey Shields 8cae425ac9 Django 2.2(.6) upgrade
This change bumps DB up to django 2.2.6 and resolves dependencies.  No migrations are necessary.  I've tested in my own environment, time to test in db-dev!

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-10-10 19:17:23 -04: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
Alfredos-Panagiotis Damkalis 494351e2e7 Remove custom views of 404 and 500 errors
According to Django 1.11 documentation if there are 404.html and 500.html
pages in templates root directory then it loads them in case of 404 or
500 errors without any extra code needed. More details in:
https://docs.djangoproject.com/en/1.11/ref/views/#error-views

Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-10-03 11:39:30 +03:00
Alfredos-Panagiotis Damkalis ef40817f61 Update javascript libraries
Updates:
* gulp to 4.0.2
* gulp-eslint to 6.0.0
* stylelint to 4.3.1
* bootstrap to 3.4.1
* chart.js to 2.8.0
* jquery to 3.4.1
* mapbox-gl to 1.3.1
* moment to 2.24.0

Removals:
* bootstrap-daterangepicker
* backbonejs(code parts that weren't removed)
* d3
* underscore

Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-09-24 22:46:25 +03:00
Alfredos-Panagiotis Damkalis e691ddb79e Fix docs url
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-09-24 18:46:47 +03:00
Vasilis Tsiligiannis 7ebc04e534 Fix filter argument of model field name
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-22 21:53:50 +03:00
Corey Shields 3e24773476 fix reverted mode_label and mode_data
when linting db code I unintentionally swapped the return of mode_data with mode_label, causing NaN in stats.js when trying to calculate the mode doughnut.

Reverts this bug.  Fixes #325

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-09-01 19:53:03 -04:00
Vasilis Tsiligiannis fc90760e7c pylint: Remove W0603 warning on 'args' and 'kwargs', remove unused Python 2 configuration
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-09-02 01:49:51 +03:00
Corey Shields 61f9137aae Fix celery cyclical dependency
Fixes the cyclical dependency between celery.py and tasks.py when update_all_tle is called outside of celery by switching to autodiscovered tasks

Signed-off-by: Corey Shields <cshields@gmail.com>
[acinonyx@openwrt.gr: use @shared_task decorator and wrapper tasks to workaround celery bug]
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-08-19 01:13:28 +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 f1420d3e9e Linting W0511
part of W0511

Filed #321 and moved code comments to #265

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 15:38:02 -04:00
Corey Shields d71114130a Rename transmitter properties
Fixing these as part of W0511

There were some transmitter properties labeled "has_" (which implies a boolean) while returning a count. Renamed them and their instances to "_count" along with cleaning up some variables

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 15:24:42 -04:00
Corey Shields 40460c47bb Linting for W0511
Moved these placeholders to issues #319 and #320

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 15:23:26 -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 9359532df9 Linting for E1101
Pylint throws 2 false positives for E1101 under Python2 (but runs cleanly in Python3). Disabling these.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 14:29:24 -04:00
Corey Shields f9336eb0b4 Linting for R0401
Fixes a cyclical dependency between calling the celery app through an import in tasks.py (which then imports tasks.py) by retrieving celery through the class.

Tested in local dev

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 14:17:16 -04:00
Corey Shields 8271351729 Linting for R0901
Ignoring cases of too many ancestors in API views.py as these are upstream, not much we can do about it.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 12:22:41 -04:00
Corey Shields 91d8ba20bd Linting for R0903
Ignoring R0903 for tests.py where we do not need to care about public methods, and for django managers in models.py

This negates the need for MR !396

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 12:13:56 -04:00
Corey Shields b704454486 Linting for R0914
A couple of functions in tasks and utils were refactored with new helper functions to reduce the number of local variables per function.

In addition, fetch_data.py was flagged with R0914 but this is a relic of the original attempt at decoding data into DB, and is unused - so I am removing rather than fixing it.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-27 12:10:47 -04:00
deckbsd 965a4f3658 add filters on satnogs db telemetry api
remove unset schema filter

fix flake8 remark

Signed-off-by: flawinne julien  <deckbsd@protonmail.com>
2019-07-20 07:31:24 -07:00
Vasilis Tsiligiannis 70ffe07f22 Reduce number of statements, resolve pylint 'R0915'
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-07-17 17:52:35 +03:00
Vasilis Tsiligiannis 5abb3553f9 Do not call return in 'if' and 'else'
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-07-17 17:52:10 +03:00
Vasilis Tsiligiannis 26662074e5 isort: Declare 'factory' as a third-party import
* Apply changes based on new configuration
* Enable 'C0411' pylint checking

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-07-17 17:51:53 +03:00
Vasilis Tsiligiannis 3404db012c Move form validation function out of class, fix 'E0213' pylint error
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-07-17 17:51:48 +03:00
Corey Shields f6e61f158f review fixes for !393
per acinonyx review, fix comment spacing, add missing citation to TransmitterEntryForm, and standardize pylint disable messages

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-17 09:26:13 -04:00
Corey Shields 3596ebfb9f flake / lint fixes
Signed-off-by: Corey Shields <cshields@gmail.com>

Fix some spacing issues brought up in a full tox run (that were not identified in my prior linting flows)
2019-07-17 09:26:13 -04:00
Corey Shields 9989efb453 linting for R0201
Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 19:12:54 -04:00
Corey Shields 3ce647e374 linting R0101
too-many-nested-blocks - pulled a break point out for utils.py/decode_data to get rid of a nested block

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 18:49:18 -04:00
Corey Shields 389194b076 linting W5104
using field excludes is an antipattern and a possible security risk down the road. Replaced with explicit fields list.
2019-07-13 18:42:11 -04:00
Corey Shields c376e08826 linting W5102, W5103
Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 18:33:03 -04:00
Corey Shields adfc08bb79 linting W1201, W1202
fix logging strings to %s format

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 18:15:13 -04:00
Corey Shields 6bc64e9217 linting for W0703
broad-except, I added explicit exceptions where I felt safe doing so - but we do have a lot of broad exceptions accepted.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 18:08:55 -04:00
Corey Shields fe1f989d7b linting for W0621
resolving name conflicts between variables and functions

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 17:38:04 -04:00
Corey Shields 0d4701b100 linting W0612, W0613
Mostly disabling the alerts on django signals and filter attributes that go unused.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 16:24:43 -04:00
Corey Shields f7c4df84f1 Fix broken API filter view
Linting W0613 led to the discovery that we filter on status entries that do not exist. Changing "functional" to "active" will fix https://db.satnogs.org/api/transmitters/?alive=true

fixes satnogs-db#298

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 16:14:40 -04:00
Corey Shields 0da7589c1d fix spacing (flake)
Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 16:02:48 -04:00
Corey Shields 678de105dd linting W0201 and W0221
we are going to ignore W0201 and W0221 around the TransmitterEntry save function. Reasons are in the code comments.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 15:32:04 -04:00
Corey Shields ec07c59263 linting for W0150
the check_celery function returns in a finally, which is unnecessary and is an antipattern. This works just the same dropping the finally statement and returning in the end.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 14:46:16 -04:00
Corey Shields a8a0dc4aa6 linting W0107
check_celery had an invalid pass, replaced that with a log entry.
 
Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 14:38:20 -04:00
Corey Shields 8b6410ba2c W0105 linting - remove display_decoded
display_decoded is an unused relic of the original decode method, and throws a W0105 warning.

removing this function completely

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-13 14:28:04 -04:00
Corey Shields f90fe277d5 remove unused helpers
cleaning up C0111 exposed that we have some helpers initially added when django cache was implemented, but have since been abandoned.

Removing them as they are unused and unneeded

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-12 22:53:23 -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 dcccb1770e Remove old decode_data.py manage command
Found while documenting for C0111, this was old code for the initial "decode" functionality that was replaced by decode_data in utils.py

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-12 19:12:43 -04:00
Corey Shields a697548a56 pylint C0122
Linting for misplaced-comparison-constant

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-12 17:47:28 -04:00
Pierros Papadeas 8a51d27f65 Fix C0325 pylint error
Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2019-07-12 19:57:27 +00:00
Corey Shields b7ec119853 pylint C0103
Linting for Pylint C0103

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-12 12:41:21 +00:00
Pierros Papadeas 853381a5dc
Fix pylint C1801 errors
Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2019-07-12 09:48:33 +03:00
Pierros Papadeas d1fb393c79
Update transmitters fixture
Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2019-07-11 14:10:47 +03:00
Pierros Papadeas 48ea435093
Add transmitter service field
Fix issue 310

Signed-off-by: Pierros Papadeas <pierros@papadeas.gr>
2019-07-11 14:10:47 +03:00
Poonam Mishra 9a0ef30e03 model: Replace __unicode__ by __str__
The special method __unicode__ is python2-only,
in python3 it's merged with __str__. In order to be py23-compatible
the python_2_unicode_decorator is used, see
https://docs.djangoproject.com/en/1.11/topics/python3/#str-and-unicode-methods

initial patch: Updated docstrings to show names
[kerel@mailbox.org: - reworded commit message,
                    - added similar change in demoddata
                    - added @python_2_unicode_compatible decorator]
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2019-07-10 19:55:48 +02:00
Corey Shields 248390a760 flake / tox fixes
Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-10 19:55:48 +02:00
Corey Shields 8734748e50 2to3 changes for python3
Mostly list changes, from 2to3

Also missing __future__ needed for _version.py

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-10 19:55:48 +02:00
Corey Shields f734919b61 Change the mysql_exceptions import of OperationalException to django.db
The import itself would have needed fixing, but its bad to pin it to mysql.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-10 19:55:48 +02:00
Corey Shields f0c0c9bc8b remove bytestrings from migrations
Remove all bytestring references from existing migrations

Future migrations should avoid bytestrings with the future import we set.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-07-10 19:55:48 +02: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
Pierros Papadeas 5433a7a67b
Beautify citation on satellite.html template 2019-06-30 11:25:36 +03:00
Vasilis Tsiligiannis 1d85a64e6e Remove task which resets all decoded data
With the introduction of 'satnogs-decoders' version saved within the
decoded data structure, there is no need to reset any data prior to
triggering a 'decode all' task. The newly decoded data can happily live
alongside old data until the administator of the data warehouse decides
to remove them, part of data janitor tasks. An additional advantage is
that if the decoder structure changes drastically, existing dashboards
can still be used to visualize the old data as long as they are
filtered by version and until new dashboards are prepared.

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-05-11 14:18:04 +03:00
Vasilis Tsiligiannis a7e80bb4e5 Save 'satnogs-decoders' version in decoded data structure
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-05-11 14:11:53 +03: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
Vasilis Tsiligiannis 1ebedf7f90 Switch to 'npm' for managing dependencies, remove static assets
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-04-27 00:23:33 +03:00
Alfredos-Panagiotis Damkalis f3977c27ea Filter trasnmitters API by uuid
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2019-04-24 15:59:11 +03:00
Corey Shields 5e5296f154 fix dependencies for moving up to Django 2
this fixes for 2.0, will be one step toward 2.2

Fixes #278
2019-04-20 21:49:33 -04:00
Corey Shields ff21847b52 rename demoddata.source to demoddata.app_source
We have a field in demoddata called "source" which stores the application source of the data (network, sids, manual). This causes a lot of confusion with the SiDS API format which has a "source" parameter (that we convert to "station")

As I'm working through documenting the API (and getting us ready for feature expansion), I'd like this field renamed to avoid future confusion.
2019-04-20 19:15:29 -04:00
Alfredos-Panagiotis Damkalis 5b7814000c Fix telemetry API methods 2019-04-19 18:53:21 +03:00
Alfredos-Panagiotis Damkalis d786ce72bd Fix transmitter API test 2019-04-19 17:23:47 +03:00
Corey Shields f43c387e2d fixing db api 2019-04-17 21:55:15 -07: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 7b1315cb9d Update fixtures from 'db-dev.satnogs.org'
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-04-09 16:04:48 +03:00
Alfredos-Panagiotis Damkalis 30e2b6ef9e Don't drop last column of base_suggestion table 2019-04-09 00:05:41 +03:00
Alfredos-Panagiotis Damkalis c2e378da4e Refactor transmitter model
Transmitter model has been refactored by changing the current schema
from Transmitter and Suggestion models to TransmitterEntry model and
two proxy models TransmitterSuggestion and Transmitter:

* TransmitterEntry model will hold all the entries and changes on
transmitter entries in db.

* TransmitterSuggestion model will be the proxy model of the unreviewed
transmitter entries.

* Transmitter model will be the proxy model of the latest approved and
reviewed transmitter entries.

There are also change on Transmitter model fields:

* alive field is now change to status field

* there are new fields: citation, user, reviewed and created
2019-04-08 21:21:46 +03:00
Ansgar Schmidt 81549264cf Adding UTC in header, fixing #267
Signed-off-by: Ansgar Schmidt <ansgar.schmidt@gmx.net>
2019-02-12 11:27:25 +01:00
Vasilis Tsiligiannis 58b0cc9bfd Fix invalid quoting in InfluxDB query
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-01-24 21:33:44 +02:00
Alfredos-Panagiotis Damkalis b24d292fc8 Add Blank=True for decayed date in satellite model 2019-01-21 15:34:02 +02:00
Pierros Papadeas 6d5e1db09c
Add decayed field in Satellite model 2019-01-19 19:27:48 +02:00
Vasilis Tsiligiannis a6b79bace0 Fix InfluxDB query to drop whole measurements
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-01-16 15:04:59 +02:00
Corey Shields a05a614dd9 hack our way around the django cache
Signed-off-by: Corey Shields <cshields@gmail.com>

In django cache we are storing a full queryset of the satellites with their data count and last payload time. By trying to filter on this (sat_cache = sats_cache.filter(norad_cat_id=norad)) we cause django to re-evaluate the queries for that specific satellite. For CAS-4a this results in 2 queries that exceed 5 mins each.

This does not impact the /stats/ page as it iterates through the whole list of satellites in cache. This change mimics that behavior to find the satellite cache we care about in the template.  Its a huge hack but its the only way we can show a count and bring the page view back for !237 quickly...  This needs refactoring, big time..

I also pulled an unused has_telemetry_data which caused a db count

This leaves behind a query to pull the last payload to show who submitted the last payload, as without this query there is no connection between the cached satellite info and the actual observer (because the /stats/ page was not meant to make that connection). If this query continues to be prohibitive we may just need to remove the "last frame submitted by.." blob.
2019-01-12 14:00:59 -05:00
Corey Shields 9ea72f808a stop triggering a cache update on page load 2019-01-11 23:52:49 -05:00
Corey Shields 3adf7a2f35 fix satellite slow queries
In this change we continue using the cache for the frame count, but instead of using the cache for the latest frame as discussed in IRC we grab the latest frame based on the ID.  In my test environment this was a reasonable query time.

I'd rather we try this route before resorting to the cache for latest frame as it will be a better user experience.

Signed-off-by: Corey Shields <cshields@gmail.com>
2019-01-11 21:28:52 -05:00
Vasilis Tsiligiannis e27e892fba Replace recursive 'dict' extraction with 'satnogs-decoders' docstring fields
This commit replaces the recursive 'dict' extraction functions with
'get_fields()' method which returns specific fields from Kaitai Struct
docstrings. The InfluxDB schema is also optimized to write multiple
fields per data point with the unique NORAD id used as the measurement
name.

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-01-09 20:51:26 +02:00
Vasilis Tsiligiannis 7f16a16ee2 Add telemetry fixtures
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-01-09 17:51:26 +02:00
Vasilis Tsiligiannis 5780fb8ebb Update fixtures
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-01-09 17:49:43 +02:00
Pierros Papadeas a8f5e53647 Add UI for transmitter UUID 2019-01-07 18:21:39 +00:00
Pierros Papadeas 6a1f145c07 Add more fields and filters on satellite admin view 2019-01-07 16:28:33 +00:00
Vasilis Tsiligiannis 86df51b031 Remove unused import, fix line break before operator
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2019-01-07 17:15:28 +02:00
Pierros Papadeas c2efc8cee2
Use case for home page statistics 2019-01-07 14:23:12 +02:00
Corey Shields f8496b5899 use cached payload count in satellite view 2019-01-06 15:40:54 -05:00
Pierros Papadeas afd69f13ac
Remove unused view counts from Satellite view 2019-01-06 10:38:50 +02: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 ba4cdd7d60 Catch TLE ValueError
Catch and handle ValueError when loading new TLE (in the case of a syntax error in the TLE)

resolves https://gitlab.com/librespacefoundation/satnogs/satnogs-db/issues/257

Signed-off-by: Corey Shields <cshields@gmail.com>

Kudos to kerel for the idea
2019-01-02 11:24:33 -05:00
Fabian P. Schmidt bfef1527de api/views: Use queryset exists syntax instead of exception handling 2019-01-01 22:03:55 +01:00
Alfredos-Panagiotis Damkalis b0308ea8f1 Fix division by zero in trasmitters percentage 2018-12-30 22:24:47 +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
Pierros Papadeas a1d8357763
Change model of transmitter to include drift and type 2018-12-25 21:15:18 +02:00
Corey Shields 2277dd5f97 fix logouturl
Auth0 logout does not clear the session. This fixes.

Signed-off-by: Corey Shields <cshields@gmail.com>
2018-12-15 16:10:17 +00:00
Corey Shields 04b8f815c7 case LOGIN_URL for AUTH0
Signed-off-by: Corey Shields <cshields@gmail.com>

The auth0 change forces an auth0 LOGIN_URL. This fixes that with an if statement

See also https://gitlab.com/librespacefoundation/satnogs/satnogs-db/issues/248
2018-12-15 09:33:20 -05:00
Pierros Papadeas 1a84e97c6c
Add wiki link to header 2018-12-15 12:43:28 +02:00
Alfredos-Panagiotis Damkalis 2b6be2a4b1 Ignore "File not found" error on frames extraction 2018-12-13 14:57:56 +02:00
Pierros Papadeas bc878d2419
Remove stats counters 2018-12-13 11:07:49 +02:00
Corey Shields ccc18b6c29 fix for sentry 804899643
Signed-off-by: Corey Shields <cshields@gmail.com>
2018-12-12 13:09:27 -05:00
Alfredos-Panagiotis Damkalis f83988fc05 Ignore re-entered satellites during TLE update 2018-12-12 18:05:19 +02:00
Vasilis Tsiligiannis 7006e2add4 Support configuration of mailing options via variables
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2018-12-11 19:49:05 +02:00
Vasilis Tsiligiannis 017fb6f2f9 Cast Sentry enable switch to bool
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2018-12-11 19:48:51 +02:00
Pierros Papadeas 2a90bad4b2
Add sentry-sdk for logging 2018-12-11 17:21:19 +02:00
Fabian P. Schmidt 221f2b6f1f Fetch TLEs only for officially assigned NORAD IDs
Due to Celestrak returning the TLE of 00005 when asked for TLEs for
satellites with NORAD IDs in the 999xx range, satellites with
temporary NORAD IDs get assigned a wrong TLE.
This commit adds a workaround by skipping satellites with temporary
NORAD IDs when updating TLEs.
2018-12-10 20:42:21 +01:00
Fabian P. Schmidt c405f781c4 Add additional TLE sources via python-satellitetle 2018-11-29 20:04:19 +00:00
Fabian P. Schmidt 8cb0f12077 fixtures: Remove duplicated satellite introduced in 50f6b93 2018-11-25 20:13:30 +01:00
Vasilis Tsiligiannis c99ac79487 Allow configuration of static and media root directories via environment variables
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2018-11-22 21:36:21 +02:00
Vasilis Tsiligiannis 96fd370157 Clean up settings and 'env-dist'
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2018-11-21 13:49:16 +02:00
Corey Shields 704bc18e76 initial auth0 support for db 2018-11-18 12:55:13 -05:00
Fabian P. Schmidt cfede128e5 Remove unused satellite_position endpoint
Endpoint unused since 30dd47cc.
2018-11-12 16:06:08 +01:00
Fabian P. Schmidt 801596a60d Remove satellite progration with pyephem in satellite_postion endpoint
This endpoint is legacy as of 30dd47cc.

Fixes #234.
2018-11-12 16:06:08 +01:00
Fabian P. Schmidt d8c3c9a348 Remove unused attribute data-url from satellite view
Commit 30dd47cc remove the usage of the value in this attribute.
This commit removes the attribute itself, as it's no longer used.
2018-11-12 14:01:46 +01:00
Vasilis Tsiligiannis a138bc7d15 Fix relative paths of templates and static files directories
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>
2018-11-09 19:41:12 +02:00
Vasilis Tsiligiannis 1a037d875c Use decoders from 'satnogsdecoders' package
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2018-11-08 00:29:20 +02:00
Pierros Papadeas c1bdf25613 Enhance email for satellite suggestions 2018-11-07 13:09:41 +00:00
Pierros Papadeas 84d4a76e88 Add counters on stats page 2018-11-07 13:09:41 +00:00
Fabian P. Schmidt 0e10569938 Update requirements
Steps performed:
```
npm install
./node_modules/.bin/gulp
```

Update of gpredict.js to 0.2.0 included, fixes #214.
2018-11-07 13:59:24 +01:00
Vasilis Tsiligiannis 4d08cdb6e4 Create an initial 'satnogs-db' package with no requirements specified
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
2018-11-06 13:32:43 +02:00
Ansgar Schmidt f4dca9a787 Kaitai decoder for QBEE (NORAD 42708)
Signed-off-by: Ansgar Schmidt <ansgar.schmidt@gmx.net>
2018-10-30 23:05:03 +01:00
Patrick Dohmen 753be85dcd Add AMSAT FOX DUV decoder struct
Signed-off-by: Patrick Dohmen <dl4pd@darc.de>
2018-10-26 20:26:41 +02:00
Patrick Dohmen a66df2eb43 Switch frametypes on known length and opcode, ignore unknown 2018-10-21 20:58:57 +02:00
Patrick Dohmen 6c898a167c Replace the regex parsing by binary data parsing 2018-10-14 10:05:57 +02:00
Patrick Dohmen 5b7dba4d6e Add ELFIN housekeeping telemetry struct and fix endianess 2018-10-11 23:22:15 +00:00
Patrick Dohmen 34b13e2312 Remove 'str' and encoding from data field as it is not just ASCII 2018-10-11 23:34:50 +02:00
Patrick Dohmen f109edfd4a Fix python capitalization requirements 2018-10-11 19:52:46 +02:00
Patrick Dohmen f03d549f76 Add AX.25 text frame parser 2018-10-09 17:49:34 +02:00
Patrick Dohmen 410539a3e8 Change ACB sense endianess, change some signed to unsigned vals 2018-10-08 17:47:26 +02:00
Patrick Dohmen 06a44c952e Change 16 bit int values to signed 2018-10-07 11:26:23 +02:00
Patrick Dohmen 58ae85523b Change some vals to signed, add bool-flags, update doc-refs 2018-10-05 17:18:40 +02:00
Patrick Dohmen e3492aaa60 Flatten kaitai struct to get seperated json objects 2018-10-03 11:21:53 +02:00
Patrick Dohmen 88dd0b058d Update documentation on using 'process:' 2018-10-03 11:20:49 +02:00
Patrick Dohmen 141597e392 Add external process to kaitai struct to preprocess ELFIN telemetry frames 2018-10-02 23:32:04 +02:00
Alfredos-Panagiotis Damkalis fc7b7e98fa Update elfin.py decoder 2018-10-02 16:27:25 +03:00
Patrick Dohmen faaed92d63 Added checks for python 3 for compatibility.
The code to preprocess the ELFIN telemetry frames to remove escape sequences throws

```
TypeError: Odd-length string
```

when executed in a python 2 environment.

Fixes #229
2018-10-01 10:24:55 +02:00
Patrick Dohmen 0dc7a7f4db Add regex to remove escape sequences \x2727, ,\x275e and \x2793 2018-09-30 21:22:32 +02:00
Corey Shields 2300e6ff1e adding elfin decoder
Thanks to DL4PD for contributing!!
2018-09-28 17:43:00 -04:00
Fabian P. Schmidt 50f6b936c8 Add re-entered satellite LIGHTSAIL-1 to fixtures 2018-09-23 16:58:02 +02:00
Fabian P. Schmidt d915dac971 Hide map in satellite view if status of satellite is re-entered
Fixes #226.
2018-09-23 16:57:44 +02:00
Corey Shields 9cc9c352f5 DB changes to allow for network-sourced sids submissions 2018-09-03 14:19:42 -04:00
Corey Shields 9f1d7b69f9 improve kaitai display
show a message in place of the struct if the struct happens to be missing
2018-09-02 21:11:42 -04:00
Corey Shields 244cf3dd3f show kaitai structs in db 2018-09-01 11:02:14 -04:00
Corey Shields 817459cc71 decoders for skcube and strand1
Kudos to kerel!!
2018-08-31 17:06:33 -04:00
Corey Shields 3098490633 add decoder for siriussat
Decoder for siriussat, thanks to kerel!
2018-08-26 09:33:49 -04:00
Corey Shields 162c1e45d2 add recursion to the decode processes
refactored


Refactored db decoding for recursion

Should cover all cases for kaitai generated decoder files.
2018-08-25 12:04:36 -04:00
Corey Shields ad94d1bf12 keep going if a decode worker comes across a missing raw file 2018-08-19 19:15:09 -04:00
Corey Shields 8527564089 kaitai decoding and influxdb support
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.
2018-08-18 20:53:21 -04:00
Pierros Papadeas 63b69d7746
Expose mode of transmitter in admin list 2018-08-18 13:10:57 +03:00
Pierros Papadeas 44026c120f
Expose baud rate on admin and filters 2018-08-18 10:53:52 +03:00
Corey Shields 4a3eaf90ee remove opbeat from db
opbeat is no longer in service, so our attempts to send data to them just clutters our logs with failures.

See also librespacefoundation/ops/org/#2
2018-08-03 16:38:51 -04:00
Corey Shields aa8c143408 Remove decoded telemetry box
Remove the decoded telemetry box, and backbone and d3 js.

fixes #224
2018-08-02 18:11:29 -04:00
Fabian P. Schmidt 5efae6745f about page: Fix link to documentation
The link to the db was updated.
This fix was already done to the README in d6b959d.
2018-07-15 14:51:02 +00:00
Corey Shields 44fee695b5 fix bare excepts
Upon fixing CI we now have a slew of PEP8 722 issues (bare excepts).  This MR fixes all of those by excepting Exception, which should catch anything the program generates while allowing systemexit exceptions.
2018-07-14 14:50:07 -04:00
Nikos Roussos 6fa7dc9e00
Minor simplifications on docker and opbeat 2018-03-24 15:36:52 +02:00
Nikos Roussos b8a51dda47
Update requirements
* Django
* django-csp
* django-allauth
* mapbox-gl
* pytest
* Replace Mysql-python with mysqlclient
2018-03-24 15:36:39 +02:00
Jacek Chmielewski d224e549a5 Fixes long loading times on satellite page by adding is_decoded boolean field with index on DemodData. 2018-03-05 17:30:23 +01:00
Nikos Roussos 03acd2a495
Squash migrations 2018-01-07 14:41:37 +02:00
Nikos Roussos 37598fc74d
Switch from dotenv to decouple 2018-01-06 13:25:23 +02:00
Nikos Roussos 7e8bfdd4e2
Save frames on date-based folders 2018-01-04 11:07:58 +02:00
zisi bfb6c55bbc Use unpack function instead of decode_bytes
Signed-off-by: zisi <agzisim@gmail.com>
2017-12-29 15:38:00 +02:00
Nikos Roussos fac8572c7b
Create missing Satellite on API call 2017-11-24 22:58:09 +01:00
Nikos Roussos e08a3d193c
Update requirements
* Add Compressor settings
* Fix deprecated filters backend
2017-11-17 15:07:57 +02:00
Fabian P. Schmidt 83562a7a54 Set maxlength to 255 for citation url input 2017-11-16 09:45:47 +00:00
Nikos Roussos 78278c181d
Wrap task call to exception handling 2017-11-13 18:57:56 +02:00
Nikos Roussos f3a1735c35
Minor cosmetic changes to mapbox-gl refactor
* Fix indentation typos
* Remove console.log instances
* Update package.json with mapbox-gl changes
2017-11-13 18:47:21 +02:00
Fabian P. Schmidt b606121093
Fix footprint style on the map in satellite view 2017-11-13 18:07:14 +02:00
Fabian P. Schmidt 050df7ff4d
Remove unused mapbox-js libary import 2017-11-13 18:07:14 +02:00
Fabian P. Schmidt 2094426f8f
Remove unused mapbox_map_id 2017-11-13 18:07:14 +02:00
Fabian P. Schmidt 1c08edf3ee
Move to mapbox-gl.js 2017-11-13 18:07:14 +02:00
Fabian P. Schmidt 30dd47cc3d
Remove unncessary ajax call from satellite view 2017-11-13 18:07:14 +02:00
Fabian P. Schmidt e9fc0c0296
Remove unused fetch of satellite position from satnogs-network 2017-11-13 18:07:14 +02:00
Fabian P. Schmidt 861782ce35
Add mapbox-gl.js 2017-11-13 18:07:14 +02:00
Nikos Roussos 7521780bcb
Fix coordinates parsing on API 2017-11-13 12:33:17 +02:00
Nikos Roussos 3770791865
Enable template caching 2017-11-13 12:30:39 +02:00
Nikos Roussos fc8e8531e6
Cache statistics through a celery task 2017-11-13 12:27:24 +02:00