|
|
@ -1,22 +1,21 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
|
|
|
|
|
|
|
|
## Sort |
|
|
|
## Stringquery |
|
|
|
|
|
|
|
|
|
|
|
This will probably be removed in the near future since it only interacts with
|
|
|
|
Broadcasts a query object to other panels |
|
|
|
the table panel and the table panel already implements all of its functionality. |
|
|
|
|
|
|
|
It only interacts with the table panel in any case |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Parameters |
|
|
|
### Parameters |
|
|
|
* label :: The label to stick over the drop down |
|
|
|
* label :: The label to stick over the field
|
|
|
|
* sort :: An array where the first elemetn is the field to sort on an the second |
|
|
|
* query :: A string or an array of querys. String if multi is off, array if it is on |
|
|
|
is the direction ('asc' or 'desc') |
|
|
|
This should be fixed, it should always be an array even if its only
|
|
|
|
|
|
|
|
one element |
|
|
|
|
|
|
|
* multi :: Allow input of multiple queries? true/false |
|
|
|
|
|
|
|
* multi_arrange :: How to arrange multu query string panels, 'vertical' or 'horizontal' |
|
|
|
### Group Events |
|
|
|
### Group Events |
|
|
|
#### Sends |
|
|
|
#### Sends |
|
|
|
* sort :: An array where the first elemetn is the field to sort on an the second |
|
|
|
* query :: Always broadcast as an array, even in multi: false |
|
|
|
is the direction ('asc' or 'desc') |
|
|
|
|
|
|
|
#### Receives |
|
|
|
#### Receives |
|
|
|
* fields :: An array containing the fields in a table. This will be concat'd +
|
|
|
|
* query :: An array of queries. This is probably needs to be fixed. |
|
|
|
uniqued with the curent list.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
@ -27,8 +26,6 @@ angular.module('kibana.stringquery', []) |
|
|
|
var _d = { |
|
|
|
var _d = { |
|
|
|
label : "Search", |
|
|
|
label : "Search", |
|
|
|
query : "*", |
|
|
|
query : "*", |
|
|
|
size : 100, |
|
|
|
|
|
|
|
sort : ['_score','desc'], |
|
|
|
|
|
|
|
group : "default", |
|
|
|
group : "default", |
|
|
|
multi : false, |
|
|
|
multi : false, |
|
|
|
multi_arrange: 'horizontal', |
|
|
|
multi_arrange: 'horizontal', |
|
|
@ -63,13 +60,6 @@ angular.module('kibana.stringquery', []) |
|
|
|
new Array($scope.panel.query) : $scope.panel.query[0]; |
|
|
|
new Array($scope.panel.query) : $scope.panel.query[0]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$scope.set_sort = function(field) { |
|
|
|
|
|
|
|
if($scope.panel.sort[0] === field) |
|
|
|
|
|
|
|
$scope.panel.sort[1] = $scope.panel.sort[1] == 'asc' ? 'desc' : 'asc'; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
$scope.panel.sort[0] = field; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.remove_query = function(index) { |
|
|
|
$scope.remove_query = function(index) { |
|
|
|
$scope.panel.query.splice(index,1); |
|
|
|
$scope.panel.query.splice(index,1); |
|
|
|
} |
|
|
|
} |
|
|
|