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