Commit 4a1c9ac3 by Torkel Ödegaard

added grafana version info to dashboard settings, and link to releases.

parent 1fada5dd
......@@ -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());
......
......@@ -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;
......
......@@ -141,6 +141,13 @@
</div>
<div class="modal-footer">
<div class="pull-left" style="padding-top: 15px;" ng-if="editor.index == 0">
<span class="editor-option small">
Grafana {{grafanaVersion}}
</span>
(<a class="small" href="https://github.com/torkelo/grafana/releases" target="_blank">check for updates</a>)
</div>
<button ng-click="add_row(dashboard.current,row); reset_row();" class="btn btn-success" ng-show="editor.index == 1">Create Row</button>
<button type="button" class="btn btn-danger" ng-click="editor.index=0;dismiss();reset_panel();dashboard.refresh()">Close</button>
</div>
\ No newline at end of file
......@@ -32,6 +32,10 @@ module.exports = function(grunt) {
{
pattern: /@REV@/,
replacement: desc.object
},
{
pattern: /@grafanaVersion@/,
replacement: 'v<%= pkg.version %>'
}
]
}
......
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