The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
grafana/pkg/cmd/grafana-cli/commands/listremote_command.go

26 lines
495 B

package commands
import (
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
s "github.com/grafana/grafana/pkg/cmd/grafana-cli/services"
)
func listremoteCommand(c CommandLine) error {
plugin, err := s.ListAllPlugins(c.GlobalString("repo"))
if err != nil {
return err
}
for _, i := range plugin.Plugins {
pluginVersion := ""
if len(i.Versions) > 0 {
pluginVersion = i.Versions[0].Version
}
logger.Infof("id: %v version: %s\n", i.Id, pluginVersion)
}
return nil
}