Fix bugs in resources download
Fix a bug caused when downloading with smart query filter on. Also fix a bug in downloading presets.
This commit is contained in:
1 parent
3b3369a236
commit
d70263e798
7 files changed
+26
-22
No files matched your search
@@ -8,7 +8,7 @@ import memoize from "../lib/common/memoize";
|
||||
import putFormComponent from "./put-form-component";
|
||||
import * as overlay from "./overlay";
|
||||
import * as smartQuery from "./smart-query";
|
||||
import { map, parse } from "../lib/common/expression-parser";
|
||||
import { map, parse, stringify } from "../lib/common/expression-parser";
|
||||
import { loadCodeMirror } from "./dynamic-loader";
|
||||
|
||||
const PAGE_SIZE = config.ui.pageSize || 10;
|
||||
@@ -95,7 +95,7 @@ const getDownloadUrl = memoize(filter => {
|
||||
const cols = {};
|
||||
for (const attr of attributes) cols[attr.label] = attr.id;
|
||||
return `/api/virtualParameters.csv?${m.buildQueryString({
|
||||
filter: filter,
|
||||
filter: stringify(filter),
|
||||
columns: JSON.stringify(cols)
|
||||
})}`;
|
||||
});
|
||||
@@ -434,7 +434,7 @@ export const component: ClosureComponent = (): Component => {
|
||||
}
|
||||
vnode.state["selected"] = selected;
|
||||
|
||||
const downloadUrl = getDownloadUrl(vnode.attrs["filter"]);
|
||||
const downloadUrl = getDownloadUrl(filter);
|
||||
|
||||
const attrs = {};
|
||||
attrs["resource"] = "virtualParameters";
|
||||
|
||||
Reference in new issue
Block a user