From b6512897e8d921ebeec273875410b54e20b516a9 Mon Sep 17 00:00:00 2001 From: yashsinghcodes Date: Mon, 17 Mar 2025 18:12:23 +0530 Subject: [PATCH] Revert "Multiple diff fixes for multi tenant workflows" This reverts commit f0c2dfa3d22f12eaa8479a079619bae6b7a367a7. --- backend/go-app/go.mod | 2 +- backend/go-app/go.sum | 2 - backend/go-app/walkoff.go | 8 +- frontend/src/components/Billing.jsx | 81 ++++++-------- frontend/src/components/EditWorkflow.jsx | 15 +-- frontend/src/components/LicencePopup.jsx | 70 +++--------- frontend/src/components/Navbar.jsx | 2 +- frontend/src/views/AngularWorkflow.jsx | 134 ++++++----------------- frontend/src/views/LoginPage.jsx | 20 ++-- frontend/src/views/Workflows.jsx | 5 +- frontend/src/views/Workflows2.jsx | 14 +-- 11 files changed, 106 insertions(+), 247 deletions(-) diff --git a/backend/go-app/go.mod b/backend/go-app/go.mod index cf2eb962..8af42425 100644 --- a/backend/go-app/go.mod +++ b/backend/go-app/go.mod @@ -18,7 +18,7 @@ require ( github.com/gorilla/mux v1.8.1 github.com/h2non/filetype v1.1.3 github.com/satori/go.uuid v1.2.0 - github.com/shuffle/shuffle-shared v0.8.12 + github.com/shuffle/shuffle-shared v0.8.7 golang.org/x/crypto v0.32.0 google.golang.org/api v0.176.1 google.golang.org/grpc v1.68.1 diff --git a/backend/go-app/go.sum b/backend/go-app/go.sum index 99179e7f..f240b4e4 100644 --- a/backend/go-app/go.sum +++ b/backend/go-app/go.sum @@ -356,8 +356,6 @@ github.com/shuffle/shuffle-shared v0.8.5 h1:c98AMOzIrDXmgQrKyf1HJ9wZwAwB02LPRvf9 github.com/shuffle/shuffle-shared v0.8.5/go.mod h1:bBXhEsPKjxln0mFnSeri7gIJ3tL/636Sh5NyTyNrvIQ= github.com/shuffle/shuffle-shared v0.8.6 h1:chnGJRKsO1gR5Vt/8hp5SQg1yP8/DmiK8sRhWVaTgEg= github.com/shuffle/shuffle-shared v0.8.6/go.mod h1:bBXhEsPKjxln0mFnSeri7gIJ3tL/636Sh5NyTyNrvIQ= -github.com/shuffle/shuffle-shared v0.8.12 h1:fg6jGAuevOGLgR7kpoZDJh//tzFjrEqj/bpxRFzxUTw= -github.com/shuffle/shuffle-shared v0.8.12/go.mod h1:bBXhEsPKjxln0mFnSeri7gIJ3tL/636Sh5NyTyNrvIQ= 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/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= diff --git a/backend/go-app/walkoff.go b/backend/go-app/walkoff.go index dfdccefe..037d6d32 100755 --- a/backend/go-app/walkoff.go +++ b/backend/go-app/walkoff.go @@ -1032,14 +1032,10 @@ func deleteWorkflow(resp http.ResponseWriter, request *http.Request) { log.Printf("[INFO] Should have deleted workflow %s (%s)", workflow.Name, fileId) - shuffle.DeleteCache(ctx, fmt.Sprintf("%s_workflows", user.Id)) + cacheKey := fmt.Sprintf("%s_workflows", user.Id) + shuffle.DeleteCache(ctx, cacheKey) shuffle.DeleteCache(ctx, fmt.Sprintf("%s_workflows", user.ActiveOrg.Id)) - shuffle.DeleteCache(ctx, fmt.Sprintf("%s_%s", user.Username, fileId)) log.Printf("[DEBUG] Cleared workflow cache for %s (%s)", user.Username, user.Id) - shuffle.DeleteCache(ctx, fmt.Sprintf("workflow_%s_childworkflows", workflow.ID)) - if len(workflow.ParentWorkflowId) > 0 { - shuffle.DeleteCache(ctx, fmt.Sprintf("workflow_%s_childworkflows", workflow.ParentWorkflowId)) - } resp.WriteHeader(200) resp.Write([]byte(`{"success": true}`)) diff --git a/frontend/src/components/Billing.jsx b/frontend/src/components/Billing.jsx index 39e15706..577d249c 100644 --- a/frontend/src/components/Billing.jsx +++ b/frontend/src/components/Billing.jsx @@ -77,8 +77,6 @@ const Billing = memo((props) => { const [currentIndex, setCurrentIndex] = useState(0); const [deleteAlertIndex, setDeleteAlertIndex] = useState(-1); const [deleteAlertVerification, setDeleteAlertVerification] = useState(false); - const [isScale, setIsScale] = useState(false); - useEffect(() => { if (userdata.app_execution_limit !== undefined && userdata.app_execution_usage !== undefined) { const percentage = (userdata.app_execution_usage / userdata.app_execution_limit) * 100; @@ -178,10 +176,11 @@ const Billing = memo((props) => { padding: 20, // maxWidth: 400, width: 340, - height: 'auto', + height: 480, // width: "100%", - backgroundColor: "#1e1e1e", - borderRadius: 10, + backgroundColor: theme.palette.backgroundColor, + borderRadius: theme.palette?.borderRadius * 2, + border: "1px solid rgba(255,255,255,0.3)", marginRight: 10, marginTop: 15, } @@ -362,7 +361,7 @@ const Billing = memo((props) => { var showSupport = false if (subscription.name.includes("default")) { top_text = "Custom Contract" - // newPaperstyle.border = "1px solid rgba(255,255,255,0.3)" + newPaperstyle.border = "1px solid rgba(255,255,255,0.3)" showSupport = true } @@ -378,17 +377,16 @@ const Billing = memo((props) => { if (subscription.name.includes("Scale")) { top_text = "Scale access" - setIsScale(true) } if (highlight === true) { // Add an "Upgrade now" button - // newPaperstyle.border = "1px solid rgba(255,255,255,0.3)" + newPaperstyle.border = "1px solid rgba(255,255,255,0.3)" } - // if (hovered) { - // newPaperstyle.backgroundColor = "#2b2b2b" - // } + if (hovered) { + newPaperstyle.backgroundColor = "#2b2b2b" + } const handleClickOpen = () => { setOpenChangeEmailBox(true); @@ -558,7 +556,6 @@ const Billing = memo((props) => { -
{top_text === "Base Cloud Access" && userdata.has_card_available === true ? { { }} @@ -2016,33 +2013,7 @@ const Billing = memo((props) => { : null} -
-
- {isCloud && - selectedOrganization.subscriptions !== undefined && - selectedOrganization.subscriptions !== null && - selectedOrganization.subscriptions.length > 0 && - !isChildOrg ? - selectedOrganization.subscriptions - .reverse() - .map((sub, index) => { - return ( - - ) - }) - : null} - -
+
{isCloud && billingInfo.subscription !== undefined && billingInfo.subscription !== null ? isChildOrg ? null : { isCloud={isCloud} userdata={userdata} stripeKey={stripeKey} - isScale={isScale} {...props} /> : !isCloud ? @@ -2091,7 +2061,6 @@ const Billing = memo((props) => { isCloud={isCloud} userdata={userdata} stripeKey={stripeKey} - isScale={isScale} /> {/* { /> */} : null} -
-
+ {isCloud && + selectedOrganization.subscriptions !== undefined && + selectedOrganization.subscriptions !== null && + selectedOrganization.subscriptions.length > 0 && + !isChildOrg ? + selectedOrganization.subscriptions + .reverse() + .map((sub, index) => { + return ( + + ) + }) + : null} {/* { */}
+ {/*isCloud && selectedOrganization.partner_info !== undefined && selectedOrganization.partner_info.reseller === true ? ( diff --git a/frontend/src/components/EditWorkflow.jsx b/frontend/src/components/EditWorkflow.jsx index 48574126..b67bde93 100644 --- a/frontend/src/components/EditWorkflow.jsx +++ b/frontend/src/components/EditWorkflow.jsx @@ -577,20 +577,12 @@ const EditWorkflow = (props) => { Multi-Tenancy, Backups & Security + - Control mechanisms for multi-tenancy, backups, and security. + Multi-Tenant Workflows. Make one workflow, and keep a separate, synced copy in all your tenants. Control distributed auth, runtime locations, files, datastore keys etc. (contact support@shuffler.io if you want a demo. Please try it!) - - Multi-Tenant Workflows - - - - Make one workflow, and keep a separate, synced copy in your other tenants. Control distributed auth, runtime locations, files, datastore keys etc. Can only distribute from parent org to child org. Need help trying it? Contact us for a demo - - - {userdata !== undefined && userdata !== null && userdata.orgs !== undefined && userdata.orgs !== null && userdata.orgs.length > 0 ? - + {userdata !== undefined && userdata !== null && userdata.orgs !== undefined && userdata.orgs !== null && userdata.orgs.length > 0 ? userdata.orgs.filter(org => org.creator_org === userdata.active_org.id).length === 0 ? userdata.active_org.creator_org === undefined || userdata.active_org.creator_org === null || userdata.active_org.creator_org === "" ? @@ -608,7 +600,6 @@ const EditWorkflow = (props) => { multiple style={{ marginTop: 10, }} value={innerWorkflow.suborg_distribution === undefined || innerWorkflow.suborg_distribution === null ? ["none"] : innerWorkflow.suborg_distribution} - disabled={workflow?.parentorg_workflow !== undefined && workflow?.parentorg_workflow !== null && workflow?.parentorg_workflow.length > 0} onChange={(e) => { var newvalue = e.target.value if (newvalue.length > 1 && newvalue[0] === "none") { diff --git a/frontend/src/components/LicencePopup.jsx b/frontend/src/components/LicencePopup.jsx index 9492ae99..f52ffa45 100644 --- a/frontend/src/components/LicencePopup.jsx +++ b/frontend/src/components/LicencePopup.jsx @@ -46,7 +46,7 @@ import { handlePayasyougo } from "../views/HandlePaymentNew.jsx" import Billing from "./Billing.jsx"; const LicencePopup = (props) => { - const { globalUrl, userdata, serverside, billingInfo, stripeKey, setModalOpen, isScale, isLoggedIn, isMobile, selectedOrganization, isCloud } = props; + const { globalUrl, userdata, serverside, billingInfo, stripeKey, setModalOpen, isLoggedIn, isMobile, selectedOrganization, isCloud } = props; //const alert = useAlert(); let navigate = useNavigate(); const [selectedDealModalOpen, setSelectedDealModalOpen] = React.useState(false); @@ -165,25 +165,11 @@ const LicencePopup = (props) => { ] } - if (userdata?.app_execution_limit >= 300000) { - subscription.name = "Enterprise" - subscription.currency_text = "$" - subscription.price = typecost_single - subscription.limit = userdata?.app_execution_limit - subscription.interval = "app run / month" - subscription.features = [ - "Includes " + (userdata?.app_execution_limit/1000) + "K app runs/month. ", - "Multi-Tenancy and Region-Selection", - "And all other features from /pricing", - ] - } - - var newPaperstyle = JSON.parse(JSON.stringify(paperStyle)) if (subscription.name === "Enterprise" && subscription.active === true) { - top_text = "Enterprise Plan" + top_text = "Current Plan" - // newPaperstyle.border = "1px solid #f85a3e" + newPaperstyle.border = "1px solid #f85a3e" } var showSupport = false @@ -269,7 +255,7 @@ const LicencePopup = (props) => { style={{ borderRadius: theme.palette?.borderRadius, }} placement="bottom" > -
+
setHovered(true)} @@ -357,9 +343,9 @@ const LicencePopup = (props) => {
- {subscription.active === true && !isScale && } +
- {top_text === "Base Cloud Access" && userdata.has_card_available === true && !isScale ? + {top_text === "Base Cloud Access" && 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." : isCloud ? - userdata?.app_execution_limit && userdata?.app_execution_limit >= 300000 ? - "You have subscribed to the Enterprise plan, which includes " + (userdata?.app_execution_limit/1000) + "K app runs/month. You can increase the limit by upgrading current plan. Contact support@shuffler.io for more information." : - `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 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.` } @@ -716,33 +699,8 @@ const LicencePopup = (props) => { setCalculatedCost("$960") setSelectedValue(8) } else { - if (userdata && userdata?.app_execution_limit) { - if (userdata.app_execution_limit >= 300000 && userdata.app_execution_limit < 400000) { - setSelectedValue(400) - setCalculatedCost("$1280") - }else if (userdata?.app_execution_limit >= 400000 && userdata?.app_execution_limit < 500000) { - setSelectedValue(500) - setCalculatedCost("$1600") - } else if (userdata?.app_execution_limit >= 500000 && userdata?.app_execution_limit < 600000) { - setSelectedValue(600) - setCalculatedCost("$1920") - } else if (userdata?.app_execution_limit >= 600000 && userdata?.app_execution_limit < 700000) { - setSelectedValue(700) - setCalculatedCost("$2240") - } else if (userdata?.app_execution_limit >= 700000 && userdata?.app_execution_limit < 800000) { - setSelectedValue(800) - setCalculatedCost("$2560") - } else if (userdata?.app_execution_limit >= 800000 && userdata?.app_execution_limit < 900000) { - setSelectedValue(900) - setCalculatedCost("$2880") - }else { - setCalculatedCost("$960") - setSelectedValue(300) - } - }else { - setCalculatedCost("$960") - setSelectedValue(300) - } + setCalculatedCost("$960") + setSelectedValue(300) } }, [shuffleVariant]) @@ -1019,7 +977,7 @@ const LicencePopup = (props) => { : null} - {/* {isCloud && + {isCloud && selectedOrganization.subscriptions !== undefined && selectedOrganization.subscriptions !== null && selectedOrganization.subscriptions.length > 0 ? @@ -1040,7 +998,7 @@ const LicencePopup = (props) => { /> ) }) - : null} */} + : null} @@ -1048,12 +1006,12 @@ const LicencePopup = (props) => {
- { !isScale && } + color="primary">Recommended
{shuffleVariant === 1 ? "Scale" : "Enterprise"} diff --git a/frontend/src/components/Navbar.jsx b/frontend/src/components/Navbar.jsx index c3cca3f8..ebee1db5 100644 --- a/frontend/src/components/Navbar.jsx +++ b/frontend/src/components/Navbar.jsx @@ -47,7 +47,7 @@ const menuData = { title: "Shuffle", description: "The most versatile automation engine with focus on security.", - icon: "images/icons/shuffleLogo.svg", + icon: "images/logos/orange_logo.svg", path: "/docs/about", gaData: { category: "navbar", diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index 374ce85b..79a9d98a 100755 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -575,17 +575,11 @@ const AngularWorkflow = (defaultprops) => { }, [editWorkflowModalOpen]) useEffect(() => { - // Check if selectedTriggerIndex is a number >= 0 - if (isNaN(selectedTriggerIndex) || selectedTriggerIndex < 0) { - return - } - - if (selectedTrigger?.trigger_type === "SUBFLOW" && selectedTriggerIndex !== undefined && selectedTriggerIndex !== null && workflow?.triggers[selectedTriggerIndex].parameters.length > 1) { + if(selectedTrigger?.trigger_type === "SUBFLOW"){ setSelectedTriggerValue(workflow.triggers[selectedTriggerIndex].parameters[1].value || "") - } else if (selectedTrigger?.trigger_type === "USERINPUT" && selectedTriggerIndex !== undefined && selectedTriggerIndex !== null && workflow?.triggers[selectedTriggerIndex].parameters.length > 0) { + } else if(selectedTrigger?.trigger_type === "USERINPUT"){ setSelectedTriggerValue(workflow.triggers[selectedTriggerIndex].parameters[0].value || "Do you want to continue the workflow? Start parameters: $exec") } - }, [selectedTriggerIndex, selectedTrigger, workflow]) useEffect(() => { @@ -954,15 +948,11 @@ const AngularWorkflow = (defaultprops) => { } useEffect(() => { - if (workflow?.actions?.length == 1) { - if (workflow?.actions[0].app_id == "3e320a20966d33c9b7e6790b2705f0bf") { + if (workflow.actions?.length == 1) { + if (workflow.actions[0].app_id == "3e320a20966d33c9b7e6790b2705f0bf") { setWorkflowAsCode(true); } } - - if (workflow?.suborg_distribution !== undefined && workflow?.suborg_distribution !== null && workflow?.suborg_distribution.length > 0) { - getChildWorkflows(workflow.id) - } }, [workflow]); // Event for making sure app is correct @@ -1505,8 +1495,6 @@ const AngularWorkflow = (defaultprops) => { if (workflow.org_id !== undefined && workflow.org_id !== null && workflow.org_id.length > 0) { headers["Org-Id"] = workflow.org_id } - - setWorkflows([]) fetch(globalUrl + "/api/v1/workflows?subflow=true", { method: "GET", @@ -1524,7 +1512,7 @@ const AngularWorkflow = (defaultprops) => { if (responseJson !== undefined) { // Sets up subflow trigger with the right info - if (isNaN(trigger_index) === false && trigger_index > -1) { + if (trigger_index > -1) { var baseSubflow = {} const trigger = workflow.triggers[trigger_index]; @@ -2506,19 +2494,15 @@ const AngularWorkflow = (defaultprops) => { if (cy !== undefined && cy !== null) { // scale: 0.3, // bg: "#27292d", - if (cy?.png !== undefined && cy?.png !== null) { - try { - const cyImageData = cy.png({ - output: "base64uri", - maxWidth: 480, - maxHeight: 270, - }) + if (cy.png !== undefined && cy.png !== null) { + const cyImageData = cy.png({ + output: "base64uri", + maxWidth: 480, + maxHeight: 270, + }) - if (cyImageData !== undefined && cyImageData !== null && cyImageData.length > 0) { - useworkflow.image = cyImageData - } - } catch (e) { - console.log("Failed to get image data: ", e) + if (cyImageData !== undefined && cyImageData !== null && cyImageData.length > 0) { + useworkflow.image = cyImageData } } } @@ -3930,10 +3914,6 @@ const AngularWorkflow = (defaultprops) => { } const findWorkflowDiff = (parentWorkflow, childWorkflow) => { - // Ensures new memory is used - parentWorkflow = JSON.parse(JSON.stringify(parentWorkflow)) - childWorkflow = JSON.parse(JSON.stringify(childWorkflow)) - var diff = { "different": false, "environment": false, @@ -3951,13 +3931,9 @@ const AngularWorkflow = (defaultprops) => { return diff } + var parentEnvironment = "" var childEnvironment = "" - - if (parentWorkflow.triggers !== undefined && parentWorkflow.triggers !== null && parentWorkflow.triggers.length > 0) { - parentWorkflow.actions = parentWorkflow.actions.concat(parentWorkflow.triggers) - } - for (var parentKey in parentWorkflow.actions) { const parentAction = parentWorkflow.actions[parentKey] if (parentAction.environment !== undefined && parentAction.environment !== null && parentAction.environment !== "") { @@ -3969,19 +3945,6 @@ const AngularWorkflow = (defaultprops) => { } var found = false - if (childWorkflow.triggers !== undefined && childWorkflow.triggers !== null && childWorkflow.triggers.length > 0) { - for (var triggerKey in childWorkflow.triggers) { - if (childWorkflow.triggers[triggerKey].replacement_for_trigger !== parentAction.id) { - continue - } - - // Rewrapping the ID just in case - childWorkflow.triggers[triggerKey].id = childWorkflow.triggers[triggerKey].replacement_for_trigger - childWorkflow.actions.push(childWorkflow.triggers[triggerKey]) - break - } - } - for (var childKey in childWorkflow.actions) { const childAction = childWorkflow.actions[childKey] if (childAction.environment !== undefined && childAction.environment !== null && childAction.environment !== "") { @@ -4028,10 +3991,6 @@ const AngularWorkflow = (defaultprops) => { continue } - var parentworkflow = "" - var parentstartnode = "" - var childworkflow = "" - var childstartnode = "" for (var parentParamIndex in parentAction.parameters) { const parentParam = parentAction.parameters[parentParamIndex] for (var childParamIndex in childAction.parameters) { @@ -4040,38 +3999,20 @@ const AngularWorkflow = (defaultprops) => { continue } - if (childParam.name === "workflow" || childParam.name === "subflow") { - parentworkflow = parentParam.value - childworkflow = childParam.value - continue - } - - if (childParam.name == "startnode") { - parentstartnode = parentParam.value - childstartnode = childParam.value - continue - } - if (childParam.value !== parentParam.value) { actionDiff.parameters.push(childParam.name) } } } - - if (parentworkflow !== childworkflow && parentstartnode !== childstartnode) { - actionDiff.parameters.push("subflow") - } } if (actionDiff.parameters.length > 0) { actionDiff.params = true } - /* if (!found) { actionDiff.new = true } - */ if (actionDiff !== undefined && actionDiff !== null && Object.keys(actionDiff).length > 1) { actionDiff.label = parentAction.label.replaceAll("_", " ") @@ -6364,15 +6305,11 @@ const AngularWorkflow = (defaultprops) => { if (workflow.org_id !== undefined && workflow.org_id !== null && workflow.org_id.length > 0 && originalWorkflow.org_id !== undefined && originalWorkflow.org_id !== null && originalWorkflow.org_id.length > 0 && workflow.org_id === originalWorkflow.org_id) { // Allows a parent workflow to control the schedule } else if (data.replacement_for_trigger !== undefined && data.replacement_for_trigger !== null && data.replacement_for_trigger.length > 0) { - - // No custom control on cloud - if (isCloud) { - toast.warning("This schedule is controlled by the parent workflow. If you want additional schedule control, please add a custom schedule to this workflow.", { - autoClose: 30000, - }) - event.target.unselect() - return - } + toast.warning("This schedule is controlled by the parent workflow. If you want additional schedule control, please add a custom schedule to this workflow.", { + autoClose: 30000, + }) + event.target.unselect() + return } } else if (data.app_name === "Webhook" && trigger_index >= 0) { @@ -6948,7 +6885,7 @@ const AngularWorkflow = (defaultprops) => { ) if (targetnode !== -1) { if (workflow.triggers[targetnode].app_name === "User Input" || workflow.triggers[targetnode].app_name === "Shuffle Workflow" || workflow.triggers[targetnode].app_name === "Shuffle Subflow") { - //console.log("User Input or Shuffle Workflow") + console.log("User Input or Shuffle Workflow") } else { toast("Can't have triggers as target of branch") event.target.remove() @@ -9280,15 +9217,11 @@ const AngularWorkflow = (defaultprops) => { } insertedNodes = insertedNodes.concat(newedges); - setWorkflow(inputworkflow) + setWorkflow(inputworkflow); // Reset view for cytoscape if (cy !== undefined && cy !== null) { - try { - cy.add(insertedNodes) - } catch (error) { - console.log("Error adding nodes to cytoscape (6): ", error) - } + cy.add(insertedNodes) try { cy.fit(null, 250) @@ -9367,6 +9300,12 @@ const AngularWorkflow = (defaultprops) => { } } + //if (selectedNode.data("id") === selectedAction.id) { + // setSelectedApp({}); + // setSelectedAction({}); + //setSelectedTrigger({}); + //setSelectedTriggerIndex({}); + //} const parsedSelection = cy.$(":selected"); if (selectedNode.data().decorator === true && selectedNode.data("type") !== "COMMENT") { toast("This node can't be deleted."); @@ -9566,6 +9505,7 @@ const AngularWorkflow = (defaultprops) => { if (firstrequest) { setFirstrequest(false) getWorkflow(props.match.params.key, {}) + getChildWorkflows(props.match.params.key) getRevisionHistory(props.match.params.key) loadTriggers() getApps() @@ -14951,15 +14891,12 @@ const AngularWorkflow = (defaultprops) => { }} >
- Select a workflow to run + Select a workflow to execute
- {workflow.triggers[selectedTriggerIndex].parameters[0].value .length === 0 ? null : workflow.triggers[selectedTriggerIndex] - .parameters[0].value === props.match.params.key ? - null - : ( + .parameters[0].value === props.match.params.key ? null : (
{ {workflows === undefined || workflows === null || - workflows.length === 0 ? - - : ( + workflows.length === 0 ? null : ( + { value={workflow.org_id} disabled={savingState !== 0 || suborgWorkflows?.length === 0 || allTriggers === undefined} onChange={(e) => { - if (cy !== undefined && cy !== null) { - cy.nodes().unselect() - } - if (lastSaved === false && originalWorkflow.id === workflow.id) { setSuborgWorkflows([]) diff --git a/frontend/src/views/LoginPage.jsx b/frontend/src/views/LoginPage.jsx index 97c8b5cf..385a2d8e 100755 --- a/frontend/src/views/LoginPage.jsx +++ b/frontend/src/views/LoginPage.jsx @@ -427,14 +427,14 @@ const LoginPage = props => { window.location.pathname = "/workflows" } - const checkAdmin = () => { - const url = globalUrl + "/api/v1/checkusers"; - fetch(url, { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - }) + const checkAdmin = () => { + const url = globalUrl + "/api/v1/checkusers"; + fetch(url, { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + }) .then((response) => response.json().then((responseJson) => { if (responseJson["success"] === false) { @@ -459,7 +459,7 @@ const LoginPage = props => { navigate("/adminsetup") }, 2500) }) - } + }; const onSubmit = (e) => { @@ -952,7 +952,7 @@ const LoginPage = props => {
return ( -
+
{loadedCheck}
) diff --git a/frontend/src/views/Workflows.jsx b/frontend/src/views/Workflows.jsx index 100eed13..1eee8317 100755 --- a/frontend/src/views/Workflows.jsx +++ b/frontend/src/views/Workflows.jsx @@ -1946,10 +1946,7 @@ const Workflows = (props) => { .then((response) => { if (response.status !== 200) { console.log("Status not 200 for setting workflows :O!"); - - if (bulk !== true) { - toast(`Failed deleting workflow ${id}. Do you have access?`); - } + toast("Failed deleting workflow. Do you have access?"); } else { if (bulk !== true) { toast(`Deleted workflow ${id}. Child Workflows in Suborgs were also removed.`) diff --git a/frontend/src/views/Workflows2.jsx b/frontend/src/views/Workflows2.jsx index f1e18120..0b079407 100644 --- a/frontend/src/views/Workflows2.jsx +++ b/frontend/src/views/Workflows2.jsx @@ -2043,10 +2043,7 @@ const Workflows2 = (props) => { .then((response) => { if (response.status !== 200) { console.log("Status not 200 for setting workflows :O!"); - - if (bulk !== true) { - toast("Failed deleting workflow. Do you have access?"); - } + toast("Failed deleting workflow. Do you have access?"); } else { if (bulk !== true) { toast(`Deleted workflow ${id}. Child Workflows in Suborgs were also removed.`) @@ -2824,7 +2821,7 @@ const Workflows2 = (props) => { {(data.sharing !== undefined && data.sharing !== null && data.sharing === "form") || (data?.form_control?.input_markdown !== undefined && data?.form_control?.input_markdown !== null && data?.form_control?.input_markdown !== "") && type !== "public" ? -
+
{ : null} {(data?.validation?.validation_ran === true && data?.validation?.valid === false && data?.validation?.errors?.length > 0 ) ? - -
+ +
{
- : null} + : null}
@@ -3238,7 +3235,6 @@ const Workflows2 = (props) => {
} -