mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
22 lines
372 B
Go
22 lines
372 B
Go
package plugins
|
|
|
|
import "encoding/json"
|
|
|
|
type PanelPlugin struct {
|
|
FrontendPluginBase
|
|
SkipDataQuery bool `json:"skipDataQuery"`
|
|
}
|
|
|
|
func (p *PanelPlugin) Load(decoder *json.Decoder, pluginDir string) error {
|
|
if err := decoder.Decode(&p); err != nil {
|
|
return err
|
|
}
|
|
|
|
if err := p.registerPlugin(pluginDir); err != nil {
|
|
return err
|
|
}
|
|
|
|
Panels[p.Id] = p
|
|
return nil
|
|
}
|