Last little workflow fixes before ui merge fix yay

This commit is contained in:
Frikky
2024-06-20 12:01:24 +02:00
parent db1138019f
commit f17d2a0d58
5 changed files with 38 additions and 26 deletions
+8 -7
View File
@@ -2105,8 +2105,8 @@ const AngularWorkflow = (defaultprops) => {
})
.catch((error) => {
setSavingState(0);
//toast(error.toString());
console.log("Save workflow error: ", error.toString());
toast.warn("Failed to save the workflow. Is the network down?")
});
if (originalWorkflow.id === undefined || originalWorkflow.id === null || originalWorkflow.id.length === 0 || useworkflow.id === originalWorkflow.id) {
@@ -8297,7 +8297,7 @@ const AngularWorkflow = (defaultprops) => {
})
}}
>
New execution variable
New Runtime variable
</Button>
</div>
</div>
@@ -8601,7 +8601,8 @@ const AngularWorkflow = (defaultprops) => {
}
if (parsedApp === undefined || parsedApp === null || parsedApp.data === undefined || parsedApp.data === null) {
toast("Failed to add trigger. Please try again.")
toast("Failed to add node. Please try again.")
console.log("Failed to add node. Please try again. Parsed app:", parsedApp)
return
}
@@ -19052,7 +19053,7 @@ const AngularWorkflow = (defaultprops) => {
data.value = data.value.substring(2)
}
if (!data.value.startsWith("http") || (data.value.startsWith("/") && data.value.includes("?"))) {
if (data.value.startsWith("http") || (data.value.startsWith("/") && data.value.includes("?"))) {
showlink = true
}
}
@@ -19348,7 +19349,7 @@ const AngularWorkflow = (defaultprops) => {
const result = execution.results.find((data) => data.status === "SUCCESS" && data.action.id === selectedResult.action.id)
if (result !== undefined) {
const oldstartnode = cy.getElementById(selectedResult.action.id);
const oldstartnode = cy.getElementById(selectedResult.action.id)
if (oldstartnode !== undefined && oldstartnode !== null) {
const foundname = oldstartnode.data("label")
if (foundname !== undefined && foundname !== null) {
@@ -19356,8 +19357,8 @@ const AngularWorkflow = (defaultprops) => {
}
}
setSelectedResult(result);
setUpdate(Math.random());
setSelectedResult(result)
setUpdate(Math.random())
break;
}
}
+1 -1
View File
@@ -130,7 +130,6 @@ export const GetIconInfo = (action) => {
// Finds the icon based on the action. Should be verbs.
const iconList = [
{ key: "cases", values: ["cases"] },
{ key: "communication", values: ["communication", "comms", "email",] },
{ key: "cache_add", values: ["set_cache"] },
{ key: "cache_get", values: ["get_cache"] },
{ key: "filter", values: ["filter"] },
@@ -200,6 +199,7 @@ export const GetIconInfo = (action) => {
values: ["compare", "convert", "to", "filter", "translate", "parse"],
},
{ key: "close", values: ["close", "stop", "cancel", "block"] },
{ key: "communication", values: ["communication", "comms", "email", "mail",] },
];
var selectedKey = ""