mirror of https://github.com/grafana/grafana.git
19 lines
285 B
Go
19 lines
285 B
Go
|
package plugins
|
||
|
|
||
|
import "encoding/json"
|
||
|
|
||
|
type PanelPlugin struct {
|
||
|
FrontendPluginBase
|
||
|
}
|
||
|
|
||
|
func (p *PanelPlugin) Load(decoder *json.Decoder, pluginDir string) error {
|
||
|
if err := decoder.Decode(&p); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
p.PluginDir = pluginDir
|
||
|
Panels[p.Id] = p
|
||
|
|
||
|
return nil
|
||
|
}
|