Merge branch 'master' into budi-8195/unable-to-load-grid-when-using-external-postgres
This commit is contained in:
commit
c5e185761e
|
@ -61,7 +61,7 @@ http {
|
||||||
set $csp_img "img-src http: https: data: blob:";
|
set $csp_img "img-src http: https: data: blob:";
|
||||||
set $csp_manifest "manifest-src 'self'";
|
set $csp_manifest "manifest-src 'self'";
|
||||||
set $csp_media "media-src 'self' https://js.intercomcdn.com https://cdn.budi.live";
|
set $csp_media "media-src 'self' https://js.intercomcdn.com https://cdn.budi.live";
|
||||||
set $csp_worker "worker-src 'none'";
|
set $csp_worker "worker-src blob:";
|
||||||
|
|
||||||
error_page 502 503 504 /error.html;
|
error_page 502 503 504 /error.html;
|
||||||
location = /error.html {
|
location = /error.html {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.26.4",
|
"version": "2.27.1",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*",
|
"packages/*",
|
||||||
|
|
|
@ -126,16 +126,25 @@ export default class AliasTables {
|
||||||
}
|
}
|
||||||
|
|
||||||
reverse<T extends Row | Row[]>(rows: T): T {
|
reverse<T extends Row | Row[]>(rows: T): T {
|
||||||
|
const mapping = new Map()
|
||||||
|
|
||||||
const process = (row: Row) => {
|
const process = (row: Row) => {
|
||||||
const final: Row = {}
|
const final: Row = {}
|
||||||
for (let [key, value] of Object.entries(row)) {
|
for (const key of Object.keys(row)) {
|
||||||
if (!key.includes(".")) {
|
let mappedKey = mapping.get(key)
|
||||||
final[key] = value
|
if (!mappedKey) {
|
||||||
} else {
|
const dotLocation = key.indexOf(".")
|
||||||
const [alias, column] = key.split(".")
|
if (dotLocation === -1) {
|
||||||
const tableName = this.tableAliases[alias] || alias
|
mappedKey = key
|
||||||
final[`${tableName}.${column}`] = value
|
} else {
|
||||||
|
const alias = key.slice(0, dotLocation)
|
||||||
|
const column = key.slice(dotLocation + 1)
|
||||||
|
const tableName = this.tableAliases[alias] || alias
|
||||||
|
mappedKey = `${tableName}.${column}`
|
||||||
|
}
|
||||||
|
mapping.set(key, mappedKey)
|
||||||
}
|
}
|
||||||
|
final[mappedKey] = row[key]
|
||||||
}
|
}
|
||||||
return final
|
return final
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue