From 8420d5549131a082f53aa6189fd2f7637acfdd78 Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Sat, 25 Oct 2014 13:03:27 -0500 Subject: [PATCH] Generate csv download url based on current host and port --- static/js/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/app.js b/static/js/app.js index 64a59e7..e1a5818 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -239,8 +239,9 @@ function exportToCSV() { setCurrentTab("table_query"); - var url = "http://localhost:8080/query?format=csv&query=" + query; + var url = "http://" + window.location.host + "/query?format=csv&query=" + query; var win = window.open(url, '_blank'); + win.focus(); }