Minor fixes to bad app viewing

This commit is contained in:
frikky
2023-01-16 00:41:58 +01:00
parent b90a489d74
commit 79d68321e8
+178 -121
View File
@@ -134,6 +134,7 @@ import ParsedAction from "../components/ParsedAction.jsx";
import PaperComponent from "../components/PaperComponent.jsx" import PaperComponent from "../components/PaperComponent.jsx"
import ExtraApps from "../components/ExtraApps.jsx" import ExtraApps from "../components/ExtraApps.jsx"
import EditWorkflow from "../components/EditWorkflow.jsx" import EditWorkflow from "../components/EditWorkflow.jsx"
import AppStats from "../components/AppStats.jsx";
const surfaceColor = "#27292D"; const surfaceColor = "#27292D";
const inputColor = "#383B40"; const inputColor = "#383B40";
@@ -250,11 +251,10 @@ const svgSize = 24;
const searchClient = algoliasearch("JNSS5CFDZZ", "db08e40265e2941b9a7d8f644b6e5240") const searchClient = algoliasearch("JNSS5CFDZZ", "db08e40265e2941b9a7d8f644b6e5240")
const AngularWorkflow = (defaultprops) => { const AngularWorkflow = (defaultprops) => {
const { globalUrl, isLoggedIn, isLoaded, userdata } = defaultprops; const { globalUrl, isLoggedIn, isLoaded, userdata, data_id } = defaultprops;
const referenceUrl = globalUrl + "/api/v1/hooks/"; const referenceUrl = globalUrl + "/api/v1/hooks/";
const alert = useAlert() const alert = useAlert()
let navigate = useNavigate(); let navigate = useNavigate();
const params = useParams(); const params = useParams();
var props = JSON.parse(JSON.stringify(defaultprops)) var props = JSON.parse(JSON.stringify(defaultprops))
props.match = {} props.match = {}
@@ -383,6 +383,7 @@ const AngularWorkflow = (defaultprops) => {
const [userediting, setUserediting] = React.useState(false) const [userediting, setUserediting] = React.useState(false)
const [lastSaved, setLastSaved] = React.useState(true); const [lastSaved, setLastSaved] = React.useState(true);
const [selectionOpen, setSelectionOpen] = React.useState(false);
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
const [_, setUpdate] = useState(""); // Used for rendring, don't remove const [_, setUpdate] = useState(""); // Used for rendring, don't remove
@@ -1685,7 +1686,7 @@ const AngularWorkflow = (defaultprops) => {
.catch((error) => { .catch((error) => {
setAppsLoaded(true) setAppsLoaded(true)
//alert.error("App loading error: "+error.toString()); //alert.error("App loading error: "+error.toString());
console.log("App loading error: "+error.toString()); console.log("App loading error: " + error.toString());
}); });
}; };
@@ -1748,9 +1749,11 @@ const AngularWorkflow = (defaultprops) => {
if (responseJson.files !== undefined && responseJson.files !== null) { if (responseJson.files !== undefined && responseJson.files !== null) {
setFiles(responseJson); setFiles(responseJson);
} else { } else {
setFiles({"namespaces": [ setFiles({
"namespaces": [
"default" "default"
]}); ]
});
} }
if ( if (
@@ -1818,7 +1821,7 @@ const AngularWorkflow = (defaultprops) => {
if (parsedAction.large_image === undefined || parsedAction.large_image === null || parsedAction.large_image === "") { if (parsedAction.large_image === undefined || parsedAction.large_image === null || parsedAction.large_image === "") {
continue continue
} }
if (appsFound.findIndex(data => data.app_name === parsedAction.app_name) < 0){ if (appsFound.findIndex(data => data.app_name === parsedAction.app_name) < 0) {
appsFound.push(parsedAction) appsFound.push(parsedAction)
} }
} }
@@ -1828,7 +1831,7 @@ const AngularWorkflow = (defaultprops) => {
appsFound = [] appsFound = []
for (var key in responseJson.triggers) { for (var key in responseJson.triggers) {
const parsedAction = responseJson.triggers[key] const parsedAction = responseJson.triggers[key]
if (appsFound.findIndex(data => data.app_name === parsedAction.app_name) < 0){ if (appsFound.findIndex(data => data.app_name === parsedAction.app_name) < 0) {
appsFound.push(parsedAction) appsFound.push(parsedAction)
} }
} }
@@ -2898,7 +2901,7 @@ const AngularWorkflow = (defaultprops) => {
//console.log("Trigger: ", data, trigger_index) //console.log("Trigger: ", data, trigger_index)
if (trigger_index === -1) { if (trigger_index === -1) {
workflow.triggers.push(data) workflow.triggers.push(data)
trigger_index = workflow.triggers.length-1 trigger_index = workflow.triggers.length - 1
setWorkflow(workflow) setWorkflow(workflow)
} }
@@ -2917,7 +2920,7 @@ const AngularWorkflow = (defaultprops) => {
getAvailableWorkflows(trigger_index); getAvailableWorkflows(trigger_index);
getSettings(); getSettings();
} else if (data.app_name === "Webhook") { } else if (data.app_name === "Webhook") {
if (workflow.triggers[trigger_index].parameters !== undefined) { if (workflow.triggers[trigger_index].parameters !== undefined && workflow.triggers[trigger_index].parameters !== null && workflow.triggers[trigger_index].parameters.length > 0) {
workflow.triggers[trigger_index].parameters[0] = { workflow.triggers[trigger_index].parameters[0] = {
name: "url", name: "url",
value: referenceUrl + "webhook_" + workflow.triggers[trigger_index].id, value: referenceUrl + "webhook_" + workflow.triggers[trigger_index].id,
@@ -2961,7 +2964,7 @@ const AngularWorkflow = (defaultprops) => {
} }
const activateApp = (appid, refresh) => { const activateApp = (appid, refresh) => {
fetch(globalUrl+"/api/v1/apps/"+appid+"/activate", { fetch(globalUrl + "/api/v1/apps/" + appid + "/activate", {
method: 'GET', method: 'GET',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@@ -4551,7 +4554,7 @@ const AngularWorkflow = (defaultprops) => {
const costheta = xParsed / z; const costheta = xParsed / z;
const alpha = 0.25; const alpha = 0.25;
var controlPointDistance = [-alpha * yParsed * costheta, alpha * yParsed * costheta]; var controlPointDistance = [-alpha * yParsed * costheta, alpha * yParsed * costheta];
var controlPointWeight = [alpha, 1-alpha] var controlPointWeight = [alpha, 1 - alpha]
//'control-point-weight': ['0.33', '0.66'], //'control-point-weight': ['0.33', '0.66'],
//var controlPointWeight = ["0.33", "0.66"] //var controlPointWeight = ["0.33", "0.66"]
@@ -5201,8 +5204,8 @@ const AngularWorkflow = (defaultprops) => {
marginRight: 5, marginRight: 5,
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
minHeight: isMobile ? bodyHeight-appBarSize*4 : "100%", minHeight: isMobile ? bodyHeight - appBarSize * 4 : "100%",
maxHeight: isMobile ? bodyHeight-appBarSize*4 : "100%", maxHeight: isMobile ? bodyHeight - appBarSize * 4 : "100%",
}; };
const paperAppStyle = { const paperAppStyle = {
@@ -5289,7 +5292,7 @@ const AngularWorkflow = (defaultprops) => {
: workflow.workflow_variables.map((variable, index) => { : workflow.workflow_variables.map((variable, index) => {
return ( return (
<div key={index}> <div key={index}>
<Paper square style={paperVariableStyle} onClick={() => {}}> <Paper square style={paperVariableStyle} onClick={() => { }}>
<div <div
style={{ style={{
marginLeft: "10px", marginLeft: "10px",
@@ -5422,7 +5425,7 @@ const AngularWorkflow = (defaultprops) => {
: workflow.execution_variables.map((variable, index) => { : workflow.execution_variables.map((variable, index) => {
return ( return (
<div> <div>
<Paper square style={paperVariableStyle} onClick={() => {}}> <Paper square style={paperVariableStyle} onClick={() => { }}>
<div <div
style={{ style={{
marginLeft: "10px", marginLeft: "10px",
@@ -5570,7 +5573,7 @@ const AngularWorkflow = (defaultprops) => {
marginRight: 5, marginRight: 5,
}; };
const parsedHeight = isMobile ? bodyHeight - appBarSize*4 : bodyHeight - appBarSize - 50 const parsedHeight = isMobile ? bodyHeight - appBarSize * 4 : bodyHeight - appBarSize - 50
return ( return (
<div> <div>
<div <div
@@ -5757,7 +5760,7 @@ const AngularWorkflow = (defaultprops) => {
y: 0, y: 0,
}} }}
> >
<Paper square style={paperAppStyle} onClick={() => {}}> <Paper square style={paperAppStyle} onClick={() => { }}>
<div <div
style={{ style={{
marginLeft: isMobile ? 0 : "10px", marginLeft: isMobile ? 0 : "10px",
@@ -5784,7 +5787,7 @@ const AngularWorkflow = (defaultprops) => {
overflow: "hidden", overflow: "hidden",
}} }}
> >
<Grid item style={{ flex: "1", overflow: "hidden",}}> <Grid item style={{ flex: "1", overflow: "hidden", }}>
<h3 style={{ marginBottom: "0px", marginTop: "10px", overflow: "hidden" }}> <h3 style={{ marginBottom: "0px", marginTop: "10px", overflow: "hidden" }}>
{trigger.name} {trigger.name}
</h3> </h3>
@@ -5975,8 +5978,8 @@ const AngularWorkflow = (defaultprops) => {
const appScrollStyle = { const appScrollStyle = {
overflow: "scroll", overflow: "scroll",
maxHeight: isMobile ? bodyHeight-appBarSize*4 : bodyHeight - appBarSize - 55 - 50, maxHeight: isMobile ? bodyHeight - appBarSize * 4 : bodyHeight - appBarSize - 55 - 50,
minHeight: isMobile ? bodyHeight-appBarSize*4 : bodyHeight - appBarSize - 55 - 50, minHeight: isMobile ? bodyHeight - appBarSize * 4 : bodyHeight - appBarSize - 55 - 50,
marginTop: 1, marginTop: 1,
overflowY: "auto", overflowY: "auto",
overflowX: "hidden", overflowX: "hidden",
@@ -6140,6 +6143,11 @@ const AngularWorkflow = (defaultprops) => {
const app = props.app; const app = props.app;
const [hover, setHover] = React.useState(false); const [hover, setHover] = React.useState(false);
if (app.id === "" || app.name === "") {
console.log("Skipping app: ", app)
return null
}
const maxlen = 24; const maxlen = 24;
var newAppname = app.name; var newAppname = app.name;
newAppname = newAppname.charAt(0).toUpperCase() + newAppname.substring(1); newAppname = newAppname.charAt(0).toUpperCase() + newAppname.substring(1);
@@ -6149,6 +6157,10 @@ const AngularWorkflow = (defaultprops) => {
newAppname = newAppname.replaceAll("_", " "); newAppname = newAppname.replaceAll("_", " ");
if (app.large_image === undefined || app.large_image === null || app.large_image === "") {
app.large_image = theme.palette.defaultImage
}
const image = app.large_image; const image = app.large_image;
const newAppStyle = JSON.parse(JSON.stringify(paperAppStyle)); const newAppStyle = JSON.parse(JSON.stringify(paperAppStyle));
const pixelSize = !hover ? "2px" : "4px"; const pixelSize = !hover ? "2px" : "4px";
@@ -6374,7 +6386,7 @@ const AngularWorkflow = (defaultprops) => {
} }
}; };
const SearchBox = ({currentRefinement, refine, isSearchStalled, } ) => { const SearchBox = ({ currentRefinement, refine, isSearchStalled, }) => {
useEffect(() => { useEffect(() => {
if (document !== undefined) { if (document !== undefined) {
@@ -6390,13 +6402,13 @@ const AngularWorkflow = (defaultprops) => {
}, []) }, [])
return ( return (
<form id="search_form" noValidate type="searchbox" action="" role="search" style={{margin: 0, display: "none",}} onClick={() => { <form id="search_form" noValidate type="searchbox" action="" role="search" style={{ margin: 0, display: "none", }} onClick={() => {
}}> }}>
<TextField <TextField
fullWidth fullWidth
style={{backgroundColor: theme.palette.inputColor, borderRadius: theme.palette.borderRadius, maxWidth: leftBarSize-20,}} style={{ backgroundColor: theme.palette.inputColor, borderRadius: theme.palette.borderRadius, maxWidth: leftBarSize - 20, }}
InputProps={{ InputProps={{
style:{ style: {
color: "white", color: "white",
fontSize: "1em", fontSize: "1em",
height: 50, height: 50,
@@ -6404,7 +6416,7 @@ const AngularWorkflow = (defaultprops) => {
}, },
startAdornment: ( startAdornment: (
<InputAdornment position="start"> <InputAdornment position="start">
<SearchIcon style={{marginLeft: 5}}/> <SearchIcon style={{ marginLeft: 5 }} />
</InputAdornment> </InputAdornment>
), ),
}} }}
@@ -6459,8 +6471,8 @@ const AngularWorkflow = (defaultprops) => {
const baseImage = <LibraryBooksIcon /> const baseImage = <LibraryBooksIcon />
return ( return (
<div style={{position: "relative", marginTop: 15, marginLeft: 0, marginRight: 10, position: "absolute", color: "white", zIndex: 1001, backgroundColor: theme.palette.inputColor, minWidth: leftBarSize-10, maxWidth: leftBarSize-10, boxShadows: "none", overflowX: "hidden", }}> <div style={{ position: "relative", marginTop: 15, marginLeft: 0, marginRight: 10, position: "absolute", color: "white", zIndex: 1001, backgroundColor: theme.palette.inputColor, minWidth: leftBarSize - 10, maxWidth: leftBarSize - 10, boxShadows: "none", overflowX: "hidden", }}>
<List style={{backgroundColor: theme.palette.inputColor, }}> <List style={{ backgroundColor: theme.palette.inputColor, }}>
{hits.length === 0 ? {hits.length === 0 ?
<ListItem style={outerlistitemStyle}> <ListItem style={outerlistitemStyle}>
<ListItemAvatar onClick={() => console.log(hits)}> <ListItemAvatar onClick={() => console.log(hits)}>
@@ -6476,7 +6488,7 @@ const AngularWorkflow = (defaultprops) => {
: :
hits.map((hit, index) => { hits.map((hit, index) => {
const innerlistitemStyle = { const innerlistitemStyle = {
width: positionInfo.width+35, width: positionInfo.width + 35,
overflowX: "hidden", overflowX: "hidden",
overflowY: "hidden", overflowY: "hidden",
borderBottom: "1px solid rgba(255,255,255,0.4)", borderBottom: "1px solid rgba(255,255,255,0.4)",
@@ -6492,9 +6504,9 @@ const AngularWorkflow = (defaultprops) => {
const name = hit.name === undefined ? const name = hit.name === undefined ?
hit.filename.charAt(0).toUpperCase() + hit.filename.slice(1).replaceAll("_", " ") + " - " + hit.title : hit.filename.charAt(0).toUpperCase() + hit.filename.slice(1).replaceAll("_", " ") + " - " + hit.title :
(hit.name.charAt(0).toUpperCase()+hit.name.slice(1)).replaceAll("_", " ") (hit.name.charAt(0).toUpperCase() + hit.name.slice(1)).replaceAll("_", " ")
var secondaryText = hit.data !== undefined ? hit.data.slice(0, 40)+"..." : "" var secondaryText = hit.data !== undefined ? hit.data.slice(0, 40) + "..." : ""
const avatar = hit.image_url === undefined ? const avatar = hit.image_url === undefined ?
baseImage baseImage
: :
@@ -6505,12 +6517,12 @@ const AngularWorkflow = (defaultprops) => {
//console.log(hit) //console.log(hit)
if (hit.categories !== undefined && hit.categories !== null && hit.categories.length > 0) { if (hit.categories !== undefined && hit.categories !== null && hit.categories.length > 0) {
secondaryText = hit.categories.slice(0,3).map((data, index) => { secondaryText = hit.categories.slice(0, 3).map((data, index) => {
if (index === 0) { if (index === 0) {
return data return data
} }
return ", "+data return ", " + data
/* /*
<Chip <Chip
@@ -6531,7 +6543,7 @@ const AngularWorkflow = (defaultprops) => {
parsedUrl += `?queryID=${hit.__queryID}` parsedUrl += `?queryID=${hit.__queryID}`
return ( return (
<div style={{textDecoration: "none", color: "white",}} onClick={(event) => { <div style={{ textDecoration: "none", color: "white", }} onClick={(event) => {
//if (!isCloud) { //if (!isCloud) {
// alert.info("Since this is an on-prem instance. You will need to activate the app yourself. Opening link to download it in a new window.") // alert.info("Since this is an on-prem instance. You will need to activate the app yourself. Opening link to download it in a new window.")
// setTimeout(() => { // setTimeout(() => {
@@ -6590,7 +6602,8 @@ const AngularWorkflow = (defaultprops) => {
*/} */}
</ListItem> </ListItem>
</div> </div>
)}) )
})
} }
</List> </List>
</div> </div>
@@ -6652,7 +6665,7 @@ const AngularWorkflow = (defaultprops) => {
var extraMessage = "" var extraMessage = ""
if (index == 2) { if (index == 2) {
extraMessage = <div style={{marginTop: 5}} /> extraMessage = <div style={{ marginTop: 5 }} />
} }
delay += 75 delay += 75
@@ -7551,7 +7564,7 @@ const AngularWorkflow = (defaultprops) => {
</a> </a>
</span> </span>
<FormControl> <FormControl>
<DialogTitle id="draggable-dialog-title" style={{cursor: "move",}}> <DialogTitle id="draggable-dialog-title" style={{ cursor: "move", }}>
<span style={{ color: "white" }}>Condition</span> <span style={{ color: "white" }}>Condition</span>
</DialogTitle> </DialogTitle>
<DialogContent style={{}}> <DialogContent style={{}}>
@@ -7877,7 +7890,7 @@ const AngularWorkflow = (defaultprops) => {
key={condition.condition.id} key={condition.condition.id}
square square
style={paperVariableStyle} style={paperVariableStyle}
onClick={() => {}} onClick={() => { }}
> >
<div <div
style={{ style={{
@@ -7928,7 +7941,7 @@ const AngularWorkflow = (defaultprops) => {
overflow: "hidden", overflow: "hidden",
maxWidth: 72, maxWidth: 72,
}} }}
onClick={() => {}} onClick={() => { }}
> >
{condition.condition.value} {condition.condition.value}
</div> </div>
@@ -8228,7 +8241,7 @@ const AngularWorkflow = (defaultprops) => {
}; };
const getTriggerAuth = () => { const getTriggerAuth = () => {
fetch(globalUrl + "/api/v1/triggers/" + selectedTrigger.id, { fetch(`${globalUrl}/api/v1/triggers/${selectedTrigger.id}`, {
method: "GET", method: "GET",
headers: { "content-type": "application/json" }, headers: { "content-type": "application/json" },
credentials: "include", credentials: "include",
@@ -8309,7 +8322,7 @@ const AngularWorkflow = (defaultprops) => {
console.log("BRANCH: ", branch); console.log("BRANCH: ", branch);
const startnode = branch.destination_id; const startnode = branch.destination_id;
const scopes = "https://www.googleapis.com/auth/gmail.readonly"; const scopes = "https://www.googleapis.com/auth/gmail.readonly";
const url = `https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&client_id=${client_id}&redirect_uri=${redirectUri}&response_type=code&scope=${scopes}&state=workflow_id%3D${props.match.params.key}%26trigger_id%3D${selectedTrigger.id}%26username%3D${username}%26type%3Dgmail%26start%3d${startnode}`; const url = `https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent&client_id=${client_id}&redirect_uri=${redirectUri}&response_type=code&scope=${scopes}&state=workflow_id%3D${props.match.params.key}%26trigger_id%3D${selectedTrigger.id}%26username%3D${username}%26type%3Dgmail%26start%3d${startnode}`;
console.log("URL: ", url); console.log("URL: ", url);
var newwin = window.open(url, "", "width=800,height=600"); var newwin = window.open(url, "", "width=800,height=600");
@@ -8317,7 +8330,7 @@ const AngularWorkflow = (defaultprops) => {
// Check whether we got a callback somewhere // Check whether we got a callback somewhere
var id = setInterval(function () { var id = setInterval(function () {
fetch( fetch(
globalUrl + "/api/v1/triggers/" + selectedTrigger.id, `${globalUrl}/api/v1/triggers/${selectedTrigger.id}`,
{ {
method: "GET", method: "GET",
headers: { "content-type": "application/json" }, headers: { "content-type": "application/json" },
@@ -8418,7 +8431,7 @@ const AngularWorkflow = (defaultprops) => {
// Check whether we got a callback somewhere // Check whether we got a callback somewhere
var id = setInterval(function () { var id = setInterval(function () {
fetch( fetch(
globalUrl + "/api/v1/triggers/ " + selectedTrigger.id, `${globalUrl}/api/v1/triggers/${selectedTrigger.id}`,
{ {
method: "GET", method: "GET",
headers: { "content-type": "application/json" }, headers: { "content-type": "application/json" },
@@ -8488,8 +8501,8 @@ const AngularWorkflow = (defaultprops) => {
</div> </div>
{outlookButton} {outlookButton}
{gmailButton} {gmailButton}
<Typography variant="body2" color="textSecondary" style={{marginTop: 5}}> <Typography variant="body2" color="textSecondary" style={{ marginTop: 5 }}>
If you have trouble using this trigger, please <a href="https://shuffler.io/contact" rel="noopener noreferrer" target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}}>contact us</a> to get access If you have trouble using this trigger, please <a href="https://shuffler.io/contact" rel="noopener noreferrer" target="_blank" style={{ textDecoration: "none", color: "#f86a3e" }}>contact us</a> to get access
</Typography> </Typography>
</span> </span>
)} )}
@@ -8518,14 +8531,14 @@ const AngularWorkflow = (defaultprops) => {
</div> </div>
{triggerFolders.length === 0 ? {triggerFolders.length === 0 ?
<Typography variant="body2"> <Typography variant="body2">
No folders found. Please authenticate and make sure the user has access folders available. If this persists, <a href="https://shuffler.io/contact" rel="noopener noreferrer" target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}}>contact us</a>. No folders found. Please authenticate and make sure the user has access folders available. If this persists, <a href="https://shuffler.io/contact" rel="noopener noreferrer" target="_blank" style={{ textDecoration: "none", color: "#f86a3e" }}>contact us</a>.
</Typography> </Typography>
: :
<Select <Select
MenuProps={{ MenuProps={{
disableScrollLock: true, disableScrollLock: true,
sx: { sx: {
"&& .MuiMenuItem-root":{ "&& .MuiMenuItem-root": {
backgroundColor: theme.palette.inputColor, backgroundColor: theme.palette.inputColor,
color: "white", color: "white",
} }
@@ -8546,7 +8559,7 @@ const AngularWorkflow = (defaultprops) => {
setTriggerFolderWrapperMulti(e) setTriggerFolderWrapperMulti(e)
}} }}
fullWidth fullWidth
input={<Input id="select-multiple-native" style={{backgroundColor: theme.palette.inputColor, color: "white"}} />} input={<Input id="select-multiple-native" style={{ backgroundColor: theme.palette.inputColor, color: "white" }} />}
key={selectedTrigger} key={selectedTrigger}
> >
{triggerFolders.map((folder) => { {triggerFolders.map((folder) => {
@@ -8614,8 +8627,8 @@ const AngularWorkflow = (defaultprops) => {
</div> </div>
{outlookButton} {outlookButton}
{gmailButton} {gmailButton}
<Typography variant="body2" color="textSecondary" style={{marginTop: 5}}> <Typography variant="body2" color="textSecondary" style={{ marginTop: 5 }}>
If you have trouble using this trigger, please <span style={{ textDecoration: "none", color: "#f86a3e"}} onClick={() => { If you have trouble using this trigger, please <span style={{ textDecoration: "none", color: "#f86a3e" }} onClick={() => {
if (window.drift !== undefined) { if (window.drift !== undefined) {
window.drift.api.startInteraction({ interactionId: 340043 }) window.drift.api.startInteraction({ interactionId: 340043 })
} else { } else {
@@ -9046,7 +9059,7 @@ const AngularWorkflow = (defaultprops) => {
minWidth: 250, minWidth: 250,
}} }}
value={pathdata} value={pathdata}
onMouseOver={() => {}} onMouseOver={() => { }}
onClick={() => { onClick={() => {
handleItemClick([innerdata, pathdata]); handleItemClick([innerdata, pathdata]);
}} }}
@@ -9295,8 +9308,8 @@ const AngularWorkflow = (defaultprops) => {
backgroundColor: "rgb(91, 96, 100)", backgroundColor: "rgb(91, 96, 100)",
}} }}
/> />
<div style={{display: "flex"}}> <div style={{ display: "flex" }}>
<div style={{flex: 5}}> <div style={{ flex: 5 }}>
<Typography>Name</Typography> <Typography>Name</Typography>
<TextField <TextField
style={{ style={{
@@ -9319,7 +9332,7 @@ const AngularWorkflow = (defaultprops) => {
/> />
</div> </div>
<div> <div>
<div style={{flex: 1, marginLeft: 5,}}> <div style={{ flex: 1, marginLeft: 5, }}>
<Tooltip <Tooltip
color="primary" color="primary"
title={"Delay before action executes (in seconds)"} title={"Delay before action executes (in seconds)"}
@@ -9404,7 +9417,7 @@ const AngularWorkflow = (defaultprops) => {
/> />
<div style={{ flex: "6", marginTop: "20px" }}> <div style={{ flex: "6", marginTop: "20px" }}>
<div> <div>
<div style={{display: "flex"}}> <div style={{ display: "flex" }}>
<div <div
style={{ style={{
marginTop: "20px", marginTop: "20px",
@@ -9420,7 +9433,7 @@ const AngularWorkflow = (defaultprops) => {
{workflow.triggers[selectedTriggerIndex].parameters[0].value {workflow.triggers[selectedTriggerIndex].parameters[0].value
.length === 0 ? null : workflow.triggers[selectedTriggerIndex] .length === 0 ? null : workflow.triggers[selectedTriggerIndex]
.parameters[0].value === props.match.params.key ? null : ( .parameters[0].value === props.match.params.key ? null : (
<div style={{marginLeft: 5, flex: 1}}> <div style={{ marginLeft: 5, flex: 1 }}>
<a <a
rel="noopener noreferrer" rel="noopener noreferrer"
href={`/workflows/${workflow.triggers[selectedTriggerIndex].parameters[0].value}`} href={`/workflows/${workflow.triggers[selectedTriggerIndex].parameters[0].value}`}
@@ -9475,7 +9488,7 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
onChange={(event, newValue) => { onChange={(event, newValue) => {
handleWorkflowSelectionUpdate({ target: { value: newValue} }) handleWorkflowSelectionUpdate({ target: { value: newValue } })
}} }}
renderOption={(data, index) => { renderOption={(data, index) => {
if (data.id === workflow.id) { if (data.id === workflow.id) {
@@ -9487,7 +9500,7 @@ const AngularWorkflow = (defaultprops) => {
<Tooltip arrow placement="left" title={ <Tooltip arrow placement="left" title={
<span style={{}}> <span style={{}}>
{data.image !== undefined && data.image !== null && data.image.length > 0 ? {data.image !== undefined && data.image !== null && data.image.length > 0 ?
<img src={data.image} alt={data.name} style={{backgroundColor: theme.palette.surfaceColor, maxHeight: 200, minHeigth: 200, borderRadius: theme.palette.borderRadius, }} /> <img src={data.image} alt={data.name} style={{ backgroundColor: theme.palette.surfaceColor, maxHeight: 200, minHeigth: 200, borderRadius: theme.palette.borderRadius, }} />
: null} : null}
<Typography> <Typography>
Choose {data.name} Choose {data.name}
@@ -9580,7 +9593,7 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
onChange={(event, newValue) => { onChange={(event, newValue) => {
handleSubflowStartnodeSelection({ target: { value: newValue} }) handleSubflowStartnodeSelection({ target: { value: newValue } })
}} }}
renderOption={(action) => { renderOption={(action) => {
const isParent = getParents(selectedTrigger).find( const isParent = getParents(selectedTrigger).find(
@@ -9841,7 +9854,7 @@ const AngularWorkflow = (defaultprops) => {
}} }}
/> />
</div> </div>
<div style={{marginLeft: 5 }}> <div style={{ marginLeft: 5 }}>
<div>Width</div> <div>Width</div>
<TextField <TextField
style={{ style={{
@@ -9895,7 +9908,7 @@ const AngularWorkflow = (defaultprops) => {
}} }}
/> />
</div> </div>
<div style={{marginLeft: 5}}> <div style={{ marginLeft: 5 }}>
<div>Text Color</div> <div>Text Color</div>
<TextField <TextField
style={{ style={{
@@ -9922,7 +9935,7 @@ const AngularWorkflow = (defaultprops) => {
/> />
</div> </div>
</div> </div>
<div style={{marginTop: 15,}}>Background-Image</div> <div style={{ marginTop: 15, }}>Background-Image</div>
<TextField <TextField
style={{ style={{
backgroundColor: inputColor, backgroundColor: inputColor,
@@ -10120,7 +10133,7 @@ const AngularWorkflow = (defaultprops) => {
placement="left" placement="left"
> >
<div> <div>
<div style={{ display: "flex", marginBottom: 0,}}> <div style={{ display: "flex", marginBottom: 0, }}>
<Avatar variant="rounded"> <Avatar variant="rounded">
<img <img
alt={appname} alt={appname}
@@ -10128,7 +10141,7 @@ const AngularWorkflow = (defaultprops) => {
style={{ width: 50, height: 50, }} style={{ width: 50, height: 50, }}
/> />
</Avatar> </Avatar>
<Typography variant="body1" style={{marginLeft: 15, }}> <Typography variant="body1" style={{ marginLeft: 15, }}>
{appname} {appname}
</Typography> </Typography>
</div> </div>
@@ -10388,7 +10401,7 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
id="webhook_uri_header" id="webhook_uri_header"
onClick={() => {}} onClick={() => { }}
InputProps={{ InputProps={{
style: { style: {
color: "white", color: "white",
@@ -10438,14 +10451,14 @@ const AngularWorkflow = (defaultprops) => {
<b>Custom Response</b> <b>Custom Response</b>
</div> </div>
</div> </div>
<div style={{marginBottom: 20, }}> <div style={{ marginBottom: 20, }}>
<TextField <TextField
style={{ style={{
backgroundColor: inputColor, backgroundColor: inputColor,
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
id="webhook_uri_header" id="webhook_uri_header"
onClick={() => {}} onClick={() => { }}
InputProps={{ InputProps={{
style: { style: {
color: "white", color: "white",
@@ -12137,7 +12150,7 @@ const AngularWorkflow = (defaultprops) => {
// console.log(allowList, userdata.public_username) // console.log(allowList, userdata.public_username)
const leftView = workflow.public === true ? const leftView = workflow.public === true ?
<div style={{minHeight: "82vh", maxHeight: "82vh", height: "100%", minWidth: leftBarSize-70, maxWidth: leftBarSize-70, zIndex: 0, padding: 35, borderRight: "1px solid rgba(91,96,100,1)", overflowY: "auto",}}> <div style={{ minHeight: "82vh", maxHeight: "82vh", height: "100%", minWidth: leftBarSize - 70, maxWidth: leftBarSize - 70, zIndex: 0, padding: 35, borderRight: "1px solid rgba(91,96,100,1)", overflowY: "auto", }}>
<Typography variant="h6" color="textPrimary" style={{ <Typography variant="h6" color="textPrimary" style={{
margin: "0px 0px 0px 0px", margin: "0px 0px 0px 0px",
}} }}
@@ -12145,30 +12158,30 @@ const AngularWorkflow = (defaultprops) => {
{workflow.name} {workflow.name}
</Typography> </Typography>
<Typography variant="body2" color="textSecondary"> <Typography variant="body2" color="textSecondary">
This workflow is public and <span style={{color: "#f86a3e", cursor: "pointer", }} onClick={() => { This workflow is public and <span style={{ color: "#f86a3e", cursor: "pointer", }} onClick={() => {
saveWorkflow() saveWorkflow()
}}>must be saved</span> or exported before use. }}>must be saved</span> or exported before use.
</Typography> </Typography>
{Object.getOwnPropertyNames(creatorProfile).length !== 0 && creatorProfile.github_avatar !== undefined && creatorProfile.github_avatar !== null ? {Object.getOwnPropertyNames(creatorProfile).length !== 0 && creatorProfile.github_avatar !== undefined && creatorProfile.github_avatar !== null ?
<div style={{display: "flex", marginTop: 10, }}> <div style={{ display: "flex", marginTop: 10, }}>
<IconButton color="primary" style={{padding: 0, marginRight: 10, }} aria-controls="simple-menu" aria-haspopup="true" onClick={(event) => { <IconButton color="primary" style={{ padding: 0, marginRight: 10, }} aria-controls="simple-menu" aria-haspopup="true" onClick={(event) => {
}}> }}>
<Link to={`/creators/${creatorProfile.github_username}`} style={{textDecoration: "none", color: "#f86a3e"}}> <Link to={`/creators/${creatorProfile.github_username}`} style={{ textDecoration: "none", color: "#f86a3e" }}>
<Avatar style={{height: 30, width: 30,}} alt={"Workflow creator"} src={creatorProfile.github_avatar} /> <Avatar style={{ height: 30, width: 30, }} alt={"Workflow creator"} src={creatorProfile.github_avatar} />
</Link> </Link>
</IconButton> </IconButton>
<Typography variant="body1" color="textSecondary" style={{color: ""}}> <Typography variant="body1" color="textSecondary" style={{ color: "" }}>
Shared by <Link to={`/creators/${creatorProfile.github_username}`} style={{textDecoration: "none", color: "#f86a3e"}}>{creatorProfile.github_username}</Link> Shared by <Link to={`/creators/${creatorProfile.github_username}`} style={{ textDecoration: "none", color: "#f86a3e" }}>{creatorProfile.github_username}</Link>
</Typography> </Typography>
</div> </div>
: null} : null}
<div style={{marginTop: 15}} /> <div style={{ marginTop: 15 }} />
{workflow.tags !== undefined && workflow.tags !== null && workflow.tags.length > 0 ? {workflow.tags !== undefined && workflow.tags !== null && workflow.tags.length > 0 ?
<div style={{display: "flex", overflow: "hidden",marginTop: 5, }}> <div style={{ display: "flex", overflow: "hidden", marginTop: 5, }}>
<Typography variant="body1" style={{marginRight: 10, }}> <Typography variant="body1" style={{ marginRight: 10, }}>
Tags Tags
</Typography> </Typography>
<div style={{display: "flex"}}> <div style={{ display: "flex" }}>
{workflow.tags.map((tag, index) => { {workflow.tags.map((tag, index) => {
if (index >= 3) { if (index >= 3) {
return null; return null;
@@ -12177,7 +12190,7 @@ const AngularWorkflow = (defaultprops) => {
return ( return (
<Chip <Chip
key={index} key={index}
style={{backgroundColor: "#3d3f43", height: 30, marginRight: 5, paddingLeft: 5, paddingRight: 5, height: 28, cursor: "pointer", borderColor: "#3d3f43", color: "white",}} style={{ backgroundColor: "#3d3f43", height: 30, marginRight: 5, paddingLeft: 5, paddingRight: 5, height: 28, cursor: "pointer", borderColor: "#3d3f43", color: "white", }}
label={tag} label={tag}
variant="outlined" variant="outlined"
color="primary" color="primary"
@@ -12186,7 +12199,7 @@ const AngularWorkflow = (defaultprops) => {
})} })}
</div> </div>
</div> </div>
: null } : null}
{workflow.blogpost !== undefined && workflow.blogpost !== null && workflow.blogpost.length > 0 ? {workflow.blogpost !== undefined && workflow.blogpost !== null && workflow.blogpost.length > 0 ?
<div style={{ <div style={{
@@ -12209,31 +12222,33 @@ const AngularWorkflow = (defaultprops) => {
} }
{appGroup.length > 0 ? {appGroup.length > 0 ?
<div style={{display: "flex", marginTop: 10, }}> <div style={{ marginTop: 10, }}>
<div style={{ display: "flex" }}>
<Typography variant="body1"> <Typography variant="body1">
Apps Apps
</Typography> </Typography>
<AvatarGroup max={6} style={{marginLeft: 10, }}> <AvatarGroup max={6} style={{ marginLeft: 10, }}>
{appGroup.map((data, index) => { {appGroup.map((data, index) => {
return ( return (
<Link key={index} to={`/apps/${data.app_id}`}> <Link key={index} to={`/apps/${data.app_id}`}>
<Avatar alt={data.app_name} src={data.large_image} style={{width: 30, height: 30}}/> <Avatar alt={data.app_name} src={data.large_image} style={{ width: 30, height: 30 }} />
</Link> </Link>
) )
})} })}
</AvatarGroup> </AvatarGroup>
</div> </div>
</div>
: null} : null}
{triggerGroup.length > 0 ? {triggerGroup.length > 0 ?
<div style={{display: "flex", marginTop: 10, }}> <div style={{ display: "flex", marginTop: 10, }}>
<Typography variant="body1"> <Typography variant="body1">
Triggers Triggers
</Typography> </Typography>
<AvatarGroup max={6} style={{marginLeft: 10, }}> <AvatarGroup max={6} style={{ marginLeft: 10, }}>
{triggerGroup.map((data, index) => { {triggerGroup.map((data, index) => {
return ( return (
<Avatar key={index} alt={data.app_name} src={data.large_image} style={{width: 30, height: 30}}/> <Avatar key={index} alt={data.app_name} src={data.large_image} style={{ width: 30, height: 30 }} />
) )
})} })}
</AvatarGroup> </AvatarGroup>
@@ -12315,18 +12330,33 @@ const AngularWorkflow = (defaultprops) => {
: null} : null}
{workflow.description !== undefined && workflow.description !== null && workflow.description.length > 0 ? {workflow.description !== undefined && workflow.description !== null && workflow.description.length > 0 ?
<div style={{marginTop: 5, }}> <div style={{ marginTop: 5, }}>
<Typography variant="body1"> <Typography variant="body1">
Description Description
</Typography> </Typography>
<Typography variant="body1" color="textSecondary" style={{maxWidth: "100%", maxHeight: 250, overflowX: "hidden"}}> <Typography variant="body1" color="textSecondary" style={{ maxWidth: "100%", maxHeight: 250, overflowX: "hidden" }}>
{workflow.description} {workflow.description}
</Typography> </Typography>
</div> </div>
: null} : null}
{/*
<div style={{ display: "flex" }}>
<Button
color="primary"
variant="contained"
fullWidth
style={{ marginTop: 15, display: "flex" }}
onClick={() => {
setSelectionOpen(true)
}}
>
Statistics
</Button>
</div>
*/}
{userdata.avatar !== undefined && (userdata.avatar === creatorProfile.github_avatar || allowList.includes(userdata.public_username)) ? {userdata.avatar !== undefined && (userdata.avatar === creatorProfile.github_avatar || allowList.includes(userdata.public_username)) ?
<div style={{marginTop: 50, }}> <div style={{ marginTop: 50, }}>
<Typography variant="body2" color="textSecondary"> <Typography variant="body2" color="textSecondary">
You can see these buttons because you may have the correct access rights as a creator to help modify this workflow. You can see these buttons because you may have the correct access rights as a creator to help modify this workflow.
</Typography> </Typography>
@@ -12334,7 +12364,7 @@ const AngularWorkflow = (defaultprops) => {
color="primary" color="primary"
variant="contained" variant="contained"
fullWidth fullWidth
style={{marginTop: 15, }} style={{ marginTop: 15, }}
onClick={() => { onClick={() => {
// Further checks are being done on the backend // Further checks are being done on the backend
// Even if the user can "edit" a workflow on the frontend, // Even if the user can "edit" a workflow on the frontend,
@@ -12362,7 +12392,7 @@ const AngularWorkflow = (defaultprops) => {
disabled disabled
variant="outlined" variant="outlined"
fullWidth fullWidth
style={{marginTop: 15, }} style={{ marginTop: 15, }}
onClick={() => { onClick={() => {
// setEditWorkflowDetails(true) // setEditWorkflowDetails(true)
// workflow.public = false // workflow.public = false
@@ -12444,7 +12474,7 @@ const AngularWorkflow = (defaultprops) => {
} }
return ( return (
<div style={{display: "flex"}}> <div style={{ display: "flex" }}>
<IconButton <IconButton
style={{ style={{
marginTop: "auto", marginTop: "auto",
@@ -12741,11 +12771,11 @@ const AngularWorkflow = (defaultprops) => {
const isFirstRender = React.useRef(true) const isFirstRender = React.useRef(true)
useEffect(() => { useEffect(() => {
console.log("IN useeffectt "+autocomplete) console.log("IN useeffectt " + autocomplete)
if (isFirstRender.current) { if (isFirstRender.current) {
isFirstRender.current = false; isFirstRender.current = false;
console.log("IN useeffectt (2)"+collapsed) console.log("IN useeffectt (2)" + collapsed)
return; return;
} }
}) })
@@ -12809,7 +12839,7 @@ const AngularWorkflow = (defaultprops) => {
open={open} open={open}
anchorReference="anchorPosition" anchorReference="anchorPosition"
anchorPosition={anchorPosition} anchorPosition={anchorPosition}
style={{zIndex: 50000,}} style={{ zIndex: 50000, }}
onClose={(event) => { onClose={(event) => {
setAnchorPosition({ setAnchorPosition({
top: 750, top: 750,
@@ -12818,7 +12848,7 @@ const AngularWorkflow = (defaultprops) => {
}} }}
disableRestoreFocus disableRestoreFocus
> >
<Typography style={{padding: 5 }}> <Typography style={{ padding: 5 }}>
Copying Copying
</Typography> </Typography>
</Popover> </Popover>
@@ -12887,7 +12917,7 @@ const AngularWorkflow = (defaultprops) => {
style={{ zIndex: 10011 }} style={{ zIndex: 10011 }}
> >
<IconButton <IconButton
style={{ zIndex: 5000, position: "absolute", top: 10 , right: 10 }} style={{ zIndex: 5000, position: "absolute", top: 10, right: 10 }}
onClick={(e) => { onClick={(e) => {
e.preventDefault(); e.preventDefault();
setExecutionModalOpen(false) setExecutionModalOpen(false)
@@ -12981,8 +13011,8 @@ const AngularWorkflow = (defaultprops) => {
key={data.execution_id} key={data.execution_id}
square square
style={executionPaperStyle} style={executionPaperStyle}
onMouseOver={() => {}} onMouseOver={() => { }}
onMouseOut={() => {}} onMouseOut={() => { }}
onClick={() => { onClick={() => {
if ( if (
(data.result === undefined || (data.result === undefined ||
@@ -13134,13 +13164,13 @@ const AngularWorkflow = (defaultprops) => {
marginTop: "auto", marginTop: "auto",
marginBottom: "auto", marginBottom: "auto",
}} }}
onClick={() => {}} onClick={() => { }}
> >
<ArrowBackIcon style={{ color: "rgba(255,255,255,0.5)" }} /> <ArrowBackIcon style={{ color: "rgba(255,255,255,0.5)" }} />
</IconButton> </IconButton>
<h2 <h2
style={{ color: "rgba(255,255,255,0.5)", cursor: "pointer" }} style={{ color: "rgba(255,255,255,0.5)", cursor: "pointer" }}
onClick={() => {}} onClick={() => { }}
> >
See other Executions See other Executions
</h2> </h2>
@@ -13159,7 +13189,7 @@ const AngularWorkflow = (defaultprops) => {
color="primary" color="primary"
title="Rerun workflow" title="Rerun workflow"
placement="top" placement="top"
style={{ zIndex: 50000}} style={{ zIndex: 50000 }}
> >
<span style={{}}> <span style={{}}>
<Button <Button
@@ -13329,13 +13359,13 @@ const AngularWorkflow = (defaultprops) => {
(executionData.results.length === 0 && // probably ment to be around the or's (executionData.results.length === 0 && // probably ment to be around the or's
executionData.status === "EXECUTING") executionData.status === "EXECUTING")
) ? ( ) ? (
<div style={{display: "flex"}}> <div style={{ display: "flex" }}>
<CircularProgress style={{ height: 45, width: 45, marginLeft: 20, marginRight: 20, }} /> <CircularProgress style={{ height: 45, width: 45, marginLeft: 20, marginRight: 20, }} />
{!isCloud && environments.length > 0 && defaultEnvironmentIndex < environments.length && nonskippedResults.length === 0 ? {!isCloud && environments.length > 0 && defaultEnvironmentIndex < environments.length && nonskippedResults.length === 0 ?
<Typography variant="body2" color="textSecondary" style={{}}> <Typography variant="body2" color="textSecondary" style={{}}>
No results yet. Is Orborus running for the "{environments[defaultEnvironmentIndex].Name}" environment? <a href="/admin?tab=environments" rel="noopener noreferrer" target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}}>Learn more</a> No results yet. Is Orborus running for the "{environments[defaultEnvironmentIndex].Name}" environment? <a href="/admin?tab=environments" rel="noopener noreferrer" target="_blank" style={{ textDecoration: "none", color: "#f86a3e" }}>Learn more</a>
</Typography> </Typography>
: null} : null}
</div> </div>
@@ -13349,7 +13379,7 @@ const AngularWorkflow = (defaultprops) => {
<CircularProgress /> <CircularProgress />
) : ( ) : (
executionData.results.map((data, index) => { executionData.results.map((data, index) => {
if (executionData.results.length !== 1 && !showSkippedActions && (data.status === "SKIPPED") ) { if (executionData.results.length !== 1 && !showSkippedActions && (data.status === "SKIPPED")) {
return null; return null;
} }
@@ -13491,7 +13521,7 @@ const AngularWorkflow = (defaultprops) => {
if (data.similar_actions !== undefined && data.similar_actions !== null) { if (data.similar_actions !== undefined && data.similar_actions !== null) {
var minimumMatch = 85 var minimumMatch = 85
var matching_executions = [] var matching_executions = []
for (var k in data.similar_actions){ for (var k in data.similar_actions) {
if (data.similar_actions.hasOwnProperty(k)) { if (data.similar_actions.hasOwnProperty(k)) {
if (data.similar_actions[k].similarity > minimumMatch) { if (data.similar_actions[k].similarity > minimumMatch) {
matching_executions.push(data.similar_actions[k].execution_id) matching_executions.push(data.similar_actions[k].execution_id)
@@ -13507,7 +13537,7 @@ const AngularWorkflow = (defaultprops) => {
color="primary" color="primary"
title="See executions with similar results (not identical)" title="See executions with similar results (not identical)"
placement="top" placement="top"
style={{ zIndex: 50000, marginLeft: 50,}} style={{ zIndex: 50000, marginLeft: 50, }}
> >
<IconButton <IconButton
style={{ style={{
@@ -13521,7 +13551,7 @@ const AngularWorkflow = (defaultprops) => {
navigate(`?execution_highlight=${parsed_url}`) navigate(`?execution_highlight=${parsed_url}`)
}} }}
> >
<PreviewIcon style={{ color: "rgba(255,255,255,0.5)" }}/> <PreviewIcon style={{ color: "rgba(255,255,255,0.5)" }} />
</IconButton> </IconButton>
</Tooltip> </Tooltip>
} }
@@ -13646,7 +13676,7 @@ const AngularWorkflow = (defaultprops) => {
textDecoration: "none", textDecoration: "none",
color: "#f85a3e", color: "#f85a3e",
}} }}
onClick={(event) => {}} onClick={(event) => { }}
> >
<OpenInNewIcon /> <OpenInNewIcon />
</a> </a>
@@ -13661,7 +13691,7 @@ const AngularWorkflow = (defaultprops) => {
<Typography variant="body1"> <Typography variant="body1">
<b>Status&nbsp;</b> <b>Status&nbsp;</b>
</Typography> </Typography>
<Typography variant="body1" color="textSecondary" style={{marginRight: 15,}}> <Typography variant="body1" color="textSecondary" style={{ marginRight: 15, }}>
{data.status} {data.status}
</Typography> </Typography>
{similarActionsView} {similarActionsView}
@@ -13748,12 +13778,12 @@ const AngularWorkflow = (defaultprops) => {
validate.result = JSON.parse(validate.result); validate.result = JSON.parse(validate.result);
} }
const AppResultVariable = ({data}) => { const AppResultVariable = ({ data }) => {
const [open, setOpen] = React.useState(false) const [open, setOpen] = React.useState(false)
const showVariable = data.value.length < 60 const showVariable = data.value.length < 60
return ( return (
<div style={{maxWidth: 600, overflowX: "hidden", }}> <div style={{ maxWidth: 600, overflowX: "hidden", }}>
{data.value.length > 60 ? {data.value.length > 60 ?
<IconButton <IconButton
style={{ style={{
@@ -14049,7 +14079,7 @@ const AngularWorkflow = (defaultprops) => {
variant="h6" variant="h6"
style={{ marginBottom: 0, marginTop: 0 }} style={{ marginBottom: 0, marginTop: 0 }}
> >
Variables <span style={{fontSize: 10}}>(click to expand)</span> Variables <span style={{ fontSize: 10 }}>(click to expand)</span>
</Typography> </Typography>
{selectedResult.action.parameters.map((data, index) => { {selectedResult.action.parameters.map((data, index) => {
if (data.value.length === 0) { if (data.value.length === 0) {
@@ -14065,7 +14095,7 @@ const AngularWorkflow = (defaultprops) => {
} }
return ( return (
<AppResultVariable key={index} data={data}/> <AppResultVariable key={index} data={data} />
); );
})} })}
</div> </div>
@@ -14231,7 +14261,7 @@ const AngularWorkflow = (defaultprops) => {
}} }}
> >
<FormControl> <FormControl>
<DialogTitle id="draggable-dialog-title" style={{cursor: "move",}}> <DialogTitle id="draggable-dialog-title" style={{ cursor: "move", }}>
<span style={{ color: "white" }}>Execution Variable</span> <span style={{ color: "white" }}>Execution Variable</span>
</DialogTitle> </DialogTitle>
<DialogContent> <DialogContent>
@@ -14382,12 +14412,12 @@ const AngularWorkflow = (defaultprops) => {
backgroundColor: surfaceColor, backgroundColor: surfaceColor,
color: "white", color: "white",
border: theme.palette.defaultBorder, border: theme.palette.defaultBorder,
maxWidth: isMobile ? bodyWidth-100 : "100%", maxWidth: isMobile ? bodyWidth - 100 : "100%",
}, },
}} }}
> >
<FormControl> <FormControl>
<DialogTitle id="draggable-dialog-title" style={{cursor: "move",}}> <DialogTitle id="draggable-dialog-title" style={{ cursor: "move", }}>
<span style={{ color: "white" }}>Workflow Variable</span> <span style={{ color: "white" }}>Workflow Variable</span>
</DialogTitle> </DialogTitle>
<DialogContent> <DialogContent>
@@ -14543,7 +14573,7 @@ const AngularWorkflow = (defaultprops) => {
) { ) {
return ( return (
<DialogContent style={{ textAlign: "center", marginTop: 50 }}> <DialogContent style={{ textAlign: "center", marginTop: 50 }}>
<Typography variant="h4" id="draggable-dialog-title" style={{cursor: "move",}}> <Typography variant="h4" id="draggable-dialog-title" style={{ cursor: "move", }}>
{selectedApp.name} does not require authentication {selectedApp.name} does not require authentication
</Typography> </Typography>
</DialogContent> </DialogContent>
@@ -14647,7 +14677,7 @@ const AngularWorkflow = (defaultprops) => {
return ( return (
<div> <div>
<DialogTitle id="draggable-dialog-title" style={{cursor: "move",}}> <DialogTitle id="draggable-dialog-title" style={{ cursor: "move", }}>
<div style={{ color: "white" }}> <div style={{ color: "white" }}>
Authentication for {selectedApp.name} Authentication for {selectedApp.name}
</div> </div>
@@ -15093,7 +15123,6 @@ const AngularWorkflow = (defaultprops) => {
</div> </div>
</Dialog> </Dialog>
) : null; ) : null;
const loadedCheck = const loadedCheck =
isLoaded && workflowDone ? ( isLoaded && workflowDone ? (
<div> <div>
@@ -15118,8 +15147,36 @@ const AngularWorkflow = (defaultprops) => {
/> />
: null} : null}
{/*selectionOpen === true ?
<div style={{ borderRadius: theme.palette.borderRadius, backgroundColor: surfaceColor, zIndex: 12501,position:"fixed", left: 190, bottom: 20,top:70, width: 950, overflowY: "scroll"}}>
<div>
<IconButton
style={{
zIndex: 12502,
position: "absolute",
top: 6,
right: 6,
color: "white",
}}
onClick={() => {
setSelectionOpen(false)
}}
>
<CloseIcon />
</IconButton>
</div>
<div style={{marginTop: 60, marginLeft: 55}}>
<AppStats
globalUrl={globalUrl}
workflowId={workflow.id}
{...props}
/>
</div>
</div>
: null*/}
{showVideo !== undefined && showVideo.length > 0 ? {showVideo !== undefined && showVideo.length > 0 ?
<div style={{borderRadius: theme.palette.borderRadius, zIndex: 12501, position: "fixed", left: 40, bottom: 150, width: 300,}}> <div style={{ borderRadius: theme.palette.borderRadius, zIndex: 12501, position: "fixed", left: 40, bottom: 150, width: 300, }}>
<IconButton <IconButton
style={{ style={{
zIndex: 12502, zIndex: 12502,