Pēteris Caune
a87c3bf04b
Rewrite to avoid self.owner access to save a SQL query
2022-11-01 09:56:34 +02:00
Pēteris Caune
26b6e20fda
Fix hc.front.views.ping_details to set duration on all ping instances
...
The code in hc.front.views.ping_details calculates durations
and sets them on the Ping.duration field, overriding the cached
property. But, it only does this for pings where the duration can
be calculated. If there's a streak of "success" pings with no
"start" pings between, the loop will not set the Ping.duration
field for most of them. So, when rendering the template, the
property code will run and cause an additional SQL query for each
ping. The fix is, in hc.front.views.ping_details, to set the
Ping.duration field for each and every ping.
2022-11-01 09:22:29 +02:00
seidnerj
c82c1a3a4a
Added duration to ping details ( #720 )
...
* Added duration to ping details. This is useful on a device with a small screen, since the duration cannot be seen in the main view so now one can see it in the ping's details.
* Changed terms across the board from "delta" to "duration"
* timedelta is now consistently imported as "td" across the entire project (even in Django generated migration files)
2022-11-01 09:18:34 +02:00
Pēteris Caune
c26dbc96f5
Refactor render_docs to support multiple docs directories
2022-10-28 12:05:01 +03:00
Pēteris Caune
85be1ce481
Fix the link to the Signal CAPTCHA form
2022-10-28 08:28:32 +03:00
Pēteris Caune
20a5e3ffca
Add tests and usability tweaks for the signal_captcha view
2022-10-27 13:00:12 +03:00
Pēteris Caune
8d75f1adc3
Add a form for submitting Signal CAPTCHA solutions
2022-10-27 11:57:52 +03:00
Pēteris Caune
a189872938
Improve type hints
2022-10-20 13:03:10 +03:00
Pēteris Caune
895e8e856a
Improve type hints
2022-10-20 12:24:50 +03:00
Pēteris Caune
e4a956679e
Move port scrubbing to hc.api.views.ping, add test case
...
cc: #714
2022-10-20 11:59:19 +03:00
Cam
5aa4c64a6f
Add IPv4 check to guard clause
2022-10-20 11:41:03 +03:00
Cam
ca1b9a6b12
Remove port portion of remote_addr
2022-10-20 11:41:03 +03:00
Pēteris Caune
a944c05f68
Upgrade to fido2 1.1.0 and simplify hc.lib.webauthn
2022-10-19 09:16:01 +03:00
Pēteris Caune
03f46630eb
Format with black
2022-10-17 17:02:11 +03:00
Pēteris Caune
161430fb10
Sort imports and add "from __future__ import annotations"
2022-10-17 16:52:15 +03:00
Pēteris Caune
5969e940a5
Switch to using "from __future__ import annotations"
2022-10-17 16:29:48 +03:00
Pēteris Caune
7ac8458b07
Optimize the "Get a List of Existing Checks" API call
2022-10-12 17:02:47 +03:00
Pēteris Caune
11997e75c8
Fix test_tokenbucket failure
2022-10-09 12:22:46 +03:00
Pēteris Caune
963f1758de
Improve type hints
2022-10-09 11:51:13 +03:00
Pēteris Caune
4d69ff937e
Add support for custom topics in Zulip notifications
...
Fixes : #583
2022-10-09 11:23:14 +03:00
Pēteris Caune
a7038a9ec4
Fix remaining mypy errors and add mypy to CI
2022-10-07 12:21:45 +03:00
Pēteris Caune
291323a531
Implement the "Clear Events" function
2022-10-07 11:19:08 +03:00
Pēteris Caune
0b0a2d993c
Add "btn-remove" CSS class for remove/delete/close buttons
2022-10-07 10:07:22 +03:00
Pēteris Caune
35ad358614
Update LargeTablePaginator to use cached_property decorator
2022-09-29 09:14:35 +03:00
Pēteris Caune
08d90697c8
Improve type hints
2022-09-29 08:58:11 +03:00
Pēteris Caune
599b4d2e52
Add more type hints
2022-09-27 18:54:22 +03:00
Berk D. Demir
b4871bd432
Webhooks support for $BODY placeholder
...
Adds support for sending ping body contents with webhooks.
Only allowed in the 'body' template of the webhook configuration.
2022-09-26 10:06:24 +03:00
Pēteris Caune
ec25b319ab
Upgrade to cronsim 2.2
2022-09-22 16:16:39 +03:00
Pēteris Caune
94b49b5f34
Fix the earliest ping lookup query to order by n instead of id
...
Ordering by id causes Postgres to pick a bad
index (api_ping_pkey). Ordering by n gives equivalent results,
but Postgres picks a better index (owner_id)
Fixes : #705
2022-09-19 19:34:14 +03:00
Pēteris Caune
5b4073374e
Clean up hc.front.views.log
2022-09-09 16:43:21 +03:00
Pēteris Caune
37bbe5a9c7
Add date filters in the Log page
2022-09-09 14:16:17 +03:00
Pēteris Caune
1b7bdea9e9
Optimize HTML output of the events log some more
2022-09-05 19:45:11 +03:00
Pēteris Caune
58da098d6b
Add timeout handling in hc.lib.s3._remove_objects()
2022-08-25 10:54:59 +03:00
Pēteris Caune
b54c5381e1
Fix tests to pass when SITE_LOGO_URL is set
2022-08-25 10:45:56 +03:00
Pēteris Caune
914202e45b
Tweak the search snippet size
2022-08-22 13:02:58 +03:00
Pēteris Caune
7ac1437c8a
Switch from "trigram" to "porter unicode61" tokenizer
...
The trigram tokenizer seems to give better results, but is not
available on the SQLite version that ships with Ubuntu 20.04.
2022-08-22 12:51:53 +03:00
Pēteris Caune
5d5e469347
Implement documentation search
2022-08-22 11:56:02 +03:00
Pēteris Caune
3b137df825
Fix latin-1 handling in headers
2022-08-18 10:49:28 +03:00
Pēteris Caune
3a8b6ef51e
Add NOSIGNAL=1 option
...
Required when using pycurl from multiple threads [1]. Not sure if
we are but better safe than sorry.
[1] http://pycurl.io/docs/latest/thread-safety.html
2022-08-18 09:55:40 +03:00
Pēteris Caune
1f10aedf6c
Add more tests for hc.lib.curl
2022-08-17 16:12:21 +03:00
Pēteris Caune
9fc13403b4
Add tests for hc.lib.curl
2022-08-17 15:39:17 +03:00
Pēteris Caune
f69a1975e3
Improve error handling
2022-08-17 14:39:29 +03:00
Pēteris Caune
218798b8d2
Fix mypy warnings
2022-08-17 14:21:00 +03:00
Pēteris Caune
7695010398
Document hc.lib.curl.request
2022-08-17 13:07:20 +03:00
Pēteris Caune
3a50396806
Switch from requests to pycurl in integration onboarding views
2022-08-17 12:02:06 +03:00
Pēteris Caune
86e364eb24
Fix hc.lib.curl to send Content-Length header
2022-08-17 10:32:52 +03:00
Pēteris Caune
61a0cf9c2f
Fix Content-Type header when uploading JSON data
2022-08-17 10:11:18 +03:00
Pēteris Caune
fc127e3c01
Fix non-ASCII character handling in URLs
2022-08-17 09:22:30 +03:00
Pēteris Caune
e156c6bcae
Fix hc.lib.curl.request to handle the "auth" kwarg
2022-08-16 12:46:22 +03:00
Pēteris Caune
62acb04bba
Fix hc.lib.curl.request to handle the "params" kwarg
2022-08-16 12:28:53 +03:00