#400: Fixed parsing of underscore/space issues in frontend and SDK
This commit is contained in:
@@ -28,6 +28,28 @@ http {
|
||||
server {
|
||||
listen 80;
|
||||
server_name "localhost";
|
||||
|
||||
#location /static/js/* {
|
||||
# # avoid clickjacking
|
||||
# add_header X-Frame-Options DENY;
|
||||
# add_header X-Content-Type-Options nosniff;
|
||||
# add_header ;
|
||||
# # block MIME sniffing
|
||||
|
||||
# # security headers
|
||||
# add_header X-XSS-Protection "1; mode=block";
|
||||
# # add_header Content-Security-Policy "default-src 'self'";
|
||||
# add_header Referrer-Policy "no-referrer";
|
||||
# server_tokens off;
|
||||
|
||||
# root /usr/share/nginx/html;
|
||||
# gzip_static on;
|
||||
# expires 1y;
|
||||
# add_header Cache-Control public;
|
||||
# add_header ETag "";
|
||||
# try_files $uri /index.html;
|
||||
#}
|
||||
|
||||
location / {
|
||||
# avoid clickjacking
|
||||
add_header X-Frame-Options DENY;
|
||||
|
||||
@@ -7567,6 +7567,10 @@ const AngularWorkflow = (props) => {
|
||||
}
|
||||
|
||||
const HandleJsonCopy = (base, copy, base_node_name) => {
|
||||
if (typeof(copy.name) === "string") {
|
||||
copy.name = copy.name.replaceAll(" ", "_")
|
||||
}
|
||||
|
||||
console.log("COPY: ", copy)
|
||||
var newitem = JSON.parse(base)
|
||||
to_be_copied = "$"+base_node_name.toLowerCase().replaceAll(" ", "_")
|
||||
@@ -7919,7 +7923,7 @@ const AngularWorkflow = (props) => {
|
||||
try {
|
||||
validate.result.result = JSON.parse(validate.result.result)
|
||||
} catch (e) {
|
||||
console.log("ERROR PARSING: ", e)
|
||||
//console.log("ERROR PARSING: ", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@ export const GetParsedPaths = (inputdata, basekey) => {
|
||||
// Handle direct loop!
|
||||
if (!isNaN(key) && basekey === "") {
|
||||
console.log("Handling direct loop.")
|
||||
parsedValues.push({"type": "object", "name": "Node", "autocomplete": `${basekey}`.toLowerCase()})
|
||||
parsedValues.push({"type": "list", "name": `${splitkey}list`, "autocomplete": `${basekey}.#`.toLowerCase()})
|
||||
parsedValues.push({"type": "object", "name": "Node", "autocomplete": `${basekey.replaceAll(" ", "_")}`})
|
||||
parsedValues.push({"type": "list", "name": `${splitkey}list`, "autocomplete": `${basekey.replaceAll(" ", "_")}.#`})
|
||||
const returnValues = GetParsedPaths(value, `${basekey}.#`)
|
||||
for (var subkey in returnValues) {
|
||||
parsedValues.push(returnValues[subkey])
|
||||
@@ -61,8 +61,8 @@ export const GetParsedPaths = (inputdata, basekey) => {
|
||||
if (typeof(value) === 'object') {
|
||||
if (Array.isArray(value)) {
|
||||
// Check if each item is object
|
||||
parsedValues.push({"type": "object", "name": basekeyname, "autocomplete": `${basekey}.${key}`.toLowerCase()})
|
||||
parsedValues.push({"type": "list", "name": `${basekeyname}${splitkey}list`, "autocomplete": `${basekey}.${key}.#`.toLowerCase()})
|
||||
parsedValues.push({"type": "object", "name": basekeyname, "autocomplete": `${basekey}.${key.replaceAll(" ", "_")}`})
|
||||
parsedValues.push({"type": "list", "name": `${basekeyname}${splitkey}list`, "autocomplete": `${basekey}.${key.replaceAll(" ", "_")}.#`})
|
||||
|
||||
// Only check the first. This would be probably be dumb otherwise.
|
||||
for (var subkey in value) {
|
||||
@@ -79,14 +79,14 @@ export const GetParsedPaths = (inputdata, basekey) => {
|
||||
}
|
||||
//console.log(key+" is array")
|
||||
} else {
|
||||
parsedValues.push({"type": "object", "name": basekeyname, "autocomplete": `${basekey}.${key}`.toLowerCase()})
|
||||
parsedValues.push({"type": "object", "name": basekeyname, "autocomplete": `${basekey}.${key.replaceAll(" ", "_")}`})
|
||||
const returnValues = GetParsedPaths(value, `${basekey}.${key}`)
|
||||
for (var subkey in returnValues) {
|
||||
parsedValues.push(returnValues[subkey])
|
||||
}
|
||||
}
|
||||
} else {
|
||||
parsedValues.push({"type": "value", "name": basekeyname, "autocomplete": `${basekey}.${key}`.toLowerCase(), "value": value,})
|
||||
parsedValues.push({"type": "value", "name": basekeyname, "autocomplete": `${basekey}.${key.replaceAll(" ", "_")}`, "value": value,})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user