+
\ No newline at end of file
diff --git a/panels/stringquery/module.js b/panels/stringquery/module.js
index 76de35ffe0f..48f67673e9a 100644
--- a/panels/stringquery/module.js
+++ b/panels/stringquery/module.js
@@ -17,7 +17,14 @@ angular.module('kibana.stringquery', [])
$scope.panel.group : [$scope.panel.group];
$scope.init = function() {
+
+ // I don't like this compromise. I'm not totally sure what this panel
+ // Should do if its in multi query mode and receives a query. For now, just
+ // replace the first one, though I feel like that isn't right.
eventBus.register($scope,'query',function(event,query) {
+ if (_.isArray($scope.panel.query))
+ $scope.panel.query[0] = query
+ else
$scope.panel.query = query;
});
}
@@ -40,6 +47,13 @@ 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);
console.log($scope.panel.query)
diff --git a/panels/table/module.js b/panels/table/module.js
index 25b33ee29e1..2863f2aa90f 100644
--- a/panels/table/module.js
+++ b/panels/table/module.js
@@ -52,7 +52,7 @@ angular.module('kibana.table', [])
$scope.panel.fields = _.without($scope.panel.fields,field)
else
$scope.panel.fields.push(field)
- broadcast_fields();
+ broadcast_results();
}
$scope.toggle_details = function(row) {