From 3132680c50b6ccf244f64d69174845d2e9d55101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Fri, 3 Nov 2023 08:50:03 +0100 Subject: [PATCH 1/2] removing unnecessary console log commands --- frontend/src/components/DataServiceComponent.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/src/components/DataServiceComponent.tsx b/frontend/src/components/DataServiceComponent.tsx index ae4d38e..2146c16 100644 --- a/frontend/src/components/DataServiceComponent.tsx +++ b/frontend/src/components/DataServiceComponent.tsx @@ -28,9 +28,7 @@ export const DataServiceComponent = React.memo( if (name) { fullAccessPath = parentPath.concat('.' + name); } - console.log(fullAccessPath); const id = getIdFromFullAccessPath(fullAccessPath); - console.log(id); return (
From d643923fd3f7fa67a3b27c86069ad9bb06bc9864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Fri, 3 Nov 2023 08:50:33 +0100 Subject: [PATCH 2/2] fix: only update connection toast to reconnecting when still disconnected --- frontend/src/App.tsx | 7 +++++-- src/pydase/frontend/asset-manifest.json | 6 +++--- src/pydase/frontend/index.html | 2 +- .../static/js/{main.964bc334.js => main.16698eff.js} | 6 +++--- ...64bc334.js.LICENSE.txt => main.16698eff.js.LICENSE.txt} | 0 src/pydase/frontend/static/js/main.16698eff.js.map | 1 + src/pydase/frontend/static/js/main.964bc334.js.map | 1 - 7 files changed, 13 insertions(+), 10 deletions(-) rename src/pydase/frontend/static/js/{main.964bc334.js => main.16698eff.js} (97%) rename src/pydase/frontend/static/js/{main.964bc334.js.LICENSE.txt => main.16698eff.js.LICENSE.txt} (100%) create mode 100644 src/pydase/frontend/static/js/main.16698eff.js.map delete mode 100644 src/pydase/frontend/static/js/main.964bc334.js.map diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index b52e4b9..9a04631 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -109,7 +109,6 @@ const reducer = (state: State, action: Action): State => { throw new Error(); } }; - const App = () => { const [state, dispatch] = useReducer(reducer, null); const stateRef = useRef(state); // Declare a reference to hold the current state @@ -150,7 +149,11 @@ const App = () => { socket.on('disconnect', () => { setConnectionStatus('disconnected'); setTimeout(() => { - setConnectionStatus('reconnecting'); + // Only set "reconnecting" is the state is still "disconnected" + // E.g. when the client has already reconnected + setConnectionStatus((currentState) => + currentState === 'disconnected' ? 'reconnecting' : currentState + ); }, 2000); }); diff --git a/src/pydase/frontend/asset-manifest.json b/src/pydase/frontend/asset-manifest.json index ff1c535..30118a5 100644 --- a/src/pydase/frontend/asset-manifest.json +++ b/src/pydase/frontend/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { "main.css": "/static/css/main.c444b055.css", - "main.js": "/static/js/main.964bc334.js", + "main.js": "/static/js/main.16698eff.js", "index.html": "/index.html", "main.c444b055.css.map": "/static/css/main.c444b055.css.map", - "main.964bc334.js.map": "/static/js/main.964bc334.js.map" + "main.16698eff.js.map": "/static/js/main.16698eff.js.map" }, "entrypoints": [ "static/css/main.c444b055.css", - "static/js/main.964bc334.js" + "static/js/main.16698eff.js" ] } \ No newline at end of file diff --git a/src/pydase/frontend/index.html b/src/pydase/frontend/index.html index a64c694..a65539d 100644 --- a/src/pydase/frontend/index.html +++ b/src/pydase/frontend/index.html @@ -1 +1 @@ -pydase App
\ No newline at end of file +pydase App
\ No newline at end of file diff --git a/src/pydase/frontend/static/js/main.964bc334.js b/src/pydase/frontend/static/js/main.16698eff.js similarity index 97% rename from src/pydase/frontend/static/js/main.964bc334.js rename to src/pydase/frontend/static/js/main.16698eff.js index f48699c..6069635 100644 --- a/src/pydase/frontend/static/js/main.964bc334.js +++ b/src/pydase/frontend/static/js/main.16698eff.js @@ -1,3 +1,3 @@ -/*! For license information please see main.964bc334.js.LICENSE.txt */ -!function(){var e={694:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t