Minor fixes everywhere
This commit is contained in:
@@ -20,7 +20,7 @@ require (
|
|||||||
github.com/gorilla/mux v1.8.1
|
github.com/gorilla/mux v1.8.1
|
||||||
github.com/h2non/filetype v1.1.3
|
github.com/h2non/filetype v1.1.3
|
||||||
github.com/satori/go.uuid v1.2.0
|
github.com/satori/go.uuid v1.2.0
|
||||||
github.com/shuffle/shuffle-shared v0.8.19
|
github.com/shuffle/shuffle-shared v0.8.32
|
||||||
golang.org/x/crypto v0.36.0
|
golang.org/x/crypto v0.36.0
|
||||||
google.golang.org/api v0.176.1
|
google.golang.org/api v0.176.1
|
||||||
google.golang.org/grpc v1.68.1
|
google.golang.org/grpc v1.68.1
|
||||||
|
|||||||
@@ -333,8 +333,8 @@ github.com/sendgrid/sendgrid-go v3.14.0+incompatible h1:KDSasSTktAqMJCYClHVE94Fc
|
|||||||
github.com/sendgrid/sendgrid-go v3.14.0+incompatible/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8=
|
github.com/sendgrid/sendgrid-go v3.14.0+incompatible/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8=
|
||||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
|
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
|
||||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
|
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
|
||||||
github.com/shuffle/shuffle-shared v0.8.19 h1:HXqU62sPhVzv9MeJnA5ZpPYwwbitVz1EtMMABbY3t74=
|
github.com/shuffle/shuffle-shared v0.8.31 h1:APO/BkBxiP9Hn/Fa7SsESRD6ws9E5dBfIzS57pd3MvA=
|
||||||
github.com/shuffle/shuffle-shared v0.8.19/go.mod h1:NruHSAscDsW595wpK2r7MeHPGspUEKRNvBpcN1iGbHI=
|
github.com/shuffle/shuffle-shared v0.8.31/go.mod h1:NruHSAscDsW595wpK2r7MeHPGspUEKRNvBpcN1iGbHI=
|
||||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||||
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||||
|
|||||||
@@ -3041,6 +3041,11 @@ func executeSingleAction(resp http.ResponseWriter, request *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
shouldRerun := false
|
||||||
|
rerun, rerunOk := query["rerun"]
|
||||||
|
if rerunOk && len(rerun) > 0 && rerun[0] == "true" {
|
||||||
|
shouldRerun = true
|
||||||
|
}
|
||||||
|
|
||||||
if shouldRerun {
|
if shouldRerun {
|
||||||
log.Printf("[DEBUG] Returning single action execution ID for rerun: %s", workflowExecution.ExecutionId)
|
log.Printf("[DEBUG] Returning single action execution ID for rerun: %s", workflowExecution.ExecutionId)
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ const AdminNavBar = (props) => {
|
|||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
//const leadinfo = selectedOrganization.lead_info === undefined || selectedOrganization.lead_info === null || selectedOrganization.lead_info === "" ? "" : JSON.stringify(selectedOrganization.lead_info)
|
||||||
|
//const isPartner = leadinfo.includes("partner")
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const queryParams = new URLSearchParams(location.search);
|
const queryParams = new URLSearchParams(location.search);
|
||||||
const tabName = queryParams.get('tab');
|
const tabName = queryParams.get('tab');
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ const menuData = {
|
|||||||
description:
|
description:
|
||||||
"Connect and run actions seamlessly between different platforms.",
|
"Connect and run actions seamlessly between different platforms.",
|
||||||
icon: "/images/logos/singul.svg",
|
icon: "/images/logos/singul.svg",
|
||||||
path: "https://singul.io/",
|
path: "https://singul-docs.gitbook.io/singul/getting-started",
|
||||||
gaData: {
|
gaData: {
|
||||||
category: "navbar",
|
category: "navbar",
|
||||||
action: "products_click",
|
action: "products_click",
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ const OrganizationTab = (props) => {
|
|||||||
isLoaded={isLoaded}
|
isLoaded={isLoaded}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
case 'branding(beta)':
|
case 'branding':
|
||||||
return <Branding
|
return <Branding
|
||||||
isCloud={isCloud}
|
isCloud={isCloud}
|
||||||
userdata={userdata}
|
userdata={userdata}
|
||||||
@@ -140,7 +140,7 @@ const OrganizationTab = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div style={{ height: "100%", width: "100%", color: '#FFFFFF', backgroundColor: '#212121', borderTopRightRadius: '8px', borderBottomRightRadius: 8, borderLeft: "1px solid #494949", boxSizing: 'border-box' }}>
|
<div style={{ height: "100%", width: "100%", color: '#FFFFFF', backgroundColor: '#212121', borderTopRightRadius: '8px', borderBottomRightRadius: 8, borderLeft: "1px solid #494949", boxSizing: 'border-box' }}>
|
||||||
<div style={{ display: 'flex', justifyContent: 'space-around', width: "100%", borderBottom: '1px solid #494949' ,boxSizing: 'border-box' }}>
|
<div style={{ display: 'flex', justifyContent: 'space-around', width: "100%", borderBottom: '1px solid #494949' ,boxSizing: 'border-box' }}>
|
||||||
{['Org Configuration', "sso", "Notifications", 'Billing & Stats', 'Branding (Beta)'].map((tabName, index) => (
|
{['Org Configuration', "sso", "Notifications", 'Billing & Stats', 'Branding'].map((tabName, index) => (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
key={index}
|
key={index}
|
||||||
title={
|
title={
|
||||||
|
|||||||
@@ -818,9 +818,18 @@ const ParsedAction = (props) => {
|
|||||||
if (foundResult) {
|
if (foundResult) {
|
||||||
const valid = validateJson(foundResult.result);
|
const valid = validateJson(foundResult.result);
|
||||||
if (valid.valid) {
|
if (valid.valid) {
|
||||||
if (valid.result.success !== false) {
|
|
||||||
exampleData = valid.result
|
// Check if array, and if first item is object + success
|
||||||
break
|
if (Array.isArray(valid.result) && valid.result.length > 0 && typeof valid.result[0] === "object") {
|
||||||
|
if (valid.result[0].success !== false) {
|
||||||
|
exampleData = valid.result[0]
|
||||||
|
break
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (valid.result.success !== false) {
|
||||||
|
exampleData = valid.result
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
secondaryExample = foundResult.result
|
secondaryExample = foundResult.result
|
||||||
|
|||||||
@@ -902,6 +902,8 @@ const CodeEditor = (props) => {
|
|||||||
// Whelp this is inefficient af. Single loop pls
|
// Whelp this is inefficient af. Single loop pls
|
||||||
// When the found array is empty.
|
// When the found array is empty.
|
||||||
if (found !== null && found !== undefined) {
|
if (found !== null && found !== undefined) {
|
||||||
|
|
||||||
|
//console.log("FOUND: ", found)
|
||||||
try {
|
try {
|
||||||
for (var i = 0; i < found.length; i++) {
|
for (var i = 0; i < found.length; i++) {
|
||||||
try {
|
try {
|
||||||
@@ -937,27 +939,71 @@ const CodeEditor = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Find the location to ensure replacements happen correctly
|
||||||
|
var foundlocation = -1
|
||||||
|
for (var j = 0; j < input.length; j++) {
|
||||||
|
const foundStringSize = fixedVariable.length
|
||||||
|
const foundslice = input.slice(j, j + foundStringSize)
|
||||||
|
//console.log("FOUNDSLICE: ", foundslice)
|
||||||
|
if (fixedVariable !== foundslice) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if it matches EXACTLY or not, as there may be more AFTER the found[i]
|
||||||
|
const nextchar = input.slice(j + foundStringSize, j + foundStringSize + 1)
|
||||||
|
if (nextchar === ".") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
foundlocation = j
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIXME: There is something wrong here with:
|
||||||
|
// $variable.#
|
||||||
|
// vs
|
||||||
|
// $variable.#.subvalue
|
||||||
|
// if you put both of those lines in the same editor, then it will replace both (somehow). Make sure $variable.#.subvalue exists while testing.
|
||||||
|
console.log("FOUNDLOC: ", fixedVariable, foundlocation)
|
||||||
for (var j = 0; j < actionlist.length; j++) {
|
for (var j = 0; j < actionlist.length; j++) {
|
||||||
if (fixedVariable.slice(1,).toLowerCase() !== actionlist[j].autocomplete.toLowerCase()) {
|
if (fixedVariable.slice(1,).toLowerCase() !== actionlist[j].autocomplete.toLowerCase()) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Look for the location of found[i] in the input, as to make sure to skip parts of the input in the replace. Find ALL spots for it
|
||||||
valuefound = true
|
valuefound = true
|
||||||
|
var newvalue = ""
|
||||||
try {
|
try {
|
||||||
if (typeof actionlist[j].example === "object") {
|
|
||||||
|
|
||||||
input = input.replace(found[i], JSON.stringify(actionlist[j].example), -1);
|
if (typeof actionlist[j].example === "object") {
|
||||||
|
newvalue = JSON.stringify(actionlist[j].example)
|
||||||
|
|
||||||
} else if (actionlist[j].example.trim().startsWith("{") || actionlist[j].example.trim().startsWith("[")) {
|
} else if (actionlist[j].example.trim().startsWith("{") || actionlist[j].example.trim().startsWith("[")) {
|
||||||
input = input.replace(found[i], JSON.stringify(actionlist[j].example), -1);
|
|
||||||
|
newvalue = JSON.stringify(actionlist[j].example)
|
||||||
} else {
|
} else {
|
||||||
const newExample = fixStringInput(actionlist[j].example)
|
const newExample = fixStringInput(actionlist[j].example)
|
||||||
input = input.replace(found[i], newExample, -1)
|
|
||||||
|
newvalue = newExample
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
input = input.replace(found[i], actionlist[j].example, -1)
|
newvalue = actionlist[j].example
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
console.log("REPLACE: ", foundlocation, fixedVariable, newvalue)
|
||||||
|
if (newvalue !== "") {
|
||||||
|
if (foundlocation === -1) {
|
||||||
|
input = input.replace(fixedVariable, newvalue, 1)
|
||||||
|
} else {
|
||||||
|
// Ensures we don't just randomly replace the first value we find
|
||||||
|
const replacedSlice = input.slice(foundlocation, input.length).replace(fixedVariable, newvalue, 1)
|
||||||
|
input = input.slice(0, foundlocation) + replacedSlice
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log("Replace error: ", e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!valuefound) {
|
if (!valuefound) {
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ import {
|
|||||||
Apps as AppsIcon,
|
Apps as AppsIcon,
|
||||||
Business as BusinessIcon,
|
Business as BusinessIcon,
|
||||||
Flag,
|
Flag,
|
||||||
|
ArrowDropDown as ArrowDropDownIcon,
|
||||||
|
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
|
|
||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
@@ -58,6 +60,8 @@ const TenantsTab = memo((props) => {
|
|||||||
const [parentOrgRegionName, setParentOrgRegionName] = React.useState("UK");
|
const [parentOrgRegionName, setParentOrgRegionName] = React.useState("UK");
|
||||||
const [loadOrgs, setLoadOrgs] = React.useState(true);
|
const [loadOrgs, setLoadOrgs] = React.useState(true);
|
||||||
const [, forceUpdate] = React.useState();
|
const [, forceUpdate] = React.useState();
|
||||||
|
const [suborglistOpen, setSuborglistOpen] = React.useState(false);
|
||||||
|
const [allTenantsOpen, setAllTenantsOpen] = React.useState(false);
|
||||||
const itemColor = "black";
|
const itemColor = "black";
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -482,8 +486,8 @@ const TenantsTab = memo((props) => {
|
|||||||
|
|
||||||
const createSubOrg = (currentOrgId, name) => {
|
const createSubOrg = (currentOrgId, name) => {
|
||||||
const data = { name: name, org_id: currentOrgId };
|
const data = { name: name, org_id: currentOrgId };
|
||||||
console.log(data);
|
|
||||||
const url = globalUrl + `/api/v1/orgs/${currentOrgId}/create_sub_org`;
|
const url = globalUrl + `/api/v1/orgs/${currentOrgId}/create_sub_org`;
|
||||||
|
setSuborglistOpen(true)
|
||||||
|
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
mode: "cors",
|
mode: "cors",
|
||||||
@@ -791,7 +795,7 @@ const TenantsTab = memo((props) => {
|
|||||||
Create, manage and change to sub-organizations (tenants)! {" "}
|
Create, manage and change to sub-organizations (tenants)! {" "}
|
||||||
{isCloud
|
{isCloud
|
||||||
? "You can only make a sub organization if you are a customer of shuffle or running a POC of the platform. Please contact support@shuffler.io to try it out."
|
? "You can only make a sub organization if you are a customer of shuffle or running a POC of the platform. Please contact support@shuffler.io to try it out."
|
||||||
: ''}
|
: ''}
|
||||||
<a
|
<a
|
||||||
href="/docs/organizations"
|
href="/docs/organizations"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
@@ -1150,168 +1154,212 @@ const TenantsTab = memo((props) => {
|
|||||||
overflowX: "auto",
|
overflowX: "auto",
|
||||||
paddingBottom: 0,
|
paddingBottom: 0,
|
||||||
}}>
|
}}>
|
||||||
<ListItem
|
{!suborglistOpen ?
|
||||||
style={{
|
<ListItem
|
||||||
width: "100%",
|
style={{
|
||||||
display: "table-row",
|
width: "100%",
|
||||||
padding: "0px 8px 8px 8px",
|
display: "table-row",
|
||||||
whiteSpace: "nowrap",
|
padding: "0px 8px 8px 8px",
|
||||||
textOverflow: "ellipsis",
|
whiteSpace: "nowrap",
|
||||||
verticalAlign: "middle",
|
textOverflow: "ellipsis",
|
||||||
}}>
|
verticalAlign: "middle",
|
||||||
<ListItemText
|
itemAlign: "center",
|
||||||
primary="Logo"
|
|
||||||
style={{
|
|
||||||
width: 100,
|
|
||||||
minWidth: 100,
|
|
||||||
maxWidth: 100,
|
|
||||||
paddingLeft: 20,
|
|
||||||
display: "table-cell",
|
|
||||||
padding: "0px 8px 8px 8px",
|
|
||||||
textAlign: "center",
|
|
||||||
borderBottom: "1px solid #494949",
|
|
||||||
verticalAlign: "middle",
|
|
||||||
}} />
|
|
||||||
<ListItemText
|
|
||||||
primary="Name"
|
|
||||||
style={{
|
|
||||||
minWidth: 100,
|
|
||||||
maxWidth: 300,
|
|
||||||
display: "table-cell",
|
|
||||||
padding: "0px 8px 8px 8px",
|
|
||||||
whiteSpace: "nowrap",
|
|
||||||
textOverflow: "ellipsis",
|
|
||||||
borderBottom: "1px solid #494949",
|
|
||||||
verticalAlign: "middle",
|
|
||||||
textAlign: "center",
|
|
||||||
}} />
|
|
||||||
{isCloud && (
|
|
||||||
<ListItemText
|
|
||||||
primary="Region"
|
|
||||||
style={{
|
|
||||||
minWidth: 100,
|
|
||||||
maxWidth: 100,
|
|
||||||
display: "table-cell",
|
|
||||||
borderBottom: "1px solid #494949",
|
|
||||||
padding: "0px 8px 8px 8px",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<ListItemText
|
|
||||||
primary="id"
|
|
||||||
style={{
|
|
||||||
minWidth: 400,
|
|
||||||
maxWidth: 400,
|
|
||||||
display: "table-cell",
|
|
||||||
padding: "0px 8px 8px 8px",
|
|
||||||
whiteSpace: "nowrap",
|
|
||||||
textOverflow: "ellipsis",
|
|
||||||
borderBottom: "1px solid #494949",
|
|
||||||
verticalAlign: "middle",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<ListItemText
|
|
||||||
primary="Action"
|
|
||||||
style={{
|
|
||||||
minWidth: 400,
|
|
||||||
maxWidth: 400,
|
|
||||||
display: "table-cell",
|
|
||||||
padding: "0px 8px 8px 8px",
|
|
||||||
whiteSpace: "nowrap",
|
|
||||||
textOverflow: "ellipsis",
|
|
||||||
borderBottom: "1px solid #494949",
|
|
||||||
verticalAlign: "middle",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</ListItem>
|
|
||||||
{subOrgs.map((data, index) => {
|
|
||||||
let regiontag = "UK";
|
|
||||||
let regionCode = "gb";
|
|
||||||
|
|
||||||
if (data.region_url?.length > 0) {
|
}}
|
||||||
const regionsplit = data.region_url.split(".");
|
>
|
||||||
if (regionsplit.length > 2 && !regionsplit[0].includes("shuffler")) {
|
<ListItemText
|
||||||
const namesplit = regionsplit[0].split("/");
|
primary={
|
||||||
regiontag = namesplit[namesplit.length - 1];
|
<Button
|
||||||
if (regiontag === "california") {
|
fullWidth
|
||||||
regiontag = "US";
|
variant="secondary"
|
||||||
regionCode = "us";
|
style={{
|
||||||
} else if (regiontag === "frankfurt") {
|
textTransform: 'none',
|
||||||
regiontag = "EU-2";
|
}}
|
||||||
regionCode = "eu";
|
onClick={() => setSuborglistOpen(true)}
|
||||||
} else if (regiontag === "ca") {
|
>
|
||||||
regiontag = "CA";
|
Show Sub-Organizations <ArrowDropDownIcon />
|
||||||
regionCode = "ca";
|
</Button>
|
||||||
|
}
|
||||||
|
style={{
|
||||||
|
width: 100,
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 100,
|
||||||
|
paddingLeft: 20,
|
||||||
|
display: "table-cell",
|
||||||
|
padding: "0px 8px 8px 8px",
|
||||||
|
textAlign: "center",
|
||||||
|
borderBottom: "1px solid #494949",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</ListItem>
|
||||||
|
:
|
||||||
|
<span>
|
||||||
|
<ListItem
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
display: "table-row",
|
||||||
|
padding: "0px 8px 8px 8px",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}}>
|
||||||
|
<ListItemText
|
||||||
|
primary="Logo"
|
||||||
|
style={{
|
||||||
|
width: 100,
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 100,
|
||||||
|
paddingLeft: 20,
|
||||||
|
display: "table-cell",
|
||||||
|
padding: "0px 8px 8px 8px",
|
||||||
|
textAlign: "center",
|
||||||
|
borderBottom: "1px solid #494949",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}} />
|
||||||
|
<ListItemText
|
||||||
|
primary="Name"
|
||||||
|
style={{
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 300,
|
||||||
|
display: "table-cell",
|
||||||
|
padding: "0px 8px 8px 8px",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
borderBottom: "1px solid #494949",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
textAlign: "center",
|
||||||
|
}} />
|
||||||
|
{isCloud && (
|
||||||
|
<ListItemText
|
||||||
|
primary="Region"
|
||||||
|
style={{
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 100,
|
||||||
|
display: "table-cell",
|
||||||
|
borderBottom: "1px solid #494949",
|
||||||
|
padding: "0px 8px 8px 8px",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<ListItemText
|
||||||
|
primary="id"
|
||||||
|
style={{
|
||||||
|
minWidth: 400,
|
||||||
|
maxWidth: 400,
|
||||||
|
display: "table-cell",
|
||||||
|
padding: "0px 8px 8px 8px",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
borderBottom: "1px solid #494949",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<ListItemText
|
||||||
|
primary="Action"
|
||||||
|
style={{
|
||||||
|
minWidth: 400,
|
||||||
|
maxWidth: 400,
|
||||||
|
display: "table-cell",
|
||||||
|
padding: "0px 8px 8px 8px",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
borderBottom: "1px solid #494949",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</ListItem>
|
||||||
|
{subOrgs.map((data, index) => {
|
||||||
|
let regiontag = "UK";
|
||||||
|
let regionCode = "gb";
|
||||||
|
|
||||||
|
if (data.region_url?.length > 0) {
|
||||||
|
const regionsplit = data.region_url.split(".");
|
||||||
|
if (regionsplit.length > 2 && !regionsplit[0].includes("shuffler")) {
|
||||||
|
const namesplit = regionsplit[0].split("/");
|
||||||
|
regiontag = namesplit[namesplit.length - 1];
|
||||||
|
if (regiontag === "california") {
|
||||||
|
regiontag = "US";
|
||||||
|
regionCode = "us";
|
||||||
|
} else if (regiontag === "frankfurt") {
|
||||||
|
regiontag = "EU-2";
|
||||||
|
regionCode = "eu";
|
||||||
|
} else if (regiontag === "ca") {
|
||||||
|
regiontag = "CA";
|
||||||
|
regionCode = "ca";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ListItem key={index} style={{ backgroundColor: index % 2 === 0 ? '#1A1A1A' : '#212121', width: "100%", borderBottomLeftRadius: 8, display:'table-row', borderBottomRightRadius: 8 }}>
|
<ListItem key={index} style={{ backgroundColor: index % 2 === 0 ? '#1A1A1A' : '#212121', width: "100%", borderBottomLeftRadius: 8, display:'table-row', borderBottomRightRadius: 8 }}>
|
||||||
<ListItemText primary={<img alt={data?.name} src={data.image || theme.palette.defaultImage} style={imageStyle} />} style={{ width: 100,
|
<ListItemText primary={<img alt={data?.name} src={data.image || theme.palette.defaultImage} style={imageStyle} />} style={{ width: 100,
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
maxWidth: 100,
|
maxWidth: 100,
|
||||||
display: "table-cell",
|
display: "table-cell",
|
||||||
padding: "8px 8px 8px 20px",
|
padding: "8px 8px 8px 20px",
|
||||||
textAlign: "center", }} />
|
textAlign: "center", }} />
|
||||||
<ListItemText primary={data.name} style={{ minWidth: 100,
|
<ListItemText primary={data.name} style={{ minWidth: 100,
|
||||||
maxWidth: 300,
|
maxWidth: 300,
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
textOverflow: "ellipsis",
|
textOverflow: "ellipsis",
|
||||||
display: "table-cell",
|
display: "table-cell",
|
||||||
padding: 8,
|
padding: 8,
|
||||||
verticalAlign: "middle",
|
verticalAlign: "middle",
|
||||||
textAlign: "center", }} />
|
textAlign: "center", }} />
|
||||||
|
|
||||||
{isCloud && (
|
{isCloud && (
|
||||||
<ListItemText
|
<ListItemText
|
||||||
primary={
|
primary={
|
||||||
<div style={{ display: "flex", alignItems: "center" }}>
|
<div style={{ display: "flex", alignItems: "center" }}>
|
||||||
<img
|
<img
|
||||||
alt={regiontag}
|
alt={regiontag}
|
||||||
src={`https://flagcdn.com/w20/${regionCode}.png`}
|
src={`https://flagcdn.com/w20/${regionCode}.png`}
|
||||||
style={{ width: "30px", height: "20px", marginRight: "5px" }}
|
style={{ width: "30px", height: "20px", marginRight: "5px" }}
|
||||||
/>
|
/>
|
||||||
<ListItemText primary={regiontag?.toUpperCase()} />
|
<ListItemText primary={regiontag?.toUpperCase()} />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
style={{ display: "table-cell", padding: 8, verticalAlign: "middle" }}
|
style={{ display: "table-cell", padding: 8, verticalAlign: "middle" }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<ListItemText primary={data.id} style={{ minWidth: 300,
|
<ListItemText primary={data.id} style={{ minWidth: 300,
|
||||||
maxWidth: 300,
|
maxWidth: 300,
|
||||||
display: "table-cell",
|
display: "table-cell",
|
||||||
padding: 8,
|
padding: 8,
|
||||||
verticalAlign: "middle", }} />
|
verticalAlign: "middle", }} />
|
||||||
|
|
||||||
|
<ListItemText
|
||||||
|
primary={
|
||||||
|
<Tooltip title={data.id === userdata?.active_org?.id ? "You are already in this organization." : ""} disableInteractive>
|
||||||
|
<Button
|
||||||
|
color="primary"
|
||||||
|
variant='outlined'
|
||||||
|
disabled={data.id === userdata?.active_org?.id}
|
||||||
|
onClick={() => {
|
||||||
|
handleClickChangeOrg(data.id);
|
||||||
|
}}
|
||||||
|
sx={{
|
||||||
|
boxShadow:"none", textTransform:"capitalize",
|
||||||
|
fontSize:16,
|
||||||
|
'&.Mui-disabled': {
|
||||||
|
backgroundColor: 'rgba(200, 200, 200, 0.5)',
|
||||||
|
color: '#A9A9A9',
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Change Active Org
|
||||||
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
|
}
|
||||||
|
style={{ display: "table-cell", verticalAlign: "middle" }}
|
||||||
|
/>
|
||||||
|
</ListItem>
|
||||||
|
)})}
|
||||||
|
|
||||||
|
</span>}
|
||||||
|
|
||||||
<ListItemText
|
|
||||||
primary={
|
|
||||||
<Tooltip title={data.id === userdata?.active_org?.id ? "You are already in this organization." : ""} disableInteractive>
|
|
||||||
<Button
|
|
||||||
color="primary"
|
|
||||||
variant='outlined'
|
|
||||||
disabled={data.id === userdata?.active_org?.id}
|
|
||||||
onClick={() => {
|
|
||||||
handleClickChangeOrg(data.id);
|
|
||||||
}}
|
|
||||||
sx={{
|
|
||||||
boxShadow:"none", textTransform:"capitalize",
|
|
||||||
fontSize:16,
|
|
||||||
'&.Mui-disabled': {
|
|
||||||
backgroundColor: 'rgba(200, 200, 200, 0.5)',
|
|
||||||
color: '#A9A9A9',
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Change Active Org
|
|
||||||
</Button>
|
|
||||||
</Tooltip>
|
|
||||||
}
|
|
||||||
style={{ display: "table-cell", verticalAlign: "middle" }}
|
|
||||||
/>
|
|
||||||
</ListItem>
|
|
||||||
)})}
|
|
||||||
</List>
|
</List>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1366,247 +1414,289 @@ const TenantsTab = memo((props) => {
|
|||||||
paddingBottom: 0,
|
paddingBottom: 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ListItem
|
{!allTenantsOpen ?
|
||||||
style={{
|
<ListItem
|
||||||
width: "100%",
|
style={{
|
||||||
display: "table-row",
|
width: "100%",
|
||||||
padding: "0px 8px 8px 8px",
|
display: "table-row",
|
||||||
whiteSpace: "nowrap",
|
padding: "0px 8px 8px 8px",
|
||||||
textOverflow: "ellipsis",
|
whiteSpace: "nowrap",
|
||||||
verticalAlign: "middle",
|
textOverflow: "ellipsis",
|
||||||
}}
|
verticalAlign: "middle",
|
||||||
>
|
itemAlign: "center",
|
||||||
<ListItemText
|
|
||||||
primary="Logo"
|
|
||||||
style={{
|
|
||||||
width: 100,
|
|
||||||
minWidth: 100,
|
|
||||||
maxWidth: 100,
|
|
||||||
paddingLeft: 20,
|
|
||||||
display: "table-cell",
|
|
||||||
padding: "0px 8px 8px 8px",
|
|
||||||
textAlign: "center",
|
|
||||||
borderBottom: "1px solid #494949",
|
|
||||||
verticalAlign: "middle",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<ListItemText
|
|
||||||
primary="Name"
|
|
||||||
style={{
|
|
||||||
minWidth: 100,
|
|
||||||
maxWidth: 300,
|
|
||||||
display: "table-cell",
|
|
||||||
padding: "0px 8px 8px 8px",
|
|
||||||
whiteSpace: "nowrap",
|
|
||||||
textOverflow: "ellipsis",
|
|
||||||
borderBottom: "1px solid #494949",
|
|
||||||
verticalAlign: "middle",
|
|
||||||
textAlign: "center",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
{isCloud && (
|
|
||||||
<ListItemText
|
|
||||||
primary="Region"
|
|
||||||
style={{
|
|
||||||
minWidth: 100,
|
|
||||||
maxWidth: 100,
|
|
||||||
display: "table-cell",
|
|
||||||
borderBottom: "1px solid #494949",
|
|
||||||
padding: "0px 8px 8px 8px",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<ListItemText
|
|
||||||
primary="id"
|
|
||||||
style={{
|
|
||||||
minWidth: 400,
|
|
||||||
maxWidth: 400,
|
|
||||||
display: "table-cell",
|
|
||||||
padding: "0px 8px 8px 8px",
|
|
||||||
whiteSpace: "nowrap",
|
|
||||||
textOverflow: "ellipsis",
|
|
||||||
borderBottom: "1px solid #494949",
|
|
||||||
verticalAlign: "middle",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<ListItemText
|
|
||||||
primary="Action"
|
|
||||||
style={{
|
|
||||||
minWidth: 400,
|
|
||||||
maxWidth: 400,
|
|
||||||
display: "table-cell",
|
|
||||||
padding: "0px 8px 8px 8px",
|
|
||||||
whiteSpace: "nowrap",
|
|
||||||
textOverflow: "ellipsis",
|
|
||||||
borderBottom: "1px solid #494949",
|
|
||||||
verticalAlign: "middle",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</ListItem>
|
|
||||||
|
|
||||||
{userdata?.orgs?.length <= 0 ? (
|
}}
|
||||||
[...Array(6)].map((_, rowIndex) => (
|
>
|
||||||
<ListItem
|
<ListItemText
|
||||||
key={rowIndex}
|
primary={
|
||||||
style={{
|
<Button
|
||||||
display: "table-row",
|
fullWidth
|
||||||
backgroundColor: "#212121",
|
variant="secondary"
|
||||||
}}
|
style={{
|
||||||
>
|
textTransform: 'none',
|
||||||
{Array(7)
|
}}
|
||||||
.fill()
|
onClick={() => setAllTenantsOpen(true)}
|
||||||
.map((_, colIndex) => (
|
>
|
||||||
<ListItemText
|
Show ALL your tenants <ArrowDropDownIcon />
|
||||||
key={colIndex}
|
</Button>
|
||||||
style={{
|
|
||||||
display: "table-cell",
|
|
||||||
padding: "8px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Skeleton
|
|
||||||
variant="text"
|
|
||||||
animation="wave"
|
|
||||||
sx={{
|
|
||||||
backgroundColor: "#1a1a1a",
|
|
||||||
height: "20px",
|
|
||||||
borderRadius: "4px",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</ListItemText>
|
|
||||||
))}
|
|
||||||
</ListItem>
|
|
||||||
))
|
|
||||||
) : (
|
|
||||||
userdata?.orgs?.length > 0 &&
|
|
||||||
userdata.orgs.map((data, index) => {
|
|
||||||
let regiontag = "UK";
|
|
||||||
let regionCode = "gb";
|
|
||||||
|
|
||||||
if (data.region_url?.length > 0) {
|
|
||||||
const regionsplit = data.region_url.split(".");
|
|
||||||
if (regionsplit.length > 2 && !regionsplit[0].includes("shuffler")) {
|
|
||||||
const namesplit = regionsplit[0].split("/");
|
|
||||||
regiontag = namesplit[namesplit.length - 1];
|
|
||||||
|
|
||||||
if (regiontag === "california") {
|
|
||||||
regiontag = "US";
|
|
||||||
regionCode = "us";
|
|
||||||
} else if (regiontag === "frankfurt") {
|
|
||||||
regiontag = "EU-2";
|
|
||||||
regionCode = "eu";
|
|
||||||
} else if (regiontag === "ca") {
|
|
||||||
regiontag = "CA";
|
|
||||||
regionCode = "ca";
|
|
||||||
}
|
}
|
||||||
}
|
style={{
|
||||||
}
|
width: 100,
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 100,
|
||||||
|
paddingLeft: 20,
|
||||||
|
display: "table-cell",
|
||||||
|
padding: "0px 8px 8px 8px",
|
||||||
|
textAlign: "center",
|
||||||
|
borderBottom: "1px solid #494949",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</ListItem>
|
||||||
|
:
|
||||||
|
<span>
|
||||||
|
<ListItem
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
display: "table-row",
|
||||||
|
padding: "0px 8px 8px 8px",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ListItemText
|
||||||
|
primary="Logo"
|
||||||
|
style={{
|
||||||
|
width: 100,
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 100,
|
||||||
|
paddingLeft: 20,
|
||||||
|
display: "table-cell",
|
||||||
|
padding: "0px 8px 8px 8px",
|
||||||
|
textAlign: "center",
|
||||||
|
borderBottom: "1px solid #494949",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<ListItemText
|
||||||
|
primary="Name"
|
||||||
|
style={{
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 300,
|
||||||
|
display: "table-cell",
|
||||||
|
padding: "0px 8px 8px 8px",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
borderBottom: "1px solid #494949",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
textAlign: "center",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{isCloud && (
|
||||||
|
<ListItemText
|
||||||
|
primary="Region"
|
||||||
|
style={{
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 100,
|
||||||
|
display: "table-cell",
|
||||||
|
borderBottom: "1px solid #494949",
|
||||||
|
padding: "0px 8px 8px 8px",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<ListItemText
|
||||||
|
primary="id"
|
||||||
|
style={{
|
||||||
|
minWidth: 400,
|
||||||
|
maxWidth: 400,
|
||||||
|
display: "table-cell",
|
||||||
|
padding: "0px 8px 8px 8px",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
borderBottom: "1px solid #494949",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<ListItemText
|
||||||
|
primary="Action"
|
||||||
|
style={{
|
||||||
|
minWidth: 400,
|
||||||
|
maxWidth: 400,
|
||||||
|
display: "table-cell",
|
||||||
|
padding: "0px 8px 8px 8px",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
borderBottom: "1px solid #494949",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</ListItem>
|
||||||
|
|
||||||
return (
|
{userdata?.orgs?.length <= 0 ? (
|
||||||
<ListItem
|
[...Array(6)].map((_, rowIndex) => (
|
||||||
key={index}
|
<ListItem
|
||||||
style={{
|
key={rowIndex}
|
||||||
display: "table-row",
|
style={{
|
||||||
verticalAlign: "middle",
|
display: "table-row",
|
||||||
padding: 8,
|
backgroundColor: "#212121",
|
||||||
backgroundColor: index % 2 === 0 ? "#1A1A1A" : "#212121",
|
}}
|
||||||
borderBottomLeftRadius:
|
>
|
||||||
userdata?.orgs?.length - 1 === index ? 8 : 0,
|
{Array(7)
|
||||||
borderBottomRightRadius:
|
.fill()
|
||||||
userdata?.orgs?.length - 1 === index ? 8 : 0,
|
.map((_, colIndex) => (
|
||||||
}}
|
<ListItemText
|
||||||
>
|
key={colIndex}
|
||||||
<ListItemText
|
style={{
|
||||||
primary={
|
display: "table-cell",
|
||||||
<img
|
padding: "8px",
|
||||||
alt={data.name}
|
}}
|
||||||
src={data.image || theme.palette.defaultImage}
|
>
|
||||||
style={imageStyle}
|
<Skeleton
|
||||||
/>
|
variant="text"
|
||||||
}
|
animation="wave"
|
||||||
style={{
|
sx={{
|
||||||
width: 100,
|
backgroundColor: "#1a1a1a",
|
||||||
minWidth: 100,
|
height: "20px",
|
||||||
maxWidth: 100,
|
borderRadius: "4px",
|
||||||
display: "table-cell",
|
}}
|
||||||
padding: "8px 8px 8px 20px",
|
/>
|
||||||
textAlign: "center",
|
</ListItemText>
|
||||||
}}
|
))}
|
||||||
/>
|
</ListItem>
|
||||||
<ListItemText
|
))
|
||||||
primary={data?.name}
|
) : (
|
||||||
style={{
|
userdata?.orgs?.length > 0 &&
|
||||||
minWidth: 100,
|
userdata.orgs.map((data, index) => {
|
||||||
maxWidth: 300,
|
let regiontag = "UK";
|
||||||
overflow: "hidden",
|
let regionCode = "gb";
|
||||||
whiteSpace: "nowrap",
|
|
||||||
textOverflow: "ellipsis",
|
|
||||||
display: "table-cell",
|
|
||||||
padding: 8,
|
|
||||||
verticalAlign: "middle",
|
|
||||||
textAlign: "center",
|
|
||||||
}}
|
|
||||||
></ListItemText>
|
|
||||||
{isCloud ? (
|
|
||||||
<ListItemText
|
|
||||||
primary={
|
|
||||||
<div style={{ display: "flex", alignItems: "center" }}>
|
|
||||||
<img
|
|
||||||
alt={regiontag}
|
|
||||||
src={`https://flagcdn.com/w20/${regionCode}.png`}
|
|
||||||
style={{
|
|
||||||
display: "table-cell",
|
|
||||||
padding: 8,
|
|
||||||
verticalAlign: "middle",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<ListItemText primary={regiontag} />
|
if (data.region_url?.length > 0) {
|
||||||
</div>
|
const regionsplit = data.region_url.split(".");
|
||||||
}
|
if (regionsplit.length > 2 && !regionsplit[0].includes("shuffler")) {
|
||||||
style={{
|
const namesplit = regionsplit[0].split("/");
|
||||||
display: "table-cell",
|
regiontag = namesplit[namesplit.length - 1];
|
||||||
padding: 8,
|
|
||||||
verticalAlign: "middle",
|
if (regiontag === "california") {
|
||||||
}}
|
regiontag = "US";
|
||||||
></ListItemText>
|
regionCode = "us";
|
||||||
) : null}
|
} else if (regiontag === "frankfurt") {
|
||||||
<ListItemText
|
regiontag = "EU-2";
|
||||||
primary={data.id}
|
regionCode = "eu";
|
||||||
style={{
|
} else if (regiontag === "ca") {
|
||||||
minWidth: 300,
|
regiontag = "CA";
|
||||||
maxWidth: 300,
|
regionCode = "ca";
|
||||||
display: "table-cell",
|
}
|
||||||
padding: 8,
|
}
|
||||||
verticalAlign: "middle",
|
}
|
||||||
}}
|
|
||||||
/>
|
return (
|
||||||
<ListItemText
|
<ListItem
|
||||||
primary={
|
key={index}
|
||||||
<Button
|
style={{
|
||||||
variant="outlined"
|
display: "table-row",
|
||||||
style={{
|
verticalAlign: "middle",
|
||||||
whiteSpace: "nowrap",
|
padding: 8,
|
||||||
textTransform: "none",
|
backgroundColor: index % 2 === 0 ? "#1A1A1A" : "#212121",
|
||||||
fontSize: 16,
|
borderBottomLeftRadius:
|
||||||
}}
|
userdata?.orgs?.length - 1 === index ? 8 : 0,
|
||||||
disabled={data?.id === userdata?.active_org?.id}
|
borderBottomRightRadius:
|
||||||
onClick={() => {
|
userdata?.orgs?.length - 1 === index ? 8 : 0,
|
||||||
handleClickChangeOrg(data?.id);
|
}}
|
||||||
}}
|
>
|
||||||
>
|
<ListItemText
|
||||||
Change Active Org
|
primary={
|
||||||
</Button>
|
<img
|
||||||
}
|
alt={data.name}
|
||||||
style={{
|
src={data.image || theme.palette.defaultImage}
|
||||||
display: "table-cell",
|
style={imageStyle}
|
||||||
padding: 8,
|
/>
|
||||||
verticalAlign: "middle",
|
}
|
||||||
}}
|
style={{
|
||||||
></ListItemText>
|
width: 100,
|
||||||
</ListItem>
|
minWidth: 100,
|
||||||
);
|
maxWidth: 100,
|
||||||
})
|
display: "table-cell",
|
||||||
)}
|
padding: "8px 8px 8px 20px",
|
||||||
|
textAlign: "center",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<ListItemText
|
||||||
|
primary={data?.name}
|
||||||
|
style={{
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 300,
|
||||||
|
overflow: "hidden",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
display: "table-cell",
|
||||||
|
padding: 8,
|
||||||
|
verticalAlign: "middle",
|
||||||
|
textAlign: "center",
|
||||||
|
}}
|
||||||
|
></ListItemText>
|
||||||
|
{isCloud ? (
|
||||||
|
<ListItemText
|
||||||
|
primary={
|
||||||
|
<div style={{ display: "flex", alignItems: "center" }}>
|
||||||
|
<img
|
||||||
|
alt={regiontag}
|
||||||
|
src={`https://flagcdn.com/w20/${regionCode}.png`}
|
||||||
|
style={{
|
||||||
|
display: "table-cell",
|
||||||
|
padding: 8,
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ListItemText primary={regiontag} />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
style={{
|
||||||
|
display: "table-cell",
|
||||||
|
padding: 8,
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}}
|
||||||
|
></ListItemText>
|
||||||
|
) : null}
|
||||||
|
<ListItemText
|
||||||
|
primary={data.id}
|
||||||
|
style={{
|
||||||
|
minWidth: 300,
|
||||||
|
maxWidth: 300,
|
||||||
|
display: "table-cell",
|
||||||
|
padding: 8,
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<ListItemText
|
||||||
|
primary={
|
||||||
|
<Button
|
||||||
|
variant="outlined"
|
||||||
|
style={{
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textTransform: "none",
|
||||||
|
fontSize: 16,
|
||||||
|
}}
|
||||||
|
disabled={data?.id === userdata?.active_org?.id}
|
||||||
|
onClick={() => {
|
||||||
|
handleClickChangeOrg(data?.id);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Change Active Org
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
style={{
|
||||||
|
display: "table-cell",
|
||||||
|
padding: 8,
|
||||||
|
verticalAlign: "middle",
|
||||||
|
}}
|
||||||
|
></ListItemText>
|
||||||
|
</ListItem>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
)}
|
||||||
|
</span>}
|
||||||
</List>
|
</List>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4316,9 +4316,15 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
var sessionToken = new URLSearchParams(cursearch).get("session_token");
|
var sessionToken = new URLSearchParams(cursearch).get("session_token");
|
||||||
if (execFound === null && sessionToken === null) {
|
if (execFound === null && sessionToken === null) {
|
||||||
|
|
||||||
toast.error(`You don't have access to this workflow or loading failed. Redirecting to workflows in a few seconds. If you recently deleted this workflow, speak with support@shuffler.io to recover it from a revision.`, {
|
if (isCloud) {
|
||||||
autoClose: 10000,
|
toast.error(`You don't have access to this workflow or loading failed. Redirecting to workflows in a few seconds. If you recently deleted this workflow, speak with support@shuffler.io to recover it from a revision.`, {
|
||||||
})
|
autoClose: 10000,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
toast.error(`You don't have access to this workflow or loading failed. Redirecting to workflows in a few seconds. Contact support@shuffler.io if this is unexpected.`, {
|
||||||
|
autoClose: 10000,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.pathname = "/workflows";
|
window.location.pathname = "/workflows";
|
||||||
@@ -7659,7 +7665,6 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handlePaste = (event) => {
|
const handlePaste = (event) => {
|
||||||
console.log("PASTE EVENT: ", event)
|
|
||||||
if (event.path !== undefined && event.path !== null && event.path.length > 0) {
|
if (event.path !== undefined && event.path !== null && event.path.length > 0) {
|
||||||
if (event.path[0].localName !== "body") {
|
if (event.path[0].localName !== "body") {
|
||||||
console.log("Skipping paste because body is not targeted")
|
console.log("Skipping paste because body is not targeted")
|
||||||
@@ -7667,15 +7672,13 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Paste target: ", event?.target)
|
|
||||||
/*
|
|
||||||
if (event.target !== undefined && event.target !== null) {
|
if (event.target !== undefined && event.target !== null) {
|
||||||
if (event.target.localName !== "body") {
|
// If it's an input area, skip paste
|
||||||
console.log("Skipping paste because body is not targeted (2). Target: ", event?.target?.localName)
|
if (event.target.localName === "input" || event.target.localName === "textarea") {
|
||||||
return;
|
console.log("Skipping paste because body is not targeted (1). Target: ", event?.target?.localName)
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
// Does this stop things?
|
// Does this stop things?
|
||||||
//event.preventDefault()
|
//event.preventDefault()
|
||||||
|
|||||||
@@ -1114,6 +1114,7 @@ const Docs = (defaultprops) => {
|
|||||||
marginTop: 25,
|
marginTop: 25,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const showPartnerLogo = userdata?.org_status?.includes("integration_partner") && userdata?.active_org?.image !== undefined && userdata?.active_org?.image !== null && userdata?.active_org?.image.length > 0
|
||||||
const mainpageInfo =
|
const mainpageInfo =
|
||||||
<div style={{
|
<div style={{
|
||||||
color: "rgba(255, 255, 255, 0.65)",
|
color: "rgba(255, 255, 255, 0.65)",
|
||||||
@@ -1129,10 +1130,12 @@ const Docs = (defaultprops) => {
|
|||||||
<Typography variant="h4" style={{ textAlign: "center", marginTop: 20 }}>
|
<Typography variant="h4" style={{ textAlign: "center", marginTop: 20 }}>
|
||||||
Documentation
|
Documentation
|
||||||
</Typography>
|
</Typography>
|
||||||
<div style={{ display: "flex", marginTop: 25, }}>
|
{showPartnerLogo === true ? null :
|
||||||
<CustomButton title="Talk to Support" icon=<img src="/images/Shuffle_logo_new.png" style={{ height: 35, width: 35, border: "", borderRadius: theme.palette?.borderRadius, }} /> />
|
<div style={{ display: "flex", marginTop: 25, }}>
|
||||||
<CustomButton title="Ask the community" icon=<img src="/images/social/discord.png" style={{ height: 35, width: 35, border: "", borderRadius: theme.palette?.borderRadius, }} /> link="https://discord.gg/B2CBzUm" />
|
<CustomButton title="Talk to Support" icon=<img src="/images/Shuffle_logo_new.png" style={{ height: 35, width: 35, border: "", borderRadius: theme.palette?.borderRadius, }} /> />
|
||||||
</div>
|
<CustomButton title="Ask the community" icon=<img src="/images/social/discord.png" style={{ height: 35, width: 35, border: "", borderRadius: theme.palette?.borderRadius, }} /> link="https://discord.gg/B2CBzUm" />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
<div style={{ textAlign: "left" }}>
|
<div style={{ textAlign: "left" }}>
|
||||||
<Typography variant="h6" style={headerStyle} >Tutorial</Typography>
|
<Typography variant="h6" style={headerStyle} >Tutorial</Typography>
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import {
|
|||||||
DialogTitle,
|
DialogTitle,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
|
Autocomplete,
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -45,6 +46,7 @@ import {
|
|||||||
LockOpen as LockOpenIcon,
|
LockOpen as LockOpenIcon,
|
||||||
OpenInNew as OpenInNewIcon,
|
OpenInNew as OpenInNewIcon,
|
||||||
Edit as EditIcon,
|
Edit as EditIcon,
|
||||||
|
Polyline as PolylineIcon,
|
||||||
} from '@mui/icons-material';
|
} from '@mui/icons-material';
|
||||||
|
|
||||||
const hrefStyle = {
|
const hrefStyle = {
|
||||||
@@ -75,6 +77,7 @@ const RunWorkflow = (defaultprops) => {
|
|||||||
const [sharingOpen, setSharingOpen] = React.useState(false)
|
const [sharingOpen, setSharingOpen] = React.useState(false)
|
||||||
const [realtimeMarkdown, setRealtimeMarkdown] = React.useState("")
|
const [realtimeMarkdown, setRealtimeMarkdown] = React.useState("")
|
||||||
const [forms, setForms] = React.useState([])
|
const [forms, setForms] = React.useState([])
|
||||||
|
const [workflows, setWorkflows] = React.useState([])
|
||||||
const [boxWidth, setBoxWidth] = React.useState(500)
|
const [boxWidth, setBoxWidth] = React.useState(500)
|
||||||
const [inputQuestions, setInputQuestions] = React.useState([])
|
const [inputQuestions, setInputQuestions] = React.useState([])
|
||||||
|
|
||||||
@@ -181,6 +184,37 @@ const RunWorkflow = (defaultprops) => {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getWorkflows = () => {
|
||||||
|
const url = `${globalUrl}/api/v1/workflows`
|
||||||
|
fetch(url, {
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Accept: "application/json",
|
||||||
|
},
|
||||||
|
credentials: "include",
|
||||||
|
})
|
||||||
|
.then((response) => {
|
||||||
|
if (response.status !== 200) {
|
||||||
|
console.log("Status not 200 for org forms");
|
||||||
|
}
|
||||||
|
|
||||||
|
return response.json()
|
||||||
|
})
|
||||||
|
.then((responseJson) => {
|
||||||
|
if (responseJson.success === false) {
|
||||||
|
toast.error("Failed saving workflow. Please try again.")
|
||||||
|
} else {
|
||||||
|
if (responseJson?.length > 0) {
|
||||||
|
setWorkflows(responseJson)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
//toast.error("Load form error: " + error)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const loadForms = (orgId) => {
|
const loadForms = (orgId) => {
|
||||||
const url = `${globalUrl}/api/v1/orgs/${orgId}/forms`
|
const url = `${globalUrl}/api/v1/orgs/${orgId}/forms`
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
@@ -878,6 +912,7 @@ const RunWorkflow = (defaultprops) => {
|
|||||||
// Just use this one?
|
// Just use this one?
|
||||||
var url = execution_id !== undefined && authorization !== undefined ? `${globalUrl}/api/v1/orgs/${orgId}?reference_execution=${execution_id}&authorization=${authorization}` : `${globalUrl}/api/v1/orgs/${orgId}`;
|
var url = execution_id !== undefined && authorization !== undefined ? `${globalUrl}/api/v1/orgs/${orgId}?reference_execution=${execution_id}&authorization=${authorization}` : `${globalUrl}/api/v1/orgs/${orgId}`;
|
||||||
|
|
||||||
|
getWorkflows()
|
||||||
loadForms(orgId)
|
loadForms(orgId)
|
||||||
|
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
@@ -1152,10 +1187,100 @@ const RunWorkflow = (defaultprops) => {
|
|||||||
No Forms Found
|
No Forms Found
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="body1" color="textSecondary">
|
<Typography variant="body1" color="textSecondary">
|
||||||
<b>Every</b> Workflow is a form, and can be accessed by going to /forms/{`{workflow_id}`}. You can control the form by editing the workflow details in the "Forms" section.
|
<b>ALL</b> Workflows are forms, and can be accessed by going to /forms/{`{workflow_id}`}. You can control the form by editing the workflow details in the "Forms" section.
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{workflows === undefined || workflows === null || workflows.length === 0 ? null :
|
||||||
|
<Autocomplete
|
||||||
|
disabled={workflows === undefined || workflows === null || workflows.length === 0}
|
||||||
|
id="form-workflow-search"
|
||||||
|
autoHighlight
|
||||||
|
value={""}
|
||||||
|
ListboxProps={{
|
||||||
|
style: {
|
||||||
|
backgroundColor: theme.palette.inputColor,
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
sx={{
|
||||||
|
'& .MuiOutlinedInput-root': {
|
||||||
|
height: 40, // Adjust the input height
|
||||||
|
},
|
||||||
|
'& .MuiAutocomplete-input': {
|
||||||
|
padding: '8px', // Adjust the text padding
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
getOptionSelected={(option, value) => option.id === value.id}
|
||||||
|
getOptionLabel={(option) => {
|
||||||
|
if (
|
||||||
|
option === undefined ||
|
||||||
|
option === null ||
|
||||||
|
option.name === undefined ||
|
||||||
|
option.name === null
|
||||||
|
) {
|
||||||
|
return "No Workflow Selected";
|
||||||
|
}
|
||||||
|
|
||||||
|
const newname = (
|
||||||
|
option.name.charAt(0).toUpperCase() + option.name.substring(1)
|
||||||
|
).replaceAll("_", " ");
|
||||||
|
return newname;
|
||||||
|
}}
|
||||||
|
options={workflows}
|
||||||
|
fullWidth
|
||||||
|
style={{
|
||||||
|
backgroundColor: theme.palette.inputColor,
|
||||||
|
borderRadius: theme.palette?.borderRadius,
|
||||||
|
marginTop: 75,
|
||||||
|
}}
|
||||||
|
renderOption={(props, data, state) => {
|
||||||
|
if (data.id === workflow.id) {
|
||||||
|
data = workflow;
|
||||||
|
}
|
||||||
|
|
||||||
|
//key={index}
|
||||||
|
return (
|
||||||
|
<Tooltip arrow placement="left" title={
|
||||||
|
<span style={{}}>
|
||||||
|
{data.image !== undefined && data.image !== null && data.image.length > 0 ?
|
||||||
|
<img src={data.image} alt={data.name} style={{ backgroundColor: theme.palette.surfaceColor, maxHeight: 200, minHeigth: 200, maxWidth: 285, borderRadius: theme.palette?.borderRadius, }} />
|
||||||
|
: null}
|
||||||
|
<Typography>
|
||||||
|
Choose Subflow '{data.name}'
|
||||||
|
</Typography>
|
||||||
|
</span>
|
||||||
|
}>
|
||||||
|
<MenuItem
|
||||||
|
style={{
|
||||||
|
backgroundColor: theme.palette.inputColor,
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
window.location.href = `/forms/${data.id}`
|
||||||
|
}}
|
||||||
|
value={data}
|
||||||
|
>
|
||||||
|
<PolylineIcon style={{ marginRight: 8 }} />
|
||||||
|
{data.name}
|
||||||
|
</MenuItem>
|
||||||
|
</Tooltip>
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
renderInput={(params) => {
|
||||||
|
return (
|
||||||
|
<div style={{ display: "flex", }}>
|
||||||
|
<TextField
|
||||||
|
style={theme.palette.textFieldStyle}
|
||||||
|
{...params}
|
||||||
|
label="Find your form"
|
||||||
|
variant="outlined"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1405,7 +1530,10 @@ const RunWorkflow = (defaultprops) => {
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
disabled={!handleValidateForm(executionArgument) || disabledButtons}
|
disabled={!handleValidateForm(executionArgument) || disabledButtons}
|
||||||
color="primary"
|
color="primary"
|
||||||
style={{flex: 1,}}
|
style={{
|
||||||
|
flex: 1,
|
||||||
|
textTransform: "none",
|
||||||
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setButtonClicked("FINISHED")
|
setButtonClicked("FINISHED")
|
||||||
setExecutionData({
|
setExecutionData({
|
||||||
@@ -1418,14 +1546,25 @@ const RunWorkflow = (defaultprops) => {
|
|||||||
<Typography variant="body1" style={{marginLeft: 3, marginRight: 3, marginTop: 3, }}>
|
<Typography variant="body1" style={{marginLeft: 3, marginRight: 3, marginTop: 3, }}>
|
||||||
or
|
or
|
||||||
</Typography>
|
</Typography>
|
||||||
<Button fullWidth id="abort_execution" variant="contained" disabled={!handleValidateForm(executionArgument) || disabledButtons} color="primary" style={{ flex: 1, }} onClick={() => {
|
<Button
|
||||||
setButtonClicked("ABORTED")
|
fullWidth
|
||||||
setExecutionData({
|
id="abort_execution"
|
||||||
status: "ABORTED",
|
variant="outlined"
|
||||||
})
|
disabled={!handleValidateForm(executionArgument) || disabledButtons}
|
||||||
|
color="primary"
|
||||||
|
style={{
|
||||||
|
flex: 1,
|
||||||
|
textTransform: "none",
|
||||||
|
}} onClick={() => {
|
||||||
|
setButtonClicked("ABORTED")
|
||||||
|
setExecutionData({
|
||||||
|
status: "ABORTED",
|
||||||
|
})
|
||||||
|
|
||||||
onSubmit(null, execution_id, authorization, false)
|
onSubmit(null, execution_id, authorization, false)
|
||||||
}}>Stop</Button>
|
}}>
|
||||||
|
Stop
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
:
|
:
|
||||||
@@ -1436,6 +1575,9 @@ const RunWorkflow = (defaultprops) => {
|
|||||||
color="primary"
|
color="primary"
|
||||||
fullWidth
|
fullWidth
|
||||||
disabled={!handleValidateForm(executionArgument) || executionLoading}
|
disabled={!handleValidateForm(executionArgument) || executionLoading}
|
||||||
|
style={{
|
||||||
|
textTransform: "none",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{executionLoading ?
|
{executionLoading ?
|
||||||
<CircularProgress color="secondary" style={{color: "white",}} />
|
<CircularProgress color="secondary" style={{color: "white",}} />
|
||||||
@@ -1621,7 +1763,10 @@ const RunWorkflow = (defaultprops) => {
|
|||||||
disabled={workflow.id === undefined || workflow.id === null}
|
disabled={workflow.id === undefined || workflow.id === null}
|
||||||
variant={"outlined"}
|
variant={"outlined"}
|
||||||
color={"secondary"}
|
color={"secondary"}
|
||||||
style={{marginRight: 10, }}
|
style={{
|
||||||
|
marginRight: 10,
|
||||||
|
textTransform: "none",
|
||||||
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
window.open(`/workflows/${workflow.id}`, "_blank")
|
window.open(`/workflows/${workflow.id}`, "_blank")
|
||||||
}}
|
}}
|
||||||
@@ -1634,7 +1779,10 @@ const RunWorkflow = (defaultprops) => {
|
|||||||
disabled={workflow.id === undefined || workflow.id === null}
|
disabled={workflow.id === undefined || workflow.id === null}
|
||||||
variant={workflow.sharing === "form" ? "outlined" : "contained"}
|
variant={workflow.sharing === "form" ? "outlined" : "contained"}
|
||||||
color={"secondary"}
|
color={"secondary"}
|
||||||
style={{marginRight: 10, }}
|
style={{
|
||||||
|
marginRight: 10,
|
||||||
|
textTransform: "none",
|
||||||
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSharingOpen(true)
|
setSharingOpen(true)
|
||||||
}}
|
}}
|
||||||
@@ -1656,7 +1804,9 @@ const RunWorkflow = (defaultprops) => {
|
|||||||
disabled={workflow.id === undefined || workflow.id === null}
|
disabled={workflow.id === undefined || workflow.id === null}
|
||||||
variant={"contained"}
|
variant={"contained"}
|
||||||
color={"primary"}
|
color={"primary"}
|
||||||
style={{}}
|
style={{
|
||||||
|
textTransform: "none",
|
||||||
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setEditWorkflowModalOpen(true)
|
setEditWorkflowModalOpen(true)
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -812,9 +812,10 @@ const Workflows2 = (props) => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const isCloud =
|
//const isCloud =
|
||||||
window.location.host === "localhost:3002" ||
|
// window.location.host === "localhost:3002" ||
|
||||||
window.location.host === "shuffler.io";
|
// window.location.host === "shuffler.io";
|
||||||
|
const isCloud = false
|
||||||
|
|
||||||
const findWorkflow = (filters) => {
|
const findWorkflow = (filters) => {
|
||||||
console.log("Using filters: ", filters)
|
console.log("Using filters: ", filters)
|
||||||
@@ -2474,16 +2475,18 @@ const Workflows2 = (props) => {
|
|||||||
style={{ display: "flex", flexDirection: "column", width: "100%", fontFamily: theme?.typography?.fontFamily }}
|
style={{ display: "flex", flexDirection: "column", width: "100%", fontFamily: theme?.typography?.fontFamily }}
|
||||||
>
|
>
|
||||||
<Grid item style={{ display: "flex", maxHeight: 34 }}>
|
<Grid item style={{ display: "flex", maxHeight: 34 }}>
|
||||||
<Tooltip title={`Org "${orgName}". Click to edit image.`} placement="bottom">
|
{currTab === 2 ? null :
|
||||||
<div
|
<Tooltip title={`Org "${orgName}". Click to edit image.`} placement="bottom">
|
||||||
styl={{ cursor: "pointer" }}
|
<div
|
||||||
onClick={() => {
|
styl={{ cursor: "pointer" }}
|
||||||
navigate("/admin")
|
onClick={() => {
|
||||||
}}
|
navigate("/admin")
|
||||||
>
|
}}
|
||||||
{image}
|
>
|
||||||
</div>
|
{image}
|
||||||
</Tooltip>
|
</div>
|
||||||
|
</Tooltip>
|
||||||
|
}
|
||||||
<Tooltip arrow
|
<Tooltip arrow
|
||||||
onMouseEnter={() => {
|
onMouseEnter={() => {
|
||||||
/*
|
/*
|
||||||
@@ -2562,9 +2565,19 @@ const Workflows2 = (props) => {
|
|||||||
>
|
>
|
||||||
<Link
|
<Link
|
||||||
to={
|
to={
|
||||||
type === "public" ? parsedUrl : data.workflow_as_code ? `/workflows/${data.id}/code` : `/workflows/${data.id}`
|
currTab === 2 ? `https://shuffler.io${parsedUrl}` : type === "public" ? parsedUrl : data.workflow_as_code ? `/workflows/${data.id}/code` : `/workflows/${data.id}`
|
||||||
}
|
}
|
||||||
style={{ textDecoration: "none", color: "inherit", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", maxWidth: "90%", display: "block" }} >
|
style={{
|
||||||
|
textDecoration: "none",
|
||||||
|
color: "inherit",
|
||||||
|
overflow: "hidden",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
maxWidth: "90%",
|
||||||
|
display: "block"
|
||||||
|
}}
|
||||||
|
target={currTab === 2 ? "_blank" : "_self"}
|
||||||
|
>
|
||||||
{parsedName}
|
{parsedName}
|
||||||
</Link>
|
</Link>
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -4261,7 +4274,7 @@ const Workflows2 = (props) => {
|
|||||||
TabIndicatorProps={{ style: { display: 'none' } }}
|
TabIndicatorProps={{ style: { display: 'none' } }}
|
||||||
>
|
>
|
||||||
<Tab
|
<Tab
|
||||||
label="Organization Workflows"
|
label="Org Workflows"
|
||||||
style={{
|
style={{
|
||||||
...tabStyle,
|
...tabStyle,
|
||||||
...(currTab === 0 ? tabActive : {})
|
...(currTab === 0 ? tabActive : {})
|
||||||
@@ -4282,6 +4295,19 @@ const Workflows2 = (props) => {
|
|||||||
...(currTab === 2 ? tabActive : {})
|
...(currTab === 2 ? tabActive : {})
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<Tab
|
||||||
|
label="Org Forms"
|
||||||
|
onClick={() => {
|
||||||
|
navigate("/forms")
|
||||||
|
}}
|
||||||
|
style={{
|
||||||
|
...tabStyle,
|
||||||
|
marginRight: 0,
|
||||||
|
marginLeft: 25,
|
||||||
|
...(currTab === 3 ? tabActive : {})
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ require (
|
|||||||
github.com/docker/docker v27.5.0+incompatible
|
github.com/docker/docker v27.5.0+incompatible
|
||||||
github.com/gorilla/mux v1.8.1
|
github.com/gorilla/mux v1.8.1
|
||||||
github.com/satori/go.uuid v1.2.0
|
github.com/satori/go.uuid v1.2.0
|
||||||
github.com/shuffle/shuffle-shared v0.8.19
|
github.com/shuffle/shuffle-shared v0.8.31
|
||||||
k8s.io/api v0.30.2
|
k8s.io/api v0.30.2
|
||||||
k8s.io/apimachinery v0.30.2
|
k8s.io/apimachinery v0.30.2
|
||||||
k8s.io/client-go v0.30.2
|
k8s.io/client-go v0.30.2
|
||||||
|
|||||||
@@ -294,8 +294,8 @@ github.com/sendgrid/sendgrid-go v3.14.0+incompatible h1:KDSasSTktAqMJCYClHVE94Fc
|
|||||||
github.com/sendgrid/sendgrid-go v3.14.0+incompatible/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8=
|
github.com/sendgrid/sendgrid-go v3.14.0+incompatible/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8=
|
||||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
|
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
|
||||||
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
|
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
|
||||||
github.com/shuffle/shuffle-shared v0.8.19 h1:HXqU62sPhVzv9MeJnA5ZpPYwwbitVz1EtMMABbY3t74=
|
github.com/shuffle/shuffle-shared v0.8.31 h1:APO/BkBxiP9Hn/Fa7SsESRD6ws9E5dBfIzS57pd3MvA=
|
||||||
github.com/shuffle/shuffle-shared v0.8.19/go.mod h1:NruHSAscDsW595wpK2r7MeHPGspUEKRNvBpcN1iGbHI=
|
github.com/shuffle/shuffle-shared v0.8.31/go.mod h1:NruHSAscDsW595wpK2r7MeHPGspUEKRNvBpcN1iGbHI=
|
||||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||||
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||||
|
|||||||
Reference in New Issue
Block a user