mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-15 11:52:12 +03:00
[UI] fix CSV, JSON, and XML export with --prefix running
This commit is contained in:
parent
6945843c97
commit
638fd6234e
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user