mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
26 lines
467 B
Go
26 lines
467 B
Go
package commands
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/cmd/grafana-cli/log"
|
|
s "github.com/grafana/grafana/pkg/cmd/grafana-cli/services"
|
|
)
|
|
|
|
func listremoteCommand(c CommandLine) error {
|
|
plugin, err := s.ListAllPlugins()
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
for _, i := range plugin.Plugins {
|
|
pluginVersion := ""
|
|
if len(i.Versions) > 0 {
|
|
pluginVersion = i.Versions[0].Version
|
|
}
|
|
|
|
log.Infof("id: %v version: %s\n", i.Id, pluginVersion)
|
|
}
|
|
|
|
return nil
|
|
}
|