diff --git a/packages/builder/src/pages/index.svelte b/packages/builder/src/pages/index.svelte index 09fa40d1c7..43f3fd02d7 100644 --- a/packages/builder/src/pages/index.svelte +++ b/packages/builder/src/pages/index.svelte @@ -66,7 +66,7 @@ - + diff --git a/packages/server/src/api/index.js b/packages/server/src/api/index.js index 5d5f64459e..0a4de71135 100644 --- a/packages/server/src/api/index.js +++ b/packages/server/src/api/index.js @@ -51,6 +51,7 @@ router process.env.NODE_ENV !== "cypress" await next() }) + .use("/health", ctx => (ctx.status = 200)) .use(authenticated) // error handling middleware diff --git a/packages/standard-components/src/fetchData.js b/packages/standard-components/src/fetchData.js index 68aca7eac6..42f07d3910 100644 --- a/packages/standard-components/src/fetchData.js +++ b/packages/standard-components/src/fetchData.js @@ -46,13 +46,18 @@ export default async function fetchData(datasource, store) { } async function fetchViewData() { - const { field, groupBy } = datasource + const { field, groupBy, calculation } = datasource const params = new URLSearchParams() - if (field) { + if (calculation) { params.set("field", field) - params.set("stats", true) + params.set("calculation", calculation) } + + if (groupBy) { + params.set("group", groupBy) + } + if (groupBy) params.set("group", groupBy) let QUERY_VIEW_URL = field