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
@@ -77,11 +77,11 @@ angular.module('kibana.map2', [])
$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);
var metric = 'count';
@@ -149,13 +149,13 @@ angular.module('kibana.map2', [])
$scope.populate_modal = function (request) {
$scope.modal = {
title: "Inspector",
body: "<h5>Last Elasticsearch Query</h5><pre>" + 'curl -XGET ' + config.elasticsearch + '/' + $scope.panel.index + "/_search?pretty -d'\n" + angular.toJson(JSON.parse(request.toString()), true) + "'</pre>"
body: "<h5>Last Elasticsearch Query</h5><pre>" + 'curl -XGET ' + config.elasticsearch + '/' + $scope.index + "/_search?pretty -d'\n" + angular.toJson(JSON.parse(request.toString()), true) + "'</pre>"
}
};
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();
}