feat(alerting): add alert message to slack integration
This commit is contained in:
+2
-2
@@ -36,7 +36,7 @@ type Alert struct {
|
||||
DashboardId int64
|
||||
PanelId int64
|
||||
Name string
|
||||
Description string
|
||||
Message string
|
||||
Severity AlertSeverityType
|
||||
State AlertStateType
|
||||
Handler int64
|
||||
@@ -63,7 +63,7 @@ func (alert *Alert) ShouldUpdateState(newState AlertStateType) bool {
|
||||
func (this *Alert) ContainsUpdates(other *Alert) bool {
|
||||
result := false
|
||||
result = result || this.Name != other.Name
|
||||
result = result || this.Description != other.Description
|
||||
result = result || this.Message != other.Message
|
||||
|
||||
if this.Settings != nil && other.Settings != nil {
|
||||
json1, err1 := this.Settings.Encode()
|
||||
|
||||
@@ -14,15 +14,15 @@ func TestAlertingModelTest(t *testing.T) {
|
||||
json2, _ := simplejson.NewJson([]byte(`{ "field": "value" }`))
|
||||
|
||||
rule1 := &Alert{
|
||||
Settings: json1,
|
||||
Name: "Namn",
|
||||
Description: "Description",
|
||||
Settings: json1,
|
||||
Name: "Namn",
|
||||
Message: "Message",
|
||||
}
|
||||
|
||||
rule2 := &Alert{
|
||||
Settings: json2,
|
||||
Name: "Namn",
|
||||
Description: "Description",
|
||||
Settings: json2,
|
||||
Name: "Namn",
|
||||
Message: "Message",
|
||||
}
|
||||
|
||||
Convey("Testing AlertRule equals", func() {
|
||||
|
||||
Reference in New Issue
Block a user