mirror of
https://github.com/grafana/grafana.git
synced 2026-08-11 13:44:59 -05:00
feat(): update checks starting to work
This commit is contained in:
@@ -73,7 +73,7 @@ func Init() error {
|
||||
app.initApp()
|
||||
}
|
||||
|
||||
StartPluginUpdateChecker()
|
||||
go StartPluginUpdateChecker()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ func checkForUpdates() {
|
||||
log.Trace("Checking for updates")
|
||||
|
||||
client := http.Client{Timeout: time.Duration(5 * time.Second)}
|
||||
resp, err := client.Get("https://grafana.net/api/plugins/repo?grafanaVersion=" + setting.BuildVersion)
|
||||
resp, err := client.Get("https://grafana.net/api/plugins/repo")
|
||||
|
||||
if err != nil {
|
||||
log.Trace("Failed to get plugins repo from grafana.net, %v", err.Error())
|
||||
@@ -69,6 +69,7 @@ func checkForUpdates() {
|
||||
return
|
||||
}
|
||||
|
||||
log.Info("GNET PLUG: %v", len(data.Plugins))
|
||||
for _, plug := range Plugins {
|
||||
for _, gplug := range data.Plugins {
|
||||
if gplug.Id == plug.Id {
|
||||
|
||||
Reference in New Issue
Block a user