From 7eac56bc0a001bc0934bd23398406723686189f8 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Thu, 10 Oct 2013 17:52:09 +0200 Subject: [PATCH] Added pie and table options to adhoc terms facet from table micro-panel --- src/app/panels/table/micropanel.html | 15 ++++++++++++++- src/app/panels/table/module.js | 4 ++-- src/app/services/fields.js | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/app/panels/table/micropanel.html b/src/app/panels/table/micropanel.html index 1a785521808..2e69988eb0f 100755 --- a/src/app/panels/table/micropanel.html +++ b/src/app/panels/table/micropanel.html @@ -47,6 +47,19 @@
Facets
- + + +
+ + Terms + + + +
+
\ No newline at end of file diff --git a/src/app/panels/table/module.js b/src/app/panels/table/module.js index 137a372d923..fe8dc9ac849 100755 --- a/src/app/panels/table/module.js +++ b/src/app/panels/table/module.js @@ -96,10 +96,10 @@ function (angular, app, _, kbn, moment) { // Create a percent function for the view $scope.percent = kbn.to_percent; - $scope.termsModal = function(field) { + $scope.termsModal = function(field,chart) { $scope.modalField = field; showModal( - '{"height":"200px","chart":"bar","field":"'+field+'"}','terms'); + '{"height":"300px","chart":"'+chart+'","field":"'+field+'"}','terms'); }; $scope.statsModal = function(field) { diff --git a/src/app/services/fields.js b/src/app/services/fields.js index 05c5a6488e9..564a4cffc76 100755 --- a/src/app/services/fields.js +++ b/src/app/services/fields.js @@ -75,7 +75,7 @@ function (angular, _, config) { ret = {}; for(var attr in obj){ // For now only support multi field on the top level - // and if if there is a default field set. + // and if there is a default field set. if(obj[attr]['type'] === 'multi_field') { ret[attr] = obj[attr]['fields'][attr] || obj[attr]; continue;