From 437b957be119fea5ddd72186a2c0601d935b57ae Mon Sep 17 00:00:00 2001 From: woodsaj Date: Wed, 11 Nov 2015 17:45:38 +0800 Subject: [PATCH] remove external_plugin from models package. --- pkg/models/external_plugin.go | 31 ------------------------------- pkg/plugins/plugins.go | 13 +++++++------ 2 files changed, 7 insertions(+), 37 deletions(-) delete mode 100644 pkg/models/external_plugin.go diff --git a/pkg/models/external_plugin.go b/pkg/models/external_plugin.go deleted file mode 100644 index a5fab329fb1..00000000000 --- a/pkg/models/external_plugin.go +++ /dev/null @@ -1,31 +0,0 @@ -package models - -type ExternalPluginRoute struct { - Path string `json:"path"` - Method string `json:"method"` - ReqSignedIn bool `json:"req_signed_in"` - ReqGrafanaAdmin bool `json:"req_grafana_admin"` - ReqRole RoleType `json:"req_role"` - Url string `json:"url"` -} - -type ExternalPluginJs struct { - src string `json:"src"` -} - -type ExternalPluginMenuItem struct { - Text string `json:"text"` - Icon string `json:"icon"` - Href string `json:"href"` -} - -type ExternalPluginCss struct { - Href string `json:"href"` -} - -type ExternalPluginIntegration struct { - Routes []*ExternalPluginRoute `json:"routes"` - Js []*ExternalPluginJs `json:"js"` - Css []*ExternalPluginCss `json:"css"` - MenuItems []*ExternalPluginMenuItem `json:"menu_items"` -} diff --git a/pkg/plugins/plugins.go b/pkg/plugins/plugins.go index 73c642176bb..1268b793027 100644 --- a/pkg/plugins/plugins.go +++ b/pkg/plugins/plugins.go @@ -8,6 +8,7 @@ import ( "path/filepath" "github.com/grafana/grafana/pkg/log" + "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/setting" ) @@ -17,12 +18,12 @@ type PluginMeta struct { } type ExternalPluginRoute struct { - Path string `json:"path"` - Method string `json:"method"` - ReqSignedIn bool `json:"req_signed_in"` - ReqGrafanaAdmin bool `json:"req_grafana_admin"` - ReqRole string `json:"req_role"` - Url string `json:"url"` + Path string `json:"path"` + Method string `json:"method"` + ReqSignedIn bool `json:"req_signed_in"` + ReqGrafanaAdmin bool `json:"req_grafana_admin"` + ReqRole models.RoleType `json:"req_role"` + Url string `json:"url"` } type ExternalPluginJs struct {