add pluginBundle support
A plugnBundle is meta plugin that has a set of dependent plugins to enable. This commit includes a plugin.json for a default "core" bundle that enables all of the shipped panels and datasources.
This commit is contained in:
@@ -61,3 +61,25 @@ type ExternalPlugin struct {
|
||||
MainNavLinks []*ExternalPluginNavLink `json:"mainNavLinks"`
|
||||
StaticRootConfig *StaticRootConfig `json:"staticRoot"`
|
||||
}
|
||||
|
||||
type PluginBundle struct {
|
||||
Type string `json:"type"`
|
||||
Enabled bool `json:"enabled"`
|
||||
PanelPlugins []string `json:"panelPlugins"`
|
||||
DatasourcePlugins []string `json:"datasourcePlugins"`
|
||||
ExternalPlugins []string `json:"externalPlugins"`
|
||||
}
|
||||
|
||||
type EnabledPlugins struct {
|
||||
PanelPlugins []*PanelPlugin
|
||||
DataSourcePlugins map[string]*DataSourcePlugin
|
||||
ExternalPlugins []*ExternalPlugin
|
||||
}
|
||||
|
||||
func NewEnabledPlugins() EnabledPlugins {
|
||||
return EnabledPlugins{
|
||||
PanelPlugins: make([]*PanelPlugin, 0),
|
||||
DataSourcePlugins: make(map[string]*DataSourcePlugin),
|
||||
ExternalPlugins: make([]*ExternalPlugin, 0),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user