Files
grafana/apps/alerting/notifications/pkg/apis/alertingnotifications/v0alpha1/routingtree_ext.go
T
Yuri Tseretyan 896a56ada8 Migrate Alerting Notifications API to app installer (#109309)
* migrate to new manifest format
* rename app to alerting.notifications to not conflict with rules
* disable custom field selectors as they are not supported in appinstaller
2025-09-23 09:42:40 -04:00

25 lines
543 B
Go

package v0alpha1
const UserDefinedRoutingTreeName = "user-defined"
func (o *RoutingTree) GetProvenanceStatus() string {
if o == nil || o.Annotations == nil {
return ""
}
s, ok := o.Annotations[ProvenanceStatusAnnotationKey]
if !ok || s == "" {
return ProvenanceStatusNone
}
return s
}
func (o *RoutingTree) SetProvenanceStatus(status string) {
if o.Annotations == nil {
o.Annotations = make(map[string]string, 1)
}
if status == "" {
status = ProvenanceStatusNone
}
o.Annotations[ProvenanceStatusAnnotationKey] = status
}