Merge branch 'timespanconfig' of github.com:rmca/grafana into rmca-timespanconfig

This commit is contained in:
Torkel Ödegaard 2014-05-29 20:53:51 -07:00
commit 0f40e06d93
3 changed files with 7 additions and 4 deletions

View File

@ -25,6 +25,7 @@ function (_, crypto) {
grafana_index : 'grafana-dash', grafana_index : 'grafana-dash',
elasticsearch_all_disabled : false, elasticsearch_all_disabled : false,
timezoneOffset : null, timezoneOffset : null,
playlistTimespan : "15s",
unsaved_changes_warning : true unsaved_changes_warning : true
}; };

View File

@ -1,8 +1,9 @@
define([ define([
'angular', 'angular',
'underscore' 'underscore',
'config'
], ],
function (angular, _) { function (angular, _, config) {
'use strict'; 'use strict';
var module = angular.module('kibana.controllers'); var module = angular.module('kibana.controllers');
@ -10,7 +11,7 @@ function (angular, _) {
module.controller('PlaylistCtrl', function($scope, playlistSrv) { module.controller('PlaylistCtrl', function($scope, playlistSrv) {
$scope.init = function() { $scope.init = function() {
$scope.timespan = "15s"; $scope.timespan = config.playlistTimespan;
$scope.loadFavorites(); $scope.loadFavorites();
$scope.$on('modal-opened', $scope.loadFavorites); $scope.$on('modal-opened', $scope.loadFavorites);
}; };
@ -35,4 +36,4 @@ function (angular, _) {
}); });
}); });

View File

@ -14,6 +14,7 @@ function (Settings) {
* For Basic authentication use: http://username:password@domain.com:9200 * For Basic authentication use: http://username:password@domain.com:9200
*/ */
elasticsearch: "http://"+window.location.hostname+":9200", elasticsearch: "http://"+window.location.hostname+":9200",
playlistTimespan: "15s",
/** /**
* graphite-web url: * graphite-web url: