style: go fmt with simplify
This commit is contained in:
@@ -39,7 +39,7 @@ func TestAlertingEvaluationHandler(t *testing.T) {
|
||||
Convey("Show return false with not passing asdf", func() {
|
||||
context := NewEvalContext(context.TODO(), &Rule{
|
||||
Conditions: []Condition{
|
||||
&conditionStub{firing: true, operator: "and", matches: []*EvalMatch{&EvalMatch{}, &EvalMatch{}}},
|
||||
&conditionStub{firing: true, operator: "and", matches: []*EvalMatch{{}, {}}},
|
||||
&conditionStub{firing: false, operator: "and"},
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
package notifiers
|
||||
|
||||
import (
|
||||
"github.com/grafana/grafana/pkg/log"
|
||||
"github.com/grafana/grafana/pkg/services/alerting"
|
||||
m "github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/metrics"
|
||||
"net/url"
|
||||
"fmt"
|
||||
"github.com/grafana/grafana/pkg/bus"
|
||||
"github.com/grafana/grafana/pkg/log"
|
||||
"github.com/grafana/grafana/pkg/metrics"
|
||||
m "github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/services/alerting"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
func init() {
|
||||
alerting.RegisterNotifier(&alerting.NotifierPlugin{
|
||||
Type: "LINE",
|
||||
Name: "LINE",
|
||||
Type: "LINE",
|
||||
Name: "LINE",
|
||||
Description: "Send notifications to LINE notify",
|
||||
Factory: NewLINENotifier,
|
||||
Factory: NewLINENotifier,
|
||||
OptionsTemplate: `
|
||||
<div class="gf-form-group">
|
||||
<h3 class="page-heading">LINE notify settings</h3>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
package notifiers
|
||||
|
||||
import (
|
||||
|
||||
@@ -113,7 +113,7 @@ func HandleAlertsQuery(query *m.GetAlertsQuery) error {
|
||||
return err
|
||||
}
|
||||
|
||||
for i, _ := range alerts {
|
||||
for i := range alerts {
|
||||
if alerts[i].ExecutionError == " " {
|
||||
alerts[i].ExecutionError = ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user