1.4.0 changes too

This commit is contained in:
Frikky
2023-11-14 15:20:31 +01:00
parent a3af4c09ae
commit f6c7939dda
16 changed files with 614 additions and 990 deletions
+33 -10
View File
@@ -291,8 +291,6 @@ const Admin = (props) => {
//const alert = useAlert();
const handleStatusChange = (event) => {
const { value } = event.target;
console.log("value: ", value)
setSelectedStatus(value);
@@ -331,7 +329,7 @@ const Admin = (props) => {
var your_apps = "- Connecting "
var subject_add = 0
var subject = "Want to automate "
var subject = "POC to automate "
if (org.security_framework !== undefined && org.security_framework !== null) {
if (org.security_framework.cases.name !== undefined && org.security_framework.cases.name !== null && org.security_framework.cases.name !== "") {
@@ -400,7 +398,7 @@ const Admin = (props) => {
// Remove comma
subject += "?"
//subject += "?"
your_apps = your_apps.substring(0, your_apps.length - 2)
}
@@ -432,12 +430,25 @@ const Admin = (props) => {
var admins = ""
// Loop users
var lastLogin = 0
for (var i = 0; i < users.length; i++) {
if (users[i].username.includes("shuffler")) {
continue
}
if (users[i].role === "admin") {
admins += users[i].username + ","
}
const data = users[i]
for (var i = 0; i < data.login_info.length; i++) {
if (data.login_info[i].timestamp > lastLogin) {
lastLogin = data.login_info[i].timestamp
}
}
}
// Remove last comma
admins = admins.substring(0, admins.length - 1)
@@ -452,15 +463,24 @@ const Admin = (props) => {
// Get drift username from userdata.username before @ in email
const username = userdata.username.substring(0, userdata.username.indexOf("@"))
var body = `Hey,%0D%0A%0D%0AI saw you trying to use Shuffle, and thought we may be able to help. Right now, it looks like you have ${workflow_amount} workflows made, but it still doesn't look like you are getting the most out of Shuffle. If you're interested, I'd love to set up a quick call to see if we can help you get more out of Shuffle. %0D%0A%0D%0A
// Check if timestamp is more than 2 weeks ago and add "a while back" to the message
const timeComparison = 1209600
const extra_timestamp_text = lastLogin === 0 ? 0 : (Date.now()/1000 - lastLogin) > timeComparison ? " a while back" : ""
console.log("LAST LOGIN: " + lastLogin, extra_timestamp_text)
// Check if cloud sync is active, and if so, add a message about it
const cloudSyncInfo = selectedOrganization.cloud_sync === true ? "- Scale your onprem installation" : ""
var body = `Hey,%0D%0A%0D%0AI noticed you tried to use Shuffle${extra_timestamp_text}, and thought you may be interested in a POC. It looks like you have ${workflow_amount} workflows made, but it still doesn't look like you are getting what you wanted out of Shuffle. If you're interested, I'd love to set up a quick call to see if we can help you get more out of Shuffle. %0D%0A%0D%0A
Some of the things we can help with:%0D%0A
${your_apps}
- Configuring and authenticating your apps%0D%0A
${usecases}
- Creating special usecases and apps%0D%0A%0D%0A
- Multi-Tenancy and creating special usecases%0D%0A
${cloudSyncInfo}%0D%0A
Let me know if you're interested, or set up a call here: https://drift.me/${username}`
If you're interested, please let me know a time that works for you, or set up a call here: https://drift.me/${username}`
return `mailto:${admins}?bcc=frikky@shuffler.io,binu@shuffler.io&subject=${subject}&body=${body}`
}
@@ -984,6 +1004,10 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
leads.push("old customer")
}
if (responseJson.lead_info.old_lead) {
leads.push("old lead")
}
if (responseJson.lead_info.tech_partner) {
leads.push("tech partner")
}
@@ -2428,7 +2452,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
renderValue={(selected) => selected.join(', ')}
MenuProps={MenuProps}
>
{["contacted", "lead", "demo done", "pov", "customer", "open source", "student", "internal", "old customer", "creator", "tech partner"].map((name) => (
{["contacted", "lead", "demo done", "pov", "customer", "open source", "student", "internal", "creator", "tech partner", "old customer", "old lead", ].map((name) => (
<MenuItem key={name} value={name}>
<Checkbox checked={selectedStatus.indexOf(name) > -1} />
<ListItemText primary={name} />
@@ -3124,7 +3148,6 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
}
if (loginInfo > 0) {
console.log("SETTING LAST LOGIN: " + loginInfo)
lastLogin = new Date(loginInfo * 1000).toISOString().slice(0, 10) + " (" + data.login_info.length + ")"
}
}
@@ -4382,7 +4405,7 @@ Let me know if you're interested, or set up a call here: https://drift.me/${user
<Tab
label=<span>
<LockIcon style={iconStyle} />
App Authentication
App Auth
</span>
/>
<Tab
+30 -15
View File
@@ -108,10 +108,10 @@ import {
Preview as PreviewIcon,
ContentCopy as ContentCopyIcon,
Circle as CircleIcon,
SquareFoot as SquareFootIcon,
AutoFixHigh as AutoFixHighIcon,
SquareFoot as SquareFootIcon,
AutoFixHigh as AutoFixHighIcon,
Polyline as PolylineIcon,
QueryStats as QueryStatsIcon,
} from "@mui/icons-material";
@@ -14591,7 +14591,7 @@ const AngularWorkflow = (defaultprops) => {
onClose={() => {
setExecutionModalOpen(false)
}}
style={{ resize: "both", overflow: "auto", zIndex: 10005 }}
style={{ resize: "both", overflow: "auto", }}
hideBackdrop={false}
variant="temporary"
BackdropProps={{
@@ -14607,7 +14607,6 @@ const AngularWorkflow = (defaultprops) => {
maxWidth: isMobile ? "100%" : 420,
color: "white",
fontSize: 18,
zIndex: 10005,
borderLeft: theme.palette.defaultBorder,
},
}}
@@ -14631,16 +14630,32 @@ const AngularWorkflow = (defaultprops) => {
: null}
{executionModalView === 0 ? (
<div style={{ padding: isMobile ? "0px 0px 0px 10px" : 25, zIndex: 12502, }}>
<Breadcrumbs
aria-label="breadcrumb"
separator=""
style={{ color: "white", fontSize: 16 }}
>
<h2 style={{ color: "rgba(255,255,255,0.5)" }}>
<DirectionsRunIcon style={{ marginRight: 10 }} />
All Workflow Runs
</h2>
</Breadcrumbs>
<div style={{display: "flex", }}>
<Breadcrumbs
aria-label="breadcrumb"
separator=""
style={{ color: "white", fontSize: 16 }}
>
<h2 style={{ color: "rgba(255,255,255,0.5)" }}>
<DirectionsRunIcon style={{ marginRight: 10 }} />
All Workflow Runs
</h2>
</Breadcrumbs>
<Tooltip
title={"Explore Executions further"}
placement="left-start"
style={{ zIndex: 10010 }}
>
<a href={`/workflows/debug?workflow_id=${workflow.id}`} style={{textDecoration: "none", }}>
<Button
color="secondary"
style={{marginLeft: 50, maxHeight: 30, marginTop: 20, }}
>
<QueryStatsIcon style={{color: "white", }}/>
</Button>
</a>
</Tooltip>
</div>
<Button
style={{ borderRadius: "0px" }}
variant="outlined"
+6 -6
View File
@@ -3125,7 +3125,7 @@ const AppCreator = (defaultprops) => {
</Select>
</div>
<div style={{marginLeft: 5, flex: 1,}}>
Value prefix
Prefix
<TextField
style={{ marginTop: 0, flex: "1", backgroundColor: inputColor }}
fullWidth={true}
@@ -3137,7 +3137,7 @@ const AppCreator = (defaultprops) => {
value={refreshUrl}
onChange={(e) => {
// Just reusing this state
setRefreshUrl(e.target.value);
setRefreshUrl(e.target.value);
}}
/>
</div>
@@ -3618,13 +3618,13 @@ const AppCreator = (defaultprops) => {
<Dialog
open={actionsModalOpen}
fullWidth
PaperProps={{
PaperProps={{
style: {
backgroundColor: surfaceColor,
color: "white",
minWidth: 500,
maxWidth: 500,
maxHeight: 800,
minWidth: 550,
maxWidth: 550,
maxHeight: 750,
},
}}
onClose={() => {
+1 -1
View File
@@ -419,7 +419,7 @@ const Welcome = (props) => {
</div>
:
<Fade in={true}>
<div style={{maxWidth: isMobile ? null : 590, margin: "auto", marginTop: 50, }}>
<div style={{maxWidth: isMobile ? null : 590, margin: "auto", marginTop: 50,textAlign : isMobile ? "center" : null }}>
<Typography variant="h4" style={{color: "#F1F1F1", marginTop: 50, fontSize: 32}}>
Help us get to know you
</Typography>
+19 -6
View File
@@ -68,11 +68,12 @@ import {
CloudDownload as CloudDownloadIcon,
ExpandLess as ExpandLessIcon,
ExpandMore as ExpandMoreIcon,
Done as DoneIcon,
CheckCircle as CheckCircleIcon,
RadioButtonUnchecked as RadioButtonUncheckedIcon,
Done as DoneIcon,
CheckCircle as CheckCircleIcon,
RadioButtonUnchecked as RadioButtonUncheckedIcon,
ArrowLeft as ArrowLeftIcon,
ArrowRight as ArrowRightIcon,
QueryStats as QueryStatsIcon,
} from "@mui/icons-material";
import { DataGrid, GridToolbar } from "@mui/x-data-grid";
@@ -3061,6 +3062,18 @@ const Workflows = (props) => {
const workflowButtons = (
<span>
<Tooltip color="primary" title={"Explore Workflow Runs"} placement="top">
<Button
disabled={workflows.length === 0}
color="secondary"
variant="text"
onClick={() => {
navigate("/workflows/debug")
}}
>
<QueryStatsIcon />
</Button>
</Tooltip>
{view === "list" && (
<Tooltip color="primary" title={"Grid View"} placement="top">
<Button
@@ -3423,8 +3436,8 @@ const Workflows = (props) => {
height: isCloud ? imgSize : imgSize+4,
width: isCloud ? imgSize : imgSize+4,
position: "absolute",
top: isCloud ? -1 : -2,
left: isCloud ? -1 : -2,
top: -2,
left: -2,
cursor: "pointer",
zIndex: 99,
border: "2px solid rgba(255,255,255,0.7)",
@@ -3786,7 +3799,7 @@ const Workflows = (props) => {
color: "white",
fontSize: 18,
borderLeft: theme.palette.defaultBorder,
marginTop: 64,
marginTop: 100,
borderRadius: "5px 0px 0px 0px",
},
}}