tech: avoid alias for importing models in alerting (#17041)

ref #14679
This commit is contained in:
Carl Bergquist
2019-05-14 08:15:05 +02:00
committed by GitHub
parent a87a763d83
commit 13f137a17d
47 changed files with 261 additions and 259 deletions
+4 -4
View File
@@ -8,11 +8,11 @@ import (
"github.com/grafana/grafana/pkg/components/null"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/infra/log"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/models"
)
type NotificationTestCommand struct {
State m.AlertStateType
State models.AlertStateType
Name string
Type string
Settings *simplejson.Json
@@ -29,7 +29,7 @@ func init() {
func handleNotificationTestCommand(cmd *NotificationTestCommand) error {
notifier := NewNotificationService(nil).(*notificationService)
model := &m.AlertNotification{
model := &models.AlertNotification{
Name: cmd.Name,
Type: cmd.Type,
Settings: cmd.Settings,
@@ -51,7 +51,7 @@ func createTestEvalContext(cmd *NotificationTestCommand) *EvalContext {
PanelId: 1,
Name: "Test notification",
Message: "Someone is testing the alert notification within grafana.",
State: m.AlertStateAlerting,
State: models.AlertStateAlerting,
}
ctx := NewEvalContext(context.Background(), testRule)