diff --git a/pkg/api/dtos/index.go b/pkg/api/dtos/index.go index 21201d30adf..b813c78f2bb 100644 --- a/pkg/api/dtos/index.go +++ b/pkg/api/dtos/index.go @@ -1,13 +1,17 @@ package dtos type IndexViewData struct { - User *CurrentUser - Settings map[string]interface{} - AppUrl string - AppSubUrl string - GoogleAnalyticsId string - GoogleTagManagerId string - MainNavLinks []*NavLink + User *CurrentUser + Settings map[string]interface{} + AppUrl string + AppSubUrl string + GoogleAnalyticsId string + GoogleTagManagerId string + MainNavLinks []*NavLink + BuildVersion string + BuildCommit string + NewGrafanaVersionExists bool + NewGrafanaVersion string } type PluginCss struct { diff --git a/pkg/api/frontendsettings.go b/pkg/api/frontendsettings.go index dd84f7827eb..f23f416b47a 100644 --- a/pkg/api/frontendsettings.go +++ b/pkg/api/frontendsettings.go @@ -137,11 +137,9 @@ 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, - "latestVersion": plugins.GrafanaLatestVersion, - "hasUpdate": plugins.GrafanaHasUpdate, + "version": setting.BuildVersion, + "commit": setting.BuildCommit, + "buildstamp": setting.BuildStamp, }, } diff --git a/pkg/api/index.go b/pkg/api/index.go index 53538fd2775..4e4f4fadfeb 100644 --- a/pkg/api/index.go +++ b/pkg/api/index.go @@ -36,11 +36,15 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) { LightTheme: prefs.Theme == "light", Timezone: prefs.Timezone, }, - Settings: settings, - AppUrl: setting.AppUrl, - AppSubUrl: setting.AppSubUrl, - GoogleAnalyticsId: setting.GoogleAnalyticsId, - GoogleTagManagerId: setting.GoogleTagManagerId, + Settings: settings, + AppUrl: setting.AppUrl, + AppSubUrl: setting.AppSubUrl, + GoogleAnalyticsId: setting.GoogleAnalyticsId, + GoogleTagManagerId: setting.GoogleTagManagerId, + BuildVersion: setting.BuildVersion, + BuildCommit: setting.BuildCommit, + NewGrafanaVersion: plugins.GrafanaLatestVersion, + NewGrafanaVersionExists: plugins.GrafanaHasUpdate, } if setting.DisableGravatar { diff --git a/public/app/core/controllers/login_ctrl.js b/public/app/core/controllers/login_ctrl.js index 4249d55a44f..45a47558ed7 100644 --- a/public/app/core/controllers/login_ctrl.js +++ b/public/app/core/controllers/login_ctrl.js @@ -35,15 +35,6 @@ function (angular, coreModule, config) { } }; - // build info view model - $scope.buildInfo = { - version: config.buildInfo.version, - commit: config.buildInfo.commit, - buildstamp: new Date(config.buildInfo.buildstamp * 1000), - latestVersion: config.buildInfo.latestVersion, - hasUpdate: config.buildInfo.hasUpdate, - }; - $scope.submit = function() { if ($scope.loginMode) { $scope.login(); diff --git a/public/app/partials/login.html b/public/app/partials/login.html index ff8d22451a8..8143ff35125 100644 --- a/public/app/partials/login.html +++ b/public/app/partials/login.html @@ -73,14 +73,5 @@ -