1
0
Fork 0
Commit Graph

343 Commits (8a3ebb3caf2dea486f2979319647d7fe54f997ba)

Author SHA1 Message Date
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