Updates from cloud pre merge

This commit is contained in:
Frikky
2024-07-31 19:30:47 +02:00
parent d5274e9da1
commit 9734a014b9
9 changed files with 253 additions and 84 deletions
+5 -6
View File
@@ -54,7 +54,6 @@ const Billing = (props) => {
const { globalUrl, userdata, serverside, billingInfo, stripeKey, selectedOrganization, handleGetOrg, clickedFromOrgTab } = props; const { globalUrl, userdata, serverside, billingInfo, stripeKey, selectedOrganization, handleGetOrg, clickedFromOrgTab } = props;
//const alert = useAlert(); //const alert = useAlert();
let navigate = useNavigate(); let navigate = useNavigate();
const [selectedDealModalOpen, setSelectedDealModalOpen] = React.useState(false); const [selectedDealModalOpen, setSelectedDealModalOpen] = React.useState(false);
const [dealList, setDealList] = React.useState([]); const [dealList, setDealList] = React.useState([]);
const [dealName, setDealName] = React.useState(""); const [dealName, setDealName] = React.useState("");
@@ -1055,10 +1054,10 @@ const Billing = (props) => {
Consultation & Management Consultation & Management
</Typography> </Typography>
<div> <div>
<Typography variant="body2" color="textSecondary" style={{ marginTop: 10, }}> <Typography variant="body2" color="textSecondary" style={{ marginTop: userdata.support ? 5 : 10, }}>
You currently have a total of {inputHour} hours and {inputMinutes} minutes of professional services available by our experts. You currently have a total of {inputHour} hours and {inputMinutes} minutes of professional services available by our experts.
</Typography> </Typography>
<div style={{ display: "flex", minWidth: 340, justifyContent: 'center', marginTop: userdata.support ? 0 : 10 }}> <div style={{ display: "flex", minWidth: 340, justifyContent: 'center', marginTop: userdata.support ? 0 : 15 }}>
{editConsultation ? {editConsultation ?
<> <>
<TextField <TextField
@@ -1106,7 +1105,7 @@ const Billing = (props) => {
{editConsultation && <Button variant="contained" color="primary" style={{ marginLeft: 5, textTransform: 'none' }} onClick={handleSave}>Save</Button>} {editConsultation && <Button variant="contained" color="primary" style={{ marginLeft: 5, textTransform: 'none' }} onClick={handleSave}>Save</Button>}
</div> </div>
: null} : null}
<Typography variant="body2" color="textSecondary" style={{ marginTop: userdata.support ? 5 : 10, }}> <Typography variant="body2" color="textSecondary" style={{ marginTop: userdata.support ? 5 : 25, }}>
Features Features
</Typography> </Typography>
<ul> <ul>
@@ -1331,7 +1330,7 @@ const Billing = (props) => {
Become a Shuffle Expert Become a Shuffle Expert
</Typography> </Typography>
<div> <div>
<Typography variant="body2" color="textSecondary" style={{ marginTop: 10, }}> <Typography variant="body2" color="textSecondary" style={{ marginTop: 25, }}>
Public Training Public Training
</Typography> </Typography>
<ul> <ul>
@@ -1346,7 +1345,7 @@ const Billing = (props) => {
</Typography> </Typography>
</li> </li>
</ul> </ul>
<Typography variant="body2" color="textSecondary" style={{ marginTop: 10, }}> <Typography variant="body2" color="textSecondary" style={{ marginTop: 20, }}>
Private Training Private Training
</Typography> </Typography>
<ul> <ul>
+54 -18
View File
@@ -3,15 +3,25 @@ import ReactGA from 'react-ga4';
import theme from "../theme.jsx"; import theme from "../theme.jsx";
import { ToastContainer, toast } from "react-toastify" import { ToastContainer, toast } from "react-toastify"
import {
CheckCircle as CheckCircleIcon,
} from "@mui/icons-material";
import { import {
Paper, Paper,
Typography, Typography,
Divider, Divider,
Button, Button,
Tooltip,
Grid, Grid,
Card, Card,
} from "@mui/material"; } from "@mui/material";
import {
red,
green,
} from "../views/AngularWorkflow.jsx"
//import { useAlert //import { useAlert
const Branding = (props) => { const Branding = (props) => {
@@ -45,7 +55,7 @@ const Branding = (props) => {
toast("Failed updating org: ", responseJson.reason); toast("Failed updating org: ", responseJson.reason);
} else { } else {
if (joinStatus == "join") { if (joinStatus == "join") {
setPublishingInfo("Your organization is now part of the Creator Incentive Program. You can now create and publish content to your organization's page. You can also create a creator account to manage your organization's content.") setPublishingInfo("Your organization is now part of the Partner Program. You can now create, publish and manage content for your organization's public page.")
} else { } else {
setPublishingInfo("Your organization is no longer part of the Creator Incentive Program. You can still create a creator account to manage your organization's content.") setPublishingInfo("Your organization is no longer part of the Creator Incentive Program. You can still create a creator account to manage your organization's content.")
} }
@@ -70,7 +80,15 @@ const Branding = (props) => {
} }
const isOrganizationReady = () => { const isOrganizationReady = () => {
console.log("Is organization ready?")
// Check if it's a suborg
if (selectedOrganization.creator_org !== "") {
const comment = "Child orgs can't become creators"
if (!publishRequirements.includes(comment)) {
setPublishRequirements([...publishRequirements, comment])
}
return false;
}
// A simple checklist to ensure the button shows up properly // A simple checklist to ensure the button shows up properly
if (selectedOrganization.name === selectedOrganization.org) { if (selectedOrganization.name === selectedOrganization.org) {
@@ -82,15 +100,6 @@ const Branding = (props) => {
return false; return false;
} }
// Check if it's a suborg
if (selectedOrganization.creator_org !== "") {
const comment = "Child orgs can't become creators"
if (!publishRequirements.includes(comment)) {
setPublishRequirements([...publishRequirements, comment])
}
return false;
}
if (selectedOrganization.large_image === "" || selectedOrganization.large_image === theme.palette.defaultImage) { if (selectedOrganization.large_image === "" || selectedOrganization.large_image === theme.palette.defaultImage) {
const comment = "Add a logo for your organization" const comment = "Add a logo for your organization"
if (!publishRequirements.includes(comment)) { if (!publishRequirements.includes(comment)) {
@@ -102,6 +111,14 @@ const Branding = (props) => {
return true return true
} }
const isPublished = selectedOrganization.creator_id === ""
const leadinfo = selectedOrganization.lead_info === undefined || selectedOrganization.lead_info === null || selectedOrganization.lead_info === "" ? "" : JSON.stringify(selectedOrganization.lead_info)
const isPartner = leadinfo.includes("partner")
console.log("LEADINFO: ", leadinfo)
console.log("SELECTEDORGANIZATION: ", selectedOrganization)
return ( return (
<div style={{ width: clickedFromOrgTab? 1030: "auto", padding: 27, height: "auto", backgroundColor: '#212121', borderRadius: '16px', }}> <div style={{ width: clickedFromOrgTab? 1030: "auto", padding: 27, height: "auto", backgroundColor: '#212121', borderRadius: '16px', }}>
<h2 style={{marginTop: clickedFromOrgTab ?0:null,}}> <h2 style={{marginTop: clickedFromOrgTab ?0:null,}}>
@@ -111,27 +128,46 @@ const Branding = (props) => {
You can customize your organization's branding by uploading a logo, changing the color scheme and a lot more. You can customize your organization's branding by uploading a logo, changing the color scheme and a lot more.
</Typography> </Typography>
<Typography variant="body1" color="textSecondary" style={{ marginTop: 20, marginBottom: 10 }}>
{isPublished ? <CheckCircleIcon style={{color: red, }} /> : <CheckCircleIcon style={{color: green, }} />}
<span style={{marginLeft: 10, color: isPublished ? red : green, }}>{isPublished ? "Not Published" : "Published"}</span>
</Typography>
<a href="https://shuffler.io/partners" target="_blank" style={{ textDecoration: "none", }}>
<Typography variant="body1" color="textSecondary" style={{ marginTop: 20, marginBottom: 10 }}>
{!isPartner ? <CheckCircleIcon style={{color: red, }} /> : <CheckCircleIcon style={{color: green, }} />}
<Tooltip title="Official Partner Program (manual verification)" placement="top" arrow>
<span style={{marginLeft: 10, color: !isPartner ? red : green, }}>{!isPartner? "Not Officially Partnered" : "Officially Partnered"}</span>
</Tooltip>
</Typography>
</a>
<a href={`/partners/${selectedOrganization.creator_id}/edit`} target="_blank">
<Button disabled={isPublished} variant="contained" style={{ marginTop: 20, marginBottom: 10, }} onClick={() => {
}}>
Modify Public Partner Details
</Button>
</a>
<Divider style={{marginTop: 50, marginBottom: 50, }} /> <Divider style={{marginTop: 50, marginBottom: 50, }} />
<h2> <h2>
Creator Incentive Program Partner Program
</h2> </h2>
<div style={{ display: "flex", width: 900, }}> <div style={{ display: "flex", width: 900, }}>
<div> <div>
<span> <span>
<Typography variant="body1" color="textSecondary"> <Typography variant="body1" color="textSecondary">
By changing publishing settings, you agree to our <a href="/docs/terms_of_service" target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}}>Terms of Service</a>, and acknowledge that your organization's non-sensitive data will be added as a <a target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}} href="https://shuffler.io/creators">creator account</a>. None of your existing workflows, apps, or other stored data will be published. Any admin in your organization can manage the creator configuration. Becoming a creator organization is reversible.<div/>Support: <a href="mailto:support@shuffler.io"target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}}>support@shuffler.io</a> By changing publishing settings, you agree to our <a href="/docs/terms_of_service" target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}}>Terms of Service</a>, and acknowledge that your organization's non-sensitive data will be added as a <a target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}} href="https://shuffler.io/creators">creator account</a>. None of your existing workflows, apps, or other stored data will be published. Any admin in your organization can manage the creator configuration. Becoming a creator organization IS reversible.<div/>Support: <a href="mailto:support@shuffler.io"target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}}>support@shuffler.io</a>
</Typography> </Typography>
{selectedOrganization.creator_id == "" ? {selectedOrganization.creator_id == "" ?
<Typography variant="h6" color="textSecondary" style={{ marginTop: 20, marginBottom: 10, color: "grey", }}> <Typography variant="h6" color="textSecondary" style={{ marginTop: 20, marginBottom: 10, color: "grey", }}>
&nbsp; &nbsp;
</Typography> </Typography>
: :
<Typography variant="h6" color="textSecondary" style={{ marginTop: 20, marginBottom: 10, color: "grey", }}> null
<a href={`/creators/${selectedOrganization.creator_id}`} target="_blank" style={{ textDecoration: "none", color: "#f86a3e"}}>Modify your creator organization</a>
</Typography>
} }
<Button <Button
style={{ height: 40, marginTop: 10, width: 300, }} style={{ height: 40, marginTop: 10, width: 300, }}
variant={selectedOrganization.creator_id == "" ? "contained" : "outlined"} variant={selectedOrganization.creator_id == "" ? "contained" : "outlined"}
@@ -141,7 +177,7 @@ const Branding = (props) => {
handleChangePublishing(); handleChangePublishing();
}} }}
> >
{selectedOrganization.creator_id == "" ? "Join" : "Leave"} Creators {selectedOrganization.creator_id == "" ? "Join" : "Leave"} Partner Program
</Button> </Button>
<Typography variant="body1" color="textSecondary" style={{ marginTop: 20, marginBottom: 10, color: "white", }}> <Typography variant="body1" color="textSecondary" style={{ marginTop: 20, marginBottom: 10, color: "white", }}>
+1 -1
View File
@@ -690,7 +690,7 @@ const LicencePopup = (props) => {
const priceItem = window.location.origin === "https://shuffler.io" ? const priceItem = window.location.origin === "https://shuffler.io" ?
shuffleVariant === 0 ? "app_executions" : "cores" shuffleVariant === 0 ? "app_executions" : "cores"
: :
shuffleVariant === 0 ? "price_1PbO0cEJjT17t98NsfEMUlMn" : "price_1PbNnaEJjT17t98NLadq6Lhq" shuffleVariant === 0 ? "price_1PZPSSEJjT17t98NLJoTMYja" : "price_1PZPQuEJjT17t98N3yORUtd9"
const successUrl = `${window.location.origin}/admin?admin_tab=billing&payment=success` const successUrl = `${window.location.origin}/admin?admin_tab=billing&payment=success`
const failUrl = `${window.location.origin}/pricing?admin_tab=billing&payment=failure` const failUrl = `${window.location.origin}/pricing?admin_tab=billing&payment=failure`
+18 -6
View File
@@ -143,7 +143,7 @@ const Header = (props) => {
const [subAnchorEl, setSubAnchorEl] = React.useState(null); const [subAnchorEl, setSubAnchorEl] = React.useState(null);
const [upgradeHovered, setUpgradeHovered] = React.useState(false); const [upgradeHovered, setUpgradeHovered] = React.useState(false);
const [showTopbar, setShowTopbar] = useState(false) const [showTopbar, setShowTopbar] = useState(false)
const stripeKey = typeof window === 'undefined' || window.location === undefined ? "" : window.location.origin === "https://shuffler.io" ? "pk_live_XAxwE2Fp9DEbEcNYw4UKmyby00vIlIPPRp" : "pk_test_51PXYYMEJjT17t98NbDkojZ3DRvsFUQBs35LGMx3i436BXwEBVFKB9nCvHt0Q3M4MG3dz4mHheuWvfoYvpaL3GmsG00k1Rb2ksO" const stripeKey = typeof window === 'undefined' || window.location === undefined ? "" : window.location.origin === "https://shuffler.io" ? "pk_live_51PXYYMEJjT17t98N20qEqItyt1fLQjrnn41lPeG2PjnSlZHTDNKHuisAbW00s4KAn86nGuqB9uSVU4ds8MutbnMU00DPXpZ8ZD" : "pk_test_51PXYYMEJjT17t98NbDkojZ3DRvsFUQBs35LGMx3i436BXwEBVFKB9nCvHt0Q3M4MG3dz4mHheuWvfoYvpaL3GmsG00k1Rb2ksO"
let navigate = useNavigate(); let navigate = useNavigate();
const classes = useStyles(); const classes = useStyles();
@@ -171,8 +171,10 @@ const Header = (props) => {
setTooltipOpen(true); setTooltipOpen(true);
}; };
const topbar_var = "topbar_closed2"
useEffect(() => { useEffect(() => {
const topbar = localStorage.getItem("topbar_closed") const topbar = localStorage.getItem(topbar_var)
if (topbar === "true") { if (topbar === "true") {
setShowTopbar(false) setShowTopbar(false)
} else { } else {
@@ -919,8 +921,8 @@ const Header = (props) => {
</MenuItem> </MenuItem>
)} )}
<div className={classes.divider} /> <div className={classes.divider} />
<MenuItem className={classes.dropdownMenuItem} onClick={() => handleMenuItemClick('/professional-support')}> <MenuItem className={classes.dropdownMenuItem} onClick={() => handleMenuItemClick('/professional-services')}>
<Link to="/professional-support" style={hrefStyle}> <Link to="/professional-services" style={hrefStyle}>
Professional Services Professional Services
</Link> </Link>
</MenuItem> </MenuItem>
@@ -929,9 +931,19 @@ const Header = (props) => {
<Link to="/training" style={hrefStyle}> <Link to="/training" style={hrefStyle}>
Training Courses Training Courses
</Link> </Link>
</MenuItem>
<Divider />
<MenuItem className={classes.dropdownMenuItem} onClick={() => handleMenuItemClick('/partners')}>
<Link to="/partners" style={hrefStyle}>
Partner Program
</Link>
</MenuItem> </MenuItem>
</Menu> </Menu>
</ListItem> </ListItem>
{/* <ListItem style={{ textAlign: "center", marginLeft: 0, paddingRight: 0 }}> {/* <ListItem style={{ textAlign: "center", marginLeft: 0, paddingRight: 0 }}>
<Link rel="noopener noreferrer" to="/training" style={hrefStyle}> <Link rel="noopener noreferrer" to="/training" style={hrefStyle}>
<Button <Button
@@ -1627,7 +1639,7 @@ const Header = (props) => {
const topbarHeight = showTopbar ? 40 : 0 const topbarHeight = showTopbar ? 40 : 0
const topbar = !isCloud || !showTopbar ? null : const topbar = !isCloud || !showTopbar ? null :
curpath === "/" || curpath.includes("/docs") || curpath === "/pricing" || curpath === "/contact" || curpath === "/search" || curpath === "/usecases" || curpath === "/training" || curpath === "/professional-support" ? curpath === "/" || curpath.includes("/docs") || curpath === "/pricing" || curpath === "/contact" || curpath === "/search" || curpath === "/usecases" || curpath === "/training" || curpath === "/professional-services" ?
<span style={{ zIndex: 50001, }}> <span style={{ zIndex: 50001, }}>
<div style={{ position: "relative", height: topbarHeight, backgroundImage: "linear-gradient(to right, #f86a3e, #f34079)", overflow: "hidden", }}> <div style={{ position: "relative", height: topbarHeight, backgroundImage: "linear-gradient(to right, #f86a3e, #f34079)", overflow: "hidden", }}>
<Typography variant="body1" style={{ paddingTop: 7, margin: "auto", textAlign: "center", color: "white", }}> <Typography variant="body1" style={{ paddingTop: 7, margin: "auto", textAlign: "center", color: "white", }}>
@@ -1653,7 +1665,7 @@ const Header = (props) => {
setShowTopbar(false) setShowTopbar(false)
// Set storage that it's clicked // Set storage that it's clicked
localStorage.setItem("topbar_closed", "true") localStorage.setItem(topbar_var, "true")
}}> }}>
<CloseIcon /> <CloseIcon />
</IconButton> </IconButton>
+112 -17
View File
@@ -3,12 +3,13 @@ import { toast } from 'react-toastify';
import { makeStyles, createStyles } from "@mui/styles"; import { makeStyles, createStyles } from "@mui/styles";
import theme from '../theme.jsx'; import theme from '../theme.jsx';
import { useNavigate, Link, useParams } from "react-router-dom";
import { validateJson, GetIconInfo } from "../views/Workflows.jsx"; import { validateJson, GetIconInfo } from "../views/Workflows.jsx";
import { GetParsedPaths } from "../views/Apps.jsx"; import { GetParsedPaths } from "../views/Apps.jsx";
import { sortByKey } from "../views/AngularWorkflow.jsx"; import { sortByKey } from "../views/AngularWorkflow.jsx";
import { NestedMenuItem } from "mui-nested-menu"; import { NestedMenuItem } from "mui-nested-menu";
import { parsedDatatypeImages } from "../components/AppFramework.jsx"; import { parsedDatatypeImages } from "../components/AppFramework.jsx";
import { green, yellow, red } from "../views/AngularWorkflow.jsx"
//import { useAlert //import { useAlert
import { import {
@@ -174,7 +175,9 @@ const ParsedAction = (props) => {
setAiQueryModalOpen, setAiQueryModalOpen,
} = props; } = props;
let navigate = useNavigate();
const classes = useStyles(); const classes = useStyles();
const [hideBody, setHideBody] = React.useState(true) const [hideBody, setHideBody] = React.useState(true)
const [activateHidingBodyButton, setActivateHidingBodyButton] = React.useState(false) const [activateHidingBodyButton, setActivateHidingBodyButton] = React.useState(false)
const [appActionName, setAppActionName] = React.useState(selectedAction.label); const [appActionName, setAppActionName] = React.useState(selectedAction.label);
@@ -207,6 +210,22 @@ const ParsedAction = (props) => {
} }
}, [expansionModalOpen]) }, [expansionModalOpen])
useEffect(() => {
if (selectedActionEnvironment === undefined || selectedActionEnvironment === null || Object.keys(selectedActionEnvironment).length === 0) {
if (environments !== undefined && environments !== null && environments.length > 0) {
if (selectedAction.environment !== undefined && selectedAction.environment !== null) {
const foundenv = environments.find(env => env.id === selectedAction.environment || selectedAction.environment === env.Name)
if (foundenv !== undefined && foundenv !== null) {
setSelectedActionEnvironment(foundenv)
}
}
}
}
}, [])
useEffect(() => { useEffect(() => {
setParamValues(selectedAction.parameters.map((param) => { setParamValues(selectedAction.parameters.map((param) => {
return { return {
@@ -587,6 +606,7 @@ const ParsedAction = (props) => {
setParamValues(newParams); setParamValues(newParams);
changeActionParameter(event, count, data) changeActionParameter(event, count, data)
} }
const calculateHelpertext = (input_data) => { const calculateHelpertext = (input_data) => {
var helperText = "" var helperText = ""
var looperText = "" var looperText = ""
@@ -1889,6 +1909,7 @@ const ParsedAction = (props) => {
}} }}
labelId="select-app-auth" labelId="select-app-auth"
value={ value={
selectedAction.authentication_id === "authgroups" ? "authgroups" :
Object.getOwnPropertyNames(selectedAction.selectedAuthentication).length === 0 Object.getOwnPropertyNames(selectedAction.selectedAuthentication).length === 0
? "No selection" ? "No selection"
: selectedAction.selectedAuthentication : selectedAction.selectedAuthentication
@@ -1905,18 +1926,48 @@ const ParsedAction = (props) => {
selectedAction.authentication_id = ""; selectedAction.authentication_id = "";
for (let [key,keyval] in Object.entries(selectedAction.parameters)) { for (let [key,keyval] in Object.entries(selectedAction.parameters)) {
//console.log(selectedAction.parameters[key])
if (selectedAction.parameters[key].configuration) { if (selectedAction.parameters[key].configuration) {
selectedAction.parameters[key].value = "";
if (selectedAction.parameters[key].example !== undefined && selectedAction.parameters[key].example !== null && selectedAction.parameters[key].example !== "") {
if (selectedAction.parameters[key].example.toLowerCase().includes("api") || selectedAction.parameters[key].example.toLowerCase().includes("key") || selectedAction.parameters[key].example.toLowerCase().includes("pass")) {
selectedAction.parameters[key].value = ""
} else {
selectedAction.parameters[key].value = selectedAction.parameters[key].example
}
} else {
selectedAction.parameters[key].value = ""
}
} }
} }
setSelectedAction(selectedAction); setSelectedAction(selectedAction);
setUpdate(Math.random()); setUpdate(Math.random());
} else if (e.target.value === "authgroups") {
if (authGroups !== undefined && authGroups !== null && authGroups.length === 0) {
toast("No auth groups created. Opening window to create one")
setTimeout(() => {
window.open("/admin?tab=app_auth", "_blank")
}, 2500)
} else {
selectedAction.selectedAuthentication = {};
selectedAction.authentication_id = "authgroups"
for (let [key,keyval] in Object.entries(selectedAction.parameters)) {
//console.log(selectedAction.parameters[key])
if (selectedAction.parameters[key].configuration) {
selectedAction.parameters[key].value = "authgroup controlled"
}
}
setSelectedAction(selectedAction)
setUpdate(Math.random())
}
} else { } else {
selectedAction.selectedAuthentication = e.target.value; selectedAction.selectedAuthentication = e.target.value;
selectedAction.authentication_id = e.target.value.id; selectedAction.authentication_id = e.target.value.id;
setSelectedAction(selectedAction); setSelectedAction(selectedAction)
setUpdate(Math.random()); setUpdate(Math.random())
} }
}} }}
style={{ style={{
@@ -1972,6 +2023,19 @@ const ParsedAction = (props) => {
</MenuItem> </MenuItem>
); );
})} })}
<Divider style={{marginTop: 10, marginBottom: 10, }}/>
<MenuItem
style={{
backgroundColor: theme.palette.inputColor,
color: "white",
}}
value="authgroups"
>
<em>Auth Groups</em>
</MenuItem>
</Select> </Select>
{/* {/*
@@ -2002,6 +2066,7 @@ const ParsedAction = (props) => {
</div> </div>
) : null} ) : null}
{showEnvironment !== undefined && showEnvironment && environments.length > 1 && !isIntegration ? ( {showEnvironment !== undefined && showEnvironment && environments.length > 1 && !isIntegration ? (
<div style={{ marginTop: "20px" }}> <div style={{ marginTop: "20px" }}>
<Typography style={{color: "rgba(255,255,255,0.7)"}}>Environment</Typography> <Typography style={{color: "rgba(255,255,255,0.7)"}}>Environment</Typography>
@@ -2010,10 +2075,7 @@ const ParsedAction = (props) => {
disableScrollLock: true, disableScrollLock: true,
}} }}
value={ value={
selectedActionEnvironment === undefined || selectedActionEnvironment === null || selectedActionEnvironment === undefined || selectedActionEnvironment === null || selectedActionEnvironment.Name === undefined || selectedActionEnvironment.Name === null ? isCloud ? "Cloud" : "Shuffle" : selectedActionEnvironment.Name
selectedActionEnvironment.Name === undefined || selectedActionEnvironment.Name === null
? isCloud ? "Cloud" : "Shuffle"
: selectedActionEnvironment.Name
} }
SelectDisplayProps={{ SelectDisplayProps={{
style: { style: {
@@ -2030,7 +2092,7 @@ const ParsedAction = (props) => {
workflow.actions[actionkey].environment = env.Name workflow.actions[actionkey].environment = env.Name
} }
setWorkflow(workflow) setWorkflow(workflow)
toast("Set environment for ALL actions to " + env.Name) toast.success("Set environment for ALL actions to " + env.Name)
}} }}
style={{ style={{
backgroundColor: theme.palette.inputColor, backgroundColor: theme.palette.inputColor,
@@ -2041,9 +2103,11 @@ const ParsedAction = (props) => {
> >
{environments.map((data, index) => { {environments.map((data, index) => {
if (data.archived === true) { if (data.archived === true) {
return null; return null
} }
const isRunning = data.running_ip !== ""
return ( return (
<MenuItem <MenuItem
key={data.Name} key={data.Name}
@@ -2053,6 +2117,27 @@ const ParsedAction = (props) => {
}} }}
value={data.Name} value={data.Name}
> >
{data.Name === "cloud" || data.Name === "Cloud" ? null : !isRunning ?
<a href={`/admin?tab=environments&env=${data.Name}`} target="_blank" style={{textDecoration: "none",}}>
<Tooltip title={"Click to configure the environment"} placement="top">
<Chip
style={{marginLeft: 0, padding: 0, marginRight: 10, cursor: "pointer", backgroundColor: red, }}
label={"Stopped"}
variant="outlined"
color="secondary"
onClick={(e) => {
e.preventDefault()
e.stopPropagation()
window.open(`/admin?tab=environments&env=${data.Name}`, "_blank", "noopener,noreferrer")
}}
/>
</Tooltip>
</a>
: null}
{data.default === true ? {data.default === true ?
<Chip <Chip
style={{marginLeft: 0, padding: 0, marginRight: 10, cursor: "pointer",}} style={{marginLeft: 0, padding: 0, marginRight: 10, cursor: "pointer",}}
@@ -2061,12 +2146,22 @@ const ParsedAction = (props) => {
color="secondary" color="secondary"
/> />
: null} : null}
{data.Name} {data.Name}
</MenuItem> </MenuItem>
); );
})} })}
</Select> </Select>
</div>
{/*selectedActionEnvironment.running_ip === "" && selectedActionEnvironment.Name !== "Cloud" && selectedActionEnvironment.Name !== "cloud" ?
<a href={`/admin?tab=environment&env=${selectedActionEnvironment.Name}`} target="_blank" style={{textDecoration: "none", color: "#f85a3e",}}>
<Typography style={{}}>
Configure the environment
</Typography>
</a>
: null*/}
</div>
) : null} ) : null}
{workflow.execution_variables !== undefined && {workflow.execution_variables !== undefined &&
workflow.execution_variables !== null && workflow.execution_variables !== null &&
@@ -2693,6 +2788,10 @@ const ParsedAction = (props) => {
return null return null
} }
if (data.value === "authgroup controlled") {
return null
}
// selectedAction.selectedAuthentication = e.target.value // selectedAction.selectedAuthentication = e.target.value
// selectedAction.authentication_id = e.target.value.id // selectedAction.authentication_id = e.target.value.id
if ( if (
@@ -4086,11 +4185,7 @@ const ParsedAction = (props) => {
onClose={() => { onClose={() => {
setShowAutocomplete(false); setShowAutocomplete(false);
if ( if (!selectedActionParameters[count].value[selectedActionParameters[count].value.length - 1] === ".") {
!selectedActionParameters[count].value[
selectedActionParameters[count].value.length - 1
] === "."
) {
setShowDropdown(false); setShowDropdown(false);
} }
+1 -1
View File
@@ -124,7 +124,7 @@ const SearchField = props => {
); );
return ( return (
<div style={{ marginTop: "auto", marginLeft: !isLoggedIn ? 0: "auto", marginRight: !isLoggedIn ? 0 : "auto", width: !isLoggedIn ? "auto" : 300, }}> <div style={{ marginTop: "auto", marginLeft: !isLoggedIn ? 0: "auto", marginRight: !isLoggedIn ? 0 : "auto", width: !isLoggedIn ? "auto" : 410, }}>
{modalView} {modalView}
<TextField <TextField
style={{ backgroundColor: "#212121", height: 48, borderRadius: rounded === true ? 25 : theme.palette.borderRadius, minWidth: fieldWidth, maxWidth: fieldWidth, }} style={{ backgroundColor: "#212121", height: 48, borderRadius: rounded === true ? 25 : theme.palette.borderRadius, minWidth: fieldWidth, maxWidth: fieldWidth, }}
+1 -1
View File
@@ -3755,7 +3755,7 @@ If you're interested, please let me know a time that works for you, or set up a
<Tab label=<span>Limits & Cloud Sync</span> /> <Tab label=<span>Limits & Cloud Sync</span> />
<Tab label=<span>Priorities</span> /> <Tab label=<span>Priorities</span> />
<Tab label=<span>Billing & Stats</span> /> <Tab label=<span>Billing & Stats</span> />
<Tab disabled={!isCloud} label=<span>Branding (Beta)</span> /> <Tab disabled={!isCloud} label=<span>Partner</span> />
</Tabs> </Tabs>
<Divider <Divider
+56 -32
View File
@@ -74,6 +74,7 @@ import {
import { import {
Folder as FolderIcon, Folder as FolderIcon,
VerifiedUser as VerifiedUserIcon, VerifiedUser as VerifiedUserIcon,
CheckCircle as CheckCircleIcon,
Insights as InsightsIcon, Insights as InsightsIcon,
LibraryBooks as LibraryBooksIcon, LibraryBooks as LibraryBooksIcon,
OpenInNew as OpenInNewIcon, OpenInNew as OpenInNewIcon,
@@ -320,7 +321,7 @@ export function SetJsonDotnotation(jsonInput, inputKey) {
export const green = "#86c142"; export const green = "#86c142";
export const yellow = "#FECC00"; export const yellow = "#FECC00";
export const red = "red"; export const red = "#ff3632";
export function removeParam(key, sourceURL) { export function removeParam(key, sourceURL) {
if (sourceURL === undefined) { if (sourceURL === undefined) {
@@ -3687,7 +3688,7 @@ const releaseToConnectLabel = "Release to Connect"
setSelectedEdge({}) setSelectedEdge({})
setSelectedActionEnvironment({}) //setSelectedActionEnvironment({})
setTriggerAuthentication({}) setTriggerAuthentication({})
setTriggerFolders([]) setTriggerFolders([])
setLocalFirstrequest(true) setLocalFirstrequest(true)
@@ -6130,6 +6131,8 @@ const releaseToConnectLabel = "Release to Connect"
if (curnode.data.id === edge.data("source")) { if (curnode.data.id === edge.data("source")) {
console.log("Found matching trigger source: ", curnode) console.log("Found matching trigger source: ", curnode)
if (curnode.data.app_name !== "Shuffle Workflow" && curnode.data.app_name !== "User Input") { if (curnode.data.app_name !== "Shuffle Workflow" && curnode.data.app_name !== "User Input") {
// If it's started, READD the edge // If it's started, READD the edge
if (curnode.data.status === "running") { if (curnode.data.status === "running") {
//console.log("Edge is running - readd it: ", edge.data()) //console.log("Edge is running - readd it: ", edge.data())
@@ -6144,7 +6147,8 @@ const releaseToConnectLabel = "Release to Connect"
data: newdata, data: newdata,
}) })
toast.error("You must STOP the trigger before deleting its branches") //toast.error("You must STOP the trigger before deleting its branches")
console.log("You must STOP the trigger before deleting its branches")
} catch (e) { } catch (e) {
console.log("Failed re-adding edge: ", e) console.log("Failed re-adding edge: ", e)
} }
@@ -9102,6 +9106,11 @@ const releaseToConnectLabel = "Release to Connect"
const startIndex = app.actions.findIndex((action) => action.category_label !== undefined && action.category_label !== null && action.category_label.length > 0) const startIndex = app.actions.findIndex((action) => action.category_label !== undefined && action.category_label !== null && action.category_label.length > 0)
const actionIndex = startIndex < 0 ? 0 : startIndex const actionIndex = startIndex < 0 ? 0 : startIndex
if (app.actions[actionIndex] === undefined || app.actions[actionIndex] === null) {
console.log("No actions found for app: ", app)
return
}
// Make the first action the most relevant one for them based on previous use // Make the first action the most relevant one for them based on previous use
if ( if (
app.actions[actionIndex].parameters !== undefined && app.actions[actionIndex].parameters !== undefined &&
@@ -11605,7 +11614,7 @@ const releaseToConnectLabel = "Release to Connect"
<div style={appApiViewStyle}> <div style={appApiViewStyle}>
<div style={{ }}> <div style={{ }}>
<h3 style={{ marginBottom: 5, }}> <h3 style={{ marginBottom: 5, }}>
Branch: Conditions - {selectedEdgeIndex} Conditions
</h3> </h3>
<a <a
rel="noopener noreferrer" rel="noopener noreferrer"
@@ -18166,6 +18175,7 @@ const releaseToConnectLabel = "Release to Connect"
} }
} }
const envStatus = !(executionData.workflow !== undefined && executionData.workflow !== null && executionData.workflow.actions !== undefined && executionData.workflow.actions !== null && executionData.workflow.actions.length > 0) ? "loading" : "success"
var executionDelay = -75 var executionDelay = -75
const executionModal = ( const executionModal = (
@@ -18598,26 +18608,6 @@ const releaseToConnectLabel = "Release to Connect"
</Button> </Button>
</span> </span>
</Tooltip> </Tooltip>
{executionData.status === "EXECUTING" ? (
<Tooltip
color="primary"
title="Abort workflow"
placement="top"
style={{ zIndex: 50000 }}
>
<span style={{}}>
<Button
color="primary"
style={{ float: "right", marginTop: 20, marginLeft: 10 }}
onClick={() => {
abortExecution();
}}
>
<PauseIcon style={{}} />
</Button>
</span>
</Tooltip>
) : null}
<Tooltip <Tooltip
color="primary" color="primary"
@@ -18691,18 +18681,41 @@ const releaseToConnectLabel = "Release to Connect"
</span> </span>
</Tooltip> </Tooltip>
{isCloud ? {executionData.status === "EXECUTING" ? (
<Tooltip <Tooltip
color="primary" color="primary"
title="Explore logs for the workflow" title="Abort workflow"
placement="top" placement="top"
style={{ zIndex: 50000, }} style={{ zIndex: 50000 }}
> >
<span style={{}}> <span style={{}}>
<Button <Button
color="primary" color="primary"
style={{ float: "right", marginTop: 20, marginLeft: 10 }} style={{ float: "right", marginTop: 20, marginLeft: 10 }}
disabled={userdata.region_url !== "https://shuffler.io"} onClick={() => {
abortExecution();
}}
>
<PauseIcon style={{}} />
</Button>
</span>
</Tooltip>
) : null}
{isCloud ?
<Tooltip
color="primary"
title="Explore logs for the workflow (max 5 days ago)"
placement="top"
style={{ zIndex: 50000, }}
>
<span style={{}}>
<Button
color="secondary"
style={{ float: "right", marginTop: 20, marginLeft: 10 }}
// Max 5 days in the past
disabled={userdata.region_url !== "https://shuffler.io" || executionData.started_at < (Math.floor(Date.now() / 1000) - 432000)}
onClick={() => { onClick={() => {
toast("Opening logs in a new tab") toast("Opening logs in a new tab")
@@ -18711,7 +18724,7 @@ const releaseToConnectLabel = "Release to Connect"
}, 250) }, 250)
}} }}
> >
<InsightsIcon color="secondary" /> <InsightsIcon />
</Button> </Button>
</span> </span>
</Tooltip> </Tooltip>
@@ -18722,7 +18735,18 @@ const releaseToConnectLabel = "Release to Connect"
{executionData.workflow !== undefined && executionData.workflow !== null && executionData.workflow.actions !== undefined && executionData.workflow.actions !== null && executionData.workflow.actions.length > 0 ? {executionData.workflow !== undefined && executionData.workflow !== null && executionData.workflow.actions !== undefined && executionData.workflow.actions !== null && executionData.workflow.actions.length > 0 ?
<div style={{ display: "flex", marginLeft: 10, }}> <div style={{ display: "flex", marginLeft: 10, }}>
<Typography variant="body1"> <Typography variant="body1">
<b>Env &nbsp;&nbsp;&nbsp;&nbsp;</b>
{/*envStatus === "success" ?
<Tooltip title="Environment is healthy" placement="top">
<CheckCircleIcon style={{ color: "green" }} />
</Tooltip>
: envStatus === "failure" ?
<Tooltip title="Environment is unhealthy" placement="top">
<ErrorIcon style={{ color: "red" }} />
</Tooltip>
: null*/}
<b style={{ }}>Env &nbsp;&nbsp;&nbsp;&nbsp;</b>
</Typography> </Typography>
<Typography variant="body1" color="textSecondary" style={{color: "#f85a3e", cursor: "pointer", }} onClick={() => { <Typography variant="body1" color="textSecondary" style={{color: "#f85a3e", cursor: "pointer", }} onClick={() => {
@@ -19580,7 +19604,7 @@ const releaseToConnectLabel = "Release to Connect"
return "The app's Docker Image is not available in the environment yet. Re-run the app to force a re-download of the app. If the problem persists, contact support" return "The app's Docker Image is not available in the environment yet. Re-run the app to force a re-download of the app. If the problem persists, contact support"
} }
if (result.status !== 200 && result.url !== undefined && result.url !== null && (result.url.includes("192.168") || result.url.includes("172.16") || result.url.includes("10.0"))) { if (result.status !== 200 && result.url !== undefined && result.url !== null && typeof result.url === "string" && (result.url.includes("192.168") || result.url.includes("172.16") || result.url.includes("10.0"))) {
return "Consider whether your Orborus environment can connect to a local IP or not." return "Consider whether your Orborus environment can connect to a local IP or not."
} }
@@ -21737,7 +21761,7 @@ const releaseToConnectLabel = "Release to Connect"
</div> </div>
<div style={{textAlign: "center", color: "white", flex: 1, paddingTop: 20, }}> <div style={{textAlign: "center", color: "white", flex: 1, paddingTop: 20, }}>
<Typography variant="h6"> <Typography variant="h6">
{selectedVersion.name} {selectedVersion?.name}
</Typography> </Typography>
</div> </div>
{/* Cross icon to close it */} {/* Cross icon to close it */}
+5 -2
View File
@@ -2586,6 +2586,8 @@ const Apps = (props) => {
if (parsedtext.indexOf("openapi") === -1 && parsedtext.indexOf("swagger") === -1) { if (parsedtext.indexOf("openapi") === -1 && parsedtext.indexOf("swagger") === -1) {
setValidation(false); setValidation(false);
setOpenApiError("Error in generation: "+parsedtext); setOpenApiError("Error in generation: "+parsedtext);
return; return;
} }
} catch (e) { } catch (e) {
@@ -2684,10 +2686,11 @@ const Apps = (props) => {
body: openApidata, body: openApidata,
credentials: "include", credentials: "include",
}) })
.then((response) => { .then((response) => {
setValidation(false); setValidation(false);
return response.json(); return response.json();
}) })
.then((responseJson) => { .then((responseJson) => {
if (responseJson.success) { if (responseJson.success) {
setAppValidation(responseJson.id); setAppValidation(responseJson.id);