Merge branch '2.0.0' of https://github.com/Shuffle/Shuffle into mergingIssue
This commit is contained in:
@@ -714,7 +714,10 @@ const Billing = (props) => {
|
||||
userdata.has_card_available === true ?
|
||||
"While you have a card attached to your account, Shuffle will no longer prevent workflows from running. Billing will occur at the start of each month."
|
||||
:
|
||||
`You are not subscribed to any plan and are using the free plan with max 10,000 app runs per month. Upgrade to deactivate this limit.`
|
||||
isCloud ?
|
||||
`You are not subscribed to any plan and are using the free plan with max 10,000 app runs per month. Upgrade to deactivate this limit.`
|
||||
:
|
||||
`You are not subscribed to any plan and are using the free, open source plan. This plan has no enforced limits, but scale issues may occur due to CPU congestion.`
|
||||
}
|
||||
</Typography>
|
||||
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
||||
|
||||
@@ -152,6 +152,7 @@ const CreatorGrid = props => {
|
||||
flexWrap: "wrap",
|
||||
alignContent: "space-between",
|
||||
marginTop: 5,
|
||||
padding:"0px 180px",
|
||||
}
|
||||
|
||||
const Hits = ({ hits }) => {
|
||||
|
||||
@@ -80,7 +80,7 @@ const DiscordChat = props => {
|
||||
event.preventDefault();
|
||||
}
|
||||
}}
|
||||
placeholder="Search Discord Chats"
|
||||
placeholder="Search Discord Chats..."
|
||||
style={{ backgroundColor: theme.palette.inputColor, borderRadius: borderRadius, margin: 10, width: "100%", }}
|
||||
InputProps={{
|
||||
style: {
|
||||
@@ -148,7 +148,7 @@ const DiscordChat = props => {
|
||||
const CustomHits = connectHits(Hits);
|
||||
|
||||
return (
|
||||
<div style={{ width: "100%", textAlign:"center", position: "relative", height: "100%", }}>
|
||||
<div style={{textAlign:"center", position: "relative", height: "100%", padding:"0px 240px" }}>
|
||||
<InstantSearch searchClient={searchClient} indexName="discord_chat">
|
||||
<div style={{ maxWidth: 450, margin: "auto", marginTop: 15, marginBottom: 5, }}>
|
||||
<CustomSearchBox />
|
||||
|
||||
@@ -279,7 +279,7 @@ const DocsGrid = props => {
|
||||
</Button>
|
||||
</div>
|
||||
*/}
|
||||
<div style={{width: "100%", position: "relative", height: "100%",}}>
|
||||
<div style={{width: "100%", position: "relative", height: "100%", padding: "0px 180px"}}>
|
||||
<InstantSearch searchClient={searchClient} indexName="documentation">
|
||||
<div style={{maxWidth: 450, margin: "auto", marginTop: 15, marginBottom: 15, }}>
|
||||
<CustomSearchBox />
|
||||
|
||||
@@ -563,7 +563,10 @@ const ParsedAction = (props) => {
|
||||
|
||||
useEffect(() => {
|
||||
selectedNameChange(appActionName)
|
||||
actionDelayChange(delay)
|
||||
|
||||
if (actionDelayChange !== undefined) {
|
||||
actionDelayChange(delay)
|
||||
}
|
||||
},[appActionName,delay])
|
||||
|
||||
const handleParamChange = (event, count,data) => {
|
||||
|
||||
@@ -204,6 +204,9 @@ const AppGrid = props => {
|
||||
style={{backgroundColor: theme.palette.inputColor, borderRadius: borderRadius, margin: 10, width: "100%",}}
|
||||
InputProps={{
|
||||
style:{
|
||||
color: "white",
|
||||
fontSize: "1em",
|
||||
height: 50,
|
||||
},
|
||||
startAdornment: (
|
||||
<InputAdornment position="start">
|
||||
@@ -238,6 +241,8 @@ const AppGrid = props => {
|
||||
flexWrap: "wrap",
|
||||
alignContent: "space-between",
|
||||
marginTop: 5,
|
||||
padding: "0px 180px",
|
||||
width:"auto"
|
||||
}
|
||||
|
||||
var workflowDelay = -50
|
||||
|
||||
@@ -76,6 +76,7 @@ import {
|
||||
Help as HelpIcon,
|
||||
Flag as FlagIcon,
|
||||
FmdGood as FmdGoodIcon,
|
||||
Warning as WarningIcon,
|
||||
} from "@mui/icons-material";
|
||||
|
||||
//import { useAlert
|
||||
@@ -5369,10 +5370,37 @@ If you're interested, please let me know a time that works for you, or set up a
|
||||
}
|
||||
}
|
||||
|
||||
console.log("AUTH: ", data)
|
||||
var validIcon = <CheckCircleIcon style={{ color: "green" }} />
|
||||
if (data.validation !== null && data.validation !== undefined && data.validation.valid === false) {
|
||||
|
||||
if (data.validation.changed_at === 0) {
|
||||
// Warning
|
||||
validIcon = "" // <WarningIcon style={{ color: "" }} />
|
||||
} else {
|
||||
validIcon = <CancelIcon style={{ color: "red" }} />
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<ListItem key={index} style={{ backgroundColor: bgColor }}>
|
||||
<ListItemText
|
||||
primary=
|
||||
<Tooltip title={data.validation.valid === true ? "Valid. Click to explore." : "Configuration failed. Click to learn why"} placement="top">
|
||||
<IconButton>
|
||||
{validIcon}
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
style={{ minWidth: 65, maxWidth: 65, }}
|
||||
onClick={() => {
|
||||
if (data.validation.workflow_id === undefined || data.validation.workflow_id === null || data.validation.workflow_id.length === 0) {
|
||||
toast.warn("No workflow runs found for this auth yet. Check back later.")
|
||||
return
|
||||
}
|
||||
|
||||
const url = `/workflows/${data.validation.workflow_id}?execution_id=${data.validation.execution_id}&node=${data.validation.node_id}`
|
||||
window.open(url, "_blank")
|
||||
}}
|
||||
/>
|
||||
<ListItemText
|
||||
primary=<img
|
||||
alt=""
|
||||
@@ -5497,17 +5525,17 @@ If you're interested, please let me know a time that works for you, or set up a
|
||||
.join(", ")
|
||||
}
|
||||
style={{
|
||||
minWidth: 125,
|
||||
maxWidth: 125,
|
||||
minWidth: 140,
|
||||
maxWidth: 140,
|
||||
overflow: "auto",
|
||||
marginRight: 10,
|
||||
}}
|
||||
/>
|
||||
<ListItemText
|
||||
style={{
|
||||
maxWidth: 230,
|
||||
minWidth: 230,
|
||||
overflow: "hidden",
|
||||
maxWidth: 150,
|
||||
minWidth: 150,
|
||||
overflow: "auto",
|
||||
}}
|
||||
primary={new Date(data.edited * 1000).toISOString()}
|
||||
/>
|
||||
@@ -5803,6 +5831,10 @@ If you're interested, please let me know a time that works for you, or set up a
|
||||
/>
|
||||
<List>
|
||||
<ListItem>
|
||||
<ListItemText
|
||||
primary="Valid"
|
||||
style={{ minWidth: 65, maxWidth: 65 }}
|
||||
/>
|
||||
<ListItemText
|
||||
primary="Icon"
|
||||
style={{ minWidth: 75, maxWidth: 75 }}
|
||||
@@ -5831,11 +5863,11 @@ If you're interested, please let me know a time that works for you, or set up a
|
||||
*/}
|
||||
<ListItemText
|
||||
primary="Fields"
|
||||
style={{ minWidth: 135, maxWidth: 135, overflow: "hidden" }}
|
||||
style={{ minWidth: 140, maxWidth: 140, overflow: "hidden" }}
|
||||
/>
|
||||
<ListItemText
|
||||
primary="Edited"
|
||||
style={{ minWidth: 230, maxWidth: 230, overflow: "hidden" }}
|
||||
style={{ minWidth: 150, maxWidth: 150, overflow: "hidden" }}
|
||||
/>
|
||||
<ListItemText
|
||||
primary="Actions"
|
||||
|
||||
@@ -432,7 +432,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
const [history, setHistory] = React.useState([]);
|
||||
const [historyIndex, setHistoryIndex] = React.useState(history.length);
|
||||
const [variableInfo, setVariableInfo] = React.useState({})
|
||||
|
||||
const [selectedVersion, setSelectedVersion] = React.useState(null)
|
||||
const [appAuthentication, setAppAuthentication] = React.useState(undefined);
|
||||
const [variablesModalOpen, setVariablesModalOpen] = React.useState(false);
|
||||
const [aiQueryModalOpen, setAiQueryModalOpen] = React.useState(false)
|
||||
@@ -472,7 +472,6 @@ const AngularWorkflow = (defaultprops) => {
|
||||
const [conditionValue, setConditionValue] = React.useState({});
|
||||
const [dragging, setDragging] = React.useState(false);
|
||||
const [showWorkflowRevisions, setShowWorkflowRevisions] = React.useState(false);
|
||||
const [selectedRevision, setSelectedRevision] = useState({})
|
||||
const [dragPosition, setDragPosition] = React.useState({
|
||||
x: 0,
|
||||
y: 0,
|
||||
@@ -2098,6 +2097,7 @@ const releaseToConnectLabel = "Release to Connect"
|
||||
setTimeout(() => {
|
||||
setSavingState(0);
|
||||
}, 1500);
|
||||
getRevisionHistory(useworkflow.id)
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -7967,6 +7967,7 @@ const releaseToConnectLabel = "Release to Connect"
|
||||
}
|
||||
|
||||
setAllRevisions(responseJson)
|
||||
setSelectedVersion(responseJson[0])
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Error getting workflow revisions: ", error)
|
||||
@@ -16571,7 +16572,6 @@ const releaseToConnectLabel = "Release to Connect"
|
||||
console.log("Show workflow revisions key pressed")
|
||||
if (!workflow.public) {
|
||||
setShowWorkflowRevisions(true)
|
||||
setSelectedRevision(workflow)
|
||||
//setOriginalWorkflow(workflow)
|
||||
}
|
||||
}
|
||||
@@ -16624,7 +16624,6 @@ const releaseToConnectLabel = "Release to Connect"
|
||||
console.log("Show workflow revisions key pressed")
|
||||
if (!workflow.public) {
|
||||
setShowWorkflowRevisions(true)
|
||||
setSelectedRevision(workflow)
|
||||
//setOriginalWorkflow(workflow)
|
||||
}
|
||||
}
|
||||
@@ -17099,7 +17098,6 @@ const releaseToConnectLabel = "Release to Connect"
|
||||
variant={"outlined"}
|
||||
onClick={() => {
|
||||
setShowWorkflowRevisions(true)
|
||||
setSelectedRevision(workflow)
|
||||
//setOriginalWorkflow(workflow)
|
||||
}}
|
||||
>
|
||||
@@ -21408,14 +21406,12 @@ const releaseToConnectLabel = "Release to Connect"
|
||||
}*/
|
||||
|
||||
const RevisionBox = (props) => {
|
||||
const { revision, } = props
|
||||
|
||||
if (revision === undefined || revision === null || revision === {}) {
|
||||
const { revision, } = props
|
||||
if (revision === undefined || revision === null) {
|
||||
return null
|
||||
}
|
||||
|
||||
var newrevision = JSON.parse(JSON.stringify(revision))
|
||||
|
||||
// Make unix timestamp into ISO timestamp in the format July 27th, 3:05 AM
|
||||
// Format: July 27th, 3:05 AM
|
||||
//console.log("Edited time: ", revision.edited)
|
||||
@@ -21440,18 +21436,17 @@ const releaseToConnectLabel = "Release to Connect"
|
||||
|
||||
return (
|
||||
<Paper
|
||||
style={{padding: "15px 15px 15px 25px", minHeight: 105, maxHeight: 105, cursor: "pointer", backgroundColor: newrevision.edited === selectedRevision.edited ? "rgba(255,255,255,0.3)" : theme.palette.surfaceColor, border: "1px solid rgba(255,255,255,0.3)", marginBottom: 10,
|
||||
style={{padding: "15px 15px 15px 25px", minHeight: 105, maxHeight: 105, cursor: "pointer", backgroundColor: newrevision.edited === selectedVersion.edited ? "rgba(255,255,255,0.3)" : theme.palette.surfaceColor, border: "1px solid rgba(255,255,255,0.3)", marginBottom: 10,
|
||||
}} onClick={(e) => {
|
||||
if (newrevision.edited === selectedRevision.edited) {
|
||||
if (newrevision.edited === selectedVersion.edited) {
|
||||
console.log("Same revision! No setting.")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
// Should render if it's not the same as workflow.edited
|
||||
console.log("Clicked revision: ", newrevision)
|
||||
setLastSaved(false)
|
||||
setSelectedRevision(newrevision)
|
||||
setLastSaved(false)
|
||||
setSelectedVersion(newrevision);
|
||||
setWorkflow(newrevision)
|
||||
setSelectedAction({});
|
||||
setSelectedApp({})
|
||||
@@ -21474,7 +21469,11 @@ const releaseToConnectLabel = "Release to Connect"
|
||||
//cy.remove('*')
|
||||
setElements([])
|
||||
}
|
||||
|
||||
|
||||
// Remove all edges
|
||||
cy.edges().remove()
|
||||
cy.nodes().remove()
|
||||
|
||||
// Remove all cy nodes
|
||||
setTimeout(() => {
|
||||
setupGraph(newrevision)
|
||||
@@ -21525,6 +21524,7 @@ const releaseToConnectLabel = "Release to Connect"
|
||||
<span style={{flex: 5, }}>
|
||||
<Typography variant="body1">
|
||||
{translatedDate}
|
||||
{/* {newrevision.edited.toString().slice(6,10)} | {newrevision.revision_id.slice(0,5)} */}
|
||||
</Typography>
|
||||
</span>
|
||||
<span style={{flex: 2, }}>
|
||||
@@ -21607,39 +21607,64 @@ const releaseToConnectLabel = "Release to Connect"
|
||||
</Paper>
|
||||
)
|
||||
}
|
||||
|
||||
const drawerData = originalWorkflow !== undefined && originalWorkflow !== null && originalWorkflow !== {} ?
|
||||
<div style={{padding: "0px 25px 100px 25px", }}>
|
||||
<Typography variant="h6" style={{marginTop: 10, marginBottom: 15, }}>
|
||||
//! Logs
|
||||
console.log("Workflow state", workflow)
|
||||
console.log("All revision", allRevisions)
|
||||
const drawerData = originalWorkflow !== undefined && originalWorkflow !== null ?
|
||||
<div style={{ height: "100%"}}>
|
||||
<Typography variant="h5" style={{ paddingLeft: 25, paddingTop:25, backgroundColor: theme.palette.surfaceColor, height: "8%" }}>
|
||||
Version History (Beta)
|
||||
</Typography>
|
||||
<div style={{height: "92%" }}>
|
||||
<div style={{paddingLeft: "25px", paddingRight: "25px", paddingTop: "10px"}}>
|
||||
<div style={{marginBottom: "20px", }}>
|
||||
<Typography variant="h6" style={{marginTop: 10, marginBottom: 5, }}>
|
||||
Current Version
|
||||
</Typography>
|
||||
<RevisionBox
|
||||
revision={selectedVersion}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<RevisionBox
|
||||
revision={originalWorkflow}
|
||||
/>
|
||||
<Divider
|
||||
style={{
|
||||
marginBottom: 15,
|
||||
height: 1,
|
||||
width: "100%",
|
||||
backgroundColor: "rgb(91, 96, 100)",
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{allRevisions.length > 0 ?
|
||||
allRevisions.map((revision, index) => {
|
||||
if (revision.edited === originalWorkflow.edited) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<RevisionBox
|
||||
revision={revision}
|
||||
key={index}
|
||||
index={index}
|
||||
/>
|
||||
)
|
||||
})
|
||||
:
|
||||
<div style={{padding: 5, }}>
|
||||
<Typography variant="body2">
|
||||
No other revisions found. Save your workflow with changes to create a revision.
|
||||
</Typography>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
{allRevisions.length > 0 ?
|
||||
<div style={{overflow: "auto", width: "100%" , height: "75%", paddingLeft: "25px", paddingRight: "20px", paddingTop: "10px", paddingBottom: "10px"}}>
|
||||
{
|
||||
allRevisions.map((revision, index) => {
|
||||
if(revision.edited === selectedVersion.edited){
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<RevisionBox
|
||||
revision={revision}
|
||||
key={index}
|
||||
index={index}
|
||||
/>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
|
||||
:
|
||||
<div style={{padding: 5, }}>
|
||||
<Typography variant="body2">
|
||||
No other revisions found. Save your workflow with changes to create a revision.
|
||||
</Typography>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
: null
|
||||
|
||||
const workflowRevisions = !showWorkflowRevisions ? null :
|
||||
@@ -21650,7 +21675,7 @@ const releaseToConnectLabel = "Release to Connect"
|
||||
onClose={() => {
|
||||
//setShowWorkflowRevisions(false)
|
||||
}}
|
||||
style={{ resize: "both", overflow: "auto", zIndex: 10005 }}
|
||||
style={{ resize: "both", overflow: "hidden", zIndex: 10005 }}
|
||||
hideBackdrop={true}
|
||||
variant="persistent"
|
||||
BackdropProps={{
|
||||
@@ -21661,7 +21686,7 @@ const releaseToConnectLabel = "Release to Connect"
|
||||
PaperProps={{
|
||||
style: {
|
||||
resize: "both",
|
||||
overflow: "auto",
|
||||
overflow: "hidden",
|
||||
minWidth: isMobile ? "100%" : 360,
|
||||
maxWidth: isMobile ? "100%" : 360,
|
||||
backgroundColor: theme.palette.platformColor,
|
||||
@@ -21669,7 +21694,6 @@ const releaseToConnectLabel = "Release to Connect"
|
||||
fontSize: 18,
|
||||
zIndex: 15001,
|
||||
borderRight: theme.palette.defaultBorder,
|
||||
paddingTop: 15,
|
||||
},
|
||||
}}
|
||||
>
|
||||
@@ -21692,7 +21716,7 @@ const releaseToConnectLabel = "Release to Connect"
|
||||
</div>
|
||||
<div style={{textAlign: "center", color: "white", flex: 1, paddingTop: 20, }}>
|
||||
<Typography variant="h6">
|
||||
{selectedRevision.name}
|
||||
{selectedVersion.name}
|
||||
</Typography>
|
||||
</div>
|
||||
{/* Cross icon to close it */}
|
||||
|
||||
@@ -32,8 +32,6 @@ import {
|
||||
FileCopy as FileCopyIcon
|
||||
} from "@mui/icons-material";
|
||||
import { fontGrid } from "@mui/material/styles/cssUtils.js";
|
||||
import { active } from "d3";
|
||||
import style from "./../index.css";
|
||||
|
||||
const Body = {
|
||||
//maxWidth: 1000,
|
||||
|
||||
@@ -43,11 +43,10 @@ const Search = (props) => {
|
||||
const params = Object.fromEntries(urlSearchParams.entries());
|
||||
const foundTab = params["tab"];
|
||||
if (foundTab !== null && foundTab !== undefined) {
|
||||
for (var key in Object.keys(views)) {
|
||||
for (let key in views) {
|
||||
const value = views[key];
|
||||
console.log(key, value);
|
||||
if (value === foundTab) {
|
||||
setConfig("", key);
|
||||
setConfig(null, key);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -130,7 +129,7 @@ const Search = (props) => {
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
overflowX: "hidden",
|
||||
minHeight: 400,
|
||||
minHeight: 400
|
||||
};
|
||||
|
||||
const views = {
|
||||
@@ -138,7 +137,9 @@ const Search = (props) => {
|
||||
1: "workflows",
|
||||
2: "docs",
|
||||
3: "creators",
|
||||
4: "discord"
|
||||
};
|
||||
|
||||
const setConfig = (event, inputValue) => {
|
||||
const newValue = parseInt(inputValue);
|
||||
|
||||
@@ -216,7 +217,7 @@ const Search = (props) => {
|
||||
<div style={boxStyle}>
|
||||
<Tabs
|
||||
style={{
|
||||
width: 741,
|
||||
width: 757,
|
||||
margin: isHeader ? null : "auto",
|
||||
marginTop: hidemargins === true ? 0 : isHeader ? null : 25,
|
||||
backgroundColor: "rgba(33, 33, 33, 1)",
|
||||
@@ -227,8 +228,8 @@ const Search = (props) => {
|
||||
textColor="secondary"
|
||||
onChange={setConfig}
|
||||
aria-label="disabled tabs example"
|
||||
variant="scrollable"
|
||||
scrollButtons="auto"
|
||||
// variant="scrollable"
|
||||
// scrollButtons="auto"
|
||||
classes={{ indicator: classes.hideIndicator, root: classes.customTab }}
|
||||
>
|
||||
<StyledTab
|
||||
|
||||
Reference in New Issue
Block a user