tech(alerting): change interval -> frequency

This commit is contained in:
bergquist
2016-05-30 09:31:05 +02:00
parent 16a9e56eca
commit 077be210da
10 changed files with 9 additions and 12 deletions

View File

@@ -112,7 +112,7 @@ func alertIsDifferent(rule1, rule2 m.AlertRule) bool {
result = result || rule1.CritOperator != rule2.CritOperator
result = result || rule1.Query != rule2.Query
result = result || rule1.QueryRefId != rule2.QueryRefId
result = result || rule1.Interval != rule2.Interval
result = result || rule1.Frequency != rule2.Frequency
result = result || rule1.Title != rule2.Title
result = result || rule1.Description != rule2.Description
result = result || rule1.QueryRange != rule2.QueryRange

View File

@@ -30,7 +30,7 @@ func TestAlertRuleChangesDataAccess(t *testing.T) {
CritLevel: 50,
WarnOperator: ">",
CritOperator: ">",
Interval: "10",
Frequency: 10,
Title: "Alerting title",
Description: "Alerting description",
QueryRange: 3600,

View File

@@ -25,7 +25,7 @@ func TestAlertingDataAccess(t *testing.T) {
CritLevel: 50,
WarnOperator: ">",
CritOperator: ">",
Interval: "10",
Frequency: 10,
Title: "Alerting title",
Description: "Alerting description",
QueryRange: 3600,
@@ -58,7 +58,7 @@ func TestAlertingDataAccess(t *testing.T) {
alert := alertQuery.Result[0]
So(err2, ShouldBeNil)
So(alert.Interval, ShouldEqual, "10")
So(alert.Frequency, ShouldEqual, 10)
So(alert.WarnLevel, ShouldEqual, 30)
So(alert.CritLevel, ShouldEqual, 50)
So(alert.WarnOperator, ShouldEqual, ">")
@@ -188,7 +188,7 @@ func TestAlertingDataAccess(t *testing.T) {
CritLevel: 50,
WarnOperator: ">",
CritOperator: ">",
Interval: "10",
Frequency: 10,
Title: "Alerting title",
Description: "Alerting description",
QueryRange: 3600,

View File

@@ -24,7 +24,7 @@ func TestAlertingStateAccess(t *testing.T) {
CritLevel: 50,
WarnOperator: ">",
CritOperator: ">",
Interval: "10",
Frequency: 10,
Title: "Alerting title",
Description: "Alerting description",
QueryRange: 3600,

View File

@@ -20,7 +20,6 @@ func addAlertMigrations(mg *Migrator) {
{Name: "warn_operator", Type: DB_NVarchar, Length: 10, Nullable: false},
{Name: "crit_level", Type: DB_BigInt, Nullable: false},
{Name: "crit_operator", Type: DB_NVarchar, Length: 10, Nullable: false},
{Name: "interval", Type: DB_NVarchar, Length: 255, Nullable: false},
{Name: "frequency", Type: DB_BigInt, Nullable: false},
{Name: "title", Type: DB_NVarchar, Length: 255, Nullable: false},
{Name: "description", Type: DB_NVarchar, Length: 255, Nullable: false},