From b766d900a8c63b7010839b1651b9ea122e6f9c96 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Fri, 25 Oct 2013 09:44:56 -0700 Subject: [PATCH] Added ability to add custom query string filters --- src/app/panels/filtering/module.html | 13 +++++++------ src/app/panels/filtering/module.js | 12 +++++++++++- src/app/panels/table/module.js | 1 - src/app/panels/terms/module.js | 2 +- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/app/panels/filtering/module.html b/src/app/panels/filtering/module.html index 3867b35893c..621b86dd3a8 100644 --- a/src/app/panels/filtering/module.html +++ b/src/app/panels/filtering/module.html @@ -74,17 +74,18 @@ -
+
  • {{key}} :
-
-
- - -
+
+ + +
+ + \ No newline at end of file diff --git a/src/app/panels/filtering/module.js b/src/app/panels/filtering/module.js index 818abaaf4b9..aaa2fc9c804 100644 --- a/src/app/panels/filtering/module.js +++ b/src/app/panels/filtering/module.js @@ -17,7 +17,7 @@ function (angular, app, _) { module.controller('filtering', function($scope, filterSrv, $rootScope, dashboard) { $scope.panelMeta = { - status : "Beta", + status : "Stable", description : "A controllable list of all filters currently applied to the dashboard. You "+ "almost certainly want one of these on your dashboard somewhere." }; @@ -45,6 +45,16 @@ function (angular, app, _) { dashboard.refresh(); }; + $scope.add = function(query) { + query = query || '*'; + filterSrv.set({ + editing : true, + type : 'querystring', + query : query, + mandate : 'must' + },undefined,true); + }; + $scope.refresh = function() { dashboard.refresh(); }; diff --git a/src/app/panels/table/module.js b/src/app/panels/table/module.js index 6ec7ffa15db..20b07362a61 100644 --- a/src/app/panels/table/module.js +++ b/src/app/panels/table/module.js @@ -60,7 +60,6 @@ function (angular, app, _, kbn, moment) { // Set and populate defaults var _d = { - status : "Stable", queries : { mode : 'all', ids : [] diff --git a/src/app/panels/terms/module.js b/src/app/panels/terms/module.js index acd0aa41de4..baf0623a2dd 100644 --- a/src/app/panels/terms/module.js +++ b/src/app/panels/terms/module.js @@ -36,7 +36,7 @@ function (angular, app, _, $, kbn) { editorTabs : [ {title:'Queries', src:'app/partials/querySelect.html'} ], - status : "Beta", + status : "Stable", description : "Displays the results of an elasticsearch facet as a pie chart, bar chart, or a "+ "table" };