Fixed missing index bug on rotated indices

This commit is contained in:
Rashid Khan
2013-05-06 11:05:54 -07:00
parent 6b6355e619
commit 7be784bc91
8 changed files with 25 additions and 34 deletions
+4 -4
View File
@@ -55,11 +55,11 @@ angular.module('kibana.map', [])
$scope.get_data = function() {
// Make sure we have everything for the request to complete
if(_.isUndefined($scope.panel.index) || _.isUndefined($scope.time))
if(_.isUndefined($scope.index) || _.isUndefined($scope.time))
return
$scope.panel.loading = true;
var request = $scope.ejs.Request().indices($scope.panel.index);
var request = $scope.ejs.Request().indices($scope.index);
// Then the insert into facet and make the request
var request = request
@@ -96,7 +96,7 @@ angular.module('kibana.map', [])
$scope.modal = {
title: "Inspector",
body : "<h5>Last Elasticsearch Query</h5><pre>"+
'curl -XGET '+config.elasticsearch+'/'+$scope.panel.index+"/_search?pretty -d'\n"+
'curl -XGET '+config.elasticsearch+'/'+$scope.index+"/_search?pretty -d'\n"+
angular.toJson(JSON.parse(request.toString()),true)+
"'</pre>",
}
@@ -104,7 +104,7 @@ angular.module('kibana.map', [])
function set_time(time) {
$scope.time = time;
$scope.panel.index = _.isUndefined(time.index) ? $scope.panel.index : time.index
$scope.index = _.isUndefined(time.index) ? $scope.index : time.index
$scope.get_data();
}