mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 10:50:37 -06:00
20 lines
309 B
Go
20 lines
309 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
|
|
p.initFrontendPlugin()
|
|
Panels[p.Id] = p
|
|
|
|
return nil
|
|
}
|