Pēteris Caune
2a0ae809a7
Add DowntimeRecord.no_data field
2023-09-27 17:43:18 +03:00
Pēteris Caune
58d7c8cc55
Simplify DowntimeSummary
2023-09-27 17:16:16 +03:00
Pēteris Caune
f7af738c76
Add monthly uptime percentage display in Check Details page
...
Fixes : #773
2023-09-27 13:44:35 +03:00
Pēteris Caune
db5d8adeb5
Switch from namedtuple to dataclass for mutability
2023-09-27 11:03:58 +03:00
Pēteris Caune
46dbaff2c3
Update Check.downtimes() to return records in descending datetime order
...
This way we can avoid one sort operation in Check.downtimes()
and one reverse operation in the "details_downtimes.html" template.
2023-09-27 10:42:05 +03:00
Pēteris Caune
f0085933c3
Update Check.downtimes() to return a list of namedtuples
...
This way it should be easier to add extra fields like uptime
to the returned data structure.
2023-09-27 10:18:52 +03:00
Pēteris Caune
aa541e760b
Add Channel.opsgenie property
...
It replaces:
* Channel.opsgenie_key
* Channel.opsgenie_region
Also, add data migration to normalize Opsgenie channel values
to always be JSON maps.
2023-09-11 16:44:38 +03:00
Pēteris Caune
dcf9f327f6
Add Channel.email property
...
It replaces:
* Channel.email_value
* Channel.email_notify_up
* Channel.email_notify_down
2023-09-11 11:45:25 +03:00
Pēteris Caune
cf4498eca2
Add Channel.phone property
...
It has typed fields: value, notify_up, notify_down.
It replaces:
* Channel.phone_number
* Channel.sms_notify_up
* Channel.sms_notify_down
* Channel.whatsapp_notify_up
* Channel.whatsapp_notify_down
* Channel.signal_notify_up
* Channel.signal_notify_down
2023-09-09 11:09:52 +03:00
Pēteris Caune
ee40cd8dab
Fix type warnings
2023-09-08 16:47:27 +03:00
Pēteris Caune
f1d1ccd281
Add Channel.shell and Channel.pd properties
2023-09-08 16:33:12 +03:00
Pēteris Caune
e17f555fb1
Replace Channel.telegram_* properties with a Channel.telegram property
...
The Channel.telegram property has typed fields:
id, thread_id, type, name.
Usage sites change from `channel.telegram_id` to `channel.telegram.id`
2023-09-08 16:02:26 +03:00
Pēteris Caune
5746bbb015
Improve type hints in hc.api.models
2023-09-08 15:58:39 +03:00
Pēteris Caune
9173475194
Improve type hints in hc.api.views
2023-09-07 14:38:55 +03:00
Pēteris Caune
05d2d0065e
Remove usage of backports.zoneinfo
2023-09-06 12:54:27 +03:00
Pēteris Caune
c9bf3132fe
Replace usage of typing.List, typing.Optional etc. with modern syntax
2023-09-06 11:27:43 +03:00
Pēteris Caune
65b3acf964
Improve type hints in hc.accounts.views
2023-09-06 10:02:50 +03:00
Pēteris Caune
0c83ca4fd8
Improve type hints in hc.accounts.forms
2023-09-05 18:31:35 +03:00
Pēteris Caune
8472bd5d1e
Update Channel.webhook_spec to return an object instead of a dict
...
This simplifies type annotations, as object's fields
can be type-annotated easily, and JSON->object parsing can be handled
by Pydantic.
2023-09-03 16:20:22 +03:00
Pēteris Caune
aecdbfb017
Remove dead code in Channel.webhook_spec
...
The "method_down" and "method_up" fields are always set
in webhook configurations, no point checking them.
2023-09-02 16:54:16 +03:00
Pēteris Caune
477f690057
Improve type hints
2023-08-31 14:17:08 +03:00
Pēteris Caune
3311712610
Improve type hints, add reusable JSON type aliases in hc.lib.typealias
2023-08-31 12:17:15 +03:00
Pēteris Caune
6bd25cc52c
Improve type hints in hc.api.transports
2023-08-30 16:08:43 +03:00
Pēteris Caune
2b73ddde17
Improve type hints
2023-08-29 19:10:27 +03:00
Pēteris Caune
afd3d62c08
Improve type hints
2023-08-29 16:51:22 +03:00
Pēteris Caune
4147bd951d
Make Channel.disabled non-nullable
2023-08-29 16:29:29 +03:00
Pēteris Caune
9483556a1f
Improve type hints and fix bugs revealed by type checker
2023-08-29 16:07:54 +03:00
Pēteris Caune
bbb06ff358
Add support for ntfy access tokens
...
Fixes : #879
2023-08-23 14:52:50 +03:00
Pēteris Caune
897cf0088b
Add bold and monospace text formatting in Signal notifications
2023-08-04 12:38:34 +03:00
Pēteris Caune
32b607533a
Make QoL improvements in admin
...
* Add "view on site" links in Check, Channel, and Project admins
* Expose over_limit_date in Profile admin
* Display last notify duration ("Time" column) in Channel admin
* Add last notify duration filter for Channel admin
2023-07-11 12:14:45 +03:00
Pēteris Caune
89c26b46a4
Refactor sendalerts and Flip.send_alerts() for cleaner logs
2023-07-08 10:28:40 +03:00
Pēteris Caune
368e76016d
Add Channel.last_notify_duration, use in sendalerts for prioritization
2023-07-07 16:40:23 +03:00
Pēteris Caune
68c42db58c
Add support for Telegram topics
...
Fixes : #852
2023-06-28 15:22:59 +03:00
Pēteris Caune
20e8408f24
Update v2->v3
2023-06-15 10:29:25 +03:00
Pēteris Caune
4ccee09f73
Add /api/v3/ (adds ability to set slug when creating or updating checks)
2023-06-14 16:52:45 +03:00
Pēteris Caune
fcf21c68a7
Reduce code repetition in Channel.transport()
2023-06-08 15:46:06 +03:00
Pēteris Caune
3e8a89bb7a
Move Slack message preparation from template to Python
2023-06-04 09:44:15 +03:00
Pēteris Caune
1d003da29d
Fix the display of ignored pings with non-zero exitstatus
2023-06-03 19:37:45 +03:00
Pēteris Caune
0ecbe1bd1d
Move Rocket.Chat message preparation from template to Python
...
cc: #463
2023-06-03 18:15:29 +03:00
Pēteris Caune
0f8c459987
Improve Rocket.Chat notification template
...
* Move the text field outside of the attachment object
* Rename "username" to "alias"
* Rename "icon_url" to "avatar"
* Remove unused, Slack-specific fields
* Add "Last Ping Body" field with a link to view full body
cc: #463
2023-06-03 09:58:34 +03:00
Pēteris Caune
eb7dfe5c63
Add Rocket.Chat integration
...
cc: #463
2023-05-30 12:30:29 +03:00
Pēteris Caune
4e3034978f
Fix another instance of pinging/deleting race condition
2023-05-02 14:11:56 +03:00
Pēteris Caune
eab52ed73c
Add email fallback for Signal notifications that hit rate limit
2023-04-04 10:21:35 +03:00
Pēteris Caune
311f7064dc
Fix a race condition in Check.ping method
...
The code in Check.ping() updates a Check object, then
creates a Ping object. There's a possible race condition
where the "sendalerts" command sees# the updated Check object
before the Ping object is created. This is especially likely
when offloading ping bodies to S3, because Ping gets created
*after* the upload completes, which can take some time.
To avoid this, put both operations inside a transaction,
but keep the S3 upload *outside* the transaction--uploads
can hang, and we want to avoid long transactions.
2023-02-08 13:12:05 +02:00
Pēteris Caune
2cfb37f097
Add rate limiting by client IP in the signup and login views
2023-01-23 14:35:45 +02:00
Pēteris Caune
a9b084ec9a
Add "Start Keyword" filtering for inbound emails
...
Fixes : #716
2023-01-16 13:19:35 +02:00
Pēteris Caune
8d06a3e896
Add a "verify number" step in the Signal onboarding flow
2023-01-10 12:54:25 +02:00
Pēteris Caune
2ed197e7ef
Improve type hints, mark arguments as keyword-only
2022-12-20 09:50:47 +02:00
Pēteris Caune
4863dda6c3
Add /api/v2/ which reports check's status slightly differently
...
cc: #633
2022-12-19 22:31:38 +02:00
Pēteris Caune
818ccad56f
Fix week, month boundary calculation to use user's timezone
2022-12-01 13:46:21 +02:00