chore: avoid alias for models in plugins (#22483)

This commit is contained in:
Carl Bergquist
2020-02-28 12:51:21 +01:00
committed by GitHub
parent f2f2722bb1
commit 67ec9edcc8
8 changed files with 47 additions and 47 deletions
+10 -10
View File
@@ -5,7 +5,7 @@ import (
"fmt"
"strings"
m "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/plugins/backendplugin"
"github.com/grafana/grafana/pkg/setting"
)
@@ -78,7 +78,7 @@ func (pb *PluginBase) registerPlugin(pluginDir string) error {
for _, include := range pb.Includes {
if include.Role == "" {
include.Role = m.ROLE_VIEWER
include.Role = models.ROLE_VIEWER
}
}
@@ -93,14 +93,14 @@ type PluginDependencies struct {
}
type PluginInclude struct {
Name string `json:"name"`
Path string `json:"path"`
Type string `json:"type"`
Component string `json:"component"`
Role m.RoleType `json:"role"`
AddToNav bool `json:"addToNav"`
DefaultNav bool `json:"defaultNav"`
Slug string `json:"slug"`
Name string `json:"name"`
Path string `json:"path"`
Type string `json:"type"`
Component string `json:"component"`
Role models.RoleType `json:"role"`
AddToNav bool `json:"addToNav"`
DefaultNav bool `json:"defaultNav"`
Slug string `json:"slug"`
Id string `json:"-"`
}