Skip to content

Commit

Permalink
waiting for input changes separated (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-o-n-i-s-h committed Apr 4, 2024
1 parent 2b6fa66 commit 4857ce2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/config/ReportConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ const _REPORT_TYPES = {
type: SELECTION_TYPES.TEXT,
default: 'View Response',
},
disableParameterCheck: {
type: SELECTION_TYPES.LIST,
values: [true, false],
default: true,
},
},
},
graph: {
Expand Down Expand Up @@ -390,6 +395,11 @@ const _REPORT_TYPES = {
type: SELECTION_TYPES.TEXT,
default: 'Query returned no data.',
},
disableParameterCheck: {
type: SELECTION_TYPES.LIST,
values: [true, false],
default: false,
},
},
},
bar: {
Expand Down
8 changes: 5 additions & 3 deletions src/report/Report.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ export const NeoReport = ({
const debouncedRunCypherQuery = useCallback(debounce(runCypherQuery, RUN_QUERY_DELAY_MS), []);

const isQueryParametersDefined = (cypherQuery: string) => {
const parameterNames = extractAllParameterNames(cypherQuery);
if (parameters) {
return checkParametersNameInGlobalParameter(parameterNames, parameters);
if (!settings?.disableParameterCheck) {
const parameterNames = extractAllParameterNames(cypherQuery);
if (parameters) {
return checkParametersNameInGlobalParameter(parameterNames, parameters);
}
}
return false;
};
Expand Down

0 comments on commit 4857ce2

Please sign in to comment.