Pēteris Caune
a3766734ae
Update settings.py to use f-strings
2024-12-19 09:14:38 +02:00
Pēteris Caune
45b8bd64df
Simplify hosting under subpath
...
Instead of using SCRIPT_NAME / FORCE_SCRIPT_NAME, PATH_INFO
and their associated issues, update urls.py to add the subpath
to all routes. This allows us to get rid of several hacks:
* the uwsgi.ini magic which parses SITE_ROOT, sets SCRIPT_NAME
and fixes PATH_INFO
* set_script_prefix() in sendalerts
* chopping the subpath off an URL in hc.accounts.views._allow_redirect
The idea comes from @apollo13
in https://code.djangoproject.com/ticket/35985#comment:5
cc: #1091
2024-12-19 09:04:45 +02:00
Pēteris Caune
281ce65504
isort
2024-12-18 13:42:18 +02:00
Pēteris Caune
0fb011464f
Update SMS notification template to include failure reason
...
cc: #1069
2024-12-18 12:31:22 +02:00
Pēteris Caune
aba1161597
Update RocketChat notification template to include failure reason
...
cc: #1069
2024-12-18 11:51:16 +02:00
Pēteris Caune
22695bfdde
Update Spike notification template to include failure reason
...
cc: #1069
2024-12-18 09:39:56 +02:00
Pēteris Caune
3fa80a8800
Update PagerTree notification template to include failure reason
...
cc: #1069
2024-12-18 09:13:05 +02:00
Pēteris Caune
fd0d58e96d
Update Zulip notification template to include failure reason
...
cc: #1069
2024-12-18 09:00:56 +02:00
Pēteris Caune
46c51787bb
Update PushBullet notification template to include failure reason
...
cc: #1069
2024-12-18 08:50:58 +02:00
Pēteris Caune
c28ae32261
Update VictorOps notification template to include failure reason
...
cc: #1069
2024-12-17 16:01:51 +02:00
Pēteris Caune
dcc5d7a7c4
Update Gotify notification template to include failure reason
...
cc: #1069
2024-12-17 15:22:19 +02:00
Pēteris Caune
d8d8d280ca
Update OpsGenie notification template to include failure reason
...
cc: #1069
2024-12-17 10:09:55 +02:00
Pēteris Caune
f390d6eece
Update MS Teams Workflows notification to include failure reason
...
cc: #1069
2024-12-17 09:50:29 +02:00
Pēteris Caune
aff41f6688
Update ntfy notification template to include failure reason
...
cc: #1069
2024-12-17 08:58:31 +02:00
Pēteris Caune
4628deb395
Update PagerDuty notification template to include failure reason
...
cc: #1069
2024-12-17 08:46:35 +02:00
Pēteris Caune
cd70e88c52
Update Pushover notification template to include failure reason
...
cc: #1069
2024-12-17 08:23:01 +02:00
Pēteris Caune
4808f35a4c
Update Signal notification template to include failure reason
...
cc: #1069
2024-12-16 17:20:28 +02:00
Pēteris Caune
3769bf3ede
Fix mypy warning
2024-12-16 15:55:36 +02:00
Pēteris Caune
ca0d639c6b
Update Slack notification template to include failure reason
...
cc: #1069
2024-12-16 15:43:25 +02:00
Pēteris Caune
f41e1e52ea
Clean up transports.Matrix.get_url()
2024-12-16 15:24:16 +02:00
Pēteris Caune
645efa5ce4
Update Telegram notification template to include failure reason
...
cc: #1069
2024-12-16 15:20:45 +02:00
Pēteris Caune
ff5b060e86
Move repeating flip reason descriptions to Flip.reason_long()
2024-12-16 14:35:36 +02:00
Pēteris Caune
e09fd28836
Improve Matrix notifications (include tags, period, last ping type etc.)
...
cc: #1069
2024-12-13 13:34:41 +02:00
Pēteris Caune
a2c7259d1b
Fix redirects after login when using a path in SITE_ROOT
...
Fixes : #382
cc: #1091
2024-12-09 12:35:02 +02:00
Pēteris Caune
0ee3f03baf
Fix redirect to login when SITE_ROOT contains a path
...
cc: #382 , #1091
2024-12-09 12:20:09 +02:00
Pēteris Caune
b685e66b71
Add a workaround for reverse() omitting script prefix when on thread
...
https://code.djangoproject.com/ticket/35985
cc: #1091
2024-12-09 11:53:53 +02:00
Pēteris Caune
7836da6448
Update settings.py to allow subpath in SITE_ROOT
...
If SITE_ROOT contains a subpath
(e.g., "http://example.org/healthchecks "), settings.py now adjusts
FORCE_SCRIPT_NAME and STATIC_URL.
Also, hc.lib.urls.absolute_reverse() now recognizes subpath in
SITE_ROOT, and makes sure it does not show up twice in the
generated URLs.
cc: #1091
2024-12-04 10:37:52 +02:00
Pēteris Caune
22268c1484
Move absolute URL construction to hc.lib.urls.absolute_reverse()
...
absolute_reverse() works the same as django.urls.reverse()
except it generates absolute URLs (starting with http[s]://)
2024-12-03 17:24:27 +02:00
Pēteris Caune
5e848f4976
Add index on api_flip (owner_id, created)
...
This helps queries in hc.front.views._get_events,
especially for checks that are flipping between up and down
states a lot.
2024-12-03 10:37:01 +02:00
Pēteris Caune
4a618cd7e9
Fix elf -> self
2024-12-02 11:32:53 +02:00
Jacek Kowalski
8485c758eb
Fix Trello integration (token regexp too specific) ( #1094 )
...
* Fix Trello configuration failing with HTTP 400
* Add additional tests regarding Trello token
2024-12-02 11:31:02 +02:00
Pēteris Caune
cb7e53677d
Increase ntfy.sh topic max length to 64
2024-11-25 11:16:15 +02:00
Pēteris Caune
62b10be5fe
Implement "no matching checks" message when searching/filtering
...
(instead of showing a table with a header row and no data rows)
2024-11-15 12:11:18 +02:00
Pēteris Caune
5ecea08e48
Fix type annotation
2024-11-14 14:28:47 +02:00
Pēteris Caune
b328c8739f
Reduce the number of Check.get_status() calls
2024-11-14 13:33:21 +02:00
Pēteris Caune
7c8d43414f
Implement filtering by status on the server side
2024-11-14 12:27:31 +02:00
Pēteris Caune
5c67c94654
Add a missing article
2024-11-08 11:31:09 +02:00
Pēteris Caune
5912758a8a
Update email alerts to mention failure reason
...
cc: #1069
2024-11-08 11:20:44 +02:00
Pēteris Caune
9edae634c7
Add Flip.reason field
...
cc: #1069
2024-11-08 10:24:50 +02:00
Pēteris Caune
79da9e9f4f
Fix auto-fixable ruff warnings
...
(`ruff check --fix`)
2024-11-07 15:15:58 +02:00
Pēteris Caune
4907073c55
Remove unneeded quotes
2024-11-06 19:32:44 +02:00
Pēteris Caune
e048ec4c48
Fix "class Foo(object):" -> "class Foo:"
...
In Python 3 these are equivalent, and shorter is better.
2024-10-29 17:57:50 +02:00
Pēteris Caune
a6ca589b34
Fix pyright warning
2024-10-29 11:54:48 +02:00
Pēteris Caune
c372e3232f
Update MS Teams legacy webhook retirement date to Jan 2025
...
Microsoft pushed it forward again:
https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/
2024-10-25 09:51:58 +03:00
Pēteris Caune
e3cbe79f57
Update CustomHeaderMiddleware to normalize email addresses to lower case
...
Also add a data migration to normalize any already existing user
accounts with non-lower-case email addresses too.
Fixes : #1074
2024-10-24 13:22:37 +03:00
Pēteris Caune
374f034bf9
Update check's status text to show how long it has been running
...
In check's details page, we have a "Current Status" section.
It shows an icon, a status text, and a table with downtime
statistics. When the check has received a start signal, the icon
also has an animated progress indicator under it.
With this change, the status text will also indicate the running
state and the elapsed time. Example:
"Currently running, started 3 minutes ago".
2024-10-23 14:14:44 +03:00
Pēteris Caune
9e69b5b5f5
Fix smtp listener to reject email addresses with unexpected domain
...
cc: #1077
2024-10-21 17:48:57 +03:00
Pēteris Caune
84f22c8978
Fix type warnings
2024-10-21 17:34:02 +03:00
Pēteris Caune
a5d4dc2db5
Fix smtp listener to reject email addresses with non-UUID local parts
...
cc: #1077 )
2024-10-21 15:56:24 +03:00
Pēteris Caune
c91213179f
Fix API to gracefully handle too long slugs
2024-10-16 12:35:30 +03:00