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>
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>
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>
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>
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>
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>
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>
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>
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#365Fixes#381
Thanks to @deckbsd and @adamkalis for their assistance on these!
Signed-off-by: Corey Shields <cshields@gmail.com>
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>
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>
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>
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)