Explorar el Código

Merge branch 'master' of github.com:famousgarkin/grafana into famousgarkin-master

Torkel Ödegaard hace 11 años
padre
commit
edd8d63caf
Se han modificado 3 ficheros con 13 adiciones y 1 borrados
  1. 1 0
      src/app/components/settings.js
  2. 1 1
      src/app/controllers/dashboardCtrl.js
  3. 11 0
      src/config.sample.js

+ 1 - 0
src/app/components/settings.js

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

+ 1 - 1
src/app/controllers/dashboardCtrl.js

@@ -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 = 'Grafana - ' + $scope.dashboard.title;
+      window.document.title = (config.title ? config.title : '') + $scope.dashboard.title;
 
 
       // start auto refresh
       // start auto refresh
       if($scope.dashboard.refresh) {
       if($scope.dashboard.refresh) {

+ 11 - 0
src/config.sample.js

@@ -73,6 +73,17 @@ 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