Commit 776f1505 by Torkel Ödegaard

Fixed grafana version in dash settings footer, Fixes #1699

parent b291b18a
{
"version": "1.9.1",
"url": "https://grafanarel.s3.amazonaws.com/grafana-1.9.1.tar.gz"
"version": "2.0.0-beta1",
}
......@@ -6,11 +6,11 @@ function (angular) {
angular
.module('grafana.directives')
.directive('grafanaVersionCheck', function($http, grafanaVersion) {
.directive('grafanaVersionCheck', function($http, contextSrv) {
return {
restrict: 'A',
link: function(scope, elem) {
if (grafanaVersion[0] === '@') {
if (contextSrv.version === 'master') {
return;
}
......@@ -20,7 +20,7 @@ function (angular) {
return;
}
if (grafanaVersion !== response.data.version) {
if (contextSrv.version !== response.data.version) {
elem.append('<i class="icon-info-sign"></i> ' +
'<a href="http://grafana.org/download" target="_blank"> ' +
'New version available: ' + response.data.version +
......
......@@ -2,13 +2,14 @@ define([
'angular',
'lodash',
'store',
'config',
],
function (angular, _, store) {
function (angular, _, store, config) {
'use strict';
var module = angular.module('grafana.services');
module.service('contextSrv', function(grafanaVersion, $rootScope, $timeout) {
module.service('contextSrv', function($rootScope, $timeout) {
var self = this;
function User() {
......@@ -17,7 +18,7 @@ function (angular, _, store) {
}
}
this.version = grafanaVersion;
this.version = config.buildInfo.version;
this.lightTheme = false;
this.user = new User();
this.isSignedIn = this.user.isSignedIn;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment