Cleaned up how keys are handled for duplicates and published workflows. Further changes APIs to use the correct one again for OpenAPI loading
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React, { useState, useEffect, useLayoutEffect } from "react";
|
||||
import ReactDOM from "react-dom"
|
||||
|
||||
import { useInterval } from "react-powerhooks";
|
||||
import { makeStyles, useTheme } from "@material-ui/core/styles";
|
||||
|
||||
@@ -1400,7 +1401,6 @@ const AngularWorkflow = (defaultprops) => {
|
||||
setVisited([])
|
||||
setExecutionRequest({})
|
||||
stop()
|
||||
})
|
||||
|
||||
var curelements = cy.elements();
|
||||
for (var i = 0; i < curelements.length; i++) {
|
||||
@@ -1476,6 +1476,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
setExecutionRequestStarted(false)
|
||||
console.log("Execute workflow err: ", error.toString());
|
||||
});
|
||||
})
|
||||
};
|
||||
|
||||
// This can be used to only show prioritzed ones later
|
||||
@@ -13858,7 +13859,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
<span style={{ color: "white" }}>Execution Variable</span>
|
||||
</DialogTitle>
|
||||
<DialogContent>
|
||||
Execution Variables are TEMPORARY variables that you can ony be set
|
||||
Execution Variables are TEMPORARY variables that you can only be set
|
||||
and used during execution. Learn more{" "}
|
||||
<a
|
||||
rel="noopener noreferrer"
|
||||
@@ -13955,7 +13956,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
|
||||
const variable = execution.execution_variables.find(
|
||||
(data) => data.name === newVariableName
|
||||
);
|
||||
)
|
||||
if (variable === undefined || variable.value === undefined) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -393,35 +393,36 @@ const AppCreator = (defaultprops) => {
|
||||
return;
|
||||
}
|
||||
|
||||
handleEditApp(urlParams.get("id"))
|
||||
//handleEditApp(urlParams.get("id"))
|
||||
|
||||
//fetch(globalUrl + "/api/v1/get_openapi/" + urlParams.get("id"), {
|
||||
// method: "GET",
|
||||
// headers: {
|
||||
// "Content-Type": "application/json",
|
||||
// Accept: "application/json",
|
||||
// },
|
||||
// credentials: "include",
|
||||
//})
|
||||
// .then((response) => {
|
||||
// if (response.status !== 200) {
|
||||
// throw new Error("NOT 200 :O");
|
||||
// }
|
||||
// THIS has to stay due to ID may not exist as normal app yet
|
||||
fetch(globalUrl + "/api/v1/get_openapi/" + urlParams.get("id"), {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Accept: "application/json",
|
||||
},
|
||||
credentials: "include",
|
||||
})
|
||||
.then((response) => {
|
||||
if (response.status !== 200) {
|
||||
throw new Error("NOT 200 :O");
|
||||
}
|
||||
|
||||
// return response.json();
|
||||
// })
|
||||
// .then((responseJson) => {
|
||||
// setIsAppLoaded(true);
|
||||
// if (!responseJson.success) {
|
||||
// alert.error("Failed to verify");
|
||||
// } else {
|
||||
// parseIncomingOpenapiData(responseJson);
|
||||
// }
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// console.log("Error: ", error.toString());
|
||||
// alert.error(error.toString());
|
||||
// });
|
||||
return response.json();
|
||||
})
|
||||
.then((responseJson) => {
|
||||
setIsAppLoaded(true);
|
||||
if (!responseJson.success) {
|
||||
alert.error("Failed to get app config. Do you have access?");
|
||||
} else {
|
||||
parseIncomingOpenapiData(responseJson);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Error: ", error.toString());
|
||||
alert.error(error.toString());
|
||||
});
|
||||
};
|
||||
|
||||
const setFileFromb64 = () => {
|
||||
|
||||
@@ -1274,8 +1274,12 @@ const Workflows = (props) => {
|
||||
|
||||
for (var subkey in data.actions[key].parameters) {
|
||||
const param = data.actions[key].parameters[subkey];
|
||||
|
||||
// Removed October 10th, 2022 as key usually isn't
|
||||
// containing anything secret, but rather necessary configurations.
|
||||
// param.name.includes("key") ||
|
||||
//
|
||||
if (
|
||||
param.name.includes("key") ||
|
||||
param.name.includes("user") ||
|
||||
param.name.includes("pass") ||
|
||||
param.name.includes("api") ||
|
||||
@@ -1322,8 +1326,9 @@ const Workflows = (props) => {
|
||||
) {
|
||||
for (key in data.workflow_variables) {
|
||||
const param = data.workflow_variables[key];
|
||||
//param.name.includes("key") ||
|
||||
|
||||
if (
|
||||
param.name.includes("key") ||
|
||||
param.name.includes("user") ||
|
||||
param.name.includes("pass") ||
|
||||
param.name.includes("api") ||
|
||||
|
||||
Reference in New Issue
Block a user