Fixed missing index bug on rotated indices
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user