Added update notice to plugin list

This commit is contained in:
Torkel Ödegaard
2016-04-11 13:42:52 -04:00
parent 6ac3bd4c7c
commit ab34b174f9
7 changed files with 41 additions and 13 deletions
+5 -3
View File
@@ -137,9 +137,11 @@ func getFrontendSettingsMap(c *middleware.Context) (map[string]interface{}, erro
"allowOrgCreate": (setting.AllowUserOrgCreate && c.IsSignedIn) || c.IsGrafanaAdmin,
"authProxyEnabled": setting.AuthProxyEnabled,
"buildInfo": map[string]interface{}{
"version": setting.BuildVersion,
"commit": setting.BuildCommit,
"buildstamp": setting.BuildStamp,
"version": setting.BuildVersion,
"commit": setting.BuildCommit,
"buildstamp": setting.BuildStamp,
"latestVersion": plugins.GrafanaLatestVersion,
"hasUpdate": plugins.GrafanaHasUpdate,
},
}
+1 -1
View File
@@ -69,7 +69,6 @@ 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 {
@@ -103,6 +102,7 @@ func checkForUpdates() {
if strings.Contains(setting.BuildVersion, "-") {
GrafanaLatestVersion = githubLatest.Testing
GrafanaHasUpdate = githubLatest.Testing != setting.BuildVersion
} else {
GrafanaLatestVersion = githubLatest.Stable
GrafanaHasUpdate = githubLatest.Stable != setting.BuildVersion