Move UI configs to DB

This commit is contained in:
Shweelan Samson authored and Zaid Abdulla committed 2019-01-16 05:22:14 -08:00
1 parent 192ed6b034
commit 1cceba3f8b
22 files changed
+337 -448

No files matched your search

+1 -5
View File
@@ -3,10 +3,6 @@
import m from "mithril";
import config from "../config";
import * as store from "../store";
import * as expression from "../../lib/common/expression";
import memoize from "../../lib/common/memoize";
const memoizedParse = memoize(expression.parse);
const CHARTS = config.ui.overview.charts;
@@ -15,7 +11,7 @@ const component = {
const device = vnode.attrs.device;
const chart = CHARTS[vnode.attrs.chart];
for (const slice of Object.values(chart.slices)) {
const filter = memoizedParse(slice.filter);
const filter = slice.filter;
if (store.evaluateExpression(filter, device)) {
const dot = m(
"svg",