diff --git a/backend/go-app/go.mod b/backend/go-app/go.mod index e15a3473..5b32f667 100644 --- a/backend/go-app/go.mod +++ b/backend/go-app/go.mod @@ -2,7 +2,7 @@ module shuffle go 1.13 -//replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared +replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared //replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi diff --git a/backend/go-app/go.sum b/backend/go-app/go.sum index 37434157..8699383f 100644 --- a/backend/go-app/go.sum +++ b/backend/go-app/go.sum @@ -155,6 +155,8 @@ github.com/frikky/shuffle-shared v0.0.46 h1:L52pyEVKZujM136qzD7LnarJIq0iXyfpDqhG github.com/frikky/shuffle-shared v0.0.46/go.mod h1:BknTfpun3qte5bumR3OqQHf9XWPIsyj8woiXCjIlbBc= github.com/frikky/shuffle-shared v0.0.47 h1:fywEmbJGbD/VT9LdkHvLWPGh9HEt8ipFDzoGHRe+QgA= github.com/frikky/shuffle-shared v0.0.47/go.mod h1:BknTfpun3qte5bumR3OqQHf9XWPIsyj8woiXCjIlbBc= +github.com/frikky/shuffle-shared v0.0.49 h1:fChF0Nh/bMuXZg67Pt9XXn9+mH4IlKgB3dAzhqwQF5o= +github.com/frikky/shuffle-shared v0.0.49/go.mod h1:BknTfpun3qte5bumR3OqQHf9XWPIsyj8woiXCjIlbBc= github.com/fsouza/go-dockerclient v1.7.2 h1:bBEAcqLTkpq205jooP5RVroUKiVEWgGecHyeZc4OFjo= github.com/fsouza/go-dockerclient v1.7.2/go.mod h1:+ugtMCVRwnPfY7d8/baCzZ3uwB0BrG5DB8OzbtxaRz8= github.com/getkin/kin-openapi v0.8.0 h1:a6TQjTqwkyscC4/hShJX7WhCVE+4bi9lzw61XHQW5hE= diff --git a/docker-compose.yml b/docker-compose.yml index f371ae04..eac89280 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,7 +63,6 @@ services: - ENVIRONMENT_NAME=${ENVIRONMENT_NAME} - BASE_URL=http://${OUTER_HOSTNAME}:${BACKEND_PORT} - DOCKER_API_VERSION=1.40 - - SHUFFLE_ORBORUS_EXECUTION_TIMEOUT=600 - SHUFFLE_BASE_IMAGE_NAME=${SHUFFLE_BASE_IMAGE_NAME} - SHUFFLE_BASE_IMAGE_REGISTRY=${SHUFFLE_BASE_IMAGE_REGISTRY} - SHUFFLE_BASE_IMAGE_TAG_SUFFIX=${SHUFFLE_BASE_IMAGE_TAG_SUFFIX} @@ -71,6 +70,8 @@ services: - HTTPS_PROXY=${SHUFFLE_HTTPS_PROXY} - SHUFFLE_PASS_WORKER_PROXY=${SHUFFLE_PASS_WORKER_PROXY} - SHUFFLE_PASS_APP_PROXY=${SHUFFLE_PASS_APP_PROXY} + - SHUFFLE_ORBORUS_EXECUTION_TIMEOUT=600 + - SHUFFLE_ORBORUS_EXECUTION_CONCURRENCY=50 - CLEANUP=${SHUFFLE_CONTAINER_AUTO_CLEANUP} restart: unless-stopped opensearch: diff --git a/frontend/src/components/ParsedAction.jsx b/frontend/src/components/ParsedAction.jsx index 9302df5b..b8abf9fd 100644 --- a/frontend/src/components/ParsedAction.jsx +++ b/frontend/src/components/ParsedAction.jsx @@ -597,6 +597,14 @@ const ParsedAction = (props) => { return null } + if (selectedApp.generated && data.name === "headers") { + console.log("HEADER: ", data) + //if (data.value.length === 0) { + + //} + //setSelectedActionParameters(selectedActionParameters) + } + if (selectedApp.generated && data.name === "body") { const regex = /\${(\w+)}/g const found = placeholder.match(regex) diff --git a/frontend/src/views/Admin.jsx b/frontend/src/views/Admin.jsx index 6f869ff5..e3c0f921 100644 --- a/frontend/src/views/Admin.jsx +++ b/frontend/src/views/Admin.jsx @@ -149,7 +149,7 @@ const Admin = (props) => { response.json().then(responseJson => { console.log("RESP: ", responseJson) if (responseJson["success"] === false) { - alert.error("Failed stopping schedule") + alert.error("Failed deleting auth") } else { getAppAuthentication() alert.success("Successfully deleted authentication!") @@ -880,7 +880,7 @@ const Admin = (props) => { .then((responseJson) => { if (responseJson.success) { //console.log(responseJson.data) - console.log(responseJson) + //console.log(responseJson) setAuthentication(responseJson.data) } else { alert.error("Failed getting authentications") @@ -1001,7 +1001,7 @@ const Admin = (props) => { 6: "categories", } const setConfig = (event, newValue) => { - console.log("Value: ", newValue) + //console.log("Value: ", newValue) setCurTab(parseInt(newValue)) if (newValue === 1) { diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index bd450a0d..5e95de26 100644 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -5664,13 +5664,17 @@ const AngularWorkflow = (props) => { id="webhook_uri_field" onClick={() => { var copyText = document.getElementById("webhook_uri_field") - navigator.clipboard.writeText(copyText.value) - copyText.select() - copyText.setSelectionRange(0, 99999) /* For mobile devices */ + if (copyText !== undefined && copyText !== null) { + navigator.clipboard.writeText(copyText.value) + copyText.select() + copyText.setSelectionRange(0, 99999) /* For mobile devices */ - /* Copy the text inside the text field */ - document.execCommand("copy") - alert.success("Copied Webhook URL") + /* Copy the text inside the text field */ + document.execCommand("copy") + alert.success("Copied Webhook URL") + } else { + console.log("Couldn't find webhook URI field: ", copyText) + } }} InputProps={{ style:{ @@ -6848,6 +6852,8 @@ const AngularWorkflow = (props) => { /* Copy the text inside the text field */ document.execCommand("copy") alert.success("Copied data") + } else { + console.log("Failed to copy from "+elementName+": ", copyText) } } diff --git a/frontend/src/views/AppCreator.jsx b/frontend/src/views/AppCreator.jsx index e7ca5bd3..26e7c3ba 100644 --- a/frontend/src/views/AppCreator.jsx +++ b/frontend/src/views/AppCreator.jsx @@ -3,7 +3,7 @@ import { makeStyles } from '@material-ui/styles'; import {BrowserView, MobileView} from "react-device-detect"; import {Paper, Typography, FormControlLabel, Button, Divider, Select, MenuItem, FormControl, Switch, Dialog, DialogTitle, DialogContent, DialogActions, TextField, Tooltip, Breadcrumbs, CircularProgress, Chip} from '@material-ui/core'; -import {CheckCircle as CheckCircleIcon, AttachFile as AttachFileIcon, Apps as AppsIcon, ErrorOutline as ErrorOutlineIcon} from '@material-ui/icons'; +import {Add as AddIcon, CheckCircle as CheckCircleIcon, AttachFile as AttachFileIcon, Apps as AppsIcon, ErrorOutline as ErrorOutlineIcon} from '@material-ui/icons'; import {Link} from 'react-router-dom'; @@ -230,6 +230,12 @@ const AppCreator = (props) => { const [extraBodyFields, setExtraBodyFields] = useState([]) const [fileUploadEnabled, setFileUploadEnabled] = useState(false) const [actionAmount, setActionAmount] = useState(increaseAmount) + const defaultAuth = { + "name": "", + "type": "header", + "example": "hello", + } + const [extraAuth, setExtraAuth] = useState([defaultAuth]) //const [actions, setActions] = useState([{ // "name": "Get workflows", @@ -1413,6 +1419,98 @@ const AppCreator = (props) => { //console.log("Option: ", authenticationOption) //console.log("Location: ", parameterLocation) //console.log("Name: ", parameterName) + const extraKeys = +