Fixed autocompletion issue for exec and added errors for bad variables

This commit is contained in:
Frikky
2022-01-21 21:20:25 +00:00
committed by GitHub
parent 9ce92d6e1f
commit 2230cef978
4 changed files with 141 additions and 79 deletions
+1 -2
View File
@@ -340,8 +340,7 @@ const AngularWorkflow = (defaultprops) => {
const [_, setUpdate] = useState(""); // Used for rendring, don't remove
const [workflowExecutions, setWorkflowExecutions] = React.useState([]);
const [defaultEnvironmentIndex, setDefaultEnvironmentIndex] =
React.useState(0);
const [defaultEnvironmentIndex, setDefaultEnvironmentIndex] = React.useState(0);
// This should all be set once, not on every iteration
// Use states and don't update lol
+21 -3
View File
@@ -381,9 +381,27 @@ const chipStyle = {
};
export const validateJson = (showResult) => {
//showResult = showResult.split(" None").join(" \"None\"")
showResult = showResult.split(" False").join(" false");
showResult = showResult.split(" True").join(" true");
console.log("INPUT: ", showResult, typeof showResult)
if (typeof showResult === 'string') {
//showResult = showResult.split(" None").join(" \"None\"")
showResult = showResult.split(" False").join(" false");
showResult = showResult.split(" True").join(" true");
//return {
// valid: false,
// result: showResult,
//};
}
//if (typeof showResult === undefined) {
//}
if (typeof showResult === "object" || typeof showResult === "array") {
return {
valid: true,
result: showResult,
};
}
var jsonvalid = true;
try {