In satellite_card.html we assume if telemetry_data_count returns a value then latest_data will also run fine. This adds some better handling in the off chance that it does not (like in an odd cache state)
Signed-off-by: Corey Shields <cshields@gmail.com>
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>
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>
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>
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>
If the satellite has a transmitter that is flagged as 'bad_transmitter' (frequency coordination violation today), then show such in the Status card.
Fixes#250
Signed-off-by: Corey Shields <cshields@gmail.com>
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>
Adds 2 fields to transmitter model, coordination (fixed set of choices, defaulting to blank) and coordination_url. API, UI, and tests are included.
Also introduces a bad_transmitter property to transmitter that will return true if any 'Uncoordinated' or '..Rejected' status is selected.
Fixes#311
Signed-off-by: Corey Shields <cshields@gmail.com>
Relates to #233Fixes#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>
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 #233Fixes#387
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>
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>
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>