Skip to content

Commit

Permalink
temporarily disable execution for service queries with params (#1164)
Browse files Browse the repository at this point in the history
  • Loading branch information
MauricioUyaguari authored May 13, 2022
1 parent 1df0754 commit f5ac673
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/happy-pumpkins-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@finos/legend-studio": patch
---

Temporary disable executing service queries with parameters until workflow is supported.
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ export const ServiceExecutionQueryEditor = observer(
const importQuery = (): void => {
queryState.setOpenQueryImporter(true);
};
const temporaryDisableExecutionWithParams = Boolean(
Array.isArray(executionState.queryState.query.parameters) &&
executionState.queryState.query.parameters.length,
);
// execute
const execute = applicationStore.guardUnhandledError(() =>
flowResult(executionState.execute()),
Expand Down Expand Up @@ -289,8 +293,16 @@ export const ServiceExecutionQueryEditor = observer(
<button
className="service-editor__execution__execute-btn"
onClick={execute}
title={
temporaryDisableExecutionWithParams
? `Use query builder to execute queries with parameters`
: `Execute`
}
disabled={
executionState.isExecuting || executionState.isGeneratingPlan
executionState.isExecuting ||
executionState.isGeneratingPlan ||
// TODO: Enable once we allow setting parameters for execution
temporaryDisableExecutionWithParams
}
tabIndex={-1}
>
Expand Down

0 comments on commit f5ac673

Please sign in to comment.