Commit Graph

260 Commits

Author SHA1 Message Date
R. Miles McCain
e7fef3b2f8 Add option to set CSRF_TRUSTED_ORIGINS (Django 4.0) 2022-09-14 11:04:47 -07:00
Christian Wiegand
e08c6e790b
Add missing "i18n" to some templates (#226) 2022-09-14 10:32:14 -07:00
R. Miles McCain
78135583ee Fix migration order 2022-09-13 14:23:00 -07:00
R. Miles McCain
487815a984 Bump version to 0.13.0 2022-09-13 13:14:53 -07:00
R. Miles McCain
6f715b5b77 Update ipware (fix CF IPs) 2022-09-13 12:19:43 -07:00
R. Miles McCain
1280433a49 Add an API! 2022-09-13 12:14:39 -07:00
R. Miles McCain
6febe7db19 Upgrade Django to 4 2022-09-13 12:09:36 -07:00
Paweł Jastrzębski
5e48e2dcf5 Use POST to api token refresh 2022-08-29 08:44:17 +02:00
Christian Wiegand
d134c0049d
Localization (#214)
* General localization:
  - Add gettext to literals
  - Add trans template tag to templates
  - Set localized date and time
  - Add locale option to TEMPLATE.env
  - Add migrations that result from model field changes

* Add german locale

* Add german locale
2022-08-28 15:22:50 -07:00
R. Miles McCain
b286c80754 Remove unneeded views 2022-08-28 15:07:05 -07:00
R. Miles McCain
c23f44d7b7 Merge commit '77cb1fb37c0da5bad39b3905f7a48cd3f176bac7' into api 2022-08-28 15:01:04 -07:00
Paweł Jastrzębski
b7f2e9cfe6 Remove basic option from api view 2022-08-28 13:35:22 +02:00
Matt Ronchetto
4d7c036acc
Add support for GPC header (#219)
* chore: reflect both headers in debugging

* chore: add Sec-GPC handling with DNT handling

The `if` statement is there purely so that nothing more has to change handling wise. If either value is true, DNT policy should kick in and no data should be stored/tracked. *Should* just work™.

* fix: meet Black style guide

* fix: comply with other header formatting

* fix: header typo
2022-08-27 18:35:56 -07:00
R. Miles McCain
77cb1fb37c Improve language 2022-08-27 14:52:02 -07:00
Fidel Ramos
96c9c0feec
Fix SQLite support (#210)
SQLite DB was not writable because it was always located in
/usr/src/shynet/, which is owned by root and not writable by
appuser. SQLite needs the parent directory containing the DB file to be
writable by the running user.

The applied fix is to place the DB file in /var/local/shynet/db and to
create that directory in the Docker image with the right permissions.

SQLite setup is now documented in README as an alternative to Postgres.
2022-05-24 12:38:27 -07:00
Paweł Jastrzębski
d9bbeea892 Remove basic option from API
For simplicity
2022-05-12 12:10:44 +02:00
Paweł Jastrzębski
ca97453c3e Return 400 if date format is invalid 2022-04-26 10:13:52 +02:00
Paweł Jastrzębski
b87b158aab Fix typo 2022-04-22 08:28:09 +02:00
Paweł Jastrzębski
4a6af18765 Add django-cors-headers 2022-04-14 19:41:14 +02:00
havk
f6188a8bd1
Add default 0 hits to chart_data (#195) 2022-01-11 14:16:49 -08:00
Paweł Jastrzębski
ba91ed561d Add uuid validation 2022-01-05 09:47:14 +01:00
Paweł Jastrzębski
2aaadfe81c Display api urls on service management page 2022-01-05 09:47:05 +01:00
Paweł Jastrzębski
7f60b3abff Rename minimal parameter to basic 2022-01-05 08:53:46 +01:00
Paweł Jastrzębski
069b218828 Move api token info to security tab 2022-01-04 08:53:00 +01:00
havk
a460d1f045
Remove empty js script from template (#189)
* Remove empty js script from template
Serving empty file raise ValueError in gunicorn

* Remove empty js file
2022-01-02 14:15:07 -08:00
havk
8b0205a2f7
Fix last month date range (#187) 2022-01-02 09:37:19 -05:00
Paweł Jastrzębski
80647d960a Merge branch 'master' into api 2022-01-01 19:56:55 +01:00
R. Miles McCain
4834c5722f Bump version to v0.12.0 2021-12-31 23:47:05 -05:00
R. Miles McCain
4b4c8f207e Fix dates in the new year 2021-12-31 23:44:48 -05:00
Paweł Jastrzębski
bcf94147c9 Fix problem with whitespaces in copied token 2021-12-31 12:11:42 -05:00
Paweł Jastrzębski
66b841fd86 Move token to User model + add API setting view 2021-12-31 12:11:42 -05:00
Paweł Jastrzębski
d809ec82d9 Add uuid filter and service uuid filter 2021-12-31 12:11:42 -05:00
Paweł Jastrzębski
e577aa4997 Add minimal argument to get_core_stats 2021-12-31 12:11:42 -05:00
Paweł Jastrzębski
5966ea2f84 Add DashboardApiView 2021-12-31 12:11:42 -05:00
Paweł Jastrzębski
a7248cd54b Add ApiTokenRequiredMixin 2021-12-31 12:11:42 -05:00
Paweł Jastrzębski
1dec03c724 Add ApiToken to admin 2021-12-31 12:11:42 -05:00
Paweł Jastrzębski
ff6933b4de Add api app with ApiToken model 2021-12-31 12:11:42 -05:00
R. Miles McCain
1fd46b019c
Lessen priorities on field buttons (#182)
* Lessen priorities on field buttons

* Use latest alpine
2021-12-31 12:11:03 -05:00
Sérgio
780b71083a
Add first factories and first dashboard tests (#172)
* Add factories and first dashboard tests

* Code cleanup

Co-authored-by: R. Miles McCain <github@sendmiles.email>
2021-11-13 21:09:55 -08:00
R. Miles McCain
f2879775ef
Set default auto field 2021-07-31 23:49:01 +00:00
R. Miles McCain
c980567fee
Formatting 2021-07-31 23:44:05 +00:00
R. Miles McCain
57c8695bcc
Debug toolbar fix 2021-07-31 23:44:03 +00:00
R. Miles McCain
31ffa47fd3
Bump version 2021-07-20 13:37:37 +00:00
R. Miles McCain
73f3513dfe
Use Poetry, not Pipenv 2021-07-20 04:51:13 +00:00
Casper Verswijvelt
de235c02a7
Add ability to toggle between map chart and country/session table (#153)
* Add ability to toggle between geo map and table view

* Add back haaavk's bar visualisation for countries table

* Change text/location of map/table toggle buttons

* Add some common css to reusable class

* CSS consistency

* Use button, not span for interactive elements

Co-authored-by: R. Miles McCain <oci@sendmiles.email>
2021-07-19 23:04:56 -04:00
Kasper Seweryn
31cb616242
Change snippet url to display current host (#159)
* Change snippet url to current host

* Change site.domain to host in page.js

* Remove useless condition

* Change hostname in email messages

* Remove `hostname` command

* Fix startup_checks.sh

* Remove unused variable from startup_checks.py
2021-07-19 22:55:30 -04:00
havk
2d5fbae279
Add sessions key to hits_per_day dict (#160) 2021-07-19 22:38:45 -04:00
Casper Verswijvelt
0153b1f847
Fix ellipsis in multiple tables (#152) 2021-06-15 15:29:59 -04:00
R. Miles McCain
e43718f596
Bump version 2021-06-13 20:11:28 +00:00
Casper Verswijvelt
9832de0c19
GeoIP Map (#142)
* First working version of world map chart

* Cleanup code, fix aspect ratio, add GeoIP Map header

* Remove limited-height on session list with already limited content

* Update package lock

* Integrate map into service page

* Adjust map colors

* Adjust colors further

Co-authored-by: R. Miles McCain <github@sendmiles.email>
2021-06-13 15:50:01 -04:00