grafana/pkg/plugins/panel_plugin.go
Torkel Ödegaard 578283078b
PanelEdit: Improves viz picker ux, auto close on click (#33633)
* PanelEdit: Improves viz picker ux, auto close on click

* Fixing strict ts error

* Updated e2e
2021-05-03 16:49:09 +02:00

26 lines
486 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) (
interface{}, error) {
if err := decoder.Decode(p); err != nil {
return nil, err
}
if p.Id == "grafana-piechart-panel" {
p.Name = "Pie Chart (old)"
}
return p, nil
}