Add button context to execute query action
This commit is contained in:
parent
6cec671283
commit
3f1d3328e2
|
@ -55,6 +55,12 @@ export const getAvailableActions = (getAllActions = false) => {
|
||||||
{
|
{
|
||||||
name: "Execute Query",
|
name: "Execute Query",
|
||||||
component: ExecuteQuery,
|
component: ExecuteQuery,
|
||||||
|
context: [
|
||||||
|
{
|
||||||
|
label: "Query result",
|
||||||
|
value: "result",
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Trigger Automation",
|
name: "Trigger Automation",
|
||||||
|
|
|
@ -74,11 +74,12 @@ const navigationHandler = action => {
|
||||||
|
|
||||||
const queryExecutionHandler = async action => {
|
const queryExecutionHandler = async action => {
|
||||||
const { datasourceId, queryId, queryParams } = action.parameters
|
const { datasourceId, queryId, queryParams } = action.parameters
|
||||||
await executeQuery({
|
const result = await executeQuery({
|
||||||
datasourceId,
|
datasourceId,
|
||||||
queryId,
|
queryId,
|
||||||
parameters: queryParams,
|
parameters: queryParams,
|
||||||
})
|
})
|
||||||
|
return { result }
|
||||||
}
|
}
|
||||||
|
|
||||||
const executeActionHandler = async (
|
const executeActionHandler = async (
|
||||||
|
|
Loading…
Reference in New Issue