Removed query filtering on dynamic variables in binding drawer
This commit is contained in:
parent
b034d78d71
commit
5b6e8992bc
|
@ -231,13 +231,10 @@
|
||||||
]
|
]
|
||||||
|
|
||||||
// convert dynamic variables list to simple key/val object
|
// convert dynamic variables list to simple key/val object
|
||||||
const getDynamicVariables = (datasource, queryId) => {
|
const getDynamicVariables = datasource => {
|
||||||
const variablesList = datasource?.config?.dynamicVariables
|
const variablesList = datasource?.config?.dynamicVariables
|
||||||
if (variablesList && variablesList.length > 0) {
|
if (variablesList && variablesList.length > 0) {
|
||||||
const filtered = queryId
|
return variablesList.reduce(
|
||||||
? variablesList.filter(variable => variable.queryId === queryId)
|
|
||||||
: variablesList
|
|
||||||
return filtered.reduce(
|
|
||||||
(acc, next) => ({ ...acc, [next.name]: next.value }),
|
(acc, next) => ({ ...acc, [next.name]: next.value }),
|
||||||
{}
|
{}
|
||||||
)
|
)
|
||||||
|
@ -367,7 +364,7 @@
|
||||||
if (query && !query.fields.pagination) {
|
if (query && !query.fields.pagination) {
|
||||||
query.fields.pagination = {}
|
query.fields.pagination = {}
|
||||||
}
|
}
|
||||||
dynamicVariables = getDynamicVariables(datasource, query._id)
|
dynamicVariables = getDynamicVariables(datasource)
|
||||||
|
|
||||||
prettifyQueryRequestBody(
|
prettifyQueryRequestBody(
|
||||||
query,
|
query,
|
||||||
|
|
Loading…
Reference in New Issue