From 23c7a6f6829a374359c499756fcc046bd4eb6b83 Mon Sep 17 00:00:00 2001 From: Tommy <61849757+tommysitehost@users.noreply.github.com> Date: Wed, 26 Apr 2023 14:22:18 +1200 Subject: [PATCH] Add 2, 3 and 6 hours silence options (#1822) # What this PR does This PR adds additional silence options in the UI. Currently we only have 1 hour, 4 hours and 12 hours silence options. I think it's worth it to have finer silence options. ## Which issue(s) this PR fixes No issue ticket but I can create one. ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) --- CHANGELOG.md | 6 ++++++ engine/apps/alerts/models/alert_group.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b68b738ea5..55bd4c07a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Added + +- Add 2, 3 and 6 hours silence options + ## v1.2.15 (2023-04-24) ### Fixed diff --git a/engine/apps/alerts/models/alert_group.py b/engine/apps/alerts/models/alert_group.py index bbf746137a..fb517562ae 100644 --- a/engine/apps/alerts/models/alert_group.py +++ b/engine/apps/alerts/models/alert_group.py @@ -241,7 +241,10 @@ class AlertGroup(AlertGroupSlackRenderingMixin, EscalationSnapshotMixin, models. SILENCE_DELAY_OPTIONS = ( (1800, "30 minutes"), (3600, "1 hour"), + (7200, "2 hours"), + (10800, "3 hours"), (14400, "4 hours"), + (21600, "6 hours"), (43200, "12 hours"), (57600, "16 hours"), (72000, "20 hours"),