From e279366a204ecfdfc88e1f7cd5cbe373e6ee3fe4 Mon Sep 17 00:00:00 2001 From: erhannis Date: Wed, 11 Sep 2024 16:28:25 -0400 Subject: [PATCH 1/2] There was a type error, and now there isn't --- .../main/webapp/src/store/socketMiddleware.ts | 2 +- ugs-platform/application/nb-configuration.xml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ugs-platform/application/nb-configuration.xml diff --git a/ugs-pendant/src/main/webapp/src/store/socketMiddleware.ts b/ugs-pendant/src/main/webapp/src/store/socketMiddleware.ts index 13cebf3d0..166bc73c1 100644 --- a/ugs-pendant/src/main/webapp/src/store/socketMiddleware.ts +++ b/ugs-pendant/src/main/webapp/src/store/socketMiddleware.ts @@ -13,7 +13,7 @@ import { RootState } from "./store"; import { getSettings } from "./settingsSlice"; import { fetchFileStatus } from "./fileStatusSlice"; -let fetchStatusTimer: number; +let fetchStatusTimer: NodeJS.Timeout; let debounceTime = 500; const fetchSettingsDebounce = ( store: MiddlewareAPI, RootState> diff --git a/ugs-platform/application/nb-configuration.xml b/ugs-platform/application/nb-configuration.xml new file mode 100644 index 000000000..974cb300f --- /dev/null +++ b/ugs-platform/application/nb-configuration.xml @@ -0,0 +1,18 @@ + + + + + + JDK_17 + + From 98b632f8b7b4ee0bc04c2c10daa30c9b1cde2f12 Mon Sep 17 00:00:00 2001 From: erhannis Date: Tue, 17 Sep 2024 22:01:49 -0400 Subject: [PATCH 2/2] window.setTimeout instead --- ugs-pendant/src/main/webapp/src/store/socketMiddleware.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ugs-pendant/src/main/webapp/src/store/socketMiddleware.ts b/ugs-pendant/src/main/webapp/src/store/socketMiddleware.ts index 166bc73c1..425286840 100644 --- a/ugs-pendant/src/main/webapp/src/store/socketMiddleware.ts +++ b/ugs-pendant/src/main/webapp/src/store/socketMiddleware.ts @@ -13,7 +13,7 @@ import { RootState } from "./store"; import { getSettings } from "./settingsSlice"; import { fetchFileStatus } from "./fileStatusSlice"; -let fetchStatusTimer: NodeJS.Timeout; +let fetchStatusTimer: number; let debounceTime = 500; const fetchSettingsDebounce = ( store: MiddlewareAPI, RootState> @@ -22,7 +22,7 @@ const fetchSettingsDebounce = ( clearTimeout(fetchStatusTimer); } - fetchStatusTimer = setTimeout(() => { + fetchStatusTimer = window.setTimeout(() => { console.log("Fetching settings"); store.dispatch(getSettings()); }, debounceTime);