diff --git a/backend/app_sdk/app_base.py b/backend/app_sdk/app_base.py index 4d653dc7..3ded5fba 100755 --- a/backend/app_sdk/app_base.py +++ b/backend/app_sdk/app_base.py @@ -702,7 +702,7 @@ class AppBase: except (KeyError, NameError) as e: self.logger.info(f"""Key/NameError in param handler for {param["name"]}: {e}""") - self.logger.info(f"[DEBUG] OUTER VALUE: {param_value}") + #self.logger.info(f"[DEBUG] OUTER VALUE: {param_value}") if len(param_value) > 0: md5 = hashlib.md5(param_value.encode('utf-8')).hexdigest() values.append(md5) @@ -1578,7 +1578,7 @@ class AppBase: } resultsurl = "%s/api/v1/streams/results" % (self.base_url) - self.logger.info("[ERROR] Before FULLEXEC stream result url '%s'" % (resultsurl)) + #self.logger.info("[DEBUG] Before FULLEXEC stream result url '%s'" % (resultsurl)) ret = requests.post( resultsurl, headers=headers, @@ -3736,9 +3736,9 @@ class AppBase: timeout_env = os.getenv("SHUFFLE_APP_SDK_TIMEOUT", timeout) try: timeout = int(timeout_env) - self.logger.info(f"[DEBUG] Timeout set to {timeout} seconds") + #self.logger.info(f"[DEBUG] Timeout set to {timeout} seconds") except Exception as e: - self.logger.info(f"[WARNING] Failed parsing timeout to int: {e}") + self.logger.info(f"[ERROR] Failed parsing timeout to int: {e}") #timeout = 30 diff --git a/frontend/src/components/CacheView.jsx b/frontend/src/components/CacheView.jsx index 97b06fcb..89cde359 100644 --- a/frontend/src/components/CacheView.jsx +++ b/frontend/src/components/CacheView.jsx @@ -398,7 +398,7 @@ const CacheView = (props) => { /> { style={{ minWidth: 400, maxWidth: 400, + overflowX: "auto", + overflowY: "hidden", }} primary={validate.valid ? { style: { zIndex: 12501, color: "white", - minWidth: isMobile ? "100%" : isFileEditor ? 650 : 1100, + minWidth: isMobile ? "100%" : isFileEditor ? 650 : 1165, maxWidth: isMobile ? "100%" : isFileEditor ? 650 : 1100, - minHeight: isMobile ? "100%" : 620, - maxHeight: isMobile ? "100%" : 620, + minHeight: isMobile ? "100%" : 700, + maxHeight: isMobile ? "100%" : 700, border: theme.palette.defaultBorder, padding: isMobile ? "25px 10px 25px 10px" : 25, }, @@ -1308,7 +1308,7 @@ const CodeEditor = (props) => { handleItemClick([innerdata]); }} > - + { value={localcodedata} extensions={[python({ py: true })]} height={isFileEditor ? 450 : 450} - width={isFileEditor ? 650 : 600} + width={isFileEditor ? 650 : 550} style={{ maxWidth: isFileEditor ? 450 : 600, maxHeight: 450, @@ -1548,117 +1548,11 @@ const CodeEditor = (props) => { }} /> - - {/*editorPopupOpen ? - - {mainVariables.map((data, index) => { - // console.log(data) - return ( -
- -
- ) - })} -
- : null*/}
- {/* - - Line Wrap - { - if (linewrap) { - setlinewrap(false) - } - if (!linewrap){ - setlinewrap(true) - } - }} - defaultChecked - size="small" - sx={{ - color: orange[600], - '&.Mui-checked': { - color: orange[800], - }, - }} - /> - - - - Dark Theme - { - if (codeTheme === "gruvbox-dark") { - setcodeTheme("duotone-light") - } - if (codeTheme === "duotone-light"){ - setcodeTheme("gruvbox-dark") - } - }} - defaultChecked - size="small" - sx={{ - color: orange[600], - '&.Mui-checked': { - color: orange[800], - }, - }} - /> - - */} -
@@ -1673,88 +1567,93 @@ const CodeEditor = (props) => { display: "flex", }} > - - Expected Output - - - - - +
+ + Expected Output + +
} - - {isMobile ? null : - validation === true ? - + + + + + {isMobile ? null : + validation === true ? + { + //handleReactJsonClipboard(copy); + }} + displayDataTypes={false} + onSelect={(select) => { + var basename = "exec" + if (selectedAction !== undefined && selectedAction !== null && Object.keys(selectedAction).length !== 0) { + basename = selectedAction.label.toLowerCase().replaceAll(" ", "_") + } + + HandleJsonCopy(expOutput, select, basename) + }} + name={"JSON autocompletion"} + /> + : +

+ {expOutput} +

+ } + {executionResult.valid === true ? { : - - No test output yet. - + +
+ + Output is based on the last VALID run of the node(s) you are referencing. Only updates when you refresh the Workflow Window. + + + No test output yet. + +
} {executionResult.errors !== undefined && executionResult.errors !== null && executionResult.errors.length > 0 ? diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index 4fc4caaa..ed968653 100755 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -9267,15 +9267,21 @@ const AngularWorkflow = (defaultprops) => { break } + const execution = workflowExecutions[executionKey] if (execution.execution_argument === undefined || execution.execution_argument === null || execution.execution_argument.length < 2) { continue } + if (execution.execution_argument.includes("too large ")) { + continue + } + if (availableArguments.includes(execution.execution_argument)) { continue } + availableArguments.push(execution.execution_argument) } } diff --git a/frontend/src/views/SettingsPage.jsx b/frontend/src/views/SettingsPage.jsx index 68acae51..2b0c1ebd 100755 --- a/frontend/src/views/SettingsPage.jsx +++ b/frontend/src/views/SettingsPage.jsx @@ -290,59 +290,6 @@ const Settings = (props) => { } }; - // const registerProviders = (userdata) => { - // // Register hooks here - // detectEthereumProvider().then((provider) => { - // if (provider) { - // if (!provider.isMetaMask) { - // toast("Only MetaMask is supported as of now."); - // return; - // } - - // // Find the ethereum network - // // Get the users' account(s) - // //toast("Connecting to MetaMask") - // //console.log("Connected: ", provider.isConnected()) - - // if (!provider.isConnected()) { - // toast("Metamask is not connected."); - // return; - // } - - // provider.on("message", (event) => { - // toast("Ethereum message: ", event); - // }); - - // provider.on("chainChanged", (chainId) => { - // console.log("Changed chain to: ", chainId); - - // const method = "eth_getBalance"; - // const params = [userdata.eth_info.account, "latest"]; - // provider - // .request({ - // method: method, - // params, - // }) - // .then((result) => { - // console.log("Got result: ", result); - // if (result !== undefined && result !== null) { - // userdata.eth_info.balance = result; - // userdata.eth_info.parsed_balance = result / 1000000000000000000; - // console.log("INFO: ", userdata); - // setUserData(userdata); - // } else { - // toast("Couldn't find balance: ", result); - // } - // }) - // .catch((error) => { - // // If the request fails, the Promise will reject with an error. - // toast("Failed getting info from ethereum API: " + error); - // }); - // }); - // } - // }); - // }; - // This should "always" have data useEffect(() => { if (firstrequest) { diff --git a/frontend/src/views/Workflows.jsx b/frontend/src/views/Workflows.jsx index 3cd86c64..7f78244a 100755 --- a/frontend/src/views/Workflows.jsx +++ b/frontend/src/views/Workflows.jsx @@ -1336,16 +1336,21 @@ const Workflows = (props) => { }; const exportAllWorkflows = (allWorkflows) => { - for (var i = 0; i < allWorkflows.length; i++) { - console.log(allWorkflows[i]) - setTimeout(() => { - console.log(allWorkflows[i]) - exportWorkflow(allWorkflows[i], false) - }, i * 200); - } + for (var i = 0; i < allWorkflows.length; i++) { + const wf = allWorkflows[i] - toast(`Exporting and keeping original for all ${allWorkflows.length} workflows`); - }; + if (wf === undefined || wf.id === undefined) { + continue + } + + console.log("Exporting workflow: ", wf) + setTimeout(() => { + exportWorkflow(JSON.parse(JSON.stringify(wf)), false) + }, i * 100); + } + + toast(`Exporting and keeping original for all ${allWorkflows.length} workflows`); + } const deduplicateIds = (data, skip_sanitize) => { if (data.triggers !== null && data.triggers !== undefined) { @@ -1498,7 +1503,12 @@ const Workflows = (props) => { }; const exportWorkflow = (data, sanitize) => { - data = JSON.parse(JSON.stringify(data)); + try { + data = JSON.parse(JSON.stringify(data)); + } catch (e) { + console.log("Failed to parse JSON: ", e); + } + let exportFileDefaultName = data.name + ".json"; if (sanitize === true) { diff --git a/functions/onprem/worker/go.sum b/functions/onprem/worker/go.sum index d8b5d719..90bc2968 100644 --- a/functions/onprem/worker/go.sum +++ b/functions/onprem/worker/go.sum @@ -376,6 +376,8 @@ github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shuffle/shuffle-shared v0.5.61 h1:Fkd7pvk8ypwaio1VvMOmJ6PQF9xCfNYx8RWjPnXjn5E= github.com/shuffle/shuffle-shared v0.5.61/go.mod h1:oIZkx93Z7EvtiTXty7xO+ax63Fjz8MQvjXMxDN0Qws0= +github.com/shuffle/shuffle-shared v0.5.63 h1:Ukjj1ThyTvcoPCi0Hhxp+BbD8VfI1xr4Xyyhh3URb3Q= +github.com/shuffle/shuffle-shared v0.5.63/go.mod h1:oIZkx93Z7EvtiTXty7xO+ax63Fjz8MQvjXMxDN0Qws0= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ=