Added query input binding

This commit is contained in:
Rashid Khan
2013-01-31 08:54:20 -07:00
parent bf75a42b88
commit e54982d42d
8 changed files with 78 additions and 16 deletions
+8 -2
View File
@@ -12,6 +12,13 @@ angular.module('kibana.table', [])
? _d[k] : $scope.panel[k];
});
if (!(_.isUndefined($scope.panel.group))) {
$scope.$on($scope.panel.group+"-query", function(event, query) {
$scope.panel.query = query;
$scope.get_data();
});
}
$scope.get_data = function() {
var request = $scope.ejs.Request().indices($scope.index);
@@ -30,7 +37,6 @@ angular.module('kibana.table', [])
// Populate scope when we have results
results.then(function(results) {
console.log(results)
$scope.hits = results.hits.total;
$scope.data = results.hits.hits;
/*
@@ -55,4 +61,4 @@ angular.module('kibana.table', [])
$scope.get_data();
});
})
})