Skip to content

Commit

Permalink
Merge pull request #111 from mercedes-benz/develop
Browse files Browse the repository at this point in the history
Sprint Release 025
  • Loading branch information
brahmprakashMishra committed Apr 15, 2024
2 parents 72bbfcf + 4857ce2 commit eacc56e
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 eacc56e

Please sign in to comment.