Pēteris Caune
b2c5e91c70
Implement legacy -> canonical timezone conversion
...
There are three related changes:
* Removed legacy timezones from hc.lib.tz.all_timezones
* Added data migration to update existing Check.tz values
* For backwards compatibility, added code to automatically
replace a legacy timezone with a canonical timezone when a
legacy timezone is passed to an API call
I used the timezone mapping on
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
2024-06-14 12:55:57 +03:00
Pēteris Caune
52f2b534a6
Fix API to accept Europe/Kiev but save it as Europe/Kyiv
2024-06-13 15:23:27 +03:00
Pēteris Caune
c5bd666faf
Add data migration to update timezone "Europe/Kiev" to "Europe/Kyiv"
2024-06-13 15:03:51 +03:00
Pēteris Caune
26a57343b1
Add a data migration to fill null api_notification.code values
...
Using model's default didn't quite work, as Django tried to use
the same UUID for all rows.
2024-05-17 10:43:46 +03:00
Pēteris Caune
d486d2db14
Add uniqueness constraint to api_notification.code
...
This is primarily to make notification lookups by code efficient.
We look up notifications by code in hc.api.views.boundces.
This field has a default value (uuid.uuid4), so any null values
will be filled with random UUIDs during migration.
2024-05-17 10:30:01 +03:00
Pēteris Caune
99d74d2c2c
Add type hint for view_on_site in channel admin
2024-05-01 11:18:31 +03:00
Pēteris Caune
4ec7a48082
Update the Discord integration to disable channel on HTTP 404 responses
2024-04-26 09:25:42 +03:00
Pēteris Caune
872e4d743e
Increase the timeout for sending Signal messages to 20 seconds
...
We're sometimes overshooting the 15 seconds, so let's try increasing
the limit a little.
2024-04-25 14:52:15 +03:00
Pēteris Caune
6fb46aee32
Fix integrations to include oncalendar schedules in notifications
2024-04-24 16:08:55 +03:00
Pēteris Caune
4181399659
Fix Spike integration to not disclose check's code in incident data
2024-04-22 13:01:38 +03:00
Pēteris Caune
ddae6a04bf
Fix VictorOps integration to not disclose check's code in incident data
2024-04-22 12:57:10 +03:00
Pēteris Caune
c08ba1d872
Fix PagerTree integration to not disclose check's code in incident data
2024-04-22 12:46:18 +03:00
Pēteris Caune
53f554df1e
Fix type warning
2024-04-22 12:45:51 +03:00
Pēteris Caune
994bc10857
Update PagerDuty integration to use ping.formatted_kind_created
2024-04-22 12:31:03 +03:00
Pēteris Caune
18bd44a68b
Fix PagerDuty integration to not disclose check's code in incident data
2024-04-22 12:12:22 +03:00
Pēteris Caune
e683496bed
Move reusable ping formatting code to Ping model
2024-04-19 12:38:20 +03:00
Pēteris Caune
5c73556050
Include ping's kind in Opsgenie notification's "Last ping" field
2024-04-19 12:19:26 +03:00
Pēteris Caune
b9e82e44c9
Fix type warning
2024-04-19 12:02:20 +03:00
Pēteris Caune
7f03a9e738
Improve Opsgenie notifications (include description, schedule, link...)
2024-04-19 11:58:35 +03:00
Pēteris Caune
577602ae21
Fix Opsgenie integration to not disclose check's code in incident data
2024-04-19 11:24:12 +03:00
Pēteris Caune
82ed392361
Update transport classes to use regular spaces instead of non-breaking
2024-04-17 16:35:43 +03:00
Pēteris Caune
83f161d657
Update transport classes to use Transport.last_ping() consistently
...
* Instead of check.n_pings (int) use last_ping().n
* Instead of check.last_ping (datetime) use last_ping().created
There is a time gap from creating a flip object to processing
it (sending out an alert). We want the notification to reflect
the check's state at the moment the flip was created. To do this,
we use the Transport.last_ping() helper method which retrieves
the last ping *that is not newer than the flip*.
This commit updates transport classes and templates to use
Transport.last_ping() consistently everywhere.
2024-04-15 15:09:17 +03:00
Pēteris Caune
d8a46349a8
Update Transport.last_ping() to ignore pings newer than the flip
2024-04-15 12:47:11 +03:00
Pēteris Caune
26f7facda2
Clean up
2024-04-12 20:13:35 +03:00
Pēteris Caune
81f202e2ac
Rename notify_flip -> notify
2024-04-12 15:49:47 +03:00
Pēteris Caune
4df58aaaef
Fix type warnings
2024-04-12 15:46:46 +03:00
Pēteris Caune
5bdb01baf9
Fix the Zulip integration to use Flip.new_status
2024-04-12 15:43:06 +03:00
Pēteris Caune
6631a5f76a
Fix the WhatsApp integration to use Flip.new_status
2024-04-12 15:40:19 +03:00
Pēteris Caune
3301cce251
Fix the Splunk On-Call integration to use Flip.new_status
2024-04-12 15:37:43 +03:00
Pēteris Caune
6e27d88ec9
Fix the Trello integration to use Flip.new_status
2024-04-12 15:34:54 +03:00
Pēteris Caune
bcecf058c2
Fix the Telegram integration to use Flip.new_status
2024-04-12 15:33:03 +03:00
Pēteris Caune
17e9f33bb9
Fix the Spike integration to use Flip.new_status
2024-04-12 15:30:26 +03:00
Pēteris Caune
2913b8faf5
Fix the Signal integration to use Flip.new_status
2024-04-12 15:27:13 +03:00
Pēteris Caune
f673f599c5
Fix the RocketChat integration to use Flip.new_status
2024-04-12 15:18:56 +03:00
Pēteris Caune
af36078f10
Fix the Pushover integration to use Flip.new_status
2024-04-12 15:14:19 +03:00
Pēteris Caune
a485bea2b2
Fix the Pushullet integration to use Flip.new_status
2024-04-12 15:08:25 +03:00
Pēteris Caune
f24a1dbc25
Fix the PagerDuty integration to use Flip.new_status
2024-04-12 15:03:31 +03:00
Pēteris Caune
f060874be5
Fix the PagerTree integration to use Flip.new_status
2024-04-12 15:00:53 +03:00
Pēteris Caune
e5018b1195
Fix the Opsgenie integration to use Flip.new_status
2024-04-12 14:57:21 +03:00
Pēteris Caune
4da32b9214
Fix the ntfy integration to use Flip.new_status
2024-04-12 14:53:29 +03:00
Pēteris Caune
462d4776d8
Fix the MS Teams integration to use Flip.new_status
2024-04-12 14:48:19 +03:00
Pēteris Caune
b3dad4ac57
Fix the Matrix integration to use Flip.new_status
2024-04-12 14:45:13 +03:00
Pēteris Caune
1e51d0d177
Fix the LINE Notify integration to use Flip.new_status
2024-04-12 14:42:57 +03:00
Pēteris Caune
1aa068553d
Fix the Gotify integration to use Flip.new_status
2024-04-12 14:39:08 +03:00
Pēteris Caune
5b6dfb9101
Fix Slack, Discord, Mattermost integrations to use Flip.new_status
2024-04-12 14:34:55 +03:00
Pēteris Caune
2fd50312c4
Update the Call integration to take a Flip argument
2024-04-12 14:25:19 +03:00
Pēteris Caune
fe9bb0d1e5
Fix the Apprise integration to use Flip.new_status
2024-04-12 14:17:12 +03:00
Pēteris Caune
a6b8f4c71e
Fix the shell integration to use Flip.new_status
2024-04-12 14:10:34 +03:00
Pēteris Caune
8372abf019
Fix the email integration to use Flip.new_status
2024-04-12 14:05:44 +03:00
Pēteris Caune
28fdfd1362
Change Channel.notify() signature to take Flip object as an argument
...
... and pass it to Transport.notify_flip().
This allows us to pass flip-specific information (the flip timestamp,
the new status) to transport classes.
2024-04-12 13:54:16 +03:00