Просмотр исходного кода

dsfix: include routes in plugin model

Torkel Ödegaard 8 лет назад
Родитель
Сommit
2789c4f1e1
1 измененных файлов с 8 добавлено и 9 удалено
  1. 8 9
      pkg/plugins/datasource_plugin.go

+ 8 - 9
pkg/plugins/datasource_plugin.go

@@ -8,15 +8,14 @@ import (
 
 type DataSourcePlugin struct {
 	FrontendPluginBase
-	Annotations  bool            `json:"annotations"`
-	Metrics      bool            `json:"metrics"`
-	Alerting     bool            `json:"alerting"`
-	QueryOptions map[string]bool `json:"queryOptions,omitempty"`
-	BuiltIn      bool            `json:"builtIn,omitempty"`
-	Mixed        bool            `json:"mixed,omitempty"`
-	HasQueryHelp bool            `json:"hasQueryHelp,omitempty"`
-
-	Routes []*AppPluginRoute `json:"-"`
+	Annotations  bool              `json:"annotations"`
+	Metrics      bool              `json:"metrics"`
+	Alerting     bool              `json:"alerting"`
+	QueryOptions map[string]bool   `json:"queryOptions,omitempty"`
+	BuiltIn      bool              `json:"builtIn,omitempty"`
+	Mixed        bool              `json:"mixed,omitempty"`
+	HasQueryHelp bool              `json:"hasQueryHelp,omitempty"`
+	Routes       []*AppPluginRoute `json:"routes"`
 }
 
 func (p *DataSourcePlugin) Load(decoder *json.Decoder, pluginDir string) error {