Implement CSV download

This commit is contained in:
Zaid Abdulla committed 2018-12-26 00:22:07 -08:00
1 parent 24b047bd5e
commit a49cbc5e40
20 files changed
+391 -215

No files matched your search

+4 -2
View File
@@ -3,8 +3,10 @@
import m from "mithril";
import config from "../config";
import * as store from "../store";
import * as funcCache from "../../common/func-cache";
import * as expression from "../../common/expression";
import memoize from "../../common/memoize";
const memoizedParse = memoize(expression.parse);
const CHARTS = config.ui.overview.charts;
@@ -13,7 +15,7 @@ const component = {
const device = vnode.attrs.device;
const chart = CHARTS[vnode.attrs.chart];
for (let slice of Object.values(chart.slices)) {
const filter = funcCache.get(expression.parse, slice.filter);
const filter = memoizedParse(slice.filter);
if (store.evaluateExpression(filter, device)) {
const dot = m(
"svg",