Alerting: Fix logging pointer address of DashboardUID and PanelID variables (#58539)
This commit is contained in:
@@ -166,6 +166,22 @@ type AlertRule struct {
|
||||
Labels map[string]string
|
||||
}
|
||||
|
||||
// GetDashboardUID returns the DashboardUID or "".
|
||||
func (alertRule *AlertRule) GetDashboardUID() string {
|
||||
if alertRule.DashboardUID != nil {
|
||||
return *alertRule.DashboardUID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// GetPanelID returns the Panel ID or -1.
|
||||
func (alertRule *AlertRule) GetPanelID() int64 {
|
||||
if alertRule.PanelID != nil {
|
||||
return *alertRule.PanelID
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
type LabelOption func(map[string]string)
|
||||
|
||||
func WithoutInternalLabels() LabelOption {
|
||||
|
||||
Reference in New Issue
Block a user