Added verify as dropdown
This commit is contained in:
@@ -505,11 +505,13 @@ class AppBase:
|
||||
|
||||
results = []
|
||||
if has_loop:
|
||||
self.logger.info(f"[DEBUG] Should run inner loop: {newparams}")
|
||||
#self.logger.info(f"[DEBUG] Should run inner loop: {newparams}")
|
||||
self.logger.info(f"[DEBUG] Should run inner loop")
|
||||
#ret = await self.run_recursed_items(func, newparams, loop_wrapper)
|
||||
ret = self.run_recursed_items(func, newparams, loop_wrapper)
|
||||
else:
|
||||
self.logger.info(f"[DEBUG] Should run multiplier check with params (inner): {newparams}")
|
||||
#self.logger.info(f"[DEBUG] Should run multiplier check with params (inner): {newparams}")
|
||||
self.logger.info(f"[DEBUG] Should run multiplier check with params (inner)")
|
||||
# 1. Find the loops that are required and create new multipliers
|
||||
# If here: check for multipliers within this scope.
|
||||
ret = []
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"babel-eslint": "^10.1.0",
|
||||
"class-transformer": "^0.4.0",
|
||||
"create-react-app": "^4.0.3",
|
||||
"cytoscape": "^3.11.0",
|
||||
"cytoscape": "^3.20.0",
|
||||
"cytoscape-clipboard": "^2.2.1",
|
||||
"cytoscape-cxtmenu": "^3.1.1",
|
||||
"cytoscape-edgehandles": "^3.6.0",
|
||||
|
||||
@@ -119,6 +119,7 @@ const ConfigureWorkflow = (props) => {
|
||||
auth_done: false,
|
||||
action_ids: [],
|
||||
action: action,
|
||||
update_version: action.app_version,
|
||||
app: {},
|
||||
};
|
||||
|
||||
@@ -130,7 +131,13 @@ const ConfigureWorkflow = (props) => {
|
||||
app.loop_versions.includes(action.app_version)))
|
||||
);
|
||||
if (app === undefined || app === null) {
|
||||
console.log("App not found: ", action.app_name);
|
||||
//console.log("App not found: ", action.app_name);
|
||||
|
||||
const subapp = apps.find(app => app.name === action.app_name)
|
||||
if (subapp !== undefined && subapp !== null) {
|
||||
newaction.update_version = "1.1.0"
|
||||
}
|
||||
|
||||
|
||||
newaction.must_activate = true;
|
||||
} else {
|
||||
@@ -196,7 +203,7 @@ const ConfigureWorkflow = (props) => {
|
||||
tmpaction.app_name === newaction.app_name
|
||||
) !== undefined
|
||||
) {
|
||||
console.log("Action already found.");
|
||||
//console.log("Action already found.");
|
||||
} else {
|
||||
newactions.push(newaction);
|
||||
}
|
||||
@@ -508,7 +515,7 @@ const ConfigureWorkflow = (props) => {
|
||||
{action.must_activate ? (
|
||||
<Button
|
||||
color="primary"
|
||||
variant="contained"
|
||||
variant="outlined"
|
||||
onClick={() => {
|
||||
activateApp(action.app_id, action.app_name, action.app_version);
|
||||
setItemChanged(true);
|
||||
@@ -516,6 +523,35 @@ const ConfigureWorkflow = (props) => {
|
||||
>
|
||||
Activate
|
||||
</Button>
|
||||
) : null}
|
||||
{action.update_version !== action.app_version ? (
|
||||
<Button
|
||||
color="primary"
|
||||
variant="contained"
|
||||
style={{marginLeft: 5}}
|
||||
onClick={() => {
|
||||
console.log("Set version to: ", action.update_version)
|
||||
|
||||
if (workflow.actions !== null) {
|
||||
//console.log(workflow.actions)
|
||||
alert.info("Setting action to version "+action.update_version)
|
||||
for (var key in workflow.actions) {
|
||||
if (workflow.actions[key].app_name === action.app_name && workflow.actions[key].app_version === action.app_version) {
|
||||
workflow.actions[key].app_version = action.update_version
|
||||
|
||||
if (!itemChanged) {
|
||||
setItemChanged(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
action.must_activate = false
|
||||
action.update_version = action.app_version
|
||||
}
|
||||
}}
|
||||
>
|
||||
{action.update_version}
|
||||
</Button>
|
||||
) : null}
|
||||
</ListItem>
|
||||
);
|
||||
@@ -609,7 +645,7 @@ const ConfigureWorkflow = (props) => {
|
||||
*/}
|
||||
<Button
|
||||
color="primary"
|
||||
variant={"contained"}
|
||||
variant={itemChanged ? "contained" : "outlined"}
|
||||
style={{}}
|
||||
onClick={() => {
|
||||
if (itemChanged) {
|
||||
|
||||
@@ -978,6 +978,24 @@ const ParsedAction = (props) => {
|
||||
setUpdate(Math.random());
|
||||
};
|
||||
|
||||
|
||||
const returnHelperText = (name, value) => {
|
||||
if (name === undefined || value === undefined) {
|
||||
return ""
|
||||
}
|
||||
|
||||
var helperText = ""
|
||||
console.log("DATA: ", name, value)
|
||||
if (name.includes("url")) {
|
||||
if (value.includes("localhost") || value.includes("127.0.0.1")) {
|
||||
helperText = "Can't use localhost. Please change to an external IP or hostname."
|
||||
}
|
||||
}
|
||||
|
||||
return helperText
|
||||
}
|
||||
|
||||
|
||||
// FIXME: Issue #40 - selectedActionParameters not reset
|
||||
if (
|
||||
Object.getOwnPropertyNames(selectedAction).length > 0 &&
|
||||
@@ -1216,6 +1234,7 @@ const ParsedAction = (props) => {
|
||||
}
|
||||
|
||||
const clickedFieldId = "rightside_field_" + count;
|
||||
|
||||
//<TextareaAutosize
|
||||
// <CodeMirror
|
||||
var datafield = (
|
||||
@@ -1262,6 +1281,7 @@ const ParsedAction = (props) => {
|
||||
}}
|
||||
fullWidth
|
||||
multiline={multiline}
|
||||
helperText={returnHelperText(data.name, data.value)}
|
||||
onClick={() => {
|
||||
console.log("Clicked field: ", clickedFieldId);
|
||||
setExpansionModalOpen(false);
|
||||
@@ -1349,6 +1369,8 @@ const ParsedAction = (props) => {
|
||||
// }
|
||||
//}
|
||||
|
||||
// Basic helpertext
|
||||
|
||||
//const keywords = ["len", "lower", "upper", "trim", "split", "length", "number", "parse", "join"]
|
||||
if (
|
||||
selectedActionParameters[count].schema !== undefined &&
|
||||
@@ -1388,6 +1410,7 @@ const ParsedAction = (props) => {
|
||||
</InputAdornment>
|
||||
),
|
||||
}}
|
||||
helperText={returnHelperText(data.name, data.value)}
|
||||
fullWidth
|
||||
multiline={multiline}
|
||||
rows="5"
|
||||
|
||||
@@ -16,7 +16,6 @@ const data = [
|
||||
margin: "5px",
|
||||
"border-width": "1px",
|
||||
"text-margin-x": "10px",
|
||||
cursor: "pointer",
|
||||
"z-index": 5001,
|
||||
},
|
||||
},
|
||||
@@ -30,7 +29,6 @@ const data = [
|
||||
"text-margin-y": "-15px",
|
||||
width: "5px",
|
||||
color: "white",
|
||||
cursor: "pointer",
|
||||
"line-fill": "linear-gradient",
|
||||
"line-gradient-stop-positions": ["0.0", "100"],
|
||||
"line-gradient-stop-colors": ["grey", "grey"],
|
||||
|
||||
@@ -2100,6 +2100,7 @@ const AngularWorkflow = (props) => {
|
||||
var curaction = workflow.actions.find((a) => a.id === data.id);
|
||||
if (!curaction || curaction === undefined) {
|
||||
alert.error("Action not found. Please remake it.");
|
||||
console.log("NOT FOUND DATA: ", event.target.data())
|
||||
event.target.remove();
|
||||
return;
|
||||
}
|
||||
@@ -3260,7 +3261,8 @@ const AngularWorkflow = (props) => {
|
||||
var parsedStyle = {
|
||||
"border-width": "1px",
|
||||
"font-size": "18px",
|
||||
};
|
||||
//"cursor": "default",
|
||||
}
|
||||
|
||||
if (
|
||||
(nodedata.app_name === "Testing" ||
|
||||
@@ -3450,20 +3452,23 @@ const AngularWorkflow = (props) => {
|
||||
"border-width": "7px",
|
||||
"border-opacity": ".7",
|
||||
"font-size": "25px",
|
||||
};
|
||||
//"cursor": "pointer",
|
||||
}
|
||||
|
||||
if (nodedata.type !== "COMMENT") {
|
||||
parsedStyle.color = "white";
|
||||
}
|
||||
|
||||
event.target.animate(
|
||||
{
|
||||
style: parsedStyle,
|
||||
},
|
||||
{
|
||||
duration: animationDuration,
|
||||
}
|
||||
);
|
||||
if (event.target !== undefined && event.target !== null) {
|
||||
event.target.animate(
|
||||
{
|
||||
style: parsedStyle,
|
||||
},
|
||||
{
|
||||
duration: animationDuration,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const outgoingEdges = event.target.outgoers("edge");
|
||||
const incomingEdges = event.target.incomers("edge");
|
||||
@@ -3511,17 +3516,34 @@ const AngularWorkflow = (props) => {
|
||||
sourcecolor !== null &&
|
||||
sourcecolor !== undefined &&
|
||||
targetcolor !== null &&
|
||||
targetcolor !== undefined
|
||||
targetcolor !== undefined &&
|
||||
!sourcecolor.includes("rgb") &&
|
||||
!targetcolor.includes("rgb")
|
||||
) {
|
||||
event.target.animate({
|
||||
style: {
|
||||
"target-arrow-color": targetcolor,
|
||||
"line-fill": "linear-gradient",
|
||||
"line-gradient-stop-colors": [sourcecolor, targetcolor],
|
||||
"line-gradient-stop-positions": [0, 1],
|
||||
},
|
||||
duration: 0,
|
||||
});
|
||||
console.log(sourcecolor)
|
||||
console.log(targetcolor)
|
||||
if (event.target !== null && event.target.value !== null) {
|
||||
event.target.animate({
|
||||
style: {
|
||||
"target-arrow-color": targetcolor,
|
||||
"line-fill": "linear-gradient",
|
||||
"line-gradient-stop-colors": [sourcecolor, targetcolor],
|
||||
"line-gradient-stop-positions": [0, 1],
|
||||
},
|
||||
duration: animationDuration,
|
||||
})
|
||||
} else {
|
||||
event.target.animate({
|
||||
style: {
|
||||
"target-arrow-color": targetcolor,
|
||||
"line-fill": "linear-gradient",
|
||||
"line-gradient-stop-colors": ["#41dcab", "#41dcab"],
|
||||
"line-gradient-stop-positions": [0, 1],
|
||||
},
|
||||
duration: animationDuration,
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5216,7 +5238,7 @@ const AngularWorkflow = (props) => {
|
||||
|
||||
const setTriggerFolderWrapperMulti = (event) => {
|
||||
const { options } = event.target;
|
||||
const value = [];
|
||||
var value = [];
|
||||
for (let i = 0, l = options.length; i < l; i += 1) {
|
||||
if (options[i].selected) {
|
||||
value.push(options[i].value);
|
||||
@@ -5228,6 +5250,14 @@ const AngularWorkflow = (props) => {
|
||||
workflow.triggers[selectedTriggerIndex].parameters = [[]];
|
||||
}
|
||||
|
||||
// Max 1 folder for office for some reason. MailFolders('MAILBOX_ID') in resource
|
||||
// Can't parse URL with multiple folders.
|
||||
if (selectedTrigger.name === "Office365" & value !== undefined && value !== null && value.length > 1) {
|
||||
alert.info("Max 1 folder at a time allowed for Office365")
|
||||
console.log("VALUE: ", value)
|
||||
value = [value[0]]
|
||||
}
|
||||
|
||||
// This is a dirty workaround for the static values in the go backend and datastore db
|
||||
const fixedValue = value.join(splitter);
|
||||
selectedTrigger.parameters[0] = {
|
||||
@@ -6447,7 +6477,16 @@ const AngularWorkflow = (props) => {
|
||||
<Button
|
||||
fullWidth
|
||||
variant="contained"
|
||||
style={{ flex: "1" }}
|
||||
style={{
|
||||
flex: 1,
|
||||
textTransform: "none",
|
||||
textAlign: "left",
|
||||
justifyContent: "flex-start",
|
||||
marginTop: 10,
|
||||
backgroundColor: "#2f2f2f",
|
||||
color: "white",
|
||||
padding: "5px 5px 5px 10px",
|
||||
}}
|
||||
color="primary"
|
||||
onClick={() => {
|
||||
//const redirectUri = isCloud ? "https%3A%2F%2Fshuffler.io%2Fapi%2Fv1%2Ftriggers%2Foutlook%2Fregister" : "http%3A%2F%2Flocalhost:5001%2Fapi%2Fv1%2Ftriggers%2Foutlook%2Fregister"
|
||||
@@ -6518,7 +6557,14 @@ const AngularWorkflow = (props) => {
|
||||
saveWorkflow(workflow);
|
||||
}}
|
||||
>
|
||||
Sign in with Office365
|
||||
<img
|
||||
alt=""
|
||||
style={{ margin: 0 }}
|
||||
src="/images/ms_symbol_dark.svg"
|
||||
/>
|
||||
<Typography style={{ margin: 0, marginLeft: 10 }} variant="body1">
|
||||
Sign in with Microsoft
|
||||
</Typography>
|
||||
</Button>
|
||||
);
|
||||
|
||||
@@ -6591,7 +6637,7 @@ const AngularWorkflow = (props) => {
|
||||
},
|
||||
}}
|
||||
onChange={(e) => {
|
||||
setTriggerFolderWrapperMulti(e);
|
||||
setTriggerFolderWrapperMulti(e)
|
||||
}}
|
||||
fullWidth
|
||||
input={<Input id="select-multiple-native" />}
|
||||
@@ -10854,7 +10900,7 @@ const AngularWorkflow = (props) => {
|
||||
//setDragging(true);
|
||||
}
|
||||
}}
|
||||
disabled={draggingDisabled}
|
||||
disabled={true}
|
||||
onStop={(e) => {
|
||||
console.log("STOP");
|
||||
if (!dragging) {
|
||||
@@ -10894,9 +10940,9 @@ const AngularWorkflow = (props) => {
|
||||
pointerEvents: "auto",
|
||||
backgroundColor: inputColor,
|
||||
color: "white",
|
||||
minWidth: 750,
|
||||
minWidth: 650,
|
||||
padding: 30,
|
||||
maxHeight: 700,
|
||||
maxHeight: 550,
|
||||
overflowY: "auto",
|
||||
overflowX: "hidden",
|
||||
zIndex: 10012,
|
||||
|
||||
@@ -754,6 +754,10 @@ const Settings = (props) => {
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
{userdata.eth_info !== undefined &&
|
||||
userdata.eth_info.account !== undefined &&
|
||||
userdata.eth_info.account.length > 0 &&
|
||||
userdata.eth_info.parsed_balance !== undefined ? (
|
||||
<div
|
||||
style={{
|
||||
marginTop: 10,
|
||||
@@ -776,9 +780,10 @@ const Settings = (props) => {
|
||||
</Typography>
|
||||
</Paper>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
<div style={{ flex: 1, marginTop: 20 }}>
|
||||
{userdata !== undefined &&
|
||||
{userdata !== undefined &&
|
||||
userdata.eth_info !== undefined &&
|
||||
userdata.eth_info.account.length > 0 ? (
|
||||
<div style={{ width: "100%", textAlign: "left" }}>
|
||||
|
||||
@@ -117,7 +117,7 @@ export const GetIconInfo = (action) => {
|
||||
{ key: "merge", values: ["join", "merge"] },
|
||||
{
|
||||
key: "search",
|
||||
values: ["search", "find", "locate", "index", "analyze", "anal", "match"],
|
||||
values: ["search", "find", "locate", "index", "analyze", "anal", "match", "check cache", "check", "verify", "validate"],
|
||||
},
|
||||
{ key: "list", values: ["list", "head", "options"] },
|
||||
{
|
||||
@@ -134,8 +134,8 @@ export const GetIconInfo = (action) => {
|
||||
"preview",
|
||||
],
|
||||
},
|
||||
{ key: "add", values: ["add"] },
|
||||
{ key: "delete", values: ["delete", "remove", "clear", "clean"] },
|
||||
{ key: "add", values: ["add", "accept", ] },
|
||||
{ key: "delete", values: ["delete", "remove", "clear", "clean", "dismiss",] },
|
||||
{
|
||||
key: "send",
|
||||
values: [
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
NAME=shuffle-worker
|
||||
VERSION=0.9.35
|
||||
VERSION=0.9.36
|
||||
|
||||
echo "Running docker build with $NAME:$VERSION"
|
||||
#CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o worker.bin .
|
||||
|
||||
@@ -1767,7 +1767,7 @@ func handleWorkflowQueue(resp http.ResponseWriter, request *http.Request) {
|
||||
log.Printf("\n\n[DEBUG] In workflowQueue\n\n")
|
||||
body, err := ioutil.ReadAll(request.Body)
|
||||
if err != nil {
|
||||
log.Println("(3) Failed reading body for workflowqueue")
|
||||
log.Println("[WARNING] (3) Failed reading body for workflowqueue")
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "%s"}`, err)))
|
||||
return
|
||||
@@ -1777,7 +1777,7 @@ func handleWorkflowQueue(resp http.ResponseWriter, request *http.Request) {
|
||||
var actionResult shuffle.ActionResult
|
||||
err = json.Unmarshal(body, &actionResult)
|
||||
if err != nil {
|
||||
log.Printf("Failed shuffle.ActionResult unmarshaling: %s", err)
|
||||
log.Printf("[ERROR] Failed shuffle.ActionResult unmarshaling: %s", err)
|
||||
resp.WriteHeader(401)
|
||||
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "%s"}`, err)))
|
||||
return
|
||||
@@ -2502,8 +2502,8 @@ func sendAppRequest(incomingUrl, appName string, port int, action shuffle.Action
|
||||
// Run with proper hostname, but set to shuffle-worker to avoid specific host target.
|
||||
// This means running with VIP instead.
|
||||
if len(hostname) > 0 {
|
||||
//parsedRequest.BaseUrl = fmt.Sprintf("http://%s:%d", hostname, baseport)
|
||||
parsedRequest.BaseUrl = fmt.Sprintf("http://shuffle-workers:%d", baseport)
|
||||
parsedRequest.BaseUrl = fmt.Sprintf("http://%s:%d", hostname, baseport)
|
||||
//parsedRequest.BaseUrl = fmt.Sprintf("http://shuffle-workers:%d", baseport)
|
||||
log.Printf("[DEBUG] Changing hostname to local hostname in Docker network for WORKER URL: %s", parsedRequest.BaseUrl)
|
||||
}
|
||||
|
||||
@@ -2841,6 +2841,7 @@ func handleRunExecution(resp http.ResponseWriter, request *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// FIXME: This should be PER EXECUTION
|
||||
//if strings.ToLower(os.Getenv("SHUFFLE_PASS_APP_PROXY")) == "true" {
|
||||
// Is it ok if these are standard? Should they be update-able after launch? Hmm
|
||||
if len(execRequest.HTTPProxy) > 0 {
|
||||
@@ -2926,6 +2927,12 @@ func handleRunExecution(resp http.ResponseWriter, request *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
err = setWorkflowExecution(ctx, workflowExecution, true)
|
||||
if err != nil {
|
||||
log.Printf("[ERROR] Failed initializing execution saving for %s: %s", workflowExecution.ExecutionId, err)
|
||||
}
|
||||
|
||||
if workflowExecution.Status == "FINISHED" || workflowExecution.Status == "SUCCESS" {
|
||||
log.Printf("[INFO] Workflow %s is finished. Exiting worker.", workflowExecution.ExecutionId)
|
||||
log.Printf("[DEBUG] Shutting down (20)")
|
||||
@@ -2935,7 +2942,6 @@ func handleRunExecution(resp http.ResponseWriter, request *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
//ctx := context.Background()
|
||||
//startAction, extra, children, parents, visited, executed, nextActions, environments := shuffle.GetExecutionVariables(ctx, workflowExecution.ExecutionId)
|
||||
|
||||
extra := 0
|
||||
|
||||
Reference in New Issue
Block a user