From 2fec45b47e492e12628f877a45330fdf83c63cd1 Mon Sep 17 00:00:00 2001 From: Frikky Date: Thu, 13 Jul 2023 22:58:51 +0200 Subject: [PATCH] Fixed most of the muiV5 / react 18 version problems --- backend/app_sdk/app_base.py | 21 +- frontend/package.json | 5 +- frontend/src/components/Header.jsx | 16 +- frontend/src/components/OrgHeader.jsx | 17 +- frontend/src/components/OrgHeaderexpanded.jsx | 2 + frontend/src/components/ScrollToTop.jsx | 2 +- frontend/src/index.js | 4 +- frontend/src/views/Admin.jsx | 207 ++---------- frontend/src/views/AngularWorkflow.jsx | 9 +- frontend/src/views/Workflows.jsx | 299 +++--------------- 10 files changed, 109 insertions(+), 473 deletions(-) diff --git a/backend/app_sdk/app_base.py b/backend/app_sdk/app_base.py index b0ffee23..3078e65b 100755 --- a/backend/app_sdk/app_base.py +++ b/backend/app_sdk/app_base.py @@ -3556,15 +3556,15 @@ class AppBase: if "the JSON object must be" in errorstring: self.logger.info("[ERROR] Something is wrong with the input for this function. Are lists and JSON data handled parsed properly (0)? the JSON object must be in...") - try: - e = json.loads(f"{e}") - except: - e = f"{e}" + #try: + # e = json.loads(f"{e}") + #except: + # e = f"{e}" newres = json.dumps({ "success": False, "reason": "An exception occurred while running this function (1). See exception for more details and contact support if this persists (support@shuffler.io)", - "exception": e, + "exception": f"{type(e).__name__} - {e}", }) break elif "got an unexpected keyword argument" in errorstring: @@ -3587,15 +3587,16 @@ class AppBase: except Exception as e: self.logger.info(f"[ERROR] Something is wrong with the input for this function. Are lists and JSON data handled parsed properly (1)? err: {e}") - try: - e = json.loads(f"{e}") - except: - e = f"{e}" + #try: + # e = json.loads(f"{e}") + #except: + # e = f"{e}" newres = json.dumps({ "success": False, "reason": "An exception occurred while running this function (2). See exception for more details and contact support if this persists (support@shuffler.io)", - "exception": e, + "exception": f"{type(e).__name__} - {e}", + }) break diff --git a/frontend/package.json b/frontend/package.json index d463173b..11ce8c98 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -36,8 +36,6 @@ "jss-nested": "^6.0.1", "jss-props-sort": "^6.0.0", "jss-vendor-prefixer": "^8.0.1", - "material-icons": "^0.7.7", - "material-icons-react": "^1.0.4", "material-ui-chip-input": "^2.0.0-beta.2", "md5-file": "^4.0.0", "mdbreact": "^4.21.1", @@ -60,13 +58,12 @@ "react-driftjs": "^1.2.2", "react-dropzone": "^14.2.3", "react-ga4": "^2.0.0", - "react-iframe": "^1.8.0", "react-instantsearch-dom": "^6.28.0", "react-json-pretty": "^2.2.0", "react-json-view": "^1.21.3", "react-markdown": "^8.0.7", "react-markdown-github": "^3.3.1", - "react-powerhooks": "0.0.7", + "react-powerhooks": "^0.0.7", "react-router": "^6.14.1", "react-router-dom": "^6.14.1", "react-scripts": "^5.0.1", diff --git a/frontend/src/components/Header.jsx b/frontend/src/components/Header.jsx index f314e151..6a1f2436 100644 --- a/frontend/src/components/Header.jsx +++ b/frontend/src/components/Header.jsx @@ -688,7 +688,7 @@ const { globalUrl, setNotifications, notifications, isLoggedIn, removeCookie, ho {/* */} - Workflows + Workflows @@ -698,24 +698,17 @@ const { globalUrl, setNotifications, notifications, isLoggedIn, removeCookie, ho {/* */} - Apps + Apps - {/* - - -
Dashboard
- -
- */}
{/* */} - Docs + Docs
@@ -796,8 +789,7 @@ const { globalUrl, setNotifications, notifications, isLoggedIn, removeCookie, ho :