Parse Custom sproc parameters (#693)

* Parse Custom sproc parameters

* Fix PK value parsing too
This commit is contained in:
Steve Faulkner 2021-04-18 23:20:58 -05:00 committed by GitHub
parent e0060b12e5
commit a53c203286
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,8 +79,15 @@ export const ExecuteSprocParamsPanel: FunctionComponent<ExecuteSprocParamsPanePr
return; return;
} }
setLoadingTrue(); setLoadingTrue();
const sprocParams = wrappedSprocParams && wrappedSprocParams.map((sprocParam) => sprocParam.text); const sprocParams =
storedProcedure.execute(sprocParams, partitionValue); wrappedSprocParams &&
wrappedSprocParams.map((sprocParam) => {
if (sprocParam.key === "custom") {
return JSON.parse(sprocParam.text);
}
return sprocParam.text;
});
storedProcedure.execute(sprocParams, partitionKey === "custom" ? JSON.parse(partitionValue) : partitionValue);
setLoadingFalse(); setLoadingFalse();
closePanel(); closePanel();
}; };