Fixed grafana version in dash settings footer, Fixes #1699

This commit is contained in:
Torkel Ödegaard 2015-04-02 09:50:57 +02:00
parent b291b18a87
commit 776f15055a
3 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,3 @@
{
"version": "1.9.1",
"url": "https://grafanarel.s3.amazonaws.com/grafana-1.9.1.tar.gz"
"version": "2.0.0-beta1",
}

View File

@ -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 +

View File

@ -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;