1
0
Fork 0
mirror of synced 2024-10-01 01:28:51 +13:00

Merge pull request #744 from Budibase/fix-issues

Fix Calculation View Issues In App Components
This commit is contained in:
Martin McKeaveney 2020-10-17 12:16:27 +01:00 committed by GitHub
commit 500be144ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View file

@ -66,7 +66,7 @@
</div>
</div>
<TemplateList onSelect={selectTemplate} />
<!-- <TemplateList onSelect={selectTemplate} /> -->
<AppList />
</div>

View file

@ -51,6 +51,7 @@ router
process.env.NODE_ENV !== "cypress"
await next()
})
.use("/health", ctx => (ctx.status = 200))
.use(authenticated)
// error handling middleware

View file

@ -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