From 5f6236c80bbe143c283bcb0e8bd36b4195f1aaf2 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Thu, 17 Dec 2015 18:04:53 -0800 Subject: [PATCH] Export to csv or json --- panoramix/templates/panoramix/explore.html | 13 +++++++++++++ panoramix/views.py | 7 +++++++ panoramix/viz.py | 8 ++++++++ 3 files changed, 28 insertions(+) diff --git a/panoramix/templates/panoramix/explore.html b/panoramix/templates/panoramix/explore.html index 40e7bb2f23..9f9793a433 100644 --- a/panoramix/templates/panoramix/explore.html +++ b/panoramix/templates/panoramix/explore.html @@ -36,6 +36,13 @@ query 0 sec +
+ + + + .csv + .json +

@@ -229,6 +236,12 @@ $('legend').click(function () { toggle_fieldset($(this), true); }); + $('#json').click(function () { + window.location = '{{ viz.json_endpoint | safe }}'; + }); + $('#csv').click(function () { + window.location = '{{ viz.csv_endpoint | safe }}'; + }); $("#viz_type").change(function() {$("#query").submit();}); collapsed_fieldsets = get_collapsed_fieldsets(); for(var i=0; i