Added minor fix for coloring and text highlights

This commit is contained in:
frikky
2022-06-05 21:32:28 +02:00
parent 9e3e86f1b0
commit 387731fbfe
5 changed files with 86 additions and 52 deletions
+1 -1
View File
@@ -352,7 +352,7 @@ class AppBase:
finished = True finished = True
break break
else: else:
self.logger.info(f"[DEBUG] RESP: {ret.text}") self.logger.info(f"[ERROR] RESP: {ret.text}")
except requests.exceptions.RequestException as e: except requests.exceptions.RequestException as e:
self.logger.info(f"[DEBUG] Request problem: {e}") self.logger.info(f"[DEBUG] Request problem: {e}")
+8 -9
View File
@@ -1884,7 +1884,6 @@ const ParsedAction = (props) => {
const coverColor = "#82ccc3" const coverColor = "#82ccc3"
//menuPosition.left -= 50 //menuPosition.left -= 50
//menuPosition.top -= 250 //menuPosition.top -= 250
console.log(menuPosition)
return parsedPaths.length > 0 ? ( return parsedPaths.length > 0 ? (
<NestedMenuItem <NestedMenuItem
key={innerdata.name} key={innerdata.name}
@@ -2369,7 +2368,7 @@ const ParsedAction = (props) => {
title="See previous results for this action" title="See previous results for this action"
placement="top" placement="top"
> >
<ArrowLeftIcon style={{ color: "white" }} /> <ArrowLeftIcon style={{ color: "rgba(255,255,255,0.7)" }} />
</Tooltip> </Tooltip>
</IconButton> </IconButton>
<IconButton <IconButton
@@ -2389,7 +2388,7 @@ const ParsedAction = (props) => {
title="Read app docs" title="Read app docs"
placement="top" placement="top"
> >
<DescriptionIcon style={{ color: "white" }} /> <DescriptionIcon style={{ color: "rgba(255,255,255,0.7)" }} />
</Tooltip> </Tooltip>
</IconButton> </IconButton>
<IconButton <IconButton
@@ -2413,7 +2412,7 @@ const ParsedAction = (props) => {
title="What are actions?" title="What are actions?"
placement="top" placement="top"
> >
<HelpOutlineIcon style={{ color: "white" }} /> <HelpOutlineIcon style={{ color: "rgba(255,255,255,0.7)" }} />
</Tooltip> </Tooltip>
</a> </a>
</IconButton> </IconButton>
@@ -2448,7 +2447,7 @@ const ParsedAction = (props) => {
title={selectedAction.run_magic_output === undefined || selectedAction.run_magic_output === null || selectedAction.run_magic_output === false ? "Click to enable magic parsing" : "Click to disable magic parsing"} title={selectedAction.run_magic_output === undefined || selectedAction.run_magic_output === null || selectedAction.run_magic_output === false ? "Click to enable magic parsing" : "Click to disable magic parsing"}
placement="top" placement="top"
> >
<AutoFixHighIcon style={{ color: selectedAction.run_magic_output === undefined || selectedAction.run_magic_output === null || selectedAction.run_magic_output === false ? "white" : "#f86a3e"}} /> <AutoFixHighIcon style={{ color: selectedAction.run_magic_output === undefined || selectedAction.run_magic_output === null || selectedAction.run_magic_output === false ? "rgba(255,255,255,0.7)" : "#f86a3e"}} />
</Tooltip> </Tooltip>
</IconButton> </IconButton>
@@ -2529,7 +2528,7 @@ const ParsedAction = (props) => {
/> />
<div style={{display: "flex"}}> <div style={{display: "flex"}}>
<div style={{flex: 5}}> <div style={{flex: 5}}>
<Typography>Name</Typography> <Typography style={{color: "rgba(255,255,255,0.7)"}}>Name</Typography>
<TextField <TextField
style={theme.palette.textFieldStyle} style={theme.palette.textFieldStyle}
InputProps={{ InputProps={{
@@ -2626,7 +2625,7 @@ const ParsedAction = (props) => {
placement="top" placement="top"
> >
<span> <span>
<Typography>Delay</Typography> <Typography style={{color: "rgba(255,255,255,0.7)"}}>Delay</Typography>
<TextField <TextField
style={{ style={{
backgroundColor: theme.palette.inputColor, backgroundColor: theme.palette.inputColor,
@@ -2691,7 +2690,7 @@ const ParsedAction = (props) => {
selectedAction.authentication !== null && selectedAction.authentication !== null &&
selectedAction.authentication.length > 0 ? ( selectedAction.authentication.length > 0 ? (
<div style={{ marginTop: 15 }}> <div style={{ marginTop: 15 }}>
<Typography>Authentication</Typography> <Typography style={{color: "rgba(255,255,255,0.7)"}}>Authentication</Typography>
<div style={{ display: "flex" }}> <div style={{ display: "flex" }}>
<Select <Select
MenuProps={{ MenuProps={{
@@ -2797,7 +2796,7 @@ const ParsedAction = (props) => {
{showEnvironment !== undefined && showEnvironment && environments.length > 1 ? ( {showEnvironment !== undefined && showEnvironment && environments.length > 1 ? (
<div style={{ marginTop: "20px" }}> <div style={{ marginTop: "20px" }}>
<Typography>Environment</Typography> <Typography style={{color: "rgba(255,255,255,0.7)"}}>Environment</Typography>
<Select <Select
MenuProps={{ MenuProps={{
disableScrollLock: true, disableScrollLock: true,
+52 -33
View File
@@ -451,7 +451,8 @@ const AngularWorkflow = (defaultprops) => {
} }
}) })
.catch((error) => { .catch((error) => {
alert.error(error.toString()); //alert.error(error.toString());
console.log("Workflow error: ", error.toString())
}); });
}; };
@@ -539,7 +540,7 @@ const AngularWorkflow = (defaultprops) => {
setUserSettings(responseJson); setUserSettings(responseJson);
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log("Apikey error: ", error);
}); });
}; };
@@ -574,7 +575,7 @@ const AngularWorkflow = (defaultprops) => {
} }
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log("Settings error: ", error);
}); });
}; };
@@ -608,7 +609,8 @@ const AngularWorkflow = (defaultprops) => {
} }
}) })
.catch((error) => { .catch((error) => {
alert.error(error.toString()); //alert.error(error.toString());
console.log("New auth error: ", error.toString());
}); });
}; };
@@ -692,7 +694,8 @@ const AngularWorkflow = (defaultprops) => {
} }
}) })
.catch((error) => { .catch((error) => {
alert.error(error.toString()); //alert.error(error.toString());
console.log("Get execution error: ", error.toString());
}); });
}; };
@@ -719,7 +722,7 @@ const AngularWorkflow = (defaultprops) => {
handleUpdateResults(responseJson, executionRequest); handleUpdateResults(responseJson, executionRequest);
}) })
.catch((error) => { .catch((error) => {
console.log("Error: ", error); console.log("Execution result Error: ", error);
stop(); stop();
}); });
}; };
@@ -751,7 +754,8 @@ const AngularWorkflow = (defaultprops) => {
return response.json(); return response.json();
}) })
.catch((error) => { .catch((error) => {
alert.error(error.toString()); //alert.error(error.toString());
console.log("Abort error: ", error.toString());
}); });
}; };
@@ -1262,7 +1266,8 @@ const AngularWorkflow = (defaultprops) => {
}) })
.catch((error) => { .catch((error) => {
setSavingState(0); setSavingState(0);
alert.error(error.toString()); //alert.error(error.toString());
console.log("Save workflow error: ", error.toString());
}); });
return success; return success;
@@ -1387,7 +1392,8 @@ const AngularWorkflow = (defaultprops) => {
start(); start();
}) })
.catch((error) => { .catch((error) => {
alert.error(error.toString()); //alert.error(error.toString());
console.log("Execute workflow err: ", error.toString());
}); });
}) })
}; };
@@ -1501,7 +1507,8 @@ const AngularWorkflow = (defaultprops) => {
}) })
.catch((error) => { .catch((error) => {
setAuthLoaded(true); setAuthLoaded(true);
alert.error("Auth loading error: " + error.toString()); //alert.error("Auth loading error: " + error.toString());
console.log("AppAuth error: " + error.toString());
}); });
}; };
@@ -1578,7 +1585,8 @@ 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());
}); });
}; };
@@ -1607,7 +1615,7 @@ const AngularWorkflow = (defaultprops) => {
} }
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log("Get userprofile error: ", error);
}) })
} }
@@ -1825,7 +1833,8 @@ const AngularWorkflow = (defaultprops) => {
} }
}) })
.catch((error) => { .catch((error) => {
alert.error(error.toString()); //alert.error(error.toString());
console.log("Get workflows error: ", error.toString());
}); });
}; };
@@ -2709,7 +2718,8 @@ const AngularWorkflow = (defaultprops) => {
} }
}) })
.catch(error => { .catch(error => {
alert.error(error.toString()) //alert.error(error.toString())
console.log("Activate app error: ", error.toString())
}); });
} }
@@ -3658,7 +3668,8 @@ const AngularWorkflow = (defaultprops) => {
} }
}) })
.catch((error) => { .catch((error) => {
alert.error(error.toString()); //alert.error(error.toString());
console.log("Get environments error: ", error.toString());
}); });
}; };
@@ -4563,7 +4574,8 @@ const AngularWorkflow = (defaultprops) => {
saveWorkflow(workflow); saveWorkflow(workflow);
}) })
.catch((error) => { .catch((error) => {
alert.error(error.toString()); //alert.error(error.toString());
console.log("Stop schedule error: ", error.toString());
}); });
}; };
@@ -4615,7 +4627,8 @@ const AngularWorkflow = (defaultprops) => {
} }
}) })
.catch((error) => { .catch((error) => {
alert.error(error.toString()); //alert.error(error.toString());
console.log("Get schedule error: ", error.toString());
}); });
}; };
@@ -5063,14 +5076,14 @@ const AngularWorkflow = (defaultprops) => {
is_valid: true, is_valid: true,
label: "Webhook", label: "Webhook",
environment: "onprem", environment: "onprem",
description: "Simple HTTP webhook", description: "Custom HTTP input",
long_description: "Execute a workflow with an unauthicated POST request", long_description: "Execute a workflow with an unauthicated POST request",
}, },
{ {
name: "Schedule", name: "Schedule",
type: "TRIGGER", type: "TRIGGER",
status: "uninitialized", status: "uninitialized",
description: "Schedule execution time", description: "Specify time",
trigger_type: "SCHEDULE", trigger_type: "SCHEDULE",
errors: null, errors: null,
large_image: large_image:
@@ -5091,7 +5104,7 @@ const AngularWorkflow = (defaultprops) => {
is_valid: true, is_valid: true,
label: "Subflow", label: "Subflow",
environment: "onprem", environment: "onprem",
description: "Control another workflow", description: "Control a workflow",
long_description: "Execute another workflow from this workflow", long_description: "Execute another workflow from this workflow",
}, },
{ {
@@ -5112,7 +5125,7 @@ const AngularWorkflow = (defaultprops) => {
name: "Office365", name: "Office365",
type: "TRIGGER", type: "TRIGGER",
status: "uninitialized", status: "uninitialized",
description: "Starts upon O365 email", description: "O365 email trigger",
trigger_type: "EMAIL", trigger_type: "EMAIL",
errors: null, errors: null,
is_valid: cloudSyncEnabled || isCloud ? true : false, is_valid: cloudSyncEnabled || isCloud ? true : false,
@@ -5126,7 +5139,7 @@ const AngularWorkflow = (defaultprops) => {
name: "Gmail", name: "Gmail",
type: "TRIGGER", type: "TRIGGER",
status: "uninitialized", status: "uninitialized",
description: "Trigger based on Gmail", description: "Gmail email trigger",
trigger_type: "EMAIL", trigger_type: "EMAIL",
errors: null, errors: null,
is_valid: cloudSyncEnabled || isCloud ? true : false, is_valid: cloudSyncEnabled || isCloud ? true : false,
@@ -5203,10 +5216,11 @@ const AngularWorkflow = (defaultprops) => {
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
marginLeft: "20px", marginLeft: "20px",
overflow: "hidden",
}} }}
> >
<Grid item style={{ flex: "1" }}> <Grid item style={{ flex: "1", overflow: "hidden",}}>
<h3 style={{ marginBottom: "0px", marginTop: "10px" }}> <h3 style={{ marginBottom: "0px", marginTop: "10px", overflow: "hidden" }}>
{trigger.name} {trigger.name}
</h3> </h3>
</Grid> </Grid>
@@ -7293,7 +7307,7 @@ const AngularWorkflow = (defaultprops) => {
} }
}) })
.catch((error) => { .catch((error) => {
console.log(error.toString()); console.log("Get gmail folder error: ", error.toString());
}); });
}; };
@@ -7347,7 +7361,7 @@ const AngularWorkflow = (defaultprops) => {
} }
}) })
.catch((error) => { .catch((error) => {
console.log(error.toString()); console.log("Get outlook folders error: ", error.toString());
}); });
}; };
@@ -7368,7 +7382,8 @@ const AngularWorkflow = (defaultprops) => {
setTriggerAuthentication(responseJson); setTriggerAuthentication(responseJson);
}) })
.catch((error) => { .catch((error) => {
console.log(error.toString()); //console.log(error.toString());
console.log("Set outlook auth error: ", error.toString());
}); });
}; };
@@ -7458,7 +7473,7 @@ const AngularWorkflow = (defaultprops) => {
setGmailFolders(); setGmailFolders();
}) })
.catch((error) => { .catch((error) => {
console.log(error.toString()); console.log("Set gmail trigg error: ", error.toString());
}); });
}, 2500); }, 2500);
@@ -7556,7 +7571,7 @@ const AngularWorkflow = (defaultprops) => {
setOutlookFolders(); setOutlookFolders();
}) })
.catch((error) => { .catch((error) => {
console.log(error.toString()); console.log("Set outlook trigger error: ", error.toString());
}); });
}, 2500); }, 2500);
@@ -9476,7 +9491,8 @@ const AngularWorkflow = (defaultprops) => {
} }
}) })
.catch((error) => { .catch((error) => {
alert.error(error.toString()); //alert.error(error.toString());
console.log("Stop mailsub error: ", error.toString());
}); });
}; };
@@ -9552,7 +9568,8 @@ const AngularWorkflow = (defaultprops) => {
} }
}) })
.catch((error) => { .catch((error) => {
alert.error(error.toString()); //alert.error(error.toString());
console.log("Start mailsub error: ", error.toString());
}); });
}; };
@@ -9636,7 +9653,8 @@ const AngularWorkflow = (defaultprops) => {
} }
}) })
.catch((error) => { .catch((error) => {
console.log(error.toString()); //console.log(error.toString());
console.log("New webhook error: ", error.toString());
}); });
}; };
@@ -9679,7 +9697,8 @@ const AngularWorkflow = (defaultprops) => {
setSelectedTrigger(trigger); setSelectedTrigger(trigger);
}) })
.catch((error) => { .catch((error) => {
alert.error(error.toString()); //alert.error(error.toString());
alert.error("Delete webhook error: ", error.toString());
}); });
}; };
+1 -1
View File
@@ -733,7 +733,7 @@ const Settings = (props) => {
{isCloud ? {isCloud ?
<span> <span>
<Typography variant="body1" color="textSecondary"> <Typography variant="body1" color="textSecondary">
By connecting your Github account, you agree to our <a href="/docs/terms_of_service" target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}}>Terms of Service</a>, and acknowledge that your non-sensitive data will be turned into a <a target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}} href="https://shuffler.io/search?tab=creators">creator account</a>. This enables you to earn a passive income from Shuffle. This IS reversible. By connecting your Github or Metamask account, you agree to our <a href="/docs/terms_of_service" target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}}>Terms of Service</a>, and acknowledge that your non-sensitive data will be turned into a <a target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}} href="https://shuffler.io/search?tab=creators">creator account</a>. This enables you to earn a passive income from Shuffle. This IS reversible. Support: support@shuffler.io
</Typography> </Typography>
<Button <Button
style={{ height: 40, marginTop: 10 }} style={{ height: 40, marginTop: 10 }}
+24 -8
View File
@@ -28,6 +28,7 @@ import (
"net/http" "net/http"
"os" "os"
"os/exec" "os/exec"
"runtime"
"strconv" "strconv"
"strings" "strings"
"time" "time"
@@ -442,12 +443,23 @@ func deployServiceWorkers(image string) {
if len(os.Getenv("DOCKER_HOST")) > 0 { if len(os.Getenv("DOCKER_HOST")) > 0 {
serviceSpec.TaskTemplate.ContainerSpec.Env = append(serviceSpec.TaskTemplate.ContainerSpec.Env, fmt.Sprintf("DOCKER_HOST=%s", os.Getenv("DOCKER_HOST"))) serviceSpec.TaskTemplate.ContainerSpec.Env = append(serviceSpec.TaskTemplate.ContainerSpec.Env, fmt.Sprintf("DOCKER_HOST=%s", os.Getenv("DOCKER_HOST")))
} else { } else {
serviceSpec.TaskTemplate.ContainerSpec.Mounts = []mount.Mount{ if runtime.GOOS == "windows" {
mount.Mount{ serviceSpec.TaskTemplate.ContainerSpec.Mounts = []mount.Mount{
Source: "/var/run/docker.sock", mount.Mount{
Target: "/var/run/docker.sock", Source: `\\.\pipe\docker_engine`,
Type: mount.TypeBind, Target: `\\.\pipe\docker_engine`,
}, Type: mount.TypeBind,
},
}
} else {
serviceSpec.TaskTemplate.ContainerSpec.Mounts = []mount.Mount{
mount.Mount{
Source: "/var/run/docker.sock",
Target: "/var/run/docker.sock",
Type: mount.TypeBind,
},
}
} }
} }
@@ -506,7 +518,11 @@ func deployWorker(image string, identifier string, env []string, executionReques
} }
if len(os.Getenv("DOCKER_HOST")) == 0 { if len(os.Getenv("DOCKER_HOST")) == 0 {
hostConfig.Binds = []string{"/var/run/docker.sock:/var/run/docker.sock:rw"} if runtime.GOOS == "windows" {
hostConfig.Binds = []string{`\\.\pipe\docker_engine:\\.\pipe\docker_engine`}
} else {
hostConfig.Binds = []string{"/var/run/docker.sock:/var/run/docker.sock:rw"}
}
} }
hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:%s", containerId)) hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:%s", containerId))
@@ -868,7 +884,7 @@ func main() {
log.Printf("[DEBUG] Running docker with socket proxy %s instead of default", os.Getenv("DOCKER_HOST")) log.Printf("[DEBUG] Running docker with socket proxy %s instead of default", os.Getenv("DOCKER_HOST"))
} else { } else {
log.Printf("[DEBUG] Running docker with default socket /var/run/docker.sock") log.Printf(`[DEBUG] Running docker with default socket /var/run/docker.sock or `)
} }
ctx := context.Background() ctx := context.Background()