[arvados-workbench2] updated: 2.5.0-36-g495d406b

git repository hosting git at public.arvados.org
Tue Feb 14 22:49:49 UTC 2023


Summary of changes:
 src/store/tooltips/tooltips-middleware.ts | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

       via  495d406b0072c237a9d878fdaab352921f7ca877 (commit)
      from  29c74bf42bf647c0a8518af553eab7c7c02f1789 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 495d406b0072c237a9d878fdaab352921f7ca877
Author: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
Date:   Tue Feb 14 23:49:04 2023 +0100

    19836: Added security state check
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla at contractors.roche.com>

diff --git a/src/store/tooltips/tooltips-middleware.ts b/src/store/tooltips/tooltips-middleware.ts
index 901374d2..d4ea41ee 100644
--- a/src/store/tooltips/tooltips-middleware.ts
+++ b/src/store/tooltips/tooltips-middleware.ts
@@ -18,16 +18,17 @@ const tippySingleton = createSingleton([], {delay: 10});
 
 export const tooltipsMiddleware = (services: ServiceRepository): Middleware => (store: Store) => next => action => {
     const state: RootState = store.getState();
-    const hideTooltip = localStorage.getItem(TOOLTIP_LOCAL_STORAGE_KEY);
-    const { BannerUUID } = (state.auth.config.clusterConfig.Workbench as any);
 
-    const bannerUUID = BannerUUID || 'tordo-4zz18-1buneu6sb8zxiti';
-
-    if (bannerUUID && !tooltipsContents && !hideTooltip && !tooltipsFetchFailed && !running) {
-        running = true;
-        fetchTooltips(services, bannerUUID);
-    } else if (tooltipsContents && !hideTooltip && !tooltipsFetchFailed) {
-        applyTooltips();
+    if (state && state.auth && state.auth.config && state.auth.config.clusterConfig && state.auth.config.clusterConfig.Workbench) {
+        const hideTooltip = localStorage.getItem(TOOLTIP_LOCAL_STORAGE_KEY);
+        const { BannerUUID: bannerUUID } = state.auth.config.clusterConfig.Workbench;
+    
+        if (bannerUUID && !tooltipsContents && !hideTooltip && !tooltipsFetchFailed && !running) {
+            running = true;
+            fetchTooltips(services, bannerUUID);
+        } else if (tooltipsContents && !hideTooltip && !tooltipsFetchFailed) {
+            applyTooltips();
+        }
     }
 
     return next(action);

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list