Skip to content

Commit 1e4ff1e

Browse files
committed
Added config setting for default playlist timespan
1 parent 0f40e06 commit 1e4ff1e

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ vNext
22
- New Y-axis formater for metric values that represent seconds (Issue #427) - thx @jippi
33
- Allow special characters in serie names (influxdb datasource), PR #390 - thx @majst01
44
- Refactoring of filterSrv (Issue #428), thx @Tetha
5+
- New config for playlist feature. Set playlist_timespan to set default playlist interval (Issue #445) - thx @rmca
56

67
# Fixes
78
- Filter option loading when having muliple nested filters now works better.

src/app/components/settings.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function (_, crypto) {
2525
grafana_index : 'grafana-dash',
2626
elasticsearch_all_disabled : false,
2727
timezoneOffset : null,
28-
playlistTimespan : "15s",
28+
playlist_timespan : "1m",
2929
unsaved_changes_warning : true
3030
};
3131

src/app/controllers/playlistCtrl.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function (angular, _, config) {
1111
module.controller('PlaylistCtrl', function($scope, playlistSrv) {
1212

1313
$scope.init = function() {
14-
$scope.timespan = config.playlistTimespan;
14+
$scope.timespan = config.playlist_timespan;
1515
$scope.loadFavorites();
1616
$scope.$on('modal-opened', $scope.loadFavorites);
1717
};

src/config.sample.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ function (Settings) {
1414
* For Basic authentication use: http://username:[email protected]:9200
1515
*/
1616
elasticsearch: "http://"+window.location.hostname+":9200",
17-
playlistTimespan: "15s",
1817

1918
/**
2019
* graphite-web url:
@@ -69,6 +68,12 @@ function (Settings) {
6968
*/
7069
unsaved_changes_warning: true,
7170

71+
/**
72+
* set the default timespan for the playlist feature
73+
* Example: "1m", "1h"
74+
*/
75+
playlist_timespan: "1m",
76+
7277
panel_names: [
7378
'text',
7479
'graphite'

0 commit comments

Comments
 (0)