Fixed autocompletion issue for exec and added errors for bad variables
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user