Commit graph

1936 commits

Author SHA1 Message Date
Pēteris Caune
7a5b6b6b31
Fix tests 2022-05-07 20:56:39 +03:00
Pēteris Caune
62c631a1e8
Increase the default profile limits
Accounts on self-hosted instances should have "unlimited" limits.
I had originally assumed 500 checks should be *enough for everybody*,
but in practice people do have accounts with 1000+ checks,
and may want to do scale testing with even more checks
(see #649). This commit raises the "unlimited" limits higher
to make it less likely users bump into them.
2022-05-07 20:51:07 +03:00
Pēteris Caune
f8382fd84e
Increase max displayed duration from 24h to 72h
Fixes: #644
2022-05-02 12:07:14 +03:00
Pēteris Caune
d1d9dd5021
Fix "Test" button for integrations that only send "up" notifications 2022-05-02 11:55:00 +03:00
Pēteris Caune
b776762ba9
Fix prunenotifications to handle checks with missing pings
Fixes: #636
2022-04-20 16:25:19 +03:00
Pēteris Caune
4c58c55741
Fix tests to skip time.sleep() 2022-04-19 11:39:28 +03:00
Pēteris Caune
aa2571b7fc
Add small delay in transports.Email.notify to allow ping body to upload 2022-04-19 11:37:48 +03:00
Pēteris Caune
32f021b9c5
Update email template to handle not yet uploaded ping bodies 2022-04-13 10:43:12 +03:00
Pēteris Caune
bb38ad3187
Remove the Signal CAPTCHA form (use "submitchallenge" command instead) 2022-04-11 14:24:28 +03:00
Pēteris Caune
6124ad59cd
Improve CAPTCHA alert email 2022-04-11 09:38:30 +03:00
Pēteris Caune
d1033ba6b5
Fix CAPTCHA email alert 2022-04-11 09:34:58 +03:00
Pēteris Caune
90d30c8b62
Add management command to submit Signal CAPTCHAs 2022-04-11 09:29:33 +03:00
Pēteris Caune
842f0c3e16
Improve CSS in Channel and Notification admin 2022-04-09 17:16:10 +03:00
Pēteris Caune
cb36e17440
Improve Notification admin 2022-04-09 16:43:39 +03:00
Pēteris Caune
7bd916558b
Add @login_required and update CHANGELOG 2022-04-09 16:35:57 +03:00
Pēteris Caune
131ffe14fb
Add experimental UI for submitting Signal rate limit challenges 2022-04-09 16:29:26 +03:00
Pēteris Caune
1826f6f654
Improve Channel and Notification admin 2022-04-09 15:03:59 +03:00
Pēteris Caune
14e2ee39f4
Clean up code in HttpTransport._request 2022-04-08 17:11:40 +03:00
Pēteris Caune
c5e677681b
Add test for hc_check_up and update CHANGELOG 2022-04-08 11:47:50 +03:00
Igor Rzegocki
e7333d6352 Add hc_check_started prometheus metrics 2022-04-08 11:25:57 +03:00
Pēteris Caune
a3d1bc7386
Implement the "started" progress spinner in the details pages 2022-04-08 10:56:36 +03:00
Pēteris Caune
29a24c34b0
Fix tests 2022-04-07 09:40:13 +03:00
Pēteris Caune
911d63a2eb
Add logic to alert ADMINS when Signal transport hits a CAPTCHA challenge 2022-04-07 09:31:20 +03:00
Pēteris Caune
1b2defa6ee
Optimize HTML output in /checks/<uuid>/log/ 2022-04-04 11:11:55 +03:00
Pēteris Caune
1d20be94ff
Optimize HTML output in /checks/<uuid>/log/
* Simplify the "n" cell
* Don't send details URLs, construct them on client side
* Strip microseconds in timestamps
2022-04-04 09:51:07 +03:00
Pēteris Caune
e11e8587a0
Tweak wording in the "check limit reached" message 2022-04-01 18:29:27 +03:00
Pēteris Caune
c4bbb4432a
Fix unwanted localization in badge SVG generation
Fixes: #629
2022-04-01 15:58:17 +03:00
Pēteris Caune
a6e52bc254
Tweak wording in the "check limit reached" message 2022-04-01 14:36:56 +03:00
Pēteris Caune
6958a9e898
Add a "Download Original" link in the "Ping Details" dialog 2022-03-16 17:31:01 +02:00
Pēteris Caune
527bc32d67
Fix hc.lib.s3.get_object to handle missing S3 credentials 2022-03-14 10:21:11 +02:00
Pēteris Caune
620fda5589
Tweak User and Profile admin
- change the "By check count" filter in Profile admin
- add "Last active" column in user list view
2022-03-13 17:04:00 +02:00
Pēteris Caune
7ae0849652
Fix crash in _remove_objects when n is negative 2022-03-11 14:33:46 +02:00
Pēteris Caune
56a6fe2381
Add "deactivate" action in user admin 2022-03-09 17:12:16 +02:00
Pēteris Caune
664c6018ab
Add pruneobjects management command and update README 2022-03-09 15:30:52 +02:00
Pēteris Caune
fcaf894d46
Fix Mattermost integration to treat 404 as a transient error
Fixes: #613
2022-03-09 10:10:38 +02:00
Pēteris Caune
16a2cd204e
Fix unwanted localization of period and grace values
cc: #617
2022-03-09 09:13:09 +02:00
Pēteris Caune
beda1f1a05
Remove dead code 2022-03-04 17:37:05 +02:00
Pēteris Caune
c1ac2ffc9c
Fix s3.py to reuse Minio client and retry InternalError errors 2022-03-04 17:33:13 +02:00
Pēteris Caune
1aad3e181b
Add "block" boolean argument to hc.lib.s3.remove_objects 2022-03-04 14:26:11 +02:00
Pēteris Caune
4422f2cf95
Add timeout for S3 operations 2022-03-04 13:09:38 +02:00
Pēteris Caune
5774757843
Add handling for missing S3 objects 2022-03-04 12:48:28 +02:00
Pēteris Caune
82f3b0a046
Fix ping_details to run get_body() only once 2022-03-04 12:37:43 +02:00
Pēteris Caune
6b82f1d17f
Document the trickery in s3.py 2022-02-28 15:36:26 +02:00
Pēteris Caune
67edf5a442
Fix tests 2022-02-28 11:55:47 +02:00
Pēteris Caune
05bb80130b
Add support for storing ping bodies in S3-compatible object storage
This is an initial, minimal implementation. It is currently
missing: error handling, timeouts for S3 operations, documentation.

cc: #609
2022-02-28 11:51:04 +02:00
Pēteris Caune
5ecd625c0b
Add Ping.body_raw field for storing body as bytes 2022-02-25 16:50:54 +02:00
Pēteris Caune
3b56fd4175
Fix Signal integration to handle UNREGISTERED_FAILURE errors 2022-02-23 11:32:17 +02:00
Pēteris Caune
8b0cbde680
Remove X-Bounce-Url from report email headers (unused) 2022-02-21 11:10:55 +02:00
Pēteris Caune
613318b26c
Add logging for OSError exceptions in the Signal transport class
signal-cli has some stability issues, this adds extra
logging so its easier to keep an eye on it.

With the default Django logging configuration, when OSError
is raised, Django will send an error report to ADMINS.

If sentry_sdk is installed and configured, the exception
will also show up in Sentry.
2022-02-18 17:13:12 +02:00
Pēteris Caune
8dcc1bfdc1
Fix Telegram bot to handle TransportError exceptions
The Telegram onboarding flow in a nutshell:

1. user invites our bot in a channel and types "/start"
2. Telegram calls our webhook (/integration/telegram/bot/)
3. Our webhook generates and posts an invite link to the chat
4. User clicks the invite link, we show "Add Telegram" form
...

In step 3, when we post the invitation link, if Telegram returns
an error (for example, CHAT_WRITE_FORBIDDEN), our webhook was
throwing HTTP 500. In response, Telegram would retry the webhook
several times, but that's probably futile.

After this commit, the webhook will return HTTP 200, regardless
of whether we could post the invite to the Telegram chat or not.
2022-02-16 16:12:54 +02:00