mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
removes dependencies install for plugins
this features was never intended for production.
This commit is contained in:
parent
56907eef69
commit
47e363ea15
@ -91,14 +91,7 @@ func InstallPlugin(pluginName, version string, c CommandLine) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
logger.Infof("%s Installed %s successfully \n", color.GreenString("✔"), pluginName)
|
logger.Infof("%s Installed %s successfully \n", color.GreenString("✔"), pluginName)
|
||||||
|
return nil
|
||||||
res, _ := s.ReadPlugin(pluginFolder, pluginName)
|
|
||||||
for _, v := range res.Dependencies.Plugins {
|
|
||||||
InstallPlugin(v.Id, version, c)
|
|
||||||
logger.Infof("Installed dependency: %v ✔\n", v.Id)
|
|
||||||
}
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func SelectVersion(plugin m.Plugin, version string) (m.Version, error) {
|
func SelectVersion(plugin m.Plugin, version string) (m.Version, error) {
|
||||||
|
@ -15,7 +15,6 @@ type InstalledPlugin struct {
|
|||||||
|
|
||||||
type Dependencies struct {
|
type Dependencies struct {
|
||||||
GrafanaVersion string `json:"grafanaVersion"`
|
GrafanaVersion string `json:"grafanaVersion"`
|
||||||
Plugins []Plugin `json:"plugins"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type PluginInfo struct {
|
type PluginInfo struct {
|
||||||
|
@ -59,10 +59,6 @@ func (pb *PluginBase) registerPlugin(pluginDir string) error {
|
|||||||
plog.Info("Registering plugin", "name", pb.Name)
|
plog.Info("Registering plugin", "name", pb.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(pb.Dependencies.Plugins) == 0 {
|
|
||||||
pb.Dependencies.Plugins = []PluginDependencyItem{}
|
|
||||||
}
|
|
||||||
|
|
||||||
if pb.Dependencies.GrafanaVersion == "" {
|
if pb.Dependencies.GrafanaVersion == "" {
|
||||||
pb.Dependencies.GrafanaVersion = "*"
|
pb.Dependencies.GrafanaVersion = "*"
|
||||||
}
|
}
|
||||||
@ -80,7 +76,6 @@ func (pb *PluginBase) registerPlugin(pluginDir string) error {
|
|||||||
|
|
||||||
type PluginDependencies struct {
|
type PluginDependencies struct {
|
||||||
GrafanaVersion string `json:"grafanaVersion"`
|
GrafanaVersion string `json:"grafanaVersion"`
|
||||||
Plugins []PluginDependencyItem `json:"plugins"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type PluginInclude struct {
|
type PluginInclude struct {
|
||||||
@ -96,13 +91,6 @@ type PluginInclude struct {
|
|||||||
Id string `json:"-"`
|
Id string `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PluginDependencyItem struct {
|
|
||||||
Type string `json:"type"`
|
|
||||||
Id string `json:"id"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
Version string `json:"version"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type PluginInfo struct {
|
type PluginInfo struct {
|
||||||
Author PluginInfoLink `json:"author"`
|
Author PluginInfoLink `json:"author"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
|
Loading…
Reference in New Issue
Block a user