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
+3 -3
View File
@@ -4,7 +4,7 @@ import (
"github.com/grafana/grafana/pkg/bus"
"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"
"github.com/grafana/grafana/pkg/services/alerting"
)
@@ -40,7 +40,7 @@ func init() {
}
func NewWebHookNotifier(model *m.AlertNotification) (alerting.Notifier, error) {
func NewWebHookNotifier(model *models.AlertNotification) (alerting.Notifier, error) {
url := model.Settings.Get("url").MustString()
if url == "" {
return nil, alerting.ValidationError{Reason: "Could not find url property in settings"}
@@ -90,7 +90,7 @@ func (this *WebhookNotifier) Notify(evalContext *alerting.EvalContext) error {
body, _ := bodyJSON.MarshalJSON()
cmd := &m.SendWebhookSync{
cmd := &models.SendWebhookSync{
Url: this.Url,
User: this.User,
Password: this.Password,