diff --git a/src/app/app.js b/src/app/app.js index 8ce947a33ec..181ad3dc016 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -27,7 +27,7 @@ function (angular, $, _, appLevelRequire) { register_fns = {}; // This stores the Kibana revision number, @REV@ is replaced by grunt. - app.constant('kbnVersion',"@REV@"); + app.constant('grafanaVersion',"@grafanaVersion@"); // Use this for cache busting partials app.constant('cacheBust',"cache-bust="+Date.now()); diff --git a/src/app/controllers/dash.js b/src/app/controllers/dash.js index 35573616b38..dc5a79e8221 100644 --- a/src/app/controllers/dash.js +++ b/src/app/controllers/dash.js @@ -30,7 +30,7 @@ function (angular, $, config, _) { var module = angular.module('kibana.controllers'); module.controller('DashCtrl', function( - $scope, $rootScope, $route, ejsResource, dashboard, alertSrv, panelMove, keyboardManager) { + $scope, $rootScope, $route, ejsResource, dashboard, alertSrv, panelMove, keyboardManager, grafanaVersion) { $scope.requiredElasticSearchVersion = ">=0.90.3"; @@ -38,6 +38,8 @@ function (angular, $, config, _) { index: 0 }; + $scope.grafanaVersion = grafanaVersion[0] === '@' ? 'version: master' : grafanaVersion; + // For moving stuff around the dashboard. $scope.panelMoveDrop = panelMove.onDrop; $scope.panelMoveStart = panelMove.onStart; diff --git a/src/app/partials/dasheditor.html b/src/app/partials/dasheditor.html index d6933c34c36..4573858eb9f 100644 --- a/src/app/partials/dasheditor.html +++ b/src/app/partials/dasheditor.html @@ -141,6 +141,13 @@
\ No newline at end of file diff --git a/tasks/build_task.js b/tasks/build_task.js index 272305da139..964e09f2711 100644 --- a/tasks/build_task.js +++ b/tasks/build_task.js @@ -32,6 +32,10 @@ module.exports = function(grunt) { { pattern: /@REV@/, replacement: desc.object + }, + { + pattern: /@grafanaVersion@/, + replacement: 'v<%= pkg.version %>' } ] }