mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 17:32:14 +08:00
filter out alpha plugins in api call, fixes #14030
This commit is contained in:
@ -10,7 +10,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
)
|
||||
|
||||
func GetPluginList(c *m.ReqContext) Response {
|
||||
func (hs *HTTPServer) GetPluginList(c *m.ReqContext) Response {
|
||||
typeFilter := c.Query("type")
|
||||
enabledFilter := c.Query("enabled")
|
||||
embeddedFilter := c.Query("embedded")
|
||||
@ -39,6 +39,10 @@ func GetPluginList(c *m.ReqContext) Response {
|
||||
continue
|
||||
}
|
||||
|
||||
if pluginDef.State == plugins.PluginStateAlpha && !hs.Cfg.EnableAlphaPanels {
|
||||
continue
|
||||
}
|
||||
|
||||
listItem := dtos.PluginListItem{
|
||||
Id: pluginDef.Id,
|
||||
Name: pluginDef.Name,
|
||||
|
Reference in New Issue
Block a user