[UI] fix CSV, JSON, and XML export with --prefix running

This commit is contained in:
Steven Kabbes 2016-07-27 22:55:54 -07:00
parent 6945843c97
commit 638fd6234e

View File

@ -211,7 +211,7 @@ function performTableAction(table, action, el) {
var format = el.data("format");
var filename = table + "." + format;
var query = window.encodeURI("SELECT * FROM " + table);
var url = "http://" + window.location.host + "/api/query?format=" + format + "&filename=" + filename + "&query=" + query + "&_session_id=" + getSessionId();
var url = window.location.href + "api/query?format=" + format + "&filename=" + filename + "&query=" + query + "&_session_id=" + getSessionId();
var win = window.open(url, "_blank");
win.focus();
break;
@ -542,7 +542,7 @@ function exportTo(format) {
return;
}
var url = "http://" + window.location.host + "/api/query?format=" + format + "&query=" + encodeQuery(query) + "&_session_id=" + getSessionId();
var url = window.location.href + "api/query?format=" + format + "&query=" + encodeQuery(query) + "&_session_id=" + getSessionId();
var win = window.open(url, '_blank');
setCurrentTab("table_query");