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