Merge branch '2.0.0' into renderingIssue

This commit is contained in:
Frikky
2024-06-20 12:24:05 +02:00
committed by GitHub
4 changed files with 20 additions and 16 deletions
+7 -5
View File
@@ -410,6 +410,7 @@ const Files = (props) => {
) { ) {
toast("Failed to delete file: " + responseJson.reason); toast("Failed to delete file: " + responseJson.reason);
} }
setTimeout(() => { setTimeout(() => {
getFiles(selectedCategory) getFiles(selectedCategory)
}, 1500); }, 1500);
@@ -697,13 +698,14 @@ const Files = (props) => {
//setFile(fileObject) //setFile(fileObject)
//const files = event.target.files[0] //const files = event.target.files[0]
uploadFiles(event.target.files); uploadFiles(event.target.files);
}} }}
/> />
<Button <Button
style={{ marginLeft: 5, marginRight: 15, backgroundColor:isSelectedFiles?"#2F2F2F":null,borderRadius:isSelectedFiles?200:null, width:isSelectedFiles?81:null, height:isSelectedFiles?40:null, boxShadow: isSelectedFiles?'none':null, }} style={{ marginLeft: 5, marginRight: 15, backgroundColor:isSelectedFiles?"#2F2F2F":null,borderRadius:isSelectedFiles?200:null, width:isSelectedFiles?81:null, height:isSelectedFiles?40:null, boxShadow: isSelectedFiles?'none':null, }}
variant="contained" variant="contained"
color="primary" color="primary"
onClick={() => getFiles()} onClick={() => getFiles(selectedCategory)}
> >
<CachedIcon /> <CachedIcon />
</Button> </Button>
@@ -846,7 +848,7 @@ const Files = (props) => {
/> />
<ListItemText <ListItemText
primary="Md5" primary="Md5"
style={{ minWidth: isSelectedFiles ? 210:250, maxWidth: isSelectedFiles?210:250, overflow: "hidden" }} style={{ minWidth: 300, maxWidth: 300, overflow: "hidden" }}
/> />
<ListItemText <ListItemText
primary="Status" primary="Status"
@@ -962,8 +964,8 @@ const Files = (props) => {
<ListItemText <ListItemText
primary={file.md5_sum} primary={file.md5_sum}
style={{ style={{
minWidth: isSelectedFiles?200:300, minWidth: 300,
maxWidth: isSelectedFiles?200:300, maxWidth: 300,
marginLeft:isSelectedFiles? 15:null, marginLeft:isSelectedFiles? 15:null,
overflow: isSelectedFiles?"auto":"hidden", overflow: isSelectedFiles?"auto":"hidden",
}} }}
@@ -1110,7 +1112,7 @@ const Files = (props) => {
disabled={file.status !== "active"} disabled={file.status !== "active"}
style = {{padding: "6px"}} style = {{padding: "6px"}}
onClick={() => { onClick={() => {
deleteFile(file); deleteFile(file)
}} }}
> >
<DeleteIcon <DeleteIcon
@@ -1581,7 +1581,8 @@ const CodeEditor = (props) => {
> >
<div> <div>
<span style={{color: "white"}}> <span style={{color: "white"}}>
Expected Output
{selectedAction === undefined ? "" : selectedAction.name === "execute_python" ? "Code to run" : "Expected Output"}
</span> </span>
</div> </div>
@@ -1598,7 +1599,7 @@ const CodeEditor = (props) => {
border: `1px solid ${theme.palette.primary.main}`, border: `1px solid ${theme.palette.primary.main}`,
position: "absolute", position: "absolute",
top: 24, top: 24,
right: 65, right: 100,
maxHeight: 35, maxHeight: 35,
minWidth: 70, minWidth: 70,
}} }}
@@ -1609,7 +1610,7 @@ const CodeEditor = (props) => {
{executing ? {executing ?
<CircularProgress style={{height: 18, width: 18, }} /> <CircularProgress style={{height: 18, width: 18, }} />
: :
<span>Try it <PlayArrowIcon style={{height: 18, width: 18, marginBottom: -4, marginLeft: 5, }} /> </span> <span>{selectedAction === undefined ? "" : selectedAction.name === "execute_python" ? "Run Python Code" : "Try it"}<PlayArrowIcon style={{height: 18, width: 18, marginBottom: -4, marginLeft: 5, }} /> </span>
} }
</Button> </Button>
</Tooltip> </Tooltip>
+8 -7
View File
@@ -2104,8 +2104,8 @@ const releaseToConnectLabel = "Release to Connect"
}) })
.catch((error) => { .catch((error) => {
setSavingState(0); setSavingState(0);
//toast(error.toString());
console.log("Save workflow error: ", 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) { if (originalWorkflow.id === undefined || originalWorkflow.id === null || originalWorkflow.id.length === 0 || useworkflow.id === originalWorkflow.id) {
@@ -8431,7 +8431,7 @@ const releaseToConnectLabel = "Release to Connect"
}) })
}} }}
> >
New execution variable New Runtime variable
</Button> </Button>
</div> </div>
</div> </div>
@@ -8739,7 +8739,8 @@ const releaseToConnectLabel = "Release to Connect"
} }
if (parsedApp === undefined || parsedApp === null || parsedApp.data === undefined || parsedApp.data === null) { 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 return
} }
@@ -18987,7 +18988,7 @@ const releaseToConnectLabel = "Release to Connect"
data.value = data.value.substring(2) 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 showlink = true
} }
} }
@@ -19282,7 +19283,7 @@ const releaseToConnectLabel = "Release to Connect"
const result = execution.results.find((data) => data.status === "SUCCESS" && data.action.id === selectedResult.action.id) const result = execution.results.find((data) => data.status === "SUCCESS" && data.action.id === selectedResult.action.id)
if (result !== undefined) { if (result !== undefined) {
const oldstartnode = cy.getElementById(selectedResult.action.id); const oldstartnode = cy.getElementById(selectedResult.action.id)
if (oldstartnode !== undefined && oldstartnode !== null) { if (oldstartnode !== undefined && oldstartnode !== null) {
const foundname = oldstartnode.data("label") const foundname = oldstartnode.data("label")
if (foundname !== undefined && foundname !== null) { if (foundname !== undefined && foundname !== null) {
@@ -19290,8 +19291,8 @@ const releaseToConnectLabel = "Release to Connect"
} }
} }
setSelectedResult(result); setSelectedResult(result)
setUpdate(Math.random()); setUpdate(Math.random())
break; break;
} }
} }
+1 -1
View File
@@ -130,7 +130,6 @@ export const GetIconInfo = (action) => {
// Finds the icon based on the action. Should be verbs. // Finds the icon based on the action. Should be verbs.
const iconList = [ const iconList = [
{ key: "cases", values: ["cases"] }, { key: "cases", values: ["cases"] },
{ key: "communication", values: ["communication", "comms", "email",] },
{ key: "cache_add", values: ["set_cache"] }, { key: "cache_add", values: ["set_cache"] },
{ key: "cache_get", values: ["get_cache"] }, { key: "cache_get", values: ["get_cache"] },
{ key: "filter", values: ["filter"] }, { key: "filter", values: ["filter"] },
@@ -200,6 +199,7 @@ export const GetIconInfo = (action) => {
values: ["compare", "convert", "to", "filter", "translate", "parse"], values: ["compare", "convert", "to", "filter", "translate", "parse"],
}, },
{ key: "close", values: ["close", "stop", "cancel", "block"] }, { key: "close", values: ["close", "stop", "cancel", "block"] },
{ key: "communication", values: ["communication", "comms", "email", "mail",] },
]; ];
var selectedKey = "" var selectedKey = ""