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:
@@ -5,18 +5,25 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<h6>Time Field</h6>
|
<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>
|
||||||
<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>
|
<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>
|
</div>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<h5>Relative mode <small>settings</small></h5>
|
<h5>Relative mode <small>settings</small></h5>
|
||||||
<div class="span8">
|
<div class="span8">
|
||||||
<h6>Relative time options <small>comma seperated</small></h6>
|
<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>
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<h6>Default timespan</h6>
|
<h6>Default timespan</h6>
|
||||||
|
@@ -35,6 +35,7 @@ angular.module('kibana.timepicker', [])
|
|||||||
timespan : '15m',
|
timespan : '15m',
|
||||||
timefield : '@timestamp',
|
timefield : '@timestamp',
|
||||||
index : '"logstash-"yyyy.mm.dd',
|
index : '"logstash-"yyyy.mm.dd',
|
||||||
|
defaultindex : "NOINDEX",
|
||||||
group : "default",
|
group : "default",
|
||||||
refresh : {
|
refresh : {
|
||||||
enable : false,
|
enable : false,
|
||||||
@@ -195,7 +196,9 @@ angular.module('kibana.timepicker', [])
|
|||||||
});
|
});
|
||||||
|
|
||||||
return all_indices().then(function(p) {
|
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;
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user