diff --git a/frontend/src/views/Docs.jsx b/frontend/src/views/Docs.jsx
index c79e8f4f..597019aa 100644
--- a/frontend/src/views/Docs.jsx
+++ b/frontend/src/views/Docs.jsx
@@ -243,9 +243,9 @@ const Docs = (props) => {
const path = "/docs/"+item
const newname = item.charAt(0).toUpperCase()+item.substring(1).split("_").join(" ").split("-").join(" ")
return (
-
+
{fetchDocs(item)}}>
- {newname}
+ > {newname}
)
diff --git a/frontend/src/views/SetAuthenticationSSO.jsx b/frontend/src/views/SetAuthenticationSSO.jsx
new file mode 100644
index 00000000..5fcd0f2b
--- /dev/null
+++ b/frontend/src/views/SetAuthenticationSSO.jsx
@@ -0,0 +1,143 @@
+import React, {useRef, useState, useEffect, useLayoutEffect} from 'react';
+
+import { Typography, CircularProgress } from '@material-ui/core';
+
+const SetAuthentication = (props) => {
+ const { globalUrl, isLoggedIn, isLoaded, userdata } = props;
+
+ const [firstRequest, setFirstRequest] = useState(true)
+ const [finished, setFinished] = useState(false)
+ const [response, setResponse] = useState("")
+ const [failed, setFailed] = useState(false)
+
+ if (firstRequest) {
+ setFirstRequest(false)
+
+ //code
+ //session_state
+ const urlSearchParams = new URLSearchParams(window.location.search);
+ const params = Object.fromEntries(urlSearchParams.entries());
+
+ const authenticationStore = []
+ var appAuthData = {
+ "label": "",
+ "app": {
+ "name": "",
+ "id": "",
+ "app_version": "",
+ },
+ "fields": [],
+ "type": "oauth2",
+ }
+
+ if (window !== undefined && window !== null) {
+ console.log(window.location)
+ appAuthData.fields.push({"key": "redirect_uri", "value": window.location.origin+window.location.pathname})
+ }
+
+ if (params.code !== undefined && params.code !== null) {
+ appAuthData.fields.push({"key": "code", "value": params.code})
+ }
+
+ if (params.session_state !== undefined && params.session_state !== null) {
+ appAuthData.fields.push({"key": "session_state", "value": params.session_state})
+ }
+
+ if (params.state !== undefined && params.state !== null) {
+ const paramsplit = params.state.split("&")
+ console.log(paramsplit)
+ for (var key in paramsplit) {
+ const query = paramsplit[key].split("=")
+ console.log(query)
+
+ if (query.length !== 2) {
+ console.log("INVALID QUERY: ", query)
+ continue
+ }
+
+ if (query[0] === "workflow_id") {
+ appAuthData.reference_workflow = query[1]
+ }
+
+ if (query[0] === "reference_action_id") {
+ //appAuthData.ReferenceWorkflow = query[1]
+ }
+
+ if (query[0] === "app_name") {
+ appAuthData.app.name = query[1]
+ appAuthData.label = "Oauth2 for "+query[1]
+ }
+
+ if (query[0] === "app_id") {
+ appAuthData.app.id = query[1]
+ }
+
+ if (query[0] === "app_version") {
+ appAuthData.app.app_version = query[1]
+ }
+
+ if (query[0] === "authentication_url") {
+ appAuthData.fields.push({"key": "authentication_url", "value": query[1]})
+ }
+
+ if (query[0] === "scope") {
+ appAuthData.fields.push({"key": "scope", "value": query[1]})
+ }
+
+ if (query[0] === "client_id") {
+ appAuthData.fields.push({"key": "client_id", "value": query[1]})
+ }
+
+ if (query[0] === "client_secret") {
+ appAuthData.fields.push({"key": "client_secret", "value": query[1]})
+ }
+ }
+ }
+
+ console.log(appAuthData)
+
+ fetch(globalUrl+"/api/v1/apps/authentication", {
+ method: 'PUT',
+ headers: {
+ 'Content-Type': 'application/json',
+ 'Accept': 'application/json',
+ },
+ credentials: "include",
+ body: JSON.stringify(appAuthData),
+ })
+ .then((response) => {
+ if (response.status !== 200) {
+ console.log("Status not 200 for oauth2 authentication")
+ setFailed(true)
+ }
+
+ return response.json()
+ })
+ .then((responseJson) => {
+ //setUserSettings(responseJson)
+ console.log("Resp: ", responseJson)
+ setFinished(true)
+ setResponse(responseJson.reason)
+
+ setTimeout(() => {
+ window.close()
+ }, 1000)
+ })
+ .catch(error => {
+ console.log(error)
+ });
+
+ }
+
+ return (
+
+
+ {!finished ? : "DONE WITH AUTH - this will close soon!!"}
+
+ {failed ? "Failed setup. Error: " : ""} {response}
+
+
+ )
+}
+
+export default SetAuthentication;
diff --git a/frontend/src/views/Workflows.jsx b/frontend/src/views/Workflows.jsx
index 9e2555cc..58dd9625 100644
--- a/frontend/src/views/Workflows.jsx
+++ b/frontend/src/views/Workflows.jsx
@@ -354,6 +354,8 @@ const Workflows = (props) => {
const [downloadUrl, setDownloadUrl] = React.useState("https://github.com/frikky/shuffle-workflows")
const [downloadBranch, setDownloadBranch] = React.useState("master")
const [loadWorkflowsModalOpen, setLoadWorkflowsModalOpen] = React.useState(false)
+ const [exportModalOpen, setExportModalOpen] = React.useState(false)
+ const [exportData, setExportData] = React.useState("");
const [modalOpen, setModalOpen] = React.useState(false);
const [newWorkflowName, setNewWorkflowName] = React.useState("");
@@ -473,6 +475,50 @@ const Workflows = (props) => {
findWorkflow(newfilters)
}
+ const exportVerifyModal = exportModalOpen ?
+
+ : null
+
const publishModal = publishModalOpen ?