refactor(alerting): changes interval to string from int
This commit is contained in:
@@ -20,7 +20,7 @@ func TestAlertingDataAccess(t *testing.T) {
|
||||
QueryRefId: "A",
|
||||
WarnLevel: "> 30",
|
||||
CritLevel: "> 50",
|
||||
Interval: 10,
|
||||
Interval: "10",
|
||||
Title: "Alerting title",
|
||||
Description: "Alerting description",
|
||||
QueryRange: "5m",
|
||||
@@ -45,7 +45,7 @@ func TestAlertingDataAccess(t *testing.T) {
|
||||
alert, err2 := GetAlertsByDashboard(1, 1)
|
||||
|
||||
So(err2, ShouldBeNil)
|
||||
So(alert.Interval, ShouldEqual, 10)
|
||||
So(alert.Interval, ShouldEqual, "10")
|
||||
So(alert.WarnLevel, ShouldEqual, "> 30")
|
||||
So(alert.CritLevel, ShouldEqual, "> 50")
|
||||
So(alert.Query, ShouldEqual, "Query")
|
||||
|
||||
@@ -15,7 +15,7 @@ func addAlertMigrations(mg *Migrator) {
|
||||
{Name: "query_ref_id", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "warn_level", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "crit_level", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "interval", Type: DB_BigInt, Nullable: false},
|
||||
{Name: "interval", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "title", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "description", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "query_range", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
|
||||
Reference in New Issue
Block a user