Plugins: Refactor Grafana and Plugin version update checkers (#44529)

* refactor

* rework plugin update checking

* make smarter

* simplify

* fix linter issue

* make use of mutex

* apply feedback to simplify

* format imports

* fix tests
This commit is contained in:
Will Browne
2022-01-31 16:06:16 +01:00
committed by GitHub
parent bf8694e709
commit 76603b93d6
14 changed files with 559 additions and 270 deletions
+2 -2
View File
@@ -239,8 +239,8 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
"commit": commit,
"buildstamp": buildstamp,
"edition": hs.License.Edition(),
"latestVersion": hs.updateChecker.LatestGrafanaVersion(),
"hasUpdate": hs.updateChecker.GrafanaUpdateAvailable(),
"latestVersion": hs.grafanaUpdateChecker.LatestVersion(),
"hasUpdate": hs.grafanaUpdateChecker.UpdateAvailable(),
"env": setting.Env,
},
"licenseInfo": map[string]interface{}{