mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
added grafana version info to dashboard settings, and link to releases.
This commit is contained in:
parent
1fada5dd0b
commit
4a1c9ac390
@ -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>
|
@ -32,6 +32,10 @@ module.exports = function(grunt) {
|
||||
{
|
||||
pattern: /@REV@/,
|
||||
replacement: desc.object
|
||||
},
|
||||
{
|
||||
pattern: /@grafanaVersion@/,
|
||||
replacement: 'v<%= pkg.version %>'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user