More App SDK fixes around indexing in recursions, and another workflow config handler fix
This commit is contained in:
@@ -556,7 +556,7 @@ const ConfigureWorkflow = (props) => {
|
||||
{action.must_activate ? (
|
||||
<Button
|
||||
color="primary"
|
||||
variant="outlined"
|
||||
variant="contained"
|
||||
onClick={() => {
|
||||
console.log("ACTION: ", action)
|
||||
activateApp(action.action.app_id, action.app_name, action.app_version);
|
||||
@@ -666,7 +666,7 @@ const ConfigureWorkflow = (props) => {
|
||||
}
|
||||
}}
|
||||
>
|
||||
Finish setup
|
||||
Close window
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
|
||||
@@ -180,23 +180,21 @@ const ParsedAction = (props) => {
|
||||
const [hiddenDescription, setHiddenDescription] = React.useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
//if (data.startsWith("${") && data.endsWith("}")) {
|
||||
//}
|
||||
// PARAM FIX - Gonna use the ID field, even though it's a hack
|
||||
const paramcheck = selectedAction.parameters.find(param => param.name === "body")
|
||||
//console.log("LOADED! Change hideBody based on input? Action: ", selectedAction, paramcheck)
|
||||
if (paramcheck !== undefined && paramcheck !== null) {
|
||||
if (paramcheck.id === "TOGGLED"){
|
||||
setHideBody(false)
|
||||
setActivateHidingBodyButton(false)
|
||||
console.log("TOGGLED BODY!")
|
||||
} else {
|
||||
setHideBody(true)
|
||||
|
||||
if (paramcheck.id === "UNTOGGLED") {
|
||||
if (selectedAction.parameters !== null && selectedAction.parameters !== undefined) {
|
||||
const paramcheck = selectedAction.parameters.find(param => param.name === "body")
|
||||
//console.log("LOADED! Change hideBody based on input? Action: ", selectedAction, paramcheck)
|
||||
if (paramcheck !== undefined && paramcheck !== null) {
|
||||
if (paramcheck.id === "TOGGLED"){
|
||||
setHideBody(false)
|
||||
setActivateHidingBodyButton(false)
|
||||
console.log("UNTOGGLED!")
|
||||
console.log("TOGGLED BODY!")
|
||||
} else {
|
||||
setHideBody(true)
|
||||
|
||||
if (paramcheck.id === "UNTOGGLED") {
|
||||
setActivateHidingBodyButton(false)
|
||||
console.log("UNTOGGLED!")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -513,9 +511,11 @@ const ParsedAction = (props) => {
|
||||
|
||||
const valid = validateJson(foundResult)
|
||||
if (valid.valid) {
|
||||
exampledata = JSON.parse(foundResult.result);
|
||||
exampledata = valid.result;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
exampledata = foundResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2382,9 +2382,12 @@ const ParsedAction = (props) => {
|
||||
<Select
|
||||
defaultValue={selectedAction.app_version}
|
||||
onChange={(event) => {
|
||||
console.log("VAL: ", event.target.value)
|
||||
console.log("App: ", selectedApp)
|
||||
const newversion = selectedApp.versions.find(
|
||||
(tmpApp) => tmpApp.version == event.target.value
|
||||
);
|
||||
|
||||
console.log("NEWVERSION: ", newversion);
|
||||
if (newversion !== undefined && newversion !== null) {
|
||||
getApp(newversion.id, true);
|
||||
|
||||
@@ -92,6 +92,7 @@ const CodeEditor = (props) => {
|
||||
color: "white",
|
||||
minWidth: 600,
|
||||
padding: 25,
|
||||
border: theme.palette.defaultBorder,
|
||||
},
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -16,6 +16,7 @@ const theme = createMuiTheme({
|
||||
surfaceColor: "#27292d",
|
||||
inputColor: "#383B40",
|
||||
borderRadius: 5,
|
||||
defaultBorder: "1px solid rgba(255,255,255,0.3)",
|
||||
jsonTheme: "brewer",
|
||||
reactJsonStyle: {
|
||||
borderRadius: 5,
|
||||
|
||||
@@ -1132,14 +1132,18 @@ const AngularWorkflow = (defaultprops) => {
|
||||
})
|
||||
.then((responseJson) => {
|
||||
if (executionArgument !== undefined && startNode !== undefined) {
|
||||
console.log("Running execution AFTER saving");
|
||||
//console.log("Running execution AFTER saving");
|
||||
executeWorkflow(executionArgument, startNode, true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!responseJson.success) {
|
||||
console.log(responseJson);
|
||||
alert.error("Failed to save: " + responseJson.reason);
|
||||
if (responseJson.reason !== undefined && responseJson.reason !== null) {
|
||||
alert.error("Failed to save: " + responseJson.reason);
|
||||
} else {
|
||||
alert.error("Failed to save. Please contact your admin if this is unexpected.")
|
||||
}
|
||||
} else {
|
||||
if (
|
||||
responseJson.new_id !== undefined &&
|
||||
@@ -6279,6 +6283,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
backgroundColor: surfaceColor,
|
||||
color: "white",
|
||||
minWidth: 800,
|
||||
border: theme.palette.defaultBorder,
|
||||
},
|
||||
}}
|
||||
onClose={() => {
|
||||
@@ -11211,7 +11216,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
color="primary"
|
||||
style={{ float: "right", marginTop: 20, marginLeft: 10 }}
|
||||
onClick={() => {
|
||||
console.log("DATA: ", executionData);
|
||||
//console.log("DATA: ", executionData);
|
||||
executeWorkflow(
|
||||
executionData.execution_argument,
|
||||
executionData.start,
|
||||
@@ -11830,6 +11835,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
overflowY: "auto",
|
||||
overflowX: "hidden",
|
||||
zIndex: 10012,
|
||||
border: theme.palette.defaultBorder,
|
||||
},
|
||||
}}
|
||||
>
|
||||
@@ -12773,6 +12779,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
color: "white",
|
||||
minWidth: 600,
|
||||
padding: 50,
|
||||
border: theme.palette.defaultBorder,
|
||||
},
|
||||
}}
|
||||
>
|
||||
@@ -12836,6 +12843,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
padding: 15,
|
||||
overflow: "hidden",
|
||||
zIndex: 10012,
|
||||
border: theme.palette.defaultBorder,
|
||||
},
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -472,8 +472,9 @@ const LoginDialog = (props) => {
|
||||
type="button"
|
||||
style={{ flex: "1", marginTop: 5 }}
|
||||
onClick={() => {
|
||||
console.log("CLICK");
|
||||
navigate(ssoUrl)
|
||||
//console.log("CLICK SSO");
|
||||
window.location.href = ssoUrl
|
||||
//navigate(ssoUrl)
|
||||
}}
|
||||
>
|
||||
Use SSO
|
||||
|
||||
@@ -77,7 +77,7 @@ const Settings = (props) => {
|
||||
//Returns the value from a storage position at a given address.
|
||||
const isCloud =
|
||||
window.location.host === "localhost:3002" ||
|
||||
window.location.host === "shuffler.io";
|
||||
window.location.host === "shuffler.io"
|
||||
|
||||
const bodyDivStyle = {
|
||||
margin: "auto",
|
||||
@@ -409,8 +409,6 @@ const Settings = (props) => {
|
||||
// : imageData;
|
||||
|
||||
const imageData = userSettings.image === undefined || userSettings.image == null || userSettings.image.length === 0 ? theme.palette.defaultImage : userSettings.image
|
||||
console.log("settings: ", userSettings)
|
||||
console.log("Image: ", imageData)
|
||||
const imageInfo = (
|
||||
<img
|
||||
src={imageData}
|
||||
@@ -921,11 +919,11 @@ const Settings = (props) => {
|
||||
};
|
||||
|
||||
const handleGithubConnection = () => {
|
||||
console.log("GITHUB CONNECT WOO")
|
||||
console.log("GITHUB CONNECT WOO: ", isCloud)
|
||||
//result = RestClient.post('https://github.com/login/oauth/access_token',
|
||||
|
||||
console.log("HOST: ", window.location.host);
|
||||
console.log("HOST: ", window.location);
|
||||
console.log("Location: ", window.location);
|
||||
const redirectUri = isCloud
|
||||
? window.location.host === "localhost:3002"
|
||||
? "http%3A%2F%2Flocalhost:3002%2Fset_authentication"
|
||||
@@ -935,6 +933,7 @@ const Settings = (props) => {
|
||||
:
|
||||
`https%3A%2F%2F${window.location.host}%2Fset_authentication`
|
||||
|
||||
console.log("redirect: ", redirectUri)
|
||||
|
||||
const client_id = "3d272b1b782b100b1e61"
|
||||
const username = userdata.id;
|
||||
|
||||
@@ -381,7 +381,7 @@ const chipStyle = {
|
||||
};
|
||||
|
||||
export const validateJson = (showResult) => {
|
||||
console.log("INPUT: ", showResult, typeof showResult)
|
||||
//console.log("INPUT: ", showResult, typeof showResult)
|
||||
if (typeof showResult === 'string') {
|
||||
//showResult = showResult.split(" None").join(" \"None\"")
|
||||
showResult = showResult.split(" False").join(" false");
|
||||
@@ -2451,7 +2451,7 @@ const Workflows = (props) => {
|
||||
</Tooltip>
|
||||
) : null}
|
||||
{isCloud ? null : (
|
||||
<Tooltip color="primary" title={"Download workflows"} placement="top">
|
||||
<Tooltip color="primary" title={"Import workflows to Shuffle"} placement="top">
|
||||
<Button
|
||||
color="primary"
|
||||
style={{}}
|
||||
|
||||
Reference in New Issue
Block a user