mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Added failover index setting
This commit is contained in:
parent
f2553f8ea1
commit
18c7083548
@ -5,18 +5,25 @@
|
||||
</div>
|
||||
<div class="span3">
|
||||
<h6>Time Field</h6>
|
||||
<input type="text" class="input-small" ng-model="panel.timefield" ng-change="get_data()">
|
||||
<input type="text" class="input-small" ng-model="panel.timefield">
|
||||
</div>
|
||||
<div class="span6">
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<h5>Index Settings</h5>
|
||||
<div class="span5">
|
||||
<h6>Index pattern <small>Absolutes in double quotes</small></h6>
|
||||
<input type="text" class="input-large" ng-model="panel.index" ng-change="get_data()">
|
||||
<input type="text" class="input-medium" ng-model="panel.index">
|
||||
</div>
|
||||
<div class="span5">
|
||||
<h6>Failover Index <small>If none match the pattern</small></h6>
|
||||
<input type="text" class="input-medium" ng-model="panel.defaultindex">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<h5>Relative mode <small>settings</small></h5>
|
||||
<div class="span8">
|
||||
<h6>Relative time options <small>comma seperated</small></h6>
|
||||
<input type="text" array-join class="input-large" ng-model="panel.time_options" ng-change="get_data()">
|
||||
<input type="text" array-join class="input-large" ng-model="panel.time_options">
|
||||
</div>
|
||||
<div class="span3">
|
||||
<h6>Default timespan</h6>
|
||||
|
@ -35,6 +35,7 @@ angular.module('kibana.timepicker', [])
|
||||
timespan : '15m',
|
||||
timefield : '@timestamp',
|
||||
index : '"logstash-"yyyy.mm.dd',
|
||||
defaultindex : "NOINDEX",
|
||||
group : "default",
|
||||
refresh : {
|
||||
enable : false,
|
||||
@ -195,7 +196,9 @@ angular.module('kibana.timepicker', [])
|
||||
});
|
||||
|
||||
return all_indices().then(function(p) {
|
||||
return _.intersection(p,possible);
|
||||
var indices = _.intersection(p,possible);
|
||||
console.log(indices)
|
||||
return indices.length == 0 ? [$scope.panel.defaultindex] : indices;
|
||||
})
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user