From 2b5291900daa8fe19b40210fd58f28e29644bb76 Mon Sep 17 00:00:00 2001 From: Arik Fraimovich Date: Mon, 17 Mar 2014 20:21:39 +0200 Subject: [PATCH] Show filters directive on all visualizations. --- rd_ui/app/scripts/visualizations/base.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rd_ui/app/scripts/visualizations/base.js b/rd_ui/app/scripts/visualizations/base.js index 2d6061c7..5a0a34da 100644 --- a/rd_ui/app/scripts/visualizations/base.js +++ b/rd_ui/app/scripts/visualizations/base.js @@ -64,8 +64,11 @@ // TODO: using switch here (and in the options editor) might introduce errors and bad // performance wise. It's better to eventually show the correct template based on the // visualization type and not make the browser render all of them. - template: Visualization.renderVisualizationsTemplate, - replace: false + template: '\n' + Visualization.renderVisualizationsTemplate, + replace: false, + link: function(scope) { + scope.filters = scope.queryResult.getFilters(); + } } }; @@ -148,6 +151,8 @@ } }; + + angular.module('redash.visualization', []) .provider('Visualization', VisualizationProvider) .directive('visualizationRenderer', ['Visualization', VisualizationRenderer])