mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 20:24:18 -06:00
531c579341
* plugins: Let descendant plugins inherit their root's signature Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
26 lines
472 B
Go
26 lines
472 B
Go
package plugins
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/grafana/grafana/pkg/plugins/backendplugin"
|
|
)
|
|
|
|
type PanelPlugin struct {
|
|
FrontendPluginBase
|
|
SkipDataQuery bool `json:"skipDataQuery"`
|
|
}
|
|
|
|
func (p *PanelPlugin) Load(decoder *json.Decoder, base *PluginBase, backendPluginManager backendplugin.Manager) error {
|
|
if err := decoder.Decode(p); err != nil {
|
|
return err
|
|
}
|
|
|
|
if err := p.registerPlugin(base); err != nil {
|
|
return err
|
|
}
|
|
|
|
Panels[p.Id] = p
|
|
return nil
|
|
}
|