Dashboard: new config.js option to change/remove window title prefix from 'Grafana -' to anything, PR #685

This commit is contained in:
Torkel Ödegaard 2014-08-24 14:45:00 +02:00
parent edd8d63caf
commit 6f80862517
4 changed files with 7 additions and 14 deletions

View File

@ -7,6 +7,7 @@
- [Issue #709](https://github.com/grafana/grafana/issues/709). Dashboard: Small UI look polish to search results, made dashboard title link are larger - [Issue #709](https://github.com/grafana/grafana/issues/709). Dashboard: Small UI look polish to search results, made dashboard title link are larger
- [Issue #425](https://github.com/grafana/grafana/issues/425). Graph: New section in 'Display Styles' tab to override any display setting on per series bases (mix and match lines, bars, points, fill, stack, line width etc) - [Issue #425](https://github.com/grafana/grafana/issues/425). Graph: New section in 'Display Styles' tab to override any display setting on per series bases (mix and match lines, bars, points, fill, stack, line width etc)
- [Issue #634](https://github.com/grafana/grafana/issues/634). Dashboard: Dashboard tags now in different colors (from fixed palette) determined by tag name. - [Issue #634](https://github.com/grafana/grafana/issues/634). Dashboard: Dashboard tags now in different colors (from fixed palette) determined by tag name.
- [Issue #685](https://github.com/grafana/grafana/issues/685). Dashboard: New config.js option to change/remove window title prefix.
**Fixes** **Fixes**
- [Issue #696](https://github.com/grafana/grafana/issues/696). Graph: Fix for y-axis format 'none' when values are in scientific notation (ex 2.3e-13) - [Issue #696](https://github.com/grafana/grafana/issues/696). Graph: Fix for y-axis format 'none' when values are in scientific notation (ex 2.3e-13)

View File

@ -14,7 +14,7 @@ function (_, crypto) {
*/ */
var defaults = { var defaults = {
datasources : {}, datasources : {},
title : 'Grafana - ', window_title_prefix : 'Grafana - ',
panels : ['graph', 'text'], panels : ['graph', 'text'],
plugins : {}, plugins : {},
default_route : '/dashboard/file/default.json', default_route : '/dashboard/file/default.json',

View File

@ -56,7 +56,7 @@ function (angular, $, config, _) {
$scope.panelMoveOver = panelMove.onOver; $scope.panelMoveOver = panelMove.onOver;
$scope.panelMoveOut = panelMove.onOut; $scope.panelMoveOut = panelMove.onOut;
window.document.title = (config.title ? config.title : '') + $scope.dashboard.title; window.document.title = config.window_title_prefix + $scope.dashboard.title;
// start auto refresh // start auto refresh
if($scope.dashboard.refresh) { if($scope.dashboard.refresh) {

View File

@ -73,23 +73,12 @@ function (Settings) {
* ======================================================== * ========================================================
*/ */
/* title:
* The global page title prefix that is prepended before the specific dashboard titles.
* Defaults to 'Grafana - '.
*
* title: undefined, // default prefix, page title = 'Grafana - <dashboard title>'
* title: null, // no prefix, page title = <dashboard title>
* title: '', // no prefix, page title = <dashboard title>
* title: 'Custom | ', // custom prefix, page title = 'Custom | <dashboard title>'
*/
title: undefined,
// specify the limit for dashboard search results // specify the limit for dashboard search results
search: { search: {
max_results: 20 max_results: 20
}, },
// default start dashboard // default home dashboard
default_route: '/dashboard/file/default.json', default_route: '/dashboard/file/default.json',
// set to false to disable unsaved changes warning // set to false to disable unsaved changes warning
@ -105,6 +94,9 @@ function (Settings) {
password: '' password: ''
}, },
// Change window title prefix from 'Grafana - <dashboard title>'
window_title_prefix: 'Grafana - ',
// Add your own custom pannels // Add your own custom pannels
plugins: { plugins: {
// list of plugin panels // list of plugin panels