1
0
Fork 0
Commit Graph

126 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 d674f10e70 Rename get_apikey to get_api_token
This commit is part of a series of commits fixing the usage of
API Token vs API Key.

The REST framework is using the word API Token and we already did
as well, so we should use only this word for it.

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2021-11-02 13:20:20 +00:00
Papadeas Pierros 51ec39a333 Exclude invalid transmitters from api and UI.
Signed-off-by: Papadeas Pierros <pierros@papadeas.gr>

Signed-off-by: Papadeas Pierros <pierros@papadeas.gr>
2021-08-19 11:01:41 +03:00
Alfredos-Panagiotis Damkalis 34f8c4e919 Fix SatelliteCreateView when form has no NORAD ID
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-07-30 18:24:12 +03:00
Alfredos-Panagiotis Damkalis 49eb53be30 Use bootstrap-modal-form for merging satellites
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-07-26 22:18:55 +03:00
Alfredos-Panagiotis Damkalis e7b0e56a17 Improve performance in home view by reducing sql queries
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-07-21 21:32:23 +03:00
Alfredos-Panagiotis Damkalis 0d137863b3 Add merge satellites functionality
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-07-19 14:39:55 +03:00
Corey Shields 79ca1834c9 More improved unit testing
Additional pytests, including tests for a fully populated DB

Also:

- simplify a conditional statement in the home page view

- fix broken robots.txt url parsing

- fix case in cached stats generation where new satellite id association could
trip a comparison against a NoneType by adding a default

- removed a print statement leftover from satellite id development

Signed-off-by: Corey Shields <cshields@gmail.com>
2021-05-25 16:38:02 -04:00
Alfredos-Panagiotis Damkalis f046863123 Fix export frames functionality
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-24 05:43:11 +03:00
Alfredos-Panagiotis Damkalis 3b05184d14 Add review functionality for satellite suggestions
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-11 20:27:05 +03:00
Alfredos-Panagiotis Damkalis 2f11e6b8e8 Separate aprrove permission for satellite and transmitter
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-11 20:27:05 +03:00
Alfredos-Panagiotis Damkalis 418fe5ab3d Support suggestions for creating/editing satellite
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-05-11 20:27:05 +03: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 0d81ecbe77 Rename Satellite model to SatelliteEntry
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-04-29 08:35:49 +03:00
Alfredos-Panagiotis Damkalis 5426167d5b Remove is_reviewed field from TransmitterEntry
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-03-11 08:29:38 +02:00
Alfredos-Panagiotis Damkalis a97f9666db Add reviewer and reviewed fields in TransmitterEntry
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-03-11 08:29:38 +02:00
Alfredos-Panagiotis Damkalis 2805acde27 Rename field reviewed on transmitterentry to is_reviewed
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-03-07 19:33:59 +02:00
Alfredos-Panagiotis Damkalis 00a91ba947 Rename field user on transmitterentry to created_by
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2021-03-07 19:01:34 +02:00
Corey Shields 2b17d32a67 Replace gpredict.js with satellite.js
package.json: Add satellite.js dependency

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>

Move to satellite.js in map, drop satellite footprint

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>

Remove gpredict.js dependency

Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>

Replace gpredict.js with satellite.js

Builds on the work of kerel-fs in !596 and #440, implements satellite.js for core TLE and SGP4 handling, deprecating and removing gpredict.js

fixes #440
does NOT fix #204
 
Signed-off-by: Corey Shields <cshields@gmail.com>
2021-02-13 14:56:14 -05: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 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
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 dd10892eaf Use new model for TLE sets
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-09-15 21:05:43 +03:00
Corey Shields 3d1c504e1d Linting and cleanup of unused view data
Linting for imported-auth-user to use get_user_model() instead

Pulled unused (old) variables and queries out of views for home, satellites, satellite, stats. Should improve page load a bit.

Relates to #424 

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-09-06 13:24:15 -04:00
Corey Shields 0600d2a090 Change the way admin notifications are triggered for new transmitters
Changes the admin email notifications to a backend celery task so that the UI does not block on it.

Also prevents this process from running twice as form_valid gets triggered for validation and saving.

Should fix #421

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-09-03 14:14:44 -04:00
Corey Shields b7e82848d5 Add ability to link to tabbed panes and fix map visibility
handle deep-linking of anchors into tabbed panes on the satellite and stats pages.
Fixes #399

Also clean up map visibility, only showing if a satellite has not re-entered *and* has a TLE associated with it (note, we are not testing for validity of the TLE).
Fixes #412
 
Signed-off-by: Corey Shields <cshields@gmail.com>
2020-08-30 16:17:08 -04:00
Alfredos-Panagiotis Damkalis 00e9cb1cc3 Fix update transmitter bug and new suggestion email
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-08-09 16:04:05 +03:00
Alfredos-Panagiotis Damkalis 41cb47f9ff Improve performance and reduce SQL queries
Signed-off-by: Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2020-08-09 01:05:01 +03:00
Corey Shields 771aa22ecd Some more performance improvements for home page
Add index to DemodData.timestamp

prefetch suggestions

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-08-08 13:30:44 -04:00
Corey Shields 931e0893d5 change latest demod query to pk instead of timestamp
should help query load, pk is indexed.

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-08-08 10:44:52 -04:00
Corey Shields 07a4904ff8 Move recent_decoded_cnt to ajax view
Move the new recent_decoded_cnt out of api and into the base view

fixes #398

Signed-off-by: Corey Shields <cshields@gmail.com>
2020-08-06 18:14:08 -04: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
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 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 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
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
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 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
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
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
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
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 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