Merge branch 'master' into chore/aws-v2-to-v3
This commit is contained in:
commit
c27f7daaee
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
||||
"version": "3.2.33",
|
||||
"version": "3.2.34",
|
||||
"npmClient": "yarn",
|
||||
"concurrency": 20,
|
||||
"command": {
|
||||
|
|
|
@ -66,10 +66,9 @@ export const patchAPI = API => {
|
|||
}
|
||||
}
|
||||
const fetchRelationshipData = API.fetchRelationshipData
|
||||
API.fetchRelationshipData = async params => {
|
||||
const tableId = params?.tableId
|
||||
const rows = await fetchRelationshipData(params)
|
||||
return await enrichRows(rows, tableId)
|
||||
API.fetchRelationshipData = async (sourceId, rowId, fieldName) => {
|
||||
const rows = await fetchRelationshipData(sourceId, rowId, fieldName)
|
||||
return await enrichRows(rows, sourceId)
|
||||
}
|
||||
const fetchTableData = API.fetchTableData
|
||||
API.fetchTableData = async tableId => {
|
||||
|
@ -85,9 +84,9 @@ export const patchAPI = API => {
|
|||
}
|
||||
}
|
||||
const fetchViewData = API.fetchViewData
|
||||
API.fetchViewData = async params => {
|
||||
API.fetchViewData = async (viewName, params) => {
|
||||
const tableId = params?.tableId
|
||||
const rows = await fetchViewData(params)
|
||||
const rows = await fetchViewData(viewName, params)
|
||||
return await enrichRows(rows, tableId)
|
||||
}
|
||||
|
||||
|
|
|
@ -8,9 +8,15 @@ export default class ViewFetch extends DataFetch {
|
|||
async getData() {
|
||||
const { datasource } = this.options
|
||||
try {
|
||||
const res = await this.API.fetchViewData(datasource.name)
|
||||
const res = await this.API.fetchViewData(datasource.name, {
|
||||
calculation: datasource.calculation,
|
||||
field: datasource.field,
|
||||
groupBy: datasource.groupBy,
|
||||
tableId: datasource.tableId,
|
||||
})
|
||||
return { rows: res || [] }
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
return { rows: [] }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue