Disable annotations on overview again, set refresh rate to 2m if > 100 rows

This commit is contained in:
Rashid Khan 2014-01-09 09:28:34 -07:00
parent 4b320bb8e1
commit 126cab725c
2 changed files with 10 additions and 4 deletions

View file

@ -144,7 +144,7 @@
"title": "Document Count",
"pointradius": 5,
"annotate": {
"enable": true,
"enable": false,
"query": "_type:cluster_event",
"size": 100,
"field": "message",
@ -217,7 +217,7 @@
"title": "Search request rate",
"pointradius": 5,
"annotate": {
"enable": true,
"enable": false,
"query": "_type:cluster_event",
"size": 100,
"field": "message",
@ -290,7 +290,7 @@
"title": "Indexing request rate",
"pointradius": 5,
"annotate": {
"enable": true,
"enable": false,
"query": "_type:cluster_event",
"size": 100,
"field": "message",

View file

@ -41,7 +41,7 @@ define([
return fieldName.replace(/\.raw$/, '');
}
module.controller('marvel.stats_table', function ($scope, dashboard, filterSrv, $filter) {
module.controller('marvel.stats_table', function ($scope, dashboard, filterSrv, $filter, alertSrv) {
$scope.panelMeta = {
modals: [],
editorTabs: [],
@ -218,6 +218,12 @@ define([
$scope.panel.compact = true;
$scope.sparkLines = false;
$scope.viewSelect = false;
if(l > 100 && kbn.interval_to_seconds(dashboard.current.refresh || '1y') < 300) {
dashboard.set_interval('2m');
alertSrv.set('Refresh rate',
'Due to the large size of your cluster, the refresh rate has been adjusted to 2m',
'info',10000);
}
} else {
$scope.viewSelect = true;
$scope.sparkLines = true;