Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Followup to #67 #68

Merged
merged 1 commit into from
May 6, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions panels/hits/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ angular.module('kibana.hits', [])
$scope.panel.loading = true;

// 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

var _segment = _.isUndefined(segment) ? 0 : segment
var request = $scope.ejs.Request().indices($scope.panel.index[_segment]);
var request = $scope.ejs.Request().indices($scope.index[_segment]);

// Build the question part of the query
var queries = [];
Expand Down Expand Up @@ -121,7 +121,7 @@ angular.module('kibana.hits', [])
i++;
});
$scope.$emit('render');
if(_segment < $scope.panel.index.length-1)
if(_segment < $scope.index.length-1)
$scope.get_data(_segment+1,query_id)

}
Expand All @@ -143,7 +143,7 @@ angular.module('kibana.hits', [])

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();
}

Expand Down
10 changes: 5 additions & 5 deletions panels/table/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ angular.module('kibana.table', [])
$scope.panel.error = false;

// 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 _segment = _.isUndefined(segment) ? 0 : segment
$scope.segment = _segment;

var request = $scope.ejs.Request().indices($scope.panel.index[_segment])
var request = $scope.ejs.Request().indices($scope.index[_segment])
.query(ejs.FilteredQuery(
ejs.QueryStringQuery($scope.panel.query || '*'),
ejs.RangeFilter($scope.time.field)
Expand Down Expand Up @@ -184,7 +184,7 @@ angular.module('kibana.table', [])
if(
($scope.data.length < $scope.panel.size*$scope.panel.pages ||
!(($scope.panel.sort[0] === $scope.time.field) && $scope.panel.sort[1] === 'desc')) &&
_segment+1 < $scope.panel.index.length
_segment+1 < $scope.index.length
) {
$scope.get_data(_segment+1,$scope.query_id)
}
Expand All @@ -196,7 +196,7 @@ angular.module('kibana.table', [])
$scope.modal = {
title: "Table 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>",
}
Expand All @@ -223,7 +223,7 @@ angular.module('kibana.table', [])

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();
}

Expand Down