-
Search Shuffle
+ {isHeader ?
+
Search for docs, apps, workflows and more
@@ -101,12 +101,11 @@ const SearchField = props => {
-
-
- {/*
+
+ {/*
+
Discord
- */}
- {/*
+
@@ -118,8 +117,9 @@ const SearchField = props => {
- */}
+ */}
+
);
diff --git a/frontend/src/components/WorkflowTemplatePopup.jsx b/frontend/src/components/WorkflowTemplatePopup.jsx
index ff20ad36..7b7e2944 100644
--- a/frontend/src/components/WorkflowTemplatePopup.jsx
+++ b/frontend/src/components/WorkflowTemplatePopup.jsx
@@ -44,7 +44,6 @@ const WorkflowTemplatePopup = (props) => {
const [missingDestination, setMissingDestination] = React.useState(undefined);
useEffect(() => {
- console.log("Source & Dest check:", missingSource, missingDestination)
}, [missingSource, missingDestination])
const isCloud = window.location.host === "localhost:3002" || window.location.host === "shuffler.io";
@@ -392,7 +391,7 @@ const WorkflowTemplatePopup = (props) => {
appFramework={appFramework}
appType={missingSource.type}
- appImage={missingSource.image}
+ AppImage={missingSource.image}
setMissing={setMissingSource}
/>
@@ -406,7 +405,7 @@ const WorkflowTemplatePopup = (props) => {
appFramework={appFramework}
appType={missingDestination.type}
- appImage={missingDestination.image}
+ AppImage={missingDestination.image}
setMissing={setMissingDestination}
/>
@@ -443,7 +442,7 @@ const WorkflowTemplatePopup = (props) => {
if (title.length > maxlength) {
parsedTitle = title.substring(0, maxlength) + "..."
}
- console.log("isHomePage", isHomePage)
+
parsedTitle = parsedTitle.replaceAll("_", " ")
const parsedDescription = description !== undefined && description !== null ? description.replaceAll("_", " ") : ""
diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx
index cb973f31..5df90df7 100755
--- a/frontend/src/views/AngularWorkflow.jsx
+++ b/frontend/src/views/AngularWorkflow.jsx
@@ -11,7 +11,7 @@ import { useNavigate, Link, useParams } from "react-router-dom";
import { useBeforeunload } from "react-beforeunload";
import ReactJson from "react-json-view";
import { NestedMenuItem } from 'mui-nested-menu';
-import ReactMarkdown from "react-markdown";
+import Markdown from "react-markdown";
//import { useAlert
import { ToastContainer, toast } from "react-toastify"
import { isMobile } from "react-device-detect"
@@ -635,7 +635,11 @@ const AngularWorkflow = (defaultprops) => {
if (responseJson.success === true) {
if (responseJson.reason !== undefined && responseJson.reason !== undefined && responseJson.reason.length > 0) {
if (!responseJson.reason.includes("404: Not Found") && responseJson.reason.length > 25) {
- selectedApp.documentation = responseJson.reason
+ // Translate
into markdown ![]()
+ const imgRegex = / {
tmpView = execution_id;
}
- console.log("TMPVIEW: ", tmpView);
-
// Compare with currently selected item
if (tmpView !== undefined && tmpView !== null && tmpView.length > 0) {
// Don't clean up if it's already open
@@ -1669,7 +1671,7 @@ const AngularWorkflow = (defaultprops) => {
if (hasSaved === false) {
setExecutionRequestStarted(true);
saveWorkflow(workflow, executionArgument, startNode);
- console.log("FIXME: Might have forgotten to save before executing.");
+ //console.log("FIXME: Might have forgotten to save before executing.");
return;
}
@@ -3783,6 +3785,8 @@ const AngularWorkflow = (defaultprops) => {
//}
curaction.app_id = curapp.id
+ console.log("CURAPP: ", curapp.authentication)
+
setAuthenticationType(
curapp.authentication.type === "oauth2" && curapp.authentication.redirect_uri !== undefined && curapp.authentication.redirect_uri !== null ? {
type: "oauth2",
@@ -3792,6 +3796,7 @@ const AngularWorkflow = (defaultprops) => {
scope: curapp.authentication.scope,
client_id: curapp.authentication.client_id,
client_secret: curapp.authentication.client_secret,
+ grant_type: curapp.authentication.grant_type,
} : {
type: "",
}
@@ -16955,7 +16960,7 @@ const AngularWorkflow = (defaultprops) => {
)}
) : (
- {
}}
>
{selectedApp.documentation}
-
+
)}
diff --git a/frontend/src/views/AppCreator.jsx b/frontend/src/views/AppCreator.jsx
index c2656a95..452f0920 100755
--- a/frontend/src/views/AppCreator.jsx
+++ b/frontend/src/views/AppCreator.jsx
@@ -398,7 +398,6 @@ const AppCreator = (defaultprops) => {
apikeySelection.length > 0 ? apikeySelection[0] : ""
);
const [refreshUrl, setRefreshUrl] = useState("");
- const [oauth2Scopes, setOauth2Scopes] = useState([]);
const [projectCategories, setProjectCategories] = useState([]);
const [selectedCategory, setSelectedCategory] = useState("");
@@ -411,7 +410,10 @@ const AppCreator = (defaultprops) => {
const [appBuilding, setAppBuilding] = useState(false);
const [fileDownloadEnabled, setFileDownloadEnabled] = useState(false);
const [actionAmount, setActionAmount] = useState(increaseAmount);
- const [oauth2Type, setOauth2Type] = useState("application");
+
+ const [oauth2Scopes, setOauth2Scopes] = useState([]);
+ const [oauth2Type, setOauth2Type] = useState("delegated");
+ const [oauth2GrantType, setOauth2GrantType] = useState("client_credentials");
const defaultAuth = {
name: "",
type: "header",
@@ -1748,17 +1750,25 @@ const AppCreator = (defaultprops) => {
//console.log("FLOW-1: ", value)
const flowkey = value.flow === undefined ? "flows" : "flow";
//console.log("FLOW: ", value[flowkey])
- const basekey = value[flowkey].authorizationCode !== undefined
- ? "authorizationCode"
- : "implicit";
+
+
+ // Doesn't seem to be used for now
+ const basekey = value[flowkey].authorizationCode !== undefined ? "authorizationCode" : "implicit";
+
+ // Kind of fucked up, but it works for now?
+ if (value["x-grant-type"] !== undefined && value["x-grant-type"] !== null && value["x-grant-type"].length !== 0) {
+ setOauth2Type(value["x-grant-type"])
+ }
//console.log("FLOW2: ", value[flowkey][basekey])
if (value[flowkey] !== undefined && value[flowkey][basekey] !== undefined
) {
- if (value[flowkey][basekey].authorizationUrl !== undefined && parameterName.length === 0) {
+ var newparamname = parameterName
+ if (value[flowkey][basekey].authorizationUrl !== undefined && value[flowkey][basekey].authorizationUrl !== null && value[flowkey][basekey].authorizationUrl.length !== 0 && parameterName.length === 0) {
setParameterName(value[flowkey][basekey].authorizationUrl);
- // } else {
- // setOauth2Type("application")
+ } else {
+ setOauth2Type("application")
+
}
var tokenUrl = "";
@@ -2519,6 +2529,14 @@ const AppCreator = (defaultprops) => {
},
},
};
+
+
+ //if (value[flowkey][basekey]["x-grant-type"] !== undefined && value[flowkey][basekey]["x-grant-type"] !== null && value[flowkey][basekey]["x-grant-type"].length !== 0) {
+ if (oauth2GrantType.length > 0) {
+ data.components.securitySchemes["Oauth2"]["x-grant-type"] = oauth2GrantType;
+ }
+
+ console.log("SECURITYSCHEMES: ", data.components);
}
if (setExtraAuth.length > 0) {
@@ -3082,7 +3100,7 @@ const AppCreator = (defaultprops) => {
},
}}
style={{ maxHeight: 80, overflowX: "hidden", overflowY: "auto" }}
- placeholder="Available Oauth2 Scopes (enter to add)"
+ placeholder="Available Oauth2 Scopes"
color="primary"
fullWidth
value={oauth2Scopes}
@@ -5957,36 +5975,67 @@ const AppCreator = (defaultprops) => {
{authenticationOption === "Oauth2" ?
-
+
{/*
- Delegated: The user will get a popup for access their personal data.
- Application: Permissions are set by the app creator in the 3rd party platform.
*/}
-
+
+ {oauth2Type === "application" ?
+