Add button context to execute query action

This commit is contained in:
Andrew Kingston 2021-12-09 16:48:19 +00:00
parent 372d32b8b3
commit eeecc762d2
2 changed files with 8 additions and 1 deletions

View File

@ -55,6 +55,12 @@ export const getAvailableActions = (getAllActions = false) => {
{
name: "Execute Query",
component: ExecuteQuery,
context: [
{
label: "Query result",
value: "result",
},
],
},
{
name: "Trigger Automation",

View File

@ -74,11 +74,12 @@ const navigationHandler = action => {
const queryExecutionHandler = async action => {
const { datasourceId, queryId, queryParams } = action.parameters
await executeQuery({
const result = await executeQuery({
datasourceId,
queryId,
parameters: queryParams,
})
return { result }
}
const executeActionHandler = async (