mirror of https://github.com/grafana/grafana.git
Making the default playlist timespan configurable.
This commit is contained in:
parent
cfc5fa87d0
commit
31c75886c3
|
@ -25,6 +25,7 @@ function (_, crypto) {
|
|||
grafana_index : 'grafana-dash',
|
||||
elasticsearch_all_disabled : false,
|
||||
timezoneOffset : null,
|
||||
playlistTimespan : "15s",
|
||||
unsaved_changes_warning : true
|
||||
};
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
define([
|
||||
'angular',
|
||||
'underscore'
|
||||
'underscore',
|
||||
'config'
|
||||
],
|
||||
function (angular, _) {
|
||||
function (angular, _, config) {
|
||||
'use strict';
|
||||
|
||||
var module = angular.module('kibana.controllers');
|
||||
|
@ -10,7 +11,7 @@ function (angular, _) {
|
|||
module.controller('PlaylistCtrl', function($scope, playlistSrv) {
|
||||
|
||||
$scope.init = function() {
|
||||
$scope.timespan = "15s";
|
||||
$scope.timespan = config.playlistTimespan;
|
||||
$scope.loadFavorites();
|
||||
$scope.$on('modal-opened', $scope.loadFavorites);
|
||||
};
|
||||
|
@ -35,4 +36,4 @@ function (angular, _) {
|
|||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -14,6 +14,7 @@ function (Settings) {
|
|||
* For Basic authentication use: http://username:password@domain.com:9200
|
||||
*/
|
||||
elasticsearch: "http://"+window.location.hostname+":9200",
|
||||
playlistTimespan: "15s",
|
||||
|
||||
/**
|
||||
* graphite-web url:
|
||||
|
|
Loading…
Reference in New Issue