Fixed bug in where pie panel would not stringify correctly if mode was changed

This commit is contained in:
Rashid Khan
2013-02-22 14:57:47 -07:00
parent 632b2abba7
commit ae2a3ee83f
5 changed files with 26 additions and 4 deletions
+15
View File
@@ -54,6 +54,21 @@ angular.module('kibana.pie', [])
$scope.get_data();
}
$scope.set_mode = function(mode) {
switch(mode)
{
case 'terms':
$scope.panel.query = {query:"*",field:"_all"};
break;
case 'query':
$scope.panel.query = [{query:"*",label:"*"}];
break;
case 'goal':
$scope.panel.query = {query:"*",goal:100};
break;
}
}
$scope.get_data = function() {
// Make sure we have everything for the request to complete
if(_.isUndefined($scope.panel.index) || _.isUndefined($scope.time))