Merge branch '1.3.0' of github.com:Shuffle/Shuffle into 1.2.0

This commit is contained in:
Aditya
2023-08-03 09:29:16 +05:30
31 changed files with 343 additions and 1738 deletions
+11 -10
View File
@@ -3556,15 +3556,15 @@ class AppBase:
if "the JSON object must be" in errorstring: if "the JSON object must be" in errorstring:
self.logger.info("[ERROR] Something is wrong with the input for this function. Are lists and JSON data handled parsed properly (0)? the JSON object must be in...") self.logger.info("[ERROR] Something is wrong with the input for this function. Are lists and JSON data handled parsed properly (0)? the JSON object must be in...")
try: #try:
e = json.loads(f"{e}") # e = json.loads(f"{e}")
except: #except:
e = f"{e}" # e = f"{e}"
newres = json.dumps({ newres = json.dumps({
"success": False, "success": False,
"reason": "An exception occurred while running this function (1). 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, "exception": f"{type(e).__name__} - {e}",
}) })
break break
elif "got an unexpected keyword argument" in errorstring: elif "got an unexpected keyword argument" in errorstring:
@@ -3587,15 +3587,16 @@ class AppBase:
except Exception as e: except Exception as e:
self.logger.info(f"[ERROR] Something is wrong with the input for this function. Are lists and JSON data handled parsed properly (1)? err: {e}") self.logger.info(f"[ERROR] Something is wrong with the input for this function. Are lists and JSON data handled parsed properly (1)? err: {e}")
try: #try:
e = json.loads(f"{e}") # e = json.loads(f"{e}")
except: #except:
e = f"{e}" # e = f"{e}"
newres = json.dumps({ newres = json.dumps({
"success": False, "success": False,
"reason": "An exception occurred while running this function (2). 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, "exception": f"{type(e).__name__} - {e}",
}) })
break break
+20
View File
@@ -0,0 +1,20 @@
# Run
go run main.go walkoff.go docker.go
## Modify
- Make sure it's connected with the latest version of the shuffle-shared library, which is used to get resources from Shuffle
## Database
- The database is Opensearch and can be modified with the SHUFFLE_OPENSEARCH_URL environment variable. See .env in the root directory for more. This requires Opensearch to be running (typically started from docker-compose.yml)
```
docker-compose up -d
docker stop shuffle-backend
docker stop shuffle-frontend
docker stop shuffle-orborus
```
## Caching
- To handle caching, it by default runs it in memory of the application itself. If you want to offload this, it can be done using the SHUFFLE_MEMCACHED environment variable, connecting to a memcached instance.
```
docker run --name shuffle-cache -p 11211:11211 -d memcached -m 1024
```
+1 -2
View File
@@ -1064,7 +1064,6 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
} }
org, err := shuffle.GetOrg(ctx, item) org, err := shuffle.GetOrg(ctx, item)
_ = err
if len(org.Id) > 0 { if len(org.Id) > 0 {
userOrgs = append(userOrgs, shuffle.OrgMini{ userOrgs = append(userOrgs, shuffle.OrgMini{
Id: org.Id, Id: org.Id,
@@ -1073,7 +1072,7 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
Image: org.Image, Image: org.Image,
}) })
} else { } else {
log.Printf("[WARNING] Failed to get org %s for user %s", item, userInfo.Username) log.Printf("[WARNING] Failed to get org %s (%s) for user %s. Error: %#v", org.Name, item, userInfo.Username, err)
} }
} }
+19 -28
View File
@@ -4,30 +4,25 @@
"version": "1.3.0", "version": "1.3.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@codemirror/commands": "^6.2.2", "@codemirror/commands": "^6.2.4",
"@emotion/is-prop-valid": "^1.1.1", "@emotion/is-prop-valid": "^1.1.1",
"@emotion/react": "^11.7.0", "@emotion/react": "^11.11.1",
"@emotion/styled": "^11.6.0", "@emotion/styled": "^11.11.0",
"@lezer/highlight": "^1.1.3", "@lezer/highlight": "^1.1.3",
"@metamask/detect-provider": "^1.2.0",
"@mui/icons-material": "^5.14.0", "@mui/icons-material": "^5.14.0",
"@mui/material": "^5.2.3", "@mui/material": "^5.14.0",
"@mui/styles": "^5.14.0", "@mui/styles": "^5.14.0",
"@mui/x-data-grid": "^5.17.11", "@mui/x-data-grid": "^5.17.11",
"@uiw/codemirror-themes": "^4.19.9", "@uiw/codemirror-themes": "^4.21.7",
"@uiw/react-codemirror": "^3.2.1", "@uiw/react-codemirror": "^4.21.7",
"@use-it/interval": "^1.0.0", "@use-it/interval": "^1.0.0",
"algoliasearch": "^4.13.1", "algoliasearch": "^4.13.1",
"calculate-size": "^1.1.1",
"class-transformer": "^0.4.0", "class-transformer": "^0.4.0",
"create-react-app": "^5.0.1", "create-react-app": "^5.0.1",
"cytoscape": "^3.15.1", "cytoscape": "^3.15.1",
"cytoscape-clipboard": "^2.2.1",
"cytoscape-cxtmenu": "^3.1.1",
"cytoscape-edgehandles": "^3.6.0", "cytoscape-edgehandles": "^3.6.0",
"cytoscape-grid-guide": "~2.3.3",
"cytoscape-node-html-label": "^1.1.5", "cytoscape-node-html-label": "^1.1.5",
"cytoscape-panzoom": "^2.5.2",
"cytoscape-undo-redo": "^1.3.2",
"d3": "^7.1.1", "d3": "^7.1.1",
"dotenv": "^6.1.0", "dotenv": "^6.1.0",
"downshift": "^3.3.5", "downshift": "^3.3.5",
@@ -41,8 +36,6 @@
"jss-nested": "^6.0.1", "jss-nested": "^6.0.1",
"jss-props-sort": "^6.0.0", "jss-props-sort": "^6.0.0",
"jss-vendor-prefixer": "^8.0.1", "jss-vendor-prefixer": "^8.0.1",
"material-icons": "^0.7.7",
"material-icons-react": "^1.0.4",
"material-ui-chip-input": "^2.0.0-beta.2", "material-ui-chip-input": "^2.0.0-beta.2",
"md5-file": "^4.0.0", "md5-file": "^4.0.0",
"mdbreact": "^4.21.1", "mdbreact": "^4.21.1",
@@ -51,43 +44,41 @@
"mui-nested-menu": "^3.2.1", "mui-nested-menu": "^3.2.1",
"process": "^0.11.10", "process": "^0.11.10",
"react": "^18.2.0", "react": "^18.2.0",
"react-alert": "^5.5.0", "react-alert": "^7.0.3",
"react-alert-template-basic": "^1.0.0", "react-alert-template-basic": "^1.0.0",
"react-alice-carousel": "^2.6.4", "react-alice-carousel": "^2.6.4",
"react-avatar-editor": "^11.1.0", "react-avatar-editor": "^11.1.0",
"react-beforeunload": "^2.2.1", "react-beforeunload": "^2.2.1",
"react-chartjs-2": "^2.11.1", "react-chartjs-2": "^2.11.1",
"react-cookie": "^4.0.1", "react-cookie": "^4.0.1",
"react-cytoscapejs": "^1.2.0", "react-cytoscapejs": "^2.0.0",
"react-device-detect": "^1.9.10", "react-device-detect": "^2.2.3",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-draggable": "^3.3.2", "react-draggable": "^3.3.2",
"react-driftjs": "^1.2.2", "react-driftjs": "^1.2.2",
"react-dropzone": "^10.1.10", "react-dropzone": "^14.2.3",
"react-ga4": "^2.0.0", "react-ga4": "^2.0.0",
"react-iframe": "^1.8.0",
"react-instantsearch-dom": "^6.28.0", "react-instantsearch-dom": "^6.28.0",
"react-json-pretty": "^2.2.0", "react-json-pretty": "^2.2.0",
"react-json-view": "^1.19.1", "react-json-view": "^1.21.3",
"react-markdown": "^8.0.7", "react-markdown": "^8.0.7",
"react-markdown-github": "^3.3.1", "react-markdown-github": "^3.3.1",
"react-powerhooks": "0.0.7", "react-powerhooks": "^0.0.7",
"react-router": "6.2.1", "react-router": "^6.14.1",
"react-router-dom": "6.2.1", "react-router-dom": "^6.14.1",
"react-scripts": "^5.0.1", "react-scripts": "^5.0.1",
"react-shepherd": "^3.3.6", "reaviz": "^14.9.4",
"reactstrap": "^7.1.0", "remark-gfm": "^3.0.1",
"reaviz": "^12.1.0",
"search-insights": "^2.2.1", "search-insights": "^2.2.1",
"shellwords": "^0.1.1", "shellwords": "^0.1.1",
"simplebar": "^4.2.3", "simplebar": "^4.2.3",
"styled-components": "^4.4.0", "styled-components": "^4.4.0",
"yaml": "^1.7.2", "yaml": "^1.7.2",
"yamljs": "^0.3.0", "yamljs": "^0.3.0",
"zone.js": "~0.11.4" "zone.js": "^0.13.1"
}, },
"scripts": { "scripts": {
"start": "HTTPS=false&&PORT=3000 react-scripts --openssl-legacy-provider start", "start": "HTTPS=false&&PORT=3000 GENERATE_SOURCEMAP=false react-scripts --openssl-legacy-provider start",
"build": "react-scripts build", "build": "react-scripts build",
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject", "eject": "react-scripts eject",
+2 -115
View File
@@ -30,6 +30,7 @@ import SettingsPage from "./views/SettingsPage";
import KeepAlive from "./views/KeepAlive.jsx"; import KeepAlive from "./views/KeepAlive.jsx";
import { ThemeProvider } from "@mui/material/styles"; import { ThemeProvider } from "@mui/material/styles";
import CssBaseline from '@mui/material/CssBaseline';
import UpdateAuthentication from "./views/UpdateAuthentication.jsx"; import UpdateAuthentication from "./views/UpdateAuthentication.jsx";
import FrameworkWrapper from "./views/FrameworkWrapper.jsx"; import FrameworkWrapper from "./views/FrameworkWrapper.jsx";
@@ -38,7 +39,6 @@ import AlertTemplate from "./components/AlertTemplate";
import { useAlert, positions, Provider } from "react-alert"; import { useAlert, positions, Provider } from "react-alert";
import { isMobile } from "react-device-detect"; import { isMobile } from "react-device-detect";
import detectEthereumProvider from "@metamask/detect-provider";
import Drift from "react-driftjs"; import Drift from "react-driftjs";
// Production - backend proxy forwarding in nginx // Production - backend proxy forwarding in nginx
@@ -143,120 +143,6 @@ const App = (message, props) => {
} }
// Handling Ethereum update // Handling Ethereum update
{/*
detectEthereumProvider().then((provider) => {
if (
provider &&
userInfo.eth_info !== undefined &&
userInfo.eth_info !== null
) {
if (
userInfo.eth_info.account !== undefined &&
userInfo.eth_info.account !== null &&
userInfo.eth_info.account.length === 0
) {
userInfo.eth_info = {};
var method = "eth_requestAccounts";
var params = [];
provider
.request({
method: method,
params,
})
.then((result) => {
if (
result !== undefined &&
result !== null &&
result.length > 0
) {
userInfo.eth_info.account = result[0];
// Getting and setting balance for the current user
method = "eth_getBalance";
params = [userInfo.eth_info.account, "latest"];
provider
.request({
method: method,
params,
})
.then((result) => {
if (
result !== undefined &&
result !== null &&
result.length > 0
) {
userInfo.parsed_balance =
result / 1000000000000000000;
} else {
alert.error("Couldn't find balance: ", result);
}
// The result varies by RPC method.
// For example, this method will return a transaction hash hexadecimal string on success.
})
.catch((error) => {
// If the request fails, the Promise will reject with an error.
alert.error(
"Failed getting info from ethereum API: " + error
);
});
} else {
alert.error("Couldn't find any user: ", result);
}
})
.catch((error) => {
// If the request fails, the Promise will reject with an error.
alert.error(
"Failed getting info from ethereum API: " + error
);
});
}
// Register hooks here
provider.on("message", (event) => {
alert.info("Message from MetaMask: ", event);
});
provider.on("chainChanged", (chainId) => {
console.log("Changed chain to: ", chainId);
method = "eth_getBalance";
params = [userInfo.eth_info.account, "latest"];
provider
.request({
method: method,
params,
})
.then((result) => {
console.log("Got result: ", result);
if (result !== undefined && result !== null) {
userInfo.eth_info.balance = result;
userInfo.eth_info.parsed_balance =
result / 1000000000000000000;
console.log("INFO: ", userInfo);
setUserData(userInfo);
} else {
alert.error("Couldn't find balance: ", result);
}
})
.catch((error) => {
// If the request fails, the Promise will reject with an error.
alert.error(
"Failed getting info from ethereum API: " + error
);
});
});
}
});
if (
userInfo.eth_info !== undefined &&
userInfo.eth_info.balance !== undefined
) {
//console.log(userInfo.eth_info.balance)
userInfo.eth_info.parsed_balance =
userInfo.eth_info.balance / 1000000000000000000;
}
*/}
//console.log("USER: ", userInfo) //console.log("USER: ", userInfo)
setUserData(userInfo); setUserData(userInfo);
@@ -668,6 +554,7 @@ const App = (message, props) => {
return ( return (
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<CssBaseline />
<CookiesProvider> <CookiesProvider>
<BrowserRouter> <BrowserRouter>
<Provider template={AlertTemplate} {...options}> <Provider template={AlertTemplate} {...options}>
@@ -14,7 +14,7 @@ import {
List, List,
ListItem, ListItem,
ListItemText, ListItemText,
Fade, Collapse,
} from "@mui/material"; } from "@mui/material";
import { import {
FavoriteBorder as FavoriteBorderIcon, FavoriteBorder as FavoriteBorderIcon,
@@ -506,13 +506,6 @@ const ConfigureWorkflow = (props) => {
borderRadius: 5, borderRadius: 5,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
minHeight: 50,
marginLeft: 5,
maxWidth: "95%",
fontSize: "1em",
},
endAdornment: <InputAdornment position="end"></InputAdornment>, endAdornment: <InputAdornment position="end"></InputAdornment>,
}} }}
fullWidth fullWidth
@@ -1084,7 +1077,6 @@ const ConfigureWorkflow = (props) => {
</Button> </Button>
*/} */}
<Button <Button
color="textSecondary"
variant={"outlined"} variant={"outlined"}
style={{}} style={{}}
onClick={() => { onClick={() => {
+9 -1
View File
@@ -56,7 +56,11 @@ const Dropzone = ({ children, style, onDrop }) => {
}; };
useEffect(() => { useEffect(() => {
if (!dropzoneRef.current) return; if (dropzoneRef === null || dropzoneRef === undefined || dropzoneRef.current === null || dropzoneRef.current === undefined) {
return
}
// Check if event listene exists for dropzoneRef.current
dropzoneRef.current.addEventListener("dragover", handleDragOver); dropzoneRef.current.addEventListener("dragover", handleDragOver);
dropzoneRef.current.addEventListener("dragenter", handleDragEnter); dropzoneRef.current.addEventListener("dragenter", handleDragEnter);
@@ -64,6 +68,10 @@ const Dropzone = ({ children, style, onDrop }) => {
dropzoneRef.current.addEventListener("drop", handleDrop); dropzoneRef.current.addEventListener("drop", handleDrop);
return () => { return () => {
if (dropzoneRef.current === null || dropzoneRef.current === undefined) {
return
}
dropzoneRef.current.removeEventListener("dragover", handleDragOver); dropzoneRef.current.removeEventListener("dragover", handleDragOver);
dropzoneRef.current.removeEventListener("dragenter", handleDragEnter); dropzoneRef.current.removeEventListener("dragenter", handleDragEnter);
dropzoneRef.current.removeEventListener("dragleave", handleDragLeave); dropzoneRef.current.removeEventListener("dragleave", handleDragLeave);
+4 -12
View File
@@ -688,7 +688,7 @@ const { globalUrl, setNotifications, notifications, isLoggedIn, removeCookie, ho
{/* {/*
<PolymerIcon style={{marginRight: "5px"}} /> <PolymerIcon style={{marginRight: "5px"}} />
*/} */}
<span style={{marginTop: 0, marginRight: 8, }}>Workflows</span> <Typography style={{marginTop: 5, marginRight: 8, }}>Workflows</Typography>
</div> </div>
</Link> </Link>
</ListItem> </ListItem>
@@ -698,24 +698,17 @@ const { globalUrl, setNotifications, notifications, isLoggedIn, removeCookie, ho
{/* {/*
<AppsIcon style={{marginRight: "5px"}} /> <AppsIcon style={{marginRight: "5px"}} />
*/} */}
<span style={{marginTop: 0, marginRight: 5, }}>Apps</span> <Typography style={{marginTop: 5, marginRight: 5, }}>Apps</Typography>
</div> </div>
</Link> </Link>
</ListItem> </ListItem>
{/*
<ListItem style={{textAlign: "center"}}>
<Link to="/dashboard" style={hrefStyle}>
<div onMouseOver={handleDocsHover} onMouseOut={handleDocsHoverOut} style={{color: DocsHoverColor, cursor: "pointer"}}>Dashboard</div>
</Link>
</ListItem>
*/}
<ListItem style={listItemStyle}> <ListItem style={listItemStyle}>
<Link to="/docs" style={hrefStyle}> <Link to="/docs" style={hrefStyle}>
<div onMouseOver={handleDocsHover} onMouseOut={handleDocsHoverOut} style={{color: DocsHoverColor, cursor: "pointer", display: "flex"}}> <div onMouseOver={handleDocsHover} onMouseOut={handleDocsHoverOut} style={{color: DocsHoverColor, cursor: "pointer", display: "flex"}}>
{/* {/*
<DescriptionIcon style={{marginRight: "5px"}} /> <DescriptionIcon style={{marginRight: "5px"}} />
*/} */}
<span style={{marginTop: 0,}}>Docs</span> <Typography style={{marginTop: 5,}}>Docs</Typography>
</div> </div>
</Link> </Link>
</ListItem> </ListItem>
@@ -796,8 +789,7 @@ const { globalUrl, setNotifications, notifications, isLoggedIn, removeCookie, ho
: :
<span style={{paddingTop: 12, }}> <span style={{paddingTop: 12, }}>
<Select <Select
disableunderline
disableUnderline
SelectDisplayProps={{ SelectDisplayProps={{
style: { style: {
maxWidth: 50, maxWidth: 50,
+1 -1
View File
@@ -36,7 +36,7 @@ import {
Breadcrumbs, Breadcrumbs,
CircularProgress, CircularProgress,
Switch, Switch,
Fade, Collapse,
} from "@mui/material"; } from "@mui/material";
import { import {
LockOpen as LockOpenIcon, LockOpen as LockOpenIcon,
+11 -7
View File
@@ -1,15 +1,17 @@
import React, { useEffect } from "react"; import React, { useEffect } from "react";
import theme from '../theme.jsx'; import theme from '../theme.jsx';
import { makeStyles } from "@mui/styles"; import { makeStyles } from "@mui/styles";
import { useTheme } from "@material-ui/core/styles";
import Tooltip from "@material-ui/core/Tooltip"; import {
import Grid from "@material-ui/core/Grid"; Tooltip,
import Button from "@material-ui/core/Button"; Grid,
import TextField from "@material-ui/core/TextField"; Button,
import Typography from "@material-ui/core/Typography"; TextField,
Typography,
IconButton,
} from "@mui/material";
import { useAlert } from "react-alert"; import { useAlert } from "react-alert";
import IconButton from "@material-ui/core/IconButton";
import { import {
ExpandLess as ExpandLessIcon, ExpandLess as ExpandLessIcon,
@@ -99,6 +101,7 @@ const OrgHeader = (props) => {
//console.log("USER: ", userdata) //console.log("USER: ", userdata)
const orgSaveButton = ( const orgSaveButton = (
<Tooltip title="Save any unsaved data" placement="bottom"> <Tooltip title="Save any unsaved data" placement="bottom">
<div>
<Button <Button
style={{ width: 150, height: 55, flex: 1 }} style={{ width: 150, height: 55, flex: 1 }}
variant="contained" variant="contained"
@@ -120,6 +123,7 @@ const OrgHeader = (props) => {
> >
<SaveIcon /> <SaveIcon />
</Button> </Button>
</div>
</Tooltip> </Tooltip>
); );
@@ -201,6 +201,7 @@ const OrgHeaderexpanded = (props) => {
const orgSaveButton = ( const orgSaveButton = (
<Tooltip title="Save any unsaved data" placement="bottom"> <Tooltip title="Save any unsaved data" placement="bottom">
<div>
<Button <Button
style={{ width: 150, height: 55, flex: 1 }} style={{ width: 150, height: 55, flex: 1 }}
variant="contained" variant="contained"
@@ -237,6 +238,7 @@ const OrgHeaderexpanded = (props) => {
> >
<SaveIcon /> <SaveIcon />
</Button> </Button>
</div>
</Tooltip> </Tooltip>
); );
+17 -30
View File
@@ -43,7 +43,7 @@ import {
Breadcrumbs, Breadcrumbs,
CircularProgress, CircularProgress,
Switch, Switch,
Fade, Collapse,
Autocomplete Autocomplete
} from "@mui/material"; } from "@mui/material";
@@ -1159,6 +1159,8 @@ const ParsedAction = (props) => {
const iconInfo = GetIconInfo({ name: data.app_name }); const iconInfo = GetIconInfo({ name: data.app_name });
const useIcon = iconInfo.originalIcon; const useIcon = iconInfo.originalIcon;
console.log("Actionname 1: ", newActionname)
newActionname = ( newActionname = (
newActionname.charAt(0).toUpperCase() + newActionname.charAt(0).toUpperCase() +
newActionname.substring(1) newActionname.substring(1)
@@ -1362,7 +1364,7 @@ const ParsedAction = (props) => {
} }
var disabled = false; var disabled = false;
var rows = "5"; var rows = "3";
var openApiHelperText = "This is an OpenAPI specific field"; var openApiHelperText = "This is an OpenAPI specific field";
/* /*
if ( if (
@@ -1585,13 +1587,6 @@ const ParsedAction = (props) => {
fontSize: "1em", fontSize: "1em",
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
minHeight: 50,
marginLeft: 5,
maxWidth: "95%",
fontSize: "1em",
},
disableUnderline: true, disableUnderline: true,
endAdornment: hideExtraTypes ? null : ( endAdornment: hideExtraTypes ? null : (
<InputAdornment position="end"> <InputAdornment position="end">
@@ -1940,13 +1935,6 @@ const ParsedAction = (props) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
minHeight: 50,
marginLeft: "5px",
maxWidth: "95%",
fontSize: "1em",
},
endAdornment: hideExtraTypes ? null : ( endAdornment: hideExtraTypes ? null : (
<InputAdornment position="end"> <InputAdornment position="end">
<Tooltip title="Autocomplete text" placement="top"> <Tooltip title="Autocomplete text" placement="top">
@@ -1969,7 +1957,7 @@ const ParsedAction = (props) => {
helperText={returnHelperText(data.name, data.value)} helperText={returnHelperText(data.name, data.value)}
fullWidth fullWidth
multiline={multiline} multiline={multiline}
rows="5" rows={"3"}
color="primary" color="primary"
defaultValue={data.value} defaultValue={data.value}
type={"text"} type={"text"}
@@ -3166,14 +3154,6 @@ const ParsedAction = (props) => {
<span> <span>
<Typography style={{color: "rgba(255,255,255,0.7)"}}>Delay</Typography> <Typography style={{color: "rgba(255,255,255,0.7)"}}>Delay</Typography>
<TextField <TextField
style={{
backgroundColor: theme.palette.inputColor,
borderRadius: theme.palette.borderRadius,
color: "white",
width: 50,
height: 50,
fontSize: "1em",
}}
InputProps={{ InputProps={{
style: theme.palette.innerTextfieldStyle, style: theme.palette.innerTextfieldStyle,
disableUnderline: true, disableUnderline: true,
@@ -3511,6 +3491,8 @@ const ParsedAction = (props) => {
return null; return null;
} }
console.log("OPTION: ", option)
const newname = ( const newname = (
option.name.charAt(0).toUpperCase() + option.name.substring(1) option.name.charAt(0).toUpperCase() + option.name.substring(1)
).replaceAll("_", " "); ).replaceAll("_", " ");
@@ -3533,7 +3515,7 @@ const ParsedAction = (props) => {
}); });
} }
}} }}
renderOption={(data) => { renderOption={(props, data, state) => {
var newActionname = data.name; var newActionname = data.name;
if (data.label !== undefined && data.label !== null && data.label.length > 0) { if (data.label !== undefined && data.label !== null && data.label.length > 0) {
newActionname = data.label; newActionname = data.label;
@@ -3550,10 +3532,15 @@ const ParsedAction = (props) => {
const iconInfo = GetIconInfo({ name: data.name }); const iconInfo = GetIconInfo({ name: data.name });
const useIcon = iconInfo.originalIcon; const useIcon = iconInfo.originalIcon;
newActionname = ( if (newActionname === undefined || newActionname === null) {
newActionname.charAt(0).toUpperCase() + newActionname = "No name"
newActionname.substring(1) data.name = "No name"
).replaceAll("_", " "); data.label = "No name"
}
console.log("Name: ", newActionname)
newActionname = (newActionname.charAt(0).toUpperCase() + newActionname.substring(1)).replaceAll("_", " ");
var method = "" var method = ""
var extraDescription = "" var extraDescription = ""
+1 -1
View File
@@ -9,7 +9,7 @@ function ScrollToTop({ getUserNotifications, curpath, setCurpath, history }) {
useEffect(() => { useEffect(() => {
// Custom handler for certain scroll mechanics // Custom handler for certain scroll mechanics
// //
console.log("OLD: ", curpath, "NeW: ", window.location.pathname) //console.log("OLD: ", curpath, "NeW: ", window.location.pathname)
if (curpath === window.location.pathname && curpath === "/usecases") { if (curpath === window.location.pathname && curpath === "/usecases") {
} else { } else {
+5 -3
View File
@@ -206,11 +206,12 @@ const SearchField = props => {
const avatar = baseImage const avatar = baseImage
var parsedUrl = isCloud ? `/workflows/${hit.objectID}` : `https://shuffler.io/workflows/${hit.objectID}` var parsedUrl = isCloud ? `/workflows/${hit.objectID}` : `https://shuffler.io/workflows/${hit.objectID}`
parsedUrl += `?queryID=${hit.__queryID}` parsedUrl += `?queryID=${hit.__queryID}`
// <a rel="noopener noreferrer" href="https://www.algolia.com/" target="_blank" style={{textDecoration: "none", color: "white"}}> // <a rel="noopener noreferrer" href="https://www.algolia.com/" target="_blank" style={{textDecoration: "none", color: "white"}}>
return ( return (
<Link key={hit.objectID} to={{ pathname: parsedUrl }} rel="noopener noreferrer" style={{textDecoration: "none", color: "white",}} onClick={(event) => { <Link key={hit.objectID} to={parsedUrl} rel="noopener noreferrer" style={{textDecoration: "none", color: "white",}} onClick={(event) => {
//console.log("CLICK") //console.log("CLICK")
setSearchOpen(true) setSearchOpen(true)
@@ -402,7 +403,7 @@ const SearchField = props => {
parsedUrl += `?queryID=${hit.__queryID}` parsedUrl += `?queryID=${hit.__queryID}`
return ( return (
<Link key={hit.objectID} to={{ pathname: parsedUrl }} style={{textDecoration: "none", color: "white",}} onClick={(event) => { <Link key={hit.objectID} to={parsedUrl} style={{textDecoration: "none", color: "white",}} onClick={(event) => {
console.log("CLICK") console.log("CLICK")
setSearchOpen(true) setSearchOpen(true)
@@ -558,7 +559,8 @@ const SearchField = props => {
if (parsedUrl.includes("/apps/")) { if (parsedUrl.includes("/apps/")) {
const extraHash = hit.url_hash === undefined ? "" : `#${hit.url_hash}` const extraHash = hit.url_hash === undefined ? "" : `#${hit.url_hash}`
parsedUrl = `/apps/${hit.filename}?tab=docs&queryID=${hit.__queryID}${extraHash}` parsedUrl = `/apps/${hit.filename}`
parsedUrl += `?tab=docs&queryID=${hit.__queryID}${extraHash}`
} }
return ( return (
@@ -46,10 +46,10 @@ import ReactJson from "react-json-view";
import PaperComponent from "../components/PaperComponent.jsx"; import PaperComponent from "../components/PaperComponent.jsx";
import CodeMirror from '@uiw/react-codemirror'; import CodeMirror from '@uiw/react-codemirror';
import 'codemirror/keymap/sublime'; //import 'codemirror/keymap/sublime';
import 'codemirror/addon/selection/mark-selection.js' //import 'codemirror/addon/selection/mark-selection.js'
import 'codemirror/theme/gruvbox-dark.css'; //import 'codemirror/theme/gruvbox-dark.css';
import 'codemirror/theme/duotone-light.css'; //import 'codemirror/theme/duotone-light.css';
import {indentWithTab} from "@codemirror/commands" import {indentWithTab} from "@codemirror/commands"
import { padding, textAlign } from '@mui/system'; import { padding, textAlign } from '@mui/system';
import data from '../frameworkStyle.jsx'; import data from '../frameworkStyle.jsx';
+7 -7
View File
@@ -16,7 +16,7 @@ import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';
import theme from '../theme.jsx'; import theme from '../theme.jsx';
import { import {
Button, Button,
Fade, Collapse,
IconButton, IconButton,
FormGroup, FormGroup,
FormControl, FormControl,
@@ -506,7 +506,7 @@ const WelcomeForm = (props) => {
switch (step) { switch (step) {
case 0: case 0:
return ( return (
<Fade in={true}> <Collapse in={true}>
<Grid container spacing={1} style={{margin: "auto", maxWidth: 500, minWidth: 500, minHeight: sizing, maxHeight: sizing, }}> <Grid container spacing={1} style={{margin: "auto", maxWidth: 500, minWidth: 500, minHeight: sizing, maxHeight: sizing, }}>
{/*isCloud ? null : {/*isCloud ? null :
<Typography variant="body1" style={{marginLeft: 8, marginTop: 10, marginRight: 30, }} color="textSecondary"> <Typography variant="body1" style={{marginLeft: 8, marginTop: 10, marginRight: 30, }} color="textSecondary">
@@ -587,11 +587,11 @@ const WelcomeForm = (props) => {
</FormControl> </FormControl>
</Grid> </Grid>
</Grid> </Grid>
</Fade> </Collapse>
) )
case 1: case 1:
return ( return (
<Fade in={true}> <Collapse in={true}>
<div style={{minHeight: sizing, maxHeight: sizing, marginTop: 20, maxWidth: 500, }}> <div style={{minHeight: sizing, maxHeight: sizing, marginTop: 20, maxWidth: 500, }}>
<Typography variant="body1" style={{marginLeft: 8, marginTop: 50, marginRight: 30, marginBottom: 0, }} color="textSecondary"> <Typography variant="body1" style={{marginLeft: 8, marginTop: 50, marginRight: 30, marginBottom: 0, }} color="textSecondary">
Apps for each category are shown based on your activity and can be changed by clicking their icon. We will help you connect them later. Apps for each category are shown based on your activity and can be changed by clicking their icon. We will help you connect them later.
@@ -684,11 +684,11 @@ const WelcomeForm = (props) => {
</Grid> </Grid>
*/} */}
</div> </div>
</Fade> </Collapse>
) )
case 2: case 2:
return ( return (
<Fade in={true}> <Collapse in={true}>
<div style={{marginTop: 0, maxWidth: 700, minWidth: 700, margin: "auto", minHeight: sizing, maxHeight: sizing, }}> <div style={{marginTop: 0, maxWidth: 700, minWidth: 700, margin: "auto", minHeight: sizing, maxHeight: sizing, }}>
<Typography variant="body1" style={{marginTop: 15, marginBottom: 0, maxWidth: 500, margin: "auto", marginBottom: 15, }} color="textSecondary"> <Typography variant="body1" style={{marginTop: 15, marginBottom: 0, maxWidth: 500, margin: "auto", marginBottom: 15, }} color="textSecondary">
These are some of our Workflow templates, used to start new Workflows. Use the right and left buttons to find <a href="/usecases" target="_blank" rel="norefferer" style={{color: "#f86a3e", textDecoration: "none", }}>new Usecases</a>, and click the orange button to build it. These are some of our Workflow templates, used to start new Workflows. Use the right and left buttons to find <a href="/usecases" target="_blank" rel="norefferer" style={{color: "#f86a3e", textDecoration: "none", }}>new Usecases</a>, and click the orange button to build it.
@@ -755,7 +755,7 @@ const WelcomeForm = (props) => {
</div> </div>
</div> </div>
</div> </div>
</Fade> </Collapse>
) )
default: default:
return "unknown step" return "unknown step"
-432
View File
@@ -1,432 +0,0 @@
const data = [
{
selector: "node",
css: {
label: "data(label)",
"text-valign": "center",
"font-family":
"Segoe UI, Tahoma, Geneva, Verdana, sans-serif, sans-serif",
"font-weight": "lighter",
"margin-right": "10px",
"font-size": "18px",
width: "80px",
height: "80px",
color: "white",
padding: "10px",
margin: "5px",
"border-width": "1px",
"text-margin-x": "10px",
"z-index": 5001,
},
},
{
selector: "edge",
css: {
"target-arrow-shape": "triangle",
"target-arrow-color": "grey",
"curve-style": "unbundled-bezier",
label: "data(label)",
"text-margin-y": "-15px",
width: "5px",
color: "white",
"line-fill": "linear-gradient",
"line-gradient-stop-positions": ["0.0", "100"],
"line-gradient-stop-colors": ["grey", "grey"],
"z-index": 5001,
},
},
{
selector: `node[type="ACTION"]`,
css: {
shape: "roundrectangle",
"background-color": "#213243",
"border-color": "#81c784",
"background-width": "100%",
"background-height": "100%",
"border-radius": "5px",
"z-index": 5001,
},
},
{
selector: `node[type="COMMENT"]`,
css: {
shape: "roundrectangle",
color: "data(color)",
width: "data(width)",
height: "data(height)",
padding: "0px",
margin: "0px",
"background-color": "data(backgroundcolor)",
"background-image": "data(backgroundimage)",
"border-color": "#ffffff",
"text-margin-x": "0px",
"z-index": 4999,
"border-radius": "5px",
"background-opacity": "0.5",
"text-wrap": "wrap",
},
},
{
selector: `node[app_name="Shuffle Tools"]`,
css: {
width: "30px",
height: "30px",
"z-index": 5000,
"font-size": "0px",
"background-width": "75%",
"background-height": "75%",
"background-color": "data(iconBackground)",
"background-fill": "data(fillstyle)",
"background-gradient-direction": "to-right",
"background-gradient-stop-colors": "data(fillGradient)",
},
},
{
selector: `node[app_name="Testing"]`,
css: {
width: "30px",
height: "30px",
"z-index": 5000,
"font-size": "0px",
},
},
{
selector: `node[?small_image]`,
css: {
"background-image": "data(small_image)",
"text-halign": "right",
},
},
{
selector: `node[?large_image]`,
css: {
"background-image": "data(large_image)",
"text-halign": "right",
},
},
{
selector: `node[type="CONDITION"]`,
css: {
shape: "diamond",
"border-color": "##FFEB3B",
padding: "30px",
},
},
{
selector: `node[type="eventAction"]`,
css: {
"background-color": "#edbd21",
},
},
{
selector: `node[type="TRIGGER"]`,
css: {
shape: "octagon",
"border-radius": "5px",
"border-color": "orange",
"background-color": "#213243",
"background-width": "100%",
"background-height": "100%",
},
},
{
selector: `node[status="running"]`,
css: {
"border-color": "#81c784",
},
},
{
selector: `node[status="stopped"]`,
css: {
"border-color": "orange",
},
},
{
selector: 'node[type="mq"]',
css: {
"background-color": "#edbd21",
},
},
{
selector: "node[?isButton]",
css: {
shape: "ellipse",
width: "15px",
height: "15px",
"z-index": "5002",
"font-size": "0px",
border: "1px solid rgba(255,255,255,0.9)",
"background-image": "data(icon)",
"background-color": "data(iconBackground)",
},
},
{
selector: "node[?isSuggestion]",
css: {
shape: "ellipse",
width: "50px",
height: "50px",
"z-index": "5002",
"font-size": "0px",
border: "1px solid rgba(255,255,255,0.9)",
"background-image": "data(large_image)",
"background-color": "data(iconBackground)",
label: "data(label)",
},
},
{
selector: "node[?canConnect]",
css: {
"border-color": "#f86a3e",
"border-width": "10px",
"z-index": "5002",
"background-color": "#f86a3e",
},
},
{
selector: "node[?isDescriptor]",
css: {
shape: "ellipse",
"border-color": "#80deea",
width: "5px",
height: "5px",
"z-index": "5002",
"font-size": "10px",
"text-valign": "center",
"text-halign": "center",
border: "1px solid black",
"margin-right": "0px",
"text-margin-x": "0px",
"background-color": "data(imageColor)",
"background-image": "data(image)",
},
},
{
selector: "node[?isStartNode]",
css: {
shape: "ellipse",
"border-color": "#80deea",
width: "80px",
height: "80px",
"font-size": "18px",
"background-width": "100%",
"background-height": "100%",
},
},
{
selector: "node[!is_valid]",
css: {
"border-color": "red",
"border-width": "10px",
},
},
{
selector: ":selected",
css: {
"background-color": "#77b0d0",
"border-color": "#77b0d0",
"border-width": "20px",
},
},
{
selector: ".skipped-highlight",
css: {
"background-color": "grey",
"border-color": "grey",
"border-width": "8px",
"transition-property": "background-color",
"transition-duration": "0.5s",
},
},
{
selector: ".success-highlight",
css: {
"background-color": "#41dcab",
"border-color": "#41dcab",
"border-width": "5px",
"transition-property": "background-color",
"transition-duration": "0.5s",
},
},
{
selector: ".hover-highlight",
css: {
"background-color": "#5f9265",
"border-color": "#5f9265",
"border-width": "5px",
"transition-property": "background-color",
"transition-duration": "0.5s",
},
},
{
selector: ".failure-highlight",
css: {
"background-color": "#8e3530",
"border-color": "#8e3530",
"border-width": "5px",
"transition-property": "background-color",
"transition-duration": "0.5s",
},
},
{
selector: ".not-executing-highlight",
css: {
"background-color": "grey",
"border-color": "grey",
"border-width": "5px",
"transition-property": "#ffef47",
"transition-duration": "0.25s",
},
},
{
selector: ".executing-highlight",
css: {
"background-color": "#ffef47",
"border-color": "#ffef47",
"border-width": "8px",
"transition-property": "border-width",
"transition-duration": "0.25s",
},
},
{
selector: ".awaiting-data-highlight",
css: {
"background-color": "#f4ad42",
"border-color": "#f4ad42",
"border-width": "5px",
"transition-property": "border-color",
"transition-duration": "0.5s",
},
},
{
selector: ".shuffle-hover-highlight",
css: {
"background-color": "#f85a3e",
"border-color": "#f85a3e",
"border-width": "12px",
"transition-property": "border-width",
"transition-duration": "0.25s",
label: "data(label)",
"font-size": "18px",
color: "white",
},
},
{
selector: "$node > node",
css: {
"padding-top": "10px",
"padding-left": "10px",
"padding-bottom": "10px",
"padding-right": "10px",
},
},
{
selector: "edge.executing-highlight",
css: {
width: "5px",
"target-arrow-color": "#ffef47",
"line-color": "#ffef47",
"transition-property": "line-color, width",
"transition-duration": "0.25s",
},
},
{
selector: `edge[?decorator]`,
css: {
width: "1px",
"line-style": "dashed",
"line-fill": "linear-gradient",
"target-arrow-color": "#f34079",
"line-gradient-stop-positions": ["0.0", "100"],
"line-gradient-stop-colors": ["#f86a3e", "#f34079"],
},
},
{
selector: "edge.success-highlight",
css: {
width: "5px",
"target-arrow-color": "#41dcab",
"line-color": "#41dcab",
"transition-property": "line-color, width",
"transition-duration": "0.5s",
"line-fill": "linear-gradient",
"line-gradient-stop-positions": ["0.0", "100"],
"line-gradient-stop-colors": ["#41dcab", "#41dcab"],
},
},
{
selector: ".eh-handle",
style: {
"background-color": "#337ab7",
width: "1px",
height: "1px",
shape: "circle",
"border-width": "1px",
"border-color": "black",
},
},
{
selector: ".eh-source",
style: {
"border-width": "3",
"border-color": "#337ab7",
},
},
{
selector: ".eh-target",
style: {
"border-width": "3",
"border-color": "#337ab7",
},
},
{
selector: ".eh-preview, .eh-ghost-edge",
style: {
"background-color": "#337ab7",
"line-color": "#337ab7",
"target-arrow-color": "#337ab7",
"source-arrow-color": "#337ab7",
},
},
{
selector: "edge:selected",
css: {
"target-arrow-color": "#f85a3e",
},
},
{
selector: `edge[?source_workflow]`,
css: {
"background-opacity": "1",
"font-size": "0px",
},
},
{
selector: `node[?source_workflow]`,
css: {
"background-opacity": "0",
"font-size": "0px",
},
},
{
selector: "node:selected",
css: {
"border-color": "#f86a3e",
"border-width": "7px",
},
},
];
//{
// selector: 'edge[?hasErrors]',
// css: {
// 'target-arrow-color': '#991818',
// 'line-color': '#991818',
// 'line-style': 'dashed',
// "line-fill": "linear-gradient",
// "line-gradient-stop-positions": ["0.0", "100"],
// "line-gradient-stop-colors": ["#991818", "#991818"],
// },
//},
export default data;
+2 -2
View File
@@ -8,9 +8,9 @@ import App from "./App";
const rootElement = document.getElementById("root"); const rootElement = document.getElementById("root");
const root = createRoot(rootElement); const root = createRoot(rootElement);
root.render( root.render(
<React.StrictMode> <React.Fragment>
<App /> <App />
</React.StrictMode> </React.Fragment>
); );
//reportWebVitals(); //reportWebVitals();
File diff suppressed because one or more lines are too long
+23 -34
View File
@@ -1,14 +1,17 @@
import React from "react"; import React from "react";
import { createTheme } from "@mui/material/styles"; import { createTheme, adaptV4Theme } from "@mui/material/styles";
const theme = createTheme({ //const theme = createTheme({
const theme = createTheme(adaptV4Theme({
palette: { palette: {
main: "#F86743",
primary: { primary: {
main: "#F86743", main: "#F86743",
contrastText: "#ffffff", contrastText: "#ffffff",
}, },
secondary: { secondary: {
main: "#e8eaf6", main: "#e8eaf6",
contrastText: "#000000",
}, },
text: { text: {
secondary: "rgba(255,255,255,0.7)", secondary: "rgba(255,255,255,0.7)",
@@ -31,12 +34,12 @@ const theme = createTheme({
borderRadius: 5, borderRadius: 5,
}, },
innerTextfieldStyle: { innerTextfieldStyle: {
color: "white", //color: "white",
minHeight: 50, //minHeight: 50,
marginLeft: "5px", //marginLeft: "5px",
maxWidth: "95%", //maxWidth: "95%",
fontSize: "1em", //fontSize: "1em",
borderRadius: 5, //borderRadius: 5,
}, },
tooltip: { tooltip: {
backgroundColor: "white", backgroundColor: "white",
@@ -71,34 +74,20 @@ const theme = createTheme({
}, },
}, },
MuiCssBaseline: { MuiCssBaseline: {
'@global': { MuiCssBaseline: {
/* styleOverrides: `
scrollbarColor: "#6b6b6b #2b2b2b", @font-face {
"&::-webkit-scrollbar, & *::-webkit-scrollbar": { font-family: 'roboto';
backgroundColor: "#2b2b2b", font-style: normal;
}, font-display: swap;
"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": { font-weight: 300;
borderRadius: 8, src: local('roboto'), local('roboto'), format('truetype');
backgroundColor: "#6b6b6b", unicodeRange: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF;
minHeight: 24,
border: "3px solid #2b2b2b",
},
"&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus": {
backgroundColor: "#959595",
},
"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active": {
backgroundColor: "#959595",
},
"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": {
backgroundColor: "#959595",
},
"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": {
backgroundColor: "#2b2b2b",
},
*/
} }
`,
}, },
}, },
}); },
}));
export default theme; export default theme;
+35 -194
View File
@@ -1,14 +1,9 @@
import React, { useState, useEffect } from "react"; import React, { useState, useEffect } from "react";
import { makeStyles } from "@mui/styles"; import { useNavigate, } from "react-router-dom";
import { useNavigate, Link } from "react-router-dom";
import countries from "../components/Countries.jsx";
import CodeEditor from "../components/ShuffleCodeEditor.jsx";
import getLocalCodeData from "../components/ShuffleCodeEditor.jsx";
import CacheView from "../components/CacheView.jsx"; import CacheView from "../components/CacheView.jsx";
import theme from "../theme.jsx"; import theme from "../theme.jsx";
//import ToggleButton from '@mui/material/ToggleButton';
import { import {
FormControl, FormControl,
InputLabel, InputLabel,
@@ -17,7 +12,6 @@ import {
Checkbox, Checkbox,
Card, Card,
Tooltip, Tooltip,
FormControlLabel,
Typography, Typography,
Switch, Switch,
Select, Select,
@@ -33,7 +27,6 @@ import {
ListItem, ListItem,
ListItemText, ListItemText,
ListItemAvatar, ListItemAvatar,
ListItemSecondaryAction,
IconButton, IconButton,
Avatar, Avatar,
Zoom, Zoom,
@@ -42,56 +35,38 @@ import {
DialogActions, DialogActions,
DialogContent, DialogContent,
CircularProgress, CircularProgress,
Box,
InputAdornment, InputAdornment,
} from "@mui/material"; } from "@mui/material";
import { Autocomplete } from "@mui/material";
import { import {
Edit as EditIcon, Edit as EditIcon,
FileCopy as FileCopyIcon, FileCopy as FileCopyIcon,
SelectAll as SelectAllIcon, SelectAll as SelectAllIcon,
OpenInNew as OpenInNewIcon,
CloudDownload as CloudDownloadIcon,
Description as DescriptionIcon, Description as DescriptionIcon,
Code as CodeIcon, Code as CodeIcon,
CheckCircle as CheckCircleIcon, CheckCircle as CheckCircleIcon,
Close as CloseIcon, Close as CloseIcon,
Apps as AppsIcon, Apps as AppsIcon,
Image as ImageIcon,
Delete as DeleteIcon, Delete as DeleteIcon,
Cached as CachedIcon, Cached as CachedIcon,
AccessibilityNew as AccessibilityNewIcon, AccessibilityNew as AccessibilityNewIcon,
Lock as LockIcon, Lock as LockIcon,
Schedule as ScheduleIcon, Schedule as ScheduleIcon,
Cloud as CloudIcon,
Business as BusinessIcon, Business as BusinessIcon,
Visibility as VisibilityIcon, Visibility as VisibilityIcon,
VisibilityOff as VisibilityOffIcon, VisibilityOff as VisibilityOffIcon,
Add as AddIcon,
Clear as ClearIcon,
Storage as StorageIcon, Storage as StorageIcon,
} from "@mui/icons-material"; } from "@mui/icons-material";
import { useAlert } from "react-alert"; import { useAlert } from "react-alert";
import Dropzone from "../components/Dropzone.jsx";
import HandlePaymentNew from "../views/HandlePaymentNew.jsx";
import OrgHeader from "../components/OrgHeader.jsx"; import OrgHeader from "../components/OrgHeader.jsx";
import OrgHeaderexpanded from "../components/OrgHeaderexpanded.jsx"; import OrgHeaderexpanded from "../components/OrgHeaderexpanded.jsx";
import Billing from "../components/Billing.jsx"; import Billing from "../components/Billing.jsx";
import Priorities from "../components/Priorities.jsx"; import Priorities from "../components/Priorities.jsx";
import Branding from "../components/Branding.jsx"; import Branding from "../components/Branding.jsx";
import Files from "../components/Files.jsx"; import Files from "../components/Files.jsx";
import { display, style } from "@mui/system";
//import EnvironmentStats from "../components/EnvironmentStats.jsx"; //import EnvironmentStats from "../components/EnvironmentStats.jsx";
const useStyles = makeStyles({
notchedOutline: {
borderColor: "#f85a3e !important",
},
});
const ITEM_HEIGHT = 48; const ITEM_HEIGHT = 48;
const ITEM_PADDING_TOP = 8; const ITEM_PADDING_TOP = 8;
const MenuProps = { const MenuProps = {
@@ -104,37 +79,10 @@ const MenuProps = {
getContentAnchorEl: () => null, getContentAnchorEl: () => null,
}; };
const FileCategoryInput = (props) => {
const isSet = props.isSet;
console.log("inside filecategoryinput");
console.log("isset value" , isSet);
if (isSet){
return (
<TextField
onBlur={""}
InputProps={{
style: {
color: "white",
},
}}
color="primary"
placeholder="File category name"
required
margin="dense"
defaultValue={""}
autoFocus
fullWidth
/>
)}
}
const Admin = (props) => { const Admin = (props) => {
const { globalUrl, userdata, serverside, checkLogin } = props; const { globalUrl, userdata, serverside, checkLogin } = props;
var to_be_copied = ""; var to_be_copied = "";
const classes = useStyles();
let navigate = useNavigate(); let navigate = useNavigate();
const [firstRequest, setFirstRequest] = React.useState(true); const [firstRequest, setFirstRequest] = React.useState(true);
@@ -150,11 +98,9 @@ const Admin = (props) => {
const [selectedOrganization, setSelectedOrganization] = React.useState({}); const [selectedOrganization, setSelectedOrganization] = React.useState({});
//console.log("Selected: ", selectedOrganization) //console.log("Selected: ", selectedOrganization)
const [organizationFeatures, setOrganizationFeatures] = React.useState({});
const [loginInfo, setLoginInfo] = React.useState(""); const [loginInfo, setLoginInfo] = React.useState("");
const [curTab, setCurTab] = React.useState(0); const [curTab, setCurTab] = React.useState(0);
const [users, setUsers] = React.useState([]); const [users, setUsers] = React.useState([]);
const [organizations, setOrganizations] = React.useState([]);
const [orgSyncResponse, setOrgSyncResponse] = React.useState(""); const [orgSyncResponse, setOrgSyncResponse] = React.useState("");
const [userSettings, setUserSettings] = React.useState({}); const [userSettings, setUserSettings] = React.useState({});
const [matchingOrganizations, setMatchingOrganizations] = React.useState([]); const [matchingOrganizations, setMatchingOrganizations] = React.useState([]);
@@ -170,30 +116,21 @@ const Admin = (props) => {
const [selectedAuthenticationModalOpen, setSelectedAuthenticationModalOpen] = React.useState(false); const [selectedAuthenticationModalOpen, setSelectedAuthenticationModalOpen] = React.useState(false);
const [authenticationFields, setAuthenticationFields] = React.useState([]); const [authenticationFields, setAuthenticationFields] = React.useState([]);
const [showArchived, setShowArchived] = React.useState(false); const [showArchived, setShowArchived] = React.useState(false);
const [isDropzone, setIsDropzone] = React.useState(false);
const [image2FA, setImage2FA] = React.useState(""); const [image2FA, setImage2FA] = React.useState("");
const [value2FA, setValue2FA] = React.useState(""); const [value2FA, setValue2FA] = React.useState("");
const [secret2FA, setSecret2FA] = React.useState(""); const [secret2FA, setSecret2FA] = React.useState("");
const [show2faSetup, setShow2faSetup] = useState(false); const [show2faSetup, setShow2faSetup] = useState(false);
const [billingInfo, ] = React.useState({});
const [adminTab, setAdminTab] = React.useState(2); const [adminTab, setAdminTab] = React.useState(2);
const [showApiKey, setShowApiKey] = useState(false); const [showApiKey, setShowApiKey] = useState(false);
const [billingInfo, setBillingInfo] = React.useState({});
const [selectedStatus, setSelectedStatus] = React.useState([]); const [selectedStatus, setSelectedStatus] = React.useState([]);
useEffect(() => { useEffect(() => {
getUsers() getUsers()
}, []); }, []);
useEffect(() => {
if (isDropzone) {
//redirectOpenApi();
setIsDropzone(false);
}
}, [isDropzone]);
const isCloud = window.location.host === "localhost:3002" || window.location.host === "shuffler.io"; const isCloud = window.location.host === "localhost:3002" || window.location.host === "shuffler.io";
const get2faCode = (userId) => { const get2faCode = (userId) => {
@@ -225,39 +162,7 @@ const Admin = (props) => {
}); });
}; };
const getApps = () => {
fetch(globalUrl + "/api/v1/apps", {
method: "GET",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
},
credentials: "include",
})
.then((response) => {
if (response.status !== 200) {
console.log("Status not 200 for apps :O!");
}
return response.json();
})
.then((responseJson) => {
console.log("apps: ", responseJson);
//setApps(responseJson)
//setFilteredApps(responseJson)
//if (responseJson.length > 0) {
// setSelectedApp(responseJson[0])
// if (responseJson[0].actions !== null && responseJson[0].actions.length > 0) {
// setSelectedAction(responseJson[0].actions[0])
// } else {
// setSelectedAction({})
// }
//}
})
.catch((error) => {
alert.error(error.toString());
});
};
const categories = [ const categories = [
{ {
@@ -673,7 +578,6 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
} else if (!responseJson.success) { } else if (!responseJson.success) {
alert.error("Failed to handle sync."); alert.error("Failed to handle sync.");
} else { } else {
getOrgs();
if (disableSync) { if (disableSync) {
alert.success("Successfully disabled sync!"); alert.success("Successfully disabled sync!");
setOrgSyncResponse("Successfully disabled syncronization"); setOrgSyncResponse("Successfully disabled syncronization");
@@ -1000,18 +904,18 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
} }
setSelectedOrganization(responseJson) setSelectedOrganization(responseJson)
var lists = { //var lists = {
active: { // active: {
triggers: [], // triggers: [],
features: [], // features: [],
sync: [], // sync: [],
}, // },
inactive: { // inactive: {
triggers: [], // triggers: [],
features: [], // features: [],
sync: [], // sync: [],
}, // },
}; //};
// FIXME: Set up features // FIXME: Set up features
//Object.keys(responseJson.sync_features).map(function(key, index) { //Object.keys(responseJson.sync_features).map(function(key, index) {
@@ -1020,7 +924,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
//setOrgName(responseJson.name) //setOrgName(responseJson.name)
//setOrgDescription(responseJson.description) //setOrgDescription(responseJson.description)
setOrganizationFeatures(lists); //setOrganizationFeatures(lists);
} }
}) })
.catch((error) => { .catch((error) => {
@@ -1113,7 +1017,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
alert.info("Setting default env to " + environment.name); alert.info("Setting default env to " + environment.name);
var newEnv = []; var newEnv = [];
for (var key in environments) { for (var key in environments) {
if (environments[key].id == environment.id) { if (environments[key].id === environment.id) {
if (environments[key].archived) { if (environments[key].archived) {
alert.error("Can't set archived to default"); alert.error("Can't set archived to default");
return; return;
@@ -1121,7 +1025,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
environments[key].default = true; environments[key].default = true;
} else if ( } else if (
environments[key].default == true && environments[key].default === true &&
environments[key].id !== environment.id environments[key].id !== environment.id
) { ) {
environments[key].default = false; environments[key].default = false;
@@ -1161,33 +1065,6 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
}); });
}; };
const flushQueue = (name) => {
// Just use this one?
const url = globalUrl + "/api/v1/flush_queue";
fetch(url, {
method: "DELETE",
credentials: "include",
headers: {
"Content-Type": "application/json",
},
})
.then((response) =>
response.json().then((responseJson) => {
if (responseJson["success"] === false) {
alert.error(responseJson.reason);
getEnvironments();
} else {
setLoginInfo("");
setModalOpen(false);
getEnvironments();
}
})
)
.catch((error) => {
console.log("Error when deleting: ", error);
});
};
const rerunCloudWorkflows = (environment) => { const rerunCloudWorkflows = (environment) => {
alert.info("Starting execution reruns. This can run in the background.") alert.info("Starting execution reruns. This can run in the background.")
fetch( fetch(
@@ -1277,7 +1154,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
//alert.info("Modifying environment " + environment.Name) //alert.info("Modifying environment " + environment.Name)
var newEnv = []; var newEnv = [];
for (var key in environments) { for (var key in environments) {
if (environments[key].id == id) { if (environments[key].id === id) {
if (environments[key].default) { if (environments[key].default) {
alert.error("Can't modify the default environment"); alert.error("Can't modify the default environment");
return; return;
@@ -1356,9 +1233,6 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
}); });
}; };
var localData = "";
const getSchedules = () => { const getSchedules = () => {
fetch(globalUrl + "/api/v1/workflows/schedules", { fetch(globalUrl + "/api/v1/workflows/schedules", {
method: "GET", method: "GET",
@@ -1440,34 +1314,6 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
}); });
}; };
const getOrgs = () => {
// API no longer in use, as it's in handleInfo request
return;
fetch(globalUrl + "/api/v1/orgs", {
method: "GET",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
},
credentials: "include",
})
.then((response) => {
if (response.status !== 200) {
console.log("Status not 200 for apps :O!");
return;
}
return response.json();
})
.then((responseJson) => {
setOrganizations(responseJson);
})
.catch((error) => {
alert.error(error.toString());
});
};
const getUsers = () => { const getUsers = () => {
fetch(globalUrl + "/api/v1/getusers", { fetch(globalUrl + "/api/v1/getusers", {
method: "GET", method: "GET",
@@ -1560,8 +1406,8 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
document.title = "Shuffle - admin - environments"; document.title = "Shuffle - admin - environments";
getEnvironments(); getEnvironments();
} else if (newValue === 7) { } else if (newValue === 7) {
//getOrgs();
document.title = "Shuffle - admin - orgs"; document.title = "Shuffle - admin - orgs";
getOrgs();
} else { } else {
document.title = "Shuffle - admin"; document.title = "Shuffle - admin";
} }
@@ -2063,7 +1909,6 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
maxHeight: 200, maxHeight: 200,
maxWidth: 200, maxWidth: 200,
minWidth: 200, minWidth: 200,
maxWidth: 200,
}} }}
/> />
) : ( ) : (
@@ -2343,22 +2188,6 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
</div> </div>
) : ( ) : (
<div> <div>
{/*
<Tooltip
title={"Go to Organization document"}
style={{}}
aria-label={"Organization doc"}
>
<IconButton
style={{ top: -10, right: 50, position: "absolute" }}
onClick={() => {
console.log("Should go to icon")
}}
>
<FileCopyIcon style={{ color: "rgba(255,255,255,0.8)" }} />
</IconButton>
</Tooltip>
*/}
{userdata.support === true ? {userdata.support === true ?
<span style={{display: "flex", top: -10, right: 50, position: "absolute"}}> <span style={{display: "flex", top: -10, right: 50, position: "absolute"}}>
@@ -2407,6 +2236,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
style={{}} style={{}}
aria-label={"Copy orgid"} aria-label={"Copy orgid"}
> >
<div>
<IconButton <IconButton
style={{ top: -10, right: 0, position: "absolute" }} style={{ top: -10, right: 0, position: "absolute" }}
onClick={() => { onClick={() => {
@@ -2436,6 +2266,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
> >
<FileCopyIcon style={{ color: "rgba(255,255,255,0.8)" }} /> <FileCopyIcon style={{ color: "rgba(255,255,255,0.8)" }} />
</IconButton> </IconButton>
</div>
</Tooltip> </Tooltip>
{selectedOrganization.defaults !== undefined && selectedOrganization.defaults.documentation_reference !== undefined && selectedOrganization.defaults.documentation_reference !== null && selectedOrganization.defaults.documentation_reference.includes("http") ? {selectedOrganization.defaults !== undefined && selectedOrganization.defaults.documentation_reference !== undefined && selectedOrganization.defaults.documentation_reference !== null && selectedOrganization.defaults.documentation_reference.includes("http") ?
<Tooltip <Tooltip
@@ -2443,6 +2274,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
style={{ top: -10, right: 50, position: "absolute" }} style={{ top: -10, right: 50, position: "absolute" }}
aria-label={"Open org docs"} aria-label={"Open org docs"}
> >
<div>
<a href={selectedOrganization.defaults.documentation_reference} target="_blank" style={{ textDecoration: "none", }} rel="noopener noreferrer"> <a href={selectedOrganization.defaults.documentation_reference} target="_blank" style={{ textDecoration: "none", }} rel="noopener noreferrer">
<IconButton <IconButton
style={{ top: -10, right: 50, position: "absolute" }} style={{ top: -10, right: 50, position: "absolute" }}
@@ -2450,6 +2282,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
<DescriptionIcon style={{ color: "rgba(255,255,255,0.8)" }} /> <DescriptionIcon style={{ color: "rgba(255,255,255,0.8)" }} />
</IconButton> </IconButton>
</a> </a>
</div>
</Tooltip> </Tooltip>
: null} : null}
{selectedOrganization.name.length > 0 ? ( {selectedOrganization.name.length > 0 ? (
@@ -2764,8 +2597,10 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
}; };
return ( return (
<Zoom key={index}> <Zoom in={true} key={index}>
<div>
<GridItem data={griditem} /> <GridItem data={griditem} />
</div>
</Zoom> </Zoom>
); );
})} })}
@@ -2789,7 +2624,6 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
selectedOrganization={selectedOrganization} selectedOrganization={selectedOrganization}
adminTab={adminTab} adminTab={adminTab}
billingInfo={billingInfo} billingInfo={billingInfo}
selectedOrganization={selectedOrganization}
stripeKey={props.stripeKey} stripeKey={props.stripeKey}
handleGetOrg={handleGetOrg} handleGetOrg={handleGetOrg}
/> />
@@ -2801,7 +2635,6 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
globalUrl={globalUrl} globalUrl={globalUrl}
handleGetOrg={handleGetOrg} handleGetOrg={handleGetOrg}
selectedOrganization={selectedOrganization} selectedOrganization={selectedOrganization}
selectedOrganization={selectedOrganization}
setSelectedOrganization={setSelectedOrganization} setSelectedOrganization={setSelectedOrganization}
/> />
: null : null
@@ -3107,6 +2940,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
style={{}} style={{}}
aria-label={"Copy APIkey"} aria-label={"Copy APIkey"}
> >
<div>
<IconButton <IconButton
style={{}} style={{}}
onClick={() => { onClick={() => {
@@ -3143,6 +2977,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
style={{ color: "rgba(255,255,255,0.8)" }} style={{ color: "rgba(255,255,255,0.8)" }}
/> />
</IconButton> </IconButton>
</div>
</Tooltip> </Tooltip>
) )
} }
@@ -3715,6 +3550,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
title="Set in EVERY workflow" title="Set in EVERY workflow"
placement="top" placement="top"
> >
<div>
<IconButton <IconButton
style={{ marginRight: 10 }} style={{ marginRight: 10 }}
disabled={data.defined === false} disabled={data.defined === false}
@@ -3726,6 +3562,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
color={data.defined ? "primary" : "secondary"} color={data.defined ? "primary" : "secondary"}
/> />
</IconButton> </IconButton>
</div>
</Tooltip> </Tooltip>
) : ( ) : (
<Tooltip <Tooltip
@@ -3733,6 +3570,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
title="Must edit before you can set in all workflows" title="Must edit before you can set in all workflows"
placement="top" placement="top"
> >
<div>
<IconButton <IconButton
style={{ marginRight: 10 }} style={{ marginRight: 10 }}
onClick={() => {}} onClick={() => {}}
@@ -3741,6 +3579,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
color={data.defined ? "primary" : "secondary"} color={data.defined ? "primary" : "secondary"}
/> />
</IconButton> </IconButton>
</div>
</Tooltip> </Tooltip>
)} )}
<IconButton <IconButton
@@ -3952,6 +3791,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
style={{}} style={{}}
aria-label={"Copy orborus command"} aria-label={"Copy orborus command"}
> >
<div>
<IconButton <IconButton
style={{}} style={{}}
disabled={environment.Type === "cloud"} disabled={environment.Type === "cloud"}
@@ -3988,6 +3828,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
> >
<FileCopyIcon disabled={environment.Type === "cloud"} style={{ color: environment.Type === "cloud" ? "rgba(255,255,255,0.2)" : "rgba(255,255,255,0.8)" }} /> <FileCopyIcon disabled={environment.Type === "cloud"} style={{ color: environment.Type === "cloud" ? "rgba(255,255,255,0.2)" : "rgba(255,255,255,0.8)" }} />
</IconButton> </IconButton>
</div>
</Tooltip> </Tooltip>
} }
/> />
@@ -4079,7 +3920,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
</ListItem> </ListItem>
{showCPUAlert === false ? null : {showCPUAlert === false ? null :
<ListItem key={index+"_cpu"} style={{ backgroundColor: bgColor }}> <ListItem key={index+"_cpu"} style={{ backgroundColor: bgColor }}>
<div style={{border: "1px solid #f85a3e", borderRadius: theme.palette.borderRadius, marginTop: 10, marginBottom: 10, padding: 15, textAlign: "center", height: 70, textAlign: "left", backgroundColor: theme.palette.surfaceColor, display: "flex", }}> <div style={{border: "1px solid #f85a3e", borderRadius: theme.palette.borderRadius, marginTop: 10, marginBottom: 10, padding: 15, height: 70, textAlign: "left", backgroundColor: theme.palette.surfaceColor, display: "flex", }}>
<div style={{flex: 2, overflow: "hidden",}}> <div style={{flex: 2, overflow: "hidden",}}>
<Typography variant="body1" > <Typography variant="body1" >
90% CPU the server(s) hosting the Shuffle App Runner (Orborus) was found. 90% CPU the server(s) hosting the Shuffle App Runner (Orborus) was found.
+13 -200
View File
@@ -4,11 +4,10 @@ import ReactDOM from "react-dom"
import theme from '../theme.jsx'; import theme from '../theme.jsx';
import { useInterval } from "react-powerhooks"; import { useInterval } from "react-powerhooks";
import { makeStyles, } from "@mui/styles"; //import { makeStyles, } from "@mui/styles";
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";
import { useNavigate, Link, useParams } from "react-router-dom"; import { useNavigate, Link, useParams } from "react-router-dom";
// import { Prompt } from "react-router"; // FIXME
import { useBeforeunload } from "react-beforeunload"; import { useBeforeunload } from "react-beforeunload";
import ReactJson from "react-json-view"; import ReactJson from "react-json-view";
import { NestedMenuItem } from "mui-nested-menu" import { NestedMenuItem } from "mui-nested-menu"
@@ -51,7 +50,7 @@ import {
IconButton, IconButton,
Menu, Menu,
Input, Input,
Fade, Collapse,
FormGroup, FormGroup,
FormControlLabel, FormControlLabel,
Typography, Typography,
@@ -68,11 +67,8 @@ import {
ListItemAvatar, ListItemAvatar,
Badge, Badge,
Autocomplete, Autocomplete,
} from "@mui/material";
import {
AvatarGroup, AvatarGroup,
} from "@mui/material" } from "@mui/material";
import { import {
Folder as FolderIcon, Folder as FolderIcon,
@@ -119,14 +115,14 @@ import {
import * as cytoscape from "cytoscape"; import * as cytoscape from "cytoscape";
import * as edgehandles from "cytoscape-edgehandles"; import * as edgehandles from "cytoscape-edgehandles";
import * as clipboard from "cytoscape-clipboard"; //import * as clipboard from "cytoscape-clipboard";
//import undoRedo from "cytoscape-undo-redo";
//import cxtmenu from "cytoscape-cxtmenu";
import CytoscapeComponent from "react-cytoscapejs"; import CytoscapeComponent from "react-cytoscapejs";
import undoRedo from "cytoscape-undo-redo";
import Draggable from "react-draggable"; import Draggable from "react-draggable";
import cytoscapestyle from "../defaultCytoscapeStyle.jsx"; import cytoscapestyle from "../defaultCytoscapeStyle.jsx";
import cxtmenu from "cytoscape-cxtmenu";
import { validateJson, GetIconInfo } from "./Workflows.jsx"; import { validateJson, GetIconInfo } from "./Workflows.jsx";
import { GetParsedPaths } from "./Apps.jsx"; import { GetParsedPaths } from "./Apps.jsx";
@@ -232,9 +228,9 @@ const inputColor = "#383B40";
// http://apps.cytoscape.org/apps/yfileslayoutalgorithms // http://apps.cytoscape.org/apps/yfileslayoutalgorithms
cytoscape.use(edgehandles); cytoscape.use(edgehandles);
cytoscape.use(clipboard); //cytoscape.use(clipboard);
cytoscape.use(undoRedo); //cytoscape.use(undoRedo);
cytoscape.use(cxtmenu); //cytoscape.use(cxtmenu);
// Adds specific text to items // Adds specific text to items
//import popper from 'cytoscape-popper'; //import popper from 'cytoscape-popper';
@@ -357,32 +353,6 @@ export function removeParam(key, sourceURL) {
return rtn; return rtn;
} }
const useStyles = makeStyles({
notchedOutline: {
borderColor: "#f85a3e !important",
},
root: {
"& .MuiAutocomplete-listbox": {
border: "2px solid #f85a3e",
color: "white",
fontSize: 18,
"& li:nth-child(even)": {
backgroundColor: "#CCC",
},
"& li:nth-child(odd)": {
backgroundColor: "#FFF",
},
},
},
inputRoot: {
color: "white",
// This matches the specificity of the default styles at https://github.com/mui-org/material-ui/blob/v4.11.3/packages/material-ui-lab/src/Autocomplete/Autocomplete.js#L90
"&:hover .MuiOutlinedInput-notchedOutline": {
borderColor: "#f86a3e",
},
},
});
const splitter = "|~|"; const splitter = "|~|";
const svgSize = 24; const svgSize = 24;
//const referenceUrl = "https://shuffler.io/functions/webhooks/" //const referenceUrl = "https://shuffler.io/functions/webhooks/"
@@ -554,7 +524,6 @@ const AngularWorkflow = (defaultprops) => {
const appBarSize = isCloud ? 75 : 72; const appBarSize = isCloud ? 75 : 72;
const triggerEnvironments = isCloud ? ["cloud"] : ["onprem", "cloud"]; const triggerEnvironments = isCloud ? ["cloud"] : ["onprem", "cloud"];
const unloadText = "Are you sure you want to leave without saving (CTRL+S)?"; const unloadText = "Are you sure you want to leave without saving (CTRL+S)?";
const classes = useStyles();
const [bodyWidth, bodyHeight] = useWindowSize() const [bodyWidth, bodyHeight] = useWindowSize()
//console.log("Mobile: ", isMobile, bodyWidth, bodyHeight) //console.log("Mobile: ", isMobile, bodyWidth, bodyHeight)
@@ -7111,12 +7080,6 @@ const AngularWorkflow = (defaultprops) => {
<div style={appViewStyle}> <div style={appViewStyle}>
<div style={{ flex: "1" }}> <div style={{ flex: "1" }}>
<TextField <TextField
style={{
backgroundColor: inputColor,
borderRadius: theme.palette.borderRadius,
marginTop: 5,
marginRight: 10,
}}
InputProps={{ InputProps={{
style: { style: {
color: "white", color: "white",
@@ -7820,15 +7783,6 @@ const AngularWorkflow = (defaultprops) => {
backgroundColor: inputColor, backgroundColor: inputColor,
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{
style: {
color: "white",
minHeight: 50,
marginLeft: "5px",
maxWidth: "95%",
fontSize: "1em",
},
}}
fullWidth fullWidth
multiline={multiline} multiline={multiline}
color="primary" color="primary"
@@ -9177,15 +9131,6 @@ const AngularWorkflow = (defaultprops) => {
backgroundColor: inputColor, backgroundColor: inputColor,
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
height: 50,
fontSize: "1em",
},
}}
fullWidth fullWidth
color="primary" color="primary"
placeholder={selectedTrigger.label} placeholder={selectedTrigger.label}
@@ -9200,13 +9145,6 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
height: 50,
fontSize: "1em",
},
}} }}
required required
disabled disabled
@@ -9937,15 +9875,6 @@ const AngularWorkflow = (defaultprops) => {
backgroundColor: inputColor, backgroundColor: inputColor,
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
height: 50,
fontSize: "1em",
},
}}
fullWidth fullWidth
color="primary" color="primary"
placeholder={selectedTrigger.label} placeholder={selectedTrigger.label}
@@ -9962,14 +9891,6 @@ const AngularWorkflow = (defaultprops) => {
<span> <span>
<Typography>Delay</Typography> <Typography>Delay</Typography>
<TextField <TextField
style={{
backgroundColor: theme.palette.inputColor,
borderRadius: theme.palette.borderRadius,
color: "white",
width: 50,
height: 50,
fontSize: "1em",
}}
InputProps={{ InputProps={{
style: theme.palette.innerTextfieldStyle, style: theme.palette.innerTextfieldStyle,
}} }}
@@ -10080,7 +10001,6 @@ const AngularWorkflow = (defaultprops) => {
freeSolo freeSolo
//autoSelect //autoSelect
value={subworkflow} value={subworkflow}
classes={{ inputRoot: classes.inputRoot }}
ListboxProps={{ ListboxProps={{
style: { style: {
backgroundColor: theme.palette.inputColor, backgroundColor: theme.palette.inputColor,
@@ -10199,7 +10119,6 @@ const AngularWorkflow = (defaultprops) => {
id="subflow_node_search" id="subflow_node_search"
autoHighlight autoHighlight
value={subworkflowStartnode} value={subworkflowStartnode}
classes={{ inputRoot: classes.inputRoot }}
ListboxProps={{ ListboxProps={{
style: { style: {
backgroundColor: theme.palette.inputColor, backgroundColor: theme.palette.inputColor,
@@ -10292,12 +10211,6 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
fontSize: "1em",
},
endAdornment: ( endAdornment: (
<InputAdornment position="end"> <InputAdornment position="end">
<Tooltip title="Autocomplete text" placement="top"> <Tooltip title="Autocomplete text" placement="top">
@@ -10444,12 +10357,6 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
fontSize: "1em",
},
}} }}
multiline multiline
rows="4" rows="4"
@@ -10471,13 +10378,6 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
height: 50,
fontSize: "1em",
},
}} }}
fullWidth fullWidth
color="primary" color="primary"
@@ -10525,13 +10425,6 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
height: 50,
fontSize: "1em",
},
}} }}
fullWidth fullWidth
color="primary" color="primary"
@@ -10551,13 +10444,6 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
height: 50,
fontSize: "1em",
},
}} }}
fullWidth fullWidth
color="primary" color="primary"
@@ -10577,13 +10463,6 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
height: 50,
fontSize: "1em",
},
}} }}
fullWidth fullWidth
color="primary" color="primary"
@@ -10688,13 +10567,6 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
height: 50,
fontSize: "1em",
},
}} }}
fullWidth fullWidth
color="primary" color="primary"
@@ -10707,7 +10579,6 @@ const AngularWorkflow = (defaultprops) => {
id="action_search" id="action_search"
autoHighlight autoHighlight
value={selectedTrigger.app_association} value={selectedTrigger.app_association}
classes={{ inputRoot: classes.inputRoot }}
ListboxProps={{ ListboxProps={{
style: { style: {
backgroundColor: theme.palette.inputColor, backgroundColor: theme.palette.inputColor,
@@ -11042,12 +10913,6 @@ const AngularWorkflow = (defaultprops) => {
id="webhook_uri_header" id="webhook_uri_header"
onClick={() => { }} onClick={() => { }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
fontSize: "1em",
},
}} }}
fullWidth fullWidth
multiline multiline
@@ -11099,12 +10964,6 @@ const AngularWorkflow = (defaultprops) => {
id="webhook_uri_header" id="webhook_uri_header"
onClick={() => { }} onClick={() => { }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
fontSize: "1em",
},
}} }}
fullWidth fullWidth
multiline multiline
@@ -11508,13 +11367,6 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
height: 50,
fontSize: "1em",
},
}} }}
fullWidth fullWidth
color="primary" color="primary"
@@ -11582,13 +11434,6 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
marginTop: "3px",
fontSize: "1em",
},
}} }}
fullWidth fullWidth
rows="4" rows="4"
@@ -11678,7 +11523,6 @@ const AngularWorkflow = (defaultprops) => {
id="subflow_search" id="subflow_search"
autoHighlight autoHighlight
value={subworkflow} value={subworkflow}
classes={{ inputRoot: classes.inputRoot }}
ListboxProps={{ ListboxProps={{
style: { style: {
backgroundColor: theme.palette.inputColor, backgroundColor: theme.palette.inputColor,
@@ -11797,13 +11641,6 @@ const AngularWorkflow = (defaultprops) => {
marginTop: 10, marginTop: 10,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
height: 50,
fontSize: "1em",
},
}} }}
fullWidth fullWidth
color="primary" color="primary"
@@ -11886,13 +11723,6 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
height: 50,
fontSize: "1em",
},
}} }}
fullWidth fullWidth
color="primary" color="primary"
@@ -11990,13 +11820,6 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
height: 50,
marginLeft: "5px",
maxWidth: "95%",
fontSize: "1em",
},
}} }}
fullWidth fullWidth
disabled={ disabled={
@@ -12045,13 +11868,6 @@ const AngularWorkflow = (defaultprops) => {
borderRadius: theme.palette.borderRadius, borderRadius: theme.palette.borderRadius,
}} }}
InputProps={{ InputProps={{
style: {
color: "white",
marginLeft: "5px",
maxWidth: "95%",
marginTop: "3px",
fontSize: "1em",
},
}} }}
disabled={ disabled={
workflow.triggers[selectedTriggerIndex].status === "running" workflow.triggers[selectedTriggerIndex].status === "running"
@@ -12880,11 +12696,11 @@ const AngularWorkflow = (defaultprops) => {
{defaultReturn} {defaultReturn}
</SwipeableDrawer> </SwipeableDrawer>
: :
<Fade in={true} style={{ transitionDelay: `$0ms` }}> <Collapse in={true} style={{ transitionDelay: `$0ms` }}>
<div id="rightside_actions" style={rightsidebarStyle}> <div id="rightside_actions" style={rightsidebarStyle}>
{defaultReturn} {defaultReturn}
</div> </div>
</Fade> </Collapse>
); );
//return null; //return null;
@@ -14960,7 +14776,7 @@ const AngularWorkflow = (defaultprops) => {
</Typography> </Typography>
</div> </div>
) : ( ) : (
<Fade in={true} timeout={1000} style={{ transitionDelay: `${150}ms` }}> <Collapse in={true} timeout={1000} style={{ transitionDelay: `${150}ms` }}>
<CytoscapeComponent <CytoscapeComponent
elements={elements} elements={elements}
minZoom={0.35} minZoom={0.35}
@@ -14983,7 +14799,7 @@ const AngularWorkflow = (defaultprops) => {
setCy(incy); setCy(incy);
}} }}
/> />
</Fade> </Collapse>
)} )}
</div> </div>
{executionModal} {executionModal}
@@ -16460,9 +16276,6 @@ const AngularWorkflow = (defaultprops) => {
return ( return (
<div> <div>
{/* Removed due to missing react router features
<Prompt when={!lastSaved} message={unloadText} />
*/}
{loadedCheck} {loadedCheck}
</div> </div>
); );
+2 -2
View File
@@ -1902,9 +1902,9 @@ const Apps = (props) => {
return ( return (
<Zoom key={index} in={true} style={{ transitionDelay: `${appDelay}ms` }}> <Zoom key={index} in={true} style={{ transitionDelay: `${appDelay}ms` }}>
<span> <div>
<AppPaper app={app} /> <AppPaper app={app} />
</span> </div>
</Zoom> </Zoom>
) )
})} })}
+1 -1
View File
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from "react"; import React, { useState, useEffect } from "react";
import { useInterval } from "react-powerhooks"; import { useInterval } from "react-powerhooks";
import AppFramework from "../components/AppFramework.jsx"; import AppFramework from "../components/AppFramework.jsx";
import { makeStyles, useTheme } from "@mui/styles"; import { makeStyles, } from "@mui/styles";
// nodejs library that concatenates classes // nodejs library that concatenates classes
import classNames from "classnames"; import classNames from "classnames";
import theme from '../theme.jsx'; import theme from '../theme.jsx';
+1 -1
View File
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from "react"; import React, { useState, useEffect } from "react";
import { useInterval } from "react-powerhooks"; import { useInterval } from "react-powerhooks";
import { makeStyles, useTheme } from "@mui/styles"; import { makeStyles, } from "@mui/styles";
// nodejs library that concatenates classes // nodejs library that concatenates classes
import classNames from "classnames"; import classNames from "classnames";
import theme from '../theme.jsx'; import theme from '../theme.jsx';
+13 -7
View File
@@ -5,6 +5,7 @@ import { BrowserView, MobileView } from "react-device-detect";
import { useParams, useNavigate, Link } from "react-router-dom"; import { useParams, useNavigate, Link } from "react-router-dom";
import { isMobile } from "react-device-detect"; import { isMobile } from "react-device-detect";
import theme from '../theme.jsx'; import theme from '../theme.jsx';
import remarkGfm from 'remark-gfm'
import { import {
Grid, Grid,
@@ -364,6 +365,7 @@ const Docs = (defaultprops) => {
}; };
function OuterLink(props) { function OuterLink(props) {
console.log("Link: ", props.href)
if (props.href.includes("http") || props.href.includes("mailto")) { if (props.href.includes("http") || props.href.includes("mailto")) {
return ( return (
<a <a
@@ -385,7 +387,7 @@ const Docs = (defaultprops) => {
} }
function Img(props) { function Img(props) {
return <img style={{ borderRadius: theme.palette.borderRadius, maxWidth: "100%", marginTop: 15, marginBottom: 15, }} alt={props.alt} src={props.src} />; return <img style={{ borderRadius: theme.palette.borderRadius, width: 750, maxWidth: "100%", marginTop: 15, marginBottom: 15, }} alt={props.alt} src={props.src} />;
} }
function CodeHandler(props) { function CodeHandler(props) {
@@ -789,17 +791,21 @@ const Docs = (defaultprops) => {
: :
<div id="markdown_wrapper_outer" style={markdownStyle}> <div id="markdown_wrapper_outer" style={markdownStyle}>
<ReactMarkdown <ReactMarkdown
id="markdown_wrapper" components={{
escapeHtml={false}
source={data}
style={{maxWidth: "100%", minWidth: "100%", }}
renderers={{
link: OuterLink, link: OuterLink,
image: Img, image: Img,
code: CodeHandler, code: CodeHandler,
heading: Heading, heading: Heading,
}} }}
/> id="markdown_wrapper"
escapeHtml={false}
style={{
maxWidth: "100%", minWidth: "100%",
}}
remarkPlugins={[remarkGfm]}
>
{data}
</ReactMarkdown>
</div> </div>
} }
</div> </div>
-192
View File
@@ -12,8 +12,6 @@ import {
} from "@mui/material"; } from "@mui/material";
import { useAlert } from "react-alert"; import { useAlert } from "react-alert";
import detectEthereumProvider from "@metamask/detect-provider";
const Settings = (props) => { const Settings = (props) => {
const { globalUrl, isLoaded, userdata, setUserData } = props; const { globalUrl, isLoaded, userdata, setUserData } = props;
const alert = useAlert(); const alert = useAlert();
@@ -814,65 +812,6 @@ const Settings = (props) => {
) : null} ) : null}
</div> </div>
<div style={{ flex: 1, marginTop: 20 }}> <div style={{ flex: 1, marginTop: 20 }}>
{/*userdata !== undefined &&
userdata.eth_info !== undefined &&
userdata.eth_info.account !== undefined &&
userdata.eth_info.account.length > 0 ? (
<div style={{ width: "100%", textAlign: "left" }}>
<Typography variant="body2">Network: TBD</Typography>
<Typography variant="body2">
Address: {userdata.eth_info.account}
</Typography>
{loadedWorkflowCollections.length > 0 ? (
<Typography variant="body2">
Collections:&nbsp;
{loadedWorkflowCollections.map((data, index) => {
var collectionname = data.toLowerCase();
collectionname = collectionname.replaceAll("#", "");
collectionname = collectionname.replaceAll(" ", "-");
return (
<span key={index}>
<a
rel="noopener noreferrer"
target="_blank"
href={`https://opensea.io/collection/${collectionname}`}
style={{ textDecoration: "none", color: "#f85a3e" }}
>
{data}
</a>
&nbsp;
</span>
);
})}
</Typography>
) : null}
<Button
style={{ height: 40, marginTop: 10 }}
variant="contained"
color="primary"
fullWidth={true}
onClick={() => {
//handleEthereumTokenCreation()
loadWorkflowOwnership();
}}
>
Validate ownership
</Button>
</div>
) : (
<Button
style={{ height: 40, marginTop: 10 }}
variant="outlined"
color="primary"
fullWidth={true}
onClick={() => {
handleEthereumConnection();
}}
>
Authenticate Metamask Wallet
</Button>
)*/}
</div> </div>
</div> </div>
@@ -986,137 +925,6 @@ const Settings = (props) => {
//saveWorkflow(workflow); //saveWorkflow(workflow);
} }
const handleEthereumTokenCreation = async () => {
const provider = await detectEthereumProvider();
if (!provider) {
console.log("Please install MetaMask!");
alert.error(
"Please download the MetaMask browser extension to authenticate fully!"
);
return;
}
if (!provider.isMetaMask) {
alert.error("Only MetaMask is supported as of now.");
return;
}
if (!provider.isConnected()) {
alert.error("Metamask is not connected.");
return;
}
console.log("Should make a token");
};
const handleEthereumConnection = async () => {
const provider = await detectEthereumProvider();
if (!provider) {
console.log("Please install MetaMask!");
alert.error(
"Please download the MetaMask browser extension to authenticate fully!"
);
return;
}
if (!provider.isMetaMask) {
alert.error("Only MetaMask is supported as of now.");
return;
}
// Find the ethereum network
// Get the users' account(s)
//alert.info("Connecting to MetaMask")
//console.log("Connected: ", provider.isConnected())
if (!provider.isConnected()) {
alert.error("Metamask is not connected.");
return;
}
provider.on("message", (event) => {
alert.info("Ethereum message: ", event);
});
/*
params: [
{
from: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',
to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567',
gas: '0x76c0', // 30400
gasPrice: '0x9184e72a000', // 10000000000000
value: '0x9184e72a', // 2441406250
data:
'0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675',
},
]
*/
// https://docs.metamask.io/guide/rpc-api.html
// Gets accounts - requires previous permissions
//const method = "eth_accounts"
//const params = []
//
// Asks for permission, and gets the accounts
var method = "eth_requestAccounts";
var params = [];
provider
.request({
method: method,
params,
})
.then((result) => {
if (result !== undefined && result !== null && result.length > 0) {
userdata.eth_info.account = result[0];
// Getting and setting balance for the current user
method = "eth_getBalance";
params = [userdata.eth_info.account, "latest"];
provider
.request({
method: method,
params,
})
.then((result) => {
if (
result !== undefined &&
result !== null &&
result.length > 0
) {
userdata.eth_info.balance = result;
userdata.eth_info.parsed_balance = result / 1000000000000000000;
console.log(userdata.eth_info);
setUserData(userdata.eth_info);
// Updating
//if (userdata.eth_info !== userdata.userdata.eth_info) {
//}
setUser(userdata.id, "eth_info", userdata.eth_info);
userdata.userdata.eth_info = userdata.eth_info;
} else {
alert.error("Couldn't find balance: ", result);
}
// The result varies by RPC method.
// For example, this method will return a transaction hash hexadecimal string on success.
})
.catch((error) => {
// If the request fails, the Promise will reject with an error.
//setEthInfo(userdata.eth_info)
alert.error("Failed getting info from ethereum API: " + error);
});
} else {
alert.error("Couldn't find any user: ", result);
}
})
.catch((error) => {
// If the request fails, the Promise will reject with an error.
alert.error("Failed getting info from ethereum API: " + error);
});
// Gets the users' balance in WEI (one quintilionth ETH)
};
const loadedCheck = const loadedCheck =
isLoaded && !firstrequest ? ( isLoaded && !firstrequest ? (
<div style={bodyDivStyle}>{landingpageData}</div> <div style={bodyDivStyle}>{landingpageData}</div>
+5 -5
View File
@@ -11,7 +11,7 @@ import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos';
import { import {
Grid, Grid,
Container, Container,
Fade, Collapse,
Typography, Typography,
Paper, Paper,
Button, Button,
@@ -417,7 +417,7 @@ const Welcome = (props) => {
<Typography variant="h6" style={{textAlign: "center", marginBottom: 25, }}> <Typography variant="h6" style={{textAlign: "center", marginBottom: 25, }}>
App Framework App Framework
</Typography> </Typography>
<Fade> <Collapse>
<AppFramework <AppFramework
inputUsecase={inputUsecase} inputUsecase={inputUsecase}
frameworkData={frameworkData} frameworkData={frameworkData}
@@ -435,13 +435,13 @@ const Welcome = (props) => {
inputUsecases={usecases} inputUsecases={usecases}
setInputUsecases={setUsecases} setInputUsecases={setUsecases}
/> />
</Fade> </Collapse>
</div> </div>
} }
</Grid> </Grid>
</div> </div>
: :
<Fade in={true}> <Collapse in={true}>
<div style={{maxWidth: 700, margin: "auto", marginTop: 50, }}> <div style={{maxWidth: 700, margin: "auto", marginTop: 50, }}>
{/* {/*
<div style={{display:"flex"}}> <div style={{display:"flex"}}>
@@ -537,7 +537,7 @@ const Welcome = (props) => {
</Typography> </Typography>
</div> </div>
</div> </div>
</Fade> </Collapse>
} }
</div> </div>
) )
+14 -217
View File
@@ -8,7 +8,7 @@ import { Navigate } from "react-router-dom";
import SecurityFramework from '../components/SecurityFramework.jsx'; import SecurityFramework from '../components/SecurityFramework.jsx';
import EditWorkflow from "../components/EditWorkflow.jsx" import EditWorkflow from "../components/EditWorkflow.jsx"
import { ShepherdTour, ShepherdTourContext } from 'react-shepherd' //import { ShepherdTour, ShepherdTourContext } from 'react-shepherd'
import Priority from "../components/Priority.jsx"; import Priority from "../components/Priority.jsx";
import { isMobile } from "react-device-detect" import { isMobile } from "react-device-detect"
@@ -1272,11 +1272,11 @@ const Workflows = (props) => {
width: "100%", width: "100%",
color: "white", color: "white",
backgroundColor: surfaceColor, backgroundColor: surfaceColor,
padding: "12px 12px 0px 15px",
borderRadius: 5, borderRadius: 5,
display: "flex", display: "flex",
boxSizing: "border-box", boxSizing: "border-box",
position: "relative", position: "relative",
padding: "12px 12px 0px 15px",
}; };
const gridContainer = { const gridContainer = {
@@ -1606,7 +1606,6 @@ const Workflows = (props) => {
maxWidth: "100%", maxWidth: "100%",
minWidth: paperAppStyle.width, minWidth: paperAppStyle.width,
color: innerColor, color: innerColor,
padding: paperAppStyle.padding,
borderRadius: paperAppStyle.borderRadius, borderRadius: paperAppStyle.borderRadius,
display: "flex", display: "flex",
boxSizing: "border-box", boxSizing: "border-box",
@@ -1614,10 +1613,12 @@ const Workflows = (props) => {
border: `2px solid ${innerColor}`, border: `2px solid ${innerColor}`,
cursor: "pointer", cursor: "pointer",
backgroundColor: hover ? "rgba(39,41,45,0.5)" : "rgba(39,41,45,1)", backgroundColor: hover ? "rgba(39,41,45,0.5)" : "rgba(39,41,45,1)",
padding: paperAppStyle.padding,
}; };
return ( return (
<Grid item xs={isMobile ? 12 : 4} style={{ padding: "12px 10px 12px 10px" }}> <Grid item xs={isMobile ? 12 : 4} style={{ }}>
<Paper <Paper
square square
style={setupPaperStyle} style={setupPaperStyle}
@@ -3066,153 +3067,12 @@ const Workflows = (props) => {
</span> </span>
); );
// const tourOptions = {
// defaultStepOptions: {
// classes: "shadow-md bg-purple-dark",
// scrollTo: true
// },
// useModalOverlay: true,
// tourName: workflows,
// exitOnEsc: true,
// }
// //classes: "custom-class-name-1 custom-class-name-2",
// const newSteps = [
// {
// id: "intro",
// scrollTo: true,
// beforeShowPromise: function() {
// return new Promise(function(resolve) {
// setTimeout(function() {
// window.scrollTo(0, 0);
// resolve();
// }, 500);
// });
// },
// buttons: [
// {
// classes: "shepherd-button-primary",
// style: {
// backgroundColor: "red",
// color: "white",
// },
// text: "Next",
// type: "next"
// }
// ],
// highlightClass: "highlight",
// showCancelLink: true,
// text: [
// "React-Shepherd is a JavaScript library for guiding users through your React app."
// ],
// when: {
// show: () => {
// console.log("show step 1");
// },
// hide: () => {
// console.log("hide step 1");
// }
// }
// },
// {
// id: "second",
// attachTo: {
// element: "second-step",
// on: "top"
// },
// text: [
// "Yuk eksplorasi hasil Tes Minat Bakat-mu dan rekomendasi <b>Jurusan</b> dan Karier."
// ],
// buttons: [
// {
// classes: "btn btn-info",
// text: "Kembali",
// type: "back"
// },
// {
// classes: "btn btn-success",
// text: "Saya Mengerti",
// type: "cancel"
// }
// ],
// when: {
// show: () => {
// console.log("show stepp");
// },
// hide: () => {
// console.log("complete step");
// }
// },
// showCancelLink: false,
// scrollTo: true,
// modalOverlayOpeningPadding: 4,
// useModalOverlay: false,
// canClickTarget: false
// }
// ]
// function TourButton() {
// const tour = useContext(ShepherdTourContext);
// return (
// <Button variant="contained" color="primary" onClick={tour.start}>
// Start Tour
// </Button>
// );
// }
const WorkflowView = () => { const WorkflowView = () => {
if (workflows.length === 0) { if (workflows.length === 0) {
// Not going there yet // Not going there yet
//if ((userdata.tutorials !== undefined && userdata.tutorials !== null && !userdata.tutorials.includes("getting-started")) || userdata.tutorials === null) { //if ((userdata.tutorials !== undefined && userdata.tutorials !== null && !userdata.tutorials.includes("getting-started")) || userdata.tutorials === null) {
// return <Navigate to="/getting-started" replace />; // return <Navigate to="/getting-started" replace />;
//} //}
//return (
// <div style={emptyWorkflowStyle}>
// <Paper style={boxStyle}>
// <div>
// <h2>Welcome to Shuffle</h2>
// </div>
// <div>
// <p>
// <b>Shuffle</b> is a flexible, easy to use, automation platform
// allowing users to integrate their services and devices freely.
// It's made to significantly reduce the amount of manual labor,
// and is focused on security applications.{" "}
// <a
// href="/docs/about"
// style={{ textDecoration: "none", color: "#f85a3e" }}
// >
// Click here to learn more.
// </a>
// </p>
// </div>
// <div>
// If you want to jump straight into it, click here to create your
// first workflow:
// </div>
// <div style={{ display: "flex" }}>
// <Button
// id="second-step"
// color="primary"
// style={{ marginTop: "20px" }}
// variant="outlined"
// onClick={() => setModalOpen(true)}
// >
// New workflow
// </Button>
// <span style={{ paddingTop: 20, display: "flex" }}>
// <Typography
// style={{ marginTop: 5, marginLeft: 30, marginRight: 15 }}
// >
// ..OR
// </Typography>
// {workflowButtons}
// </span>
// </div>
// </Paper>
// </div>
//)
} }
var workflowDelay = -150 var workflowDelay = -150
@@ -3228,20 +3088,6 @@ const Workflows = (props) => {
Workflows Workflows
</Typography> </Typography>
</div> </div>
{/*
<div style={{ flex: 1 }}>
<Typography style={{ marginTop: 7, marginBottom: "auto" }}>
<a
rel="noopener noreferrer"
target="_blank"
href="https://shuffler.io/docs/workflows"
style={{ textDecoration: "none", color: "#f85a3e" }}
>
Learn more about Workflows
</a>
</Typography>
</div>
*/}
{isMobile ? null : {isMobile ? null :
<div style={{ display: "flex", margin: "0px 0px 20px 0px" }}> <div style={{ display: "flex", margin: "0px 0px 20px 0px" }}>
<div style={{ flex: 1, float: "right" }}> <div style={{ flex: 1, float: "right" }}>
@@ -3272,53 +3118,6 @@ const Workflows = (props) => {
{workflowButtons} {workflowButtons}
</div> </div>
</div> </div>
{/*
<div style={flexContainerStyle}>
<div style={{...flexBoxStyle, ...activeWorkflowStyle}}>
<div style={flexContentStyle}>
<div><img src={mobileImage} style={iconStyle} /></div>
<div style={ blockRightStyle }>
<div style={counterStyle}>{workflows.length}</div>
<div style={fontSize_16}>ACTIVE WORKFLOWS</div>
</div>
</div>
</div>
<div style={{...flexBoxStyle, ...availableWorkflowStyle}}>
<div style={flexContentStyle}>
<div><img src={bookImage} style={iconStyle} /></div>
<div style={ blockRightStyle }>
<div style={counterStyle}>{workflows.length}</div>
<div style={fontSize_16}>AVAILABE WORKFLOWS</div>
</div>
</div>
</div>
<div style={{...flexBoxStyle, ...notificationStyle}}>
<div style={flexContentStyle}>
<div><img src={bagImage} style={iconStyle} /></div>
<div style={ blockRightStyle }>
<div style={counterStyle}>{workflows.length}</div>
<div style={fontSize_16}>NOTIFICATIONS</div>
</div>
</div>
</div>
</div>
*/}
{/*
chipRenderer={({ value, isFocused, isDisabled, handleClick, handleRequestDelete }, key) => {
console.log("VALUE: ", value)
return (
<Chip
key={key}
style={chipStyle}
>
{value}
</Chip>
)
}}
*/}
<div style={{width: "100%", minHeight: isMobile ? 0 : 51, maxHeight: isMobile ? 0 : 51, marginTop: 10, }}> <div style={{width: "100%", minHeight: isMobile ? 0 : 51, maxHeight: isMobile ? 0 : 51, marginTop: 10, }}>
{!isMobile && usecases !== null && usecases !== undefined && usecases.length > 0 ? {!isMobile && usecases !== null && usecases !== undefined && usecases.length > 0 ?
@@ -3367,10 +3166,7 @@ const Workflows = (props) => {
</div> </div>
<div style={{ marginTop: 10, marginBottom: 10, }} /> <div style={{ marginTop: 10, marginBottom: 10, }} />
{!isMobile && {!isMobile && actionImageList !== undefined && actionImageList !== null && actionImageList.length > 0 ? (
actionImageList !== undefined &&
actionImageList !== null &&
actionImageList.length > 0 ? (
<div <div
style={{ style={{
display: "flex", display: "flex",
@@ -3459,10 +3255,11 @@ const Workflows = (props) => {
return returnData return returnData
} }
/*<Zoom key={index} in={true} style={{ transitionDelay: `${appDelay}ms` }}>*/
return ( return (
<Zoom key={index} in={true} style={{ transitionDelay: `${appDelay}ms` }}> <span>
{returnData} {returnData}
</Zoom> </span>
); );
})} })}
</div> </div>
@@ -3499,13 +3296,11 @@ const Workflows = (props) => {
/> />
: null} : null}
{/*<Zoom in={true} style={{ transitionDelay: `${workflowDelay}ms` }}>*/}
<div style={{marginTop: 15, marginBottom: 50, }}> <div style={{marginTop: 15, marginBottom: 50, }}>
{view === "grid" ? ( {view === "grid" ? (
<Grid container spacing={filteredWorkflows.length === 0 ? 12 : filteredWorkflows.length === 1 ? 6 : 4} style={paperAppContainer}> <Grid container spacing={filteredWorkflows.length === 0 ? 12 : filteredWorkflows.length === 1 ? 6 : 4} style={paperAppContainer}>
<Zoom in={true} style={{ transitionDelay: `${workflowDelay}ms` }}>
<NewWorkflowPaper /> <NewWorkflowPaper />
</Zoom>
{filteredWorkflows.map((data, index) => { {filteredWorkflows.map((data, index) => {
// Shouldn't be a part of this list // Shouldn't be a part of this list
if (data.public === true) { if (data.public === true) {
@@ -3516,15 +3311,17 @@ const Workflows = (props) => {
workflowDelay += 75 workflowDelay += 75
} else { } else {
return ( return (
<Grid key={index} item xs={isMobile ? 12 : 4} style={{ padding: "12px 10px 12px 10px" }}> <Zoom key={index} in={true} style={{ transitionDelay: `${workflowDelay}ms` }}>
<Grid key={index} item xs={isMobile ? 12 : 4} style={{}}>
<WorkflowPaper key={index} data={data} /> <WorkflowPaper key={index} data={data} />
</Grid> </Grid>
</Zoom>
) )
} }
return ( return (
<Zoom key={index} in={true} style={{ transitionDelay: `${workflowDelay}ms` }}> <Zoom key={index} in={true} style={{ transitionDelay: `${workflowDelay}ms` }}>
<Grid item xs={isMobile ? 12 : 4} style={{ padding: "12px 10px 12px 10px" }}> <Grid item xs={isMobile ? 12 : 4} style={{}}>
<WorkflowPaper key={index} data={data} /> <WorkflowPaper key={index} data={data} />
</Grid> </Grid>
</Zoom> </Zoom>
+1 -1
View File
@@ -1,5 +1,5 @@
NAME=shuffle-orborus NAME=shuffle-orborus
VERSION=1.2.1 VERSION=1.2.2
echo "Running docker build with $NAME:$VERSION" echo "Running docker build with $NAME:$VERSION"
#docker rmi frikky/shuffle:$NAME --force #docker rmi frikky/shuffle:$NAME --force
+1 -1
View File
@@ -1,5 +1,5 @@
NAME=shuffle-worker NAME=shuffle-worker
VERSION=1.2.0 VERSION=1.2.1
echo "Running docker build with $NAME:$VERSION" echo "Running docker build with $NAME:$VERSION"
#CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o worker.bin . #CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o worker.bin .