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:
Shweelan Samson authored and Zaid Abdulla committed 2019-03-04 16:12:39 -08:00
1 parent 3b3369a236
commit d70263e798
7 files changed
+26 -22

No files matched your search

+3 -3
View File
@@ -6,7 +6,7 @@ import * as store from "./store";
import * as notifications from "./notifications";
import memoize from "../lib/common/memoize";
import * as smartQuery from "./smart-query";
import { map, parse } from "../lib/common/expression-parser";
import { map, parse, stringify } from "../lib/common/expression-parser";
import { loadYaml, yaml } from "./dynamic-loader";
const PAGE_SIZE = config.ui.pageSize || 10;
@@ -32,7 +32,7 @@ const getDownloadUrl = memoize(filter => {
}
return `/api/faults.csv?${m.buildQueryString({
filter: filter,
filter: stringify(filter),
columns: JSON.stringify(cols)
})}`;
});
@@ -272,7 +272,7 @@ export const component: ClosureComponent = (): Component => {
}
vnode.state["selected"] = selected;
const downloadUrl = getDownloadUrl(vnode.attrs["filter"]);
const downloadUrl = getDownloadUrl(filter);
const attrs = {};
attrs["resource"] = "faults";