mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 17:06:57 -06:00
Fixed grafana version in dash settings footer, Fixes #1699
This commit is contained in:
parent
b291b18a87
commit
776f15055a
@ -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",
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user