Fixed cache frontend issues related to editing/viewing
This commit is contained in:
@@ -9267,15 +9267,21 @@ const AngularWorkflow = (defaultprops) => {
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
const execution = workflowExecutions[executionKey]
|
||||
if (execution.execution_argument === undefined || execution.execution_argument === null || execution.execution_argument.length < 2) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (execution.execution_argument.includes("too large ")) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (availableArguments.includes(execution.execution_argument)) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
availableArguments.push(execution.execution_argument)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,59 +290,6 @@ const Settings = (props) => {
|
||||
}
|
||||
};
|
||||
|
||||
// const registerProviders = (userdata) => {
|
||||
// // Register hooks here
|
||||
// detectEthereumProvider().then((provider) => {
|
||||
// if (provider) {
|
||||
// if (!provider.isMetaMask) {
|
||||
// toast("Only MetaMask is supported as of now.");
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // Find the ethereum network
|
||||
// // Get the users' account(s)
|
||||
// //toast("Connecting to MetaMask")
|
||||
// //console.log("Connected: ", provider.isConnected())
|
||||
|
||||
// if (!provider.isConnected()) {
|
||||
// toast("Metamask is not connected.");
|
||||
// return;
|
||||
// }
|
||||
|
||||
// provider.on("message", (event) => {
|
||||
// toast("Ethereum message: ", event);
|
||||
// });
|
||||
|
||||
// provider.on("chainChanged", (chainId) => {
|
||||
// console.log("Changed chain to: ", chainId);
|
||||
|
||||
// const method = "eth_getBalance";
|
||||
// const params = [userdata.eth_info.account, "latest"];
|
||||
// provider
|
||||
// .request({
|
||||
// method: method,
|
||||
// params,
|
||||
// })
|
||||
// .then((result) => {
|
||||
// console.log("Got result: ", result);
|
||||
// if (result !== undefined && result !== null) {
|
||||
// userdata.eth_info.balance = result;
|
||||
// userdata.eth_info.parsed_balance = result / 1000000000000000000;
|
||||
// console.log("INFO: ", userdata);
|
||||
// setUserData(userdata);
|
||||
// } else {
|
||||
// toast("Couldn't find balance: ", result);
|
||||
// }
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// // If the request fails, the Promise will reject with an error.
|
||||
// toast("Failed getting info from ethereum API: " + error);
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
|
||||
// This should "always" have data
|
||||
useEffect(() => {
|
||||
if (firstrequest) {
|
||||
|
||||
@@ -1336,16 +1336,21 @@ const Workflows = (props) => {
|
||||
};
|
||||
|
||||
const exportAllWorkflows = (allWorkflows) => {
|
||||
for (var i = 0; i < allWorkflows.length; i++) {
|
||||
console.log(allWorkflows[i])
|
||||
setTimeout(() => {
|
||||
console.log(allWorkflows[i])
|
||||
exportWorkflow(allWorkflows[i], false)
|
||||
}, i * 200);
|
||||
}
|
||||
for (var i = 0; i < allWorkflows.length; i++) {
|
||||
const wf = allWorkflows[i]
|
||||
|
||||
toast(`Exporting and keeping original for all ${allWorkflows.length} workflows`);
|
||||
};
|
||||
if (wf === undefined || wf.id === undefined) {
|
||||
continue
|
||||
}
|
||||
|
||||
console.log("Exporting workflow: ", wf)
|
||||
setTimeout(() => {
|
||||
exportWorkflow(JSON.parse(JSON.stringify(wf)), false)
|
||||
}, i * 100);
|
||||
}
|
||||
|
||||
toast(`Exporting and keeping original for all ${allWorkflows.length} workflows`);
|
||||
}
|
||||
|
||||
const deduplicateIds = (data, skip_sanitize) => {
|
||||
if (data.triggers !== null && data.triggers !== undefined) {
|
||||
@@ -1498,7 +1503,12 @@ const Workflows = (props) => {
|
||||
};
|
||||
|
||||
const exportWorkflow = (data, sanitize) => {
|
||||
data = JSON.parse(JSON.stringify(data));
|
||||
try {
|
||||
data = JSON.parse(JSON.stringify(data));
|
||||
} catch (e) {
|
||||
console.log("Failed to parse JSON: ", e);
|
||||
}
|
||||
|
||||
let exportFileDefaultName = data.name + ".json";
|
||||
|
||||
if (sanitize === true) {
|
||||
|
||||
Reference in New Issue
Block a user