Alerting: Support for active time intervals in notification policies (#104252)
* add active_time_intervals to route model * update k8s compat layer * update notification policies service to validate active time intervals * update integration tests * update openapi * add active time interval to model * update route generator to include active time interval * Update storage list and rename methods to handle active intervals * update api model * update provisioning and export models * update ui to allow active timing config * update i18n * fix snapshots for ui tests * run prettier * Alerting: Active time intervals UI naming (#104402) * update naming in UI * update naming in the edit page title * update translations * update alerting module --------- Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com> Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com> Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
This commit is contained in:
co-authored by
Sonia Aguilar
Sonia Aguilar
parent
a8dee54aa4
commit
3e2296acd3
@@ -630,6 +630,13 @@ func escapeRouteExport(r *definitions.RouteExport) {
|
||||
}
|
||||
r.MuteTimeIntervals = &muteTimeIntervals
|
||||
}
|
||||
if r.ActiveTimeIntervals != nil {
|
||||
intervals := make([]string, len(*r.ActiveTimeIntervals))
|
||||
for i, timeInterval := range *r.ActiveTimeIntervals {
|
||||
intervals[i] = addEscapeCharactersToString(timeInterval)
|
||||
}
|
||||
r.ActiveTimeIntervals = &intervals
|
||||
}
|
||||
for i := range r.Routes {
|
||||
escapeRouteExport(r.Routes[i])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user