diff --git a/backend/app_sdk/app_base.py b/backend/app_sdk/app_base.py index 76930cf5..a03df771 100644 --- a/backend/app_sdk/app_base.py +++ b/backend/app_sdk/app_base.py @@ -3312,7 +3312,7 @@ class AppBase: newres = json.dumps({ "success": False, - "reason": "An exception occurred while running this function. See exception for more details and contact support if this persists (support@shuffler.io)", + "reason": "An exception occurred while running this function (1). See exception for more details and contact support if this persists (support@shuffler.io)", "exception": e, }) break @@ -3343,7 +3343,7 @@ class AppBase: newres = json.dumps({ "success": False, - "reason": "An exception occurred while running this function. See exception for more details and contact support if this persists (support@shuffler.io)", + "reason": "An exception occurred while running this function (2). See exception for more details and contact support if this persists (support@shuffler.io)", "exception": e, }) break diff --git a/backend/go-app/docker.go b/backend/go-app/docker.go index 9ca293bf..38041ecf 100644 --- a/backend/go-app/docker.go +++ b/backend/go-app/docker.go @@ -2,9 +2,8 @@ package main // Docker import ( - "github.com/shuffle/shuffle-shared" - "archive/tar" + "github.com/shuffle/shuffle-shared" //"bufio" "path/filepath" //"strconv" diff --git a/backend/go-app/go.mod b/backend/go-app/go.mod index 02bdc660..9125a3e9 100644 --- a/backend/go-app/go.mod +++ b/backend/go-app/go.mod @@ -2,7 +2,7 @@ module main go 1.16 -//replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared +replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared //replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi //replace github.com/frikky/go-elasticsearch => ../../../../git/go-elasticsearch diff --git a/backend/go-app/main.go b/backend/go-app/main.go index f121a216..e6d27b19 100644 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -3187,6 +3187,7 @@ func buildSwaggerApp(resp http.ResponseWriter, body []byte, user shuffle.User) { return } + swagger.Info.Title = shuffle.FixFunctionName(swagger.Info.Title, swagger.Info.Title, false) if strings.Contains(swagger.Info.Title, " ") { swagger.Info.Title = strings.Replace(swagger.Info.Title, " ", "_", -1) } @@ -4800,7 +4801,6 @@ func runInit(ctx context.Context) { continue } - log.Printf("ENV: %s", item.Environment) if item.Environment == "cloud" { log.Printf("Skipping cloud schedule") continue diff --git a/frontend/public/images/Arrow.png b/frontend/public/images/Arrow.png new file mode 100644 index 00000000..56c7d85c Binary files /dev/null and b/frontend/public/images/Arrow.png differ diff --git a/frontend/src/defaultCytoscapeStyle.js b/frontend/src/defaultCytoscapeStyle.js index 3871db40..35c4b7f8 100644 --- a/frontend/src/defaultCytoscapeStyle.js +++ b/frontend/src/defaultCytoscapeStyle.js @@ -57,6 +57,7 @@ const data = [ padding: "0px", margin: "0px", "background-color": "data(backgroundcolor)", + "background-image": "data(backgroundimage)", "border-color": "#ffffff", "text-margin-x": "0px", "z-index": 4999, diff --git a/frontend/src/views/Admin.jsx b/frontend/src/views/Admin.jsx index a5ad30da..2885f71e 100644 --- a/frontend/src/views/Admin.jsx +++ b/frontend/src/views/Admin.jsx @@ -349,7 +349,6 @@ const Admin = (props) => { }) .then((response) => response.json().then((responseJson) => { - console.log("RESP: ", responseJson); if (responseJson["success"] === false) { alert.error("Failed deleting auth"); } else { @@ -825,7 +824,7 @@ const Admin = (props) => { handleGetDeals(orgId); } - setSelectedOrganization(responseJson); + setSelectedOrganization(responseJson) var lists = { active: { triggers: [], @@ -2381,7 +2380,7 @@ const Admin = (props) => { ) : ( - ); + ) return ( { margin: 4, backgroundColor: theme.palette.inputColor, color: "white", - minHeight: expanded ? 200 : "inherit", - maxHeight: expanded ? 200 : "inherit", + minHeight: expanded ? 250 : "inherit", + maxHeight: expanded ? 250 : "inherit", }} > @@ -2414,19 +2413,19 @@ const Admin = (props) => { {expanded ? (
- Usage:{" "} + Usage:  {props.data.limit === 0 ? ( - "Infinite" + "Unlimited" ) : ( - {props.data.usage} / {props.data.limit} + {props.data.usage} / {props.data.limit === "" ? "Unlimited" : props.data.limit} )} - + {/* Data sharing: {props.data.data_collection} - - Description: {secondary} + */} + Description: {secondary}
) : null} @@ -2935,7 +2934,7 @@ const Admin = (props) => { - Cloud sync features + Cloud sync features (monthly usage) {selectedOrganization.sync_features === undefined || @@ -2945,11 +2944,16 @@ const Admin = (props) => { key, index ) { - if (key === "schedule") { + // unnecessary parts + if (key === "schedule" || key === "apps" || key === "updates") { return null; } const item = selectedOrganization.sync_features[key]; + if (item === null) { + return null + } + const newkey = key.replaceAll("_", " "); const griditem = { primary: newkey, @@ -2960,7 +2964,8 @@ const Admin = (props) => { ? "Not defined yet" : item.description, limit: item.limit, - usage: 0, + usage: item.usage === undefined || + item.usage === null ? 0 : item.usage, data_collection: "None", active: item.active, icon: , @@ -4716,9 +4721,13 @@ const Admin = (props) => { primary="Orborus running" style={{ minWidth: 200, maxWidth: 200 }} /> + { ? environment.running_ip === undefined || environment.running_ip === null || environment.running_ip.length === 0 - ? "Not running" + ? +
+ Not running +
: environment.running_ip : "N/A" } @@ -4780,9 +4792,52 @@ const Admin = (props) => { overflow: "hidden", }} /> + + + { + const elementName = "copy_element_shuffle"; + const auth = environment.auth === "" ? 'cb5st3d3Z!3X3zaJ*Pc' : environment.auth + const commandData = `docker run -d --volume "/var/run/docker.sock:/var/run/docker.sock" -e ENVIRONMENT_NAME="${environment.Name}" -e 'AUTH=${auth}' -e ORG="${props.userdata.active_org.id}" -e DOCKER_API_VERSION=1.40 -e BASE_URL="https://shuffler.io" ghcr.io/frikky/shuffle-orborus:latest` + var copyText = document.getElementById(elementName); + if (copyText !== null && copyText !== undefined) { + const clipboard = navigator.clipboard; + if (clipboard === undefined) { + alert.error("Can only copy over HTTPS (port 3443)"); + return; + } + + navigator.clipboard.writeText(commandData); + copyText.select(); + copyText.setSelectionRange( + 0, + 99999 + ); /* For mobile devices */ + + /* Copy the text inside the text field */ + document.execCommand("copy"); + + alert.info("Orborus command copied to clipboard"); + } + }} + > + + + + } + /> + { }} color="primary" > - Clear executions + Clear diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index e608b668..a6a92d3b 100644 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -2815,17 +2815,23 @@ const AngularWorkflow = (defaultprops) => { cy.on("free", "node", (e) => onNodeDragStop(e, curaction)); } - console.log("Object: ", environments) + console.log("Object: ", environments, curaction.environment) if (environments !== undefined && environments !== null && (typeof environments === "array" || typeof environments === "object")) { + console.log("Type: ", typeof(environments)) + var parsedenv = environments - if (typeof environments === "object") { - parsedenv = [environments] + //if (typeof environments === "object") { + // parsedenv = [environments] + //} + + const envs = parsedenv.find((a) => a.Name === curaction.environment); + var env = environments[defaultEnvironmentIndex] + console.log("Inner envs: ", envs, curaction.environment) + if (envs !== undefined && envs !== null) { + env = envs } - var env = parsedenv.find((a) => a.Name === curaction.environment); - if (!env || env === undefined) { - env = parsedenv[defaultEnvironmentIndex]; - } + console.log("env: ", env) setSelectedActionEnvironment(env); } @@ -9426,6 +9432,31 @@ const AngularWorkflow = (defaultprops) => { /> +
Background-Image
+ { + selectedComment.backgroundimage = event.target.value; + console.log("Comment: ", selectedComment) + setSelectedComment(selectedComment); + }} + /> ); } @@ -14142,7 +14173,6 @@ const AngularWorkflow = (defaultprops) => { backgroundColor: surfaceColor, color: "white", minWidth: 600, - padding: 50, border: theme.palette.defaultBorder, }, }} @@ -14153,7 +14183,7 @@ const AngularWorkflow = (defaultprops) => { position: "absolute", top: 14, right: 14, - color: "grey", + color: "white", }} onClick={() => { setConfigureWorkflowModalOpen(false); diff --git a/frontend/src/views/AppCreator.jsx b/frontend/src/views/AppCreator.jsx index 2f6cc4ab..3645fa3c 100644 --- a/frontend/src/views/AppCreator.jsx +++ b/frontend/src/views/AppCreator.jsx @@ -1814,7 +1814,7 @@ const AppCreator = (defaultprops) => { for (var querykey in item.queries) { const queryitem = item.queries[querykey]; - if (queryitem === undefined || queryitem === null || queryitem.name === undefined || queryitem.name === null) { + if (queryitem === undefined || queryitem === null || queryitem.name === undefined || queryitem.name === null || queryitem.name === "") { continue } @@ -1824,7 +1824,6 @@ const AppCreator = (defaultprops) => { } querynames.push(queryitem.name.toLowerCase()) - if (queryitem.name.toLowerCase() == "url") { console.log(item.name + " uses a bad query: url"); continue; diff --git a/frontend/src/views/Apps.jsx b/frontend/src/views/Apps.jsx index cb93fd90..e20b103b 100644 --- a/frontend/src/views/Apps.jsx +++ b/frontend/src/views/Apps.jsx @@ -2265,7 +2265,7 @@ const Apps = (props) => {
- Create a new integration + Create a new app
diff --git a/frontend/src/views/Dashboard.jsx b/frontend/src/views/Dashboard.jsx index 6fff22af..fad0d5e4 100644 --- a/frontend/src/views/Dashboard.jsx +++ b/frontend/src/views/Dashboard.jsx @@ -776,8 +776,6 @@ const UsecaseListComponent = ({keys, isCloud, globalUrl, frameworkData, isLogged var baseTypeInfo = subcase.type !== undefined ? subcase.type : "communication" if (frameworkData !== undefined && frameworkData !== null) { if (frameworkData[baseTypeInfo] !== undefined && frameworkData[baseTypeInfo] !== null && subdata.app !== undefined && subdata.app !== null) { - console.log("Name: ", frameworkData[baseTypeInfo], baseTypeInfo) - console.log("Name2: ", subdata.app) if (frameworkData[baseTypeInfo].name !== undefined && frameworkData[baseTypeInfo].name.toLowerCase().replaceAll("_", " ") === subdata.app.toLowerCase().replaceAll("_", " ")) { highlight = true } diff --git a/frontend/src/views/GettingStarted.jsx b/frontend/src/views/GettingStarted.jsx index 392afce7..880b56b2 100644 --- a/frontend/src/views/GettingStarted.jsx +++ b/frontend/src/views/GettingStarted.jsx @@ -2373,6 +2373,12 @@ const GettingStarted = (props) => { +
+ + Need assistance? Ask our support team (it's free!). + + +
{/*
diff --git a/frontend/src/views/SettingsPage.jsx b/frontend/src/views/SettingsPage.jsx index 1bcd2344..2703ac94 100644 --- a/frontend/src/views/SettingsPage.jsx +++ b/frontend/src/views/SettingsPage.jsx @@ -1,5 +1,6 @@ import React, { useState, useEffect } from "react"; +import { useNavigate, Link } from "react-router-dom"; import { Grid, Typography, @@ -8,7 +9,6 @@ import { Divider, TextField, } from "@material-ui/core"; -import { Link } from "react-router-dom"; import { useAlert } from "react-alert"; import { useTheme } from "@material-ui/core/styles"; @@ -18,6 +18,7 @@ const Settings = (props) => { const { globalUrl, isLoaded, userdata, setUserData } = props; const theme = useTheme(); const alert = useAlert(); + let navigate = useNavigate(); const [username, setUsername] = useState(""); const [firstname, setFirstname] = useState(""); @@ -414,7 +415,15 @@ const Settings = (props) => { src={imageData} alt="Click to upload an image (174x174)" id="logo" + onClick={() => { + if (imageData !== theme.palette.defaultImage) { + navigate(`/creators/${userdata.public_username}`) + } else { + navigate(`/creators`) + } + }} style={{ + cursor: "pointer", maxWidth: 100, maxHeight: 100, minWidth: 100, @@ -810,7 +819,7 @@ const Settings = (props) => { ) : null}
- {userdata !== undefined && + {/*userdata !== undefined && userdata.eth_info !== undefined && userdata.eth_info.account !== undefined && userdata.eth_info.account.length > 0 ? ( @@ -868,7 +877,7 @@ const Settings = (props) => { > Authenticate Metamask Wallet - )} + )*/}
diff --git a/frontend/src/views/Workflows.jsx b/frontend/src/views/Workflows.jsx index 658f2e87..b8f2c62a 100644 --- a/frontend/src/views/Workflows.jsx +++ b/frontend/src/views/Workflows.jsx @@ -1075,6 +1075,7 @@ const Workflows = (props) => { minWidth: isMobile ? "100%" : 1024, maxWidth: isMobile ? "100%" : 1024, margin: "auto", + paddingBottom: 200, }; const emptyWorkflowStyle = { @@ -1145,9 +1146,11 @@ const Workflows = (props) => { for (var key in data.triggers) { const trigger = data.triggers[key]; if (trigger.app_name === "Shuffle Workflow") { - if (trigger.parameters.length > 2) { - trigger.parameters[2].value = ""; - } + if (trigger.parameters !== null && trigger.parameters !== undefined) { + if (trigger.parameters.length > 2) { + trigger.parameters[2].value = ""; + } + } } if (trigger.status === "running") { @@ -3500,7 +3503,13 @@ const Workflows = (props) => { {exportVerifyModal} {publishModal} {workflowDownloadModalOpen} - + {/*
+ + Need assistance? Ask our support team (it's free!). + + +
*/} + ) : (