chihsuan commented on code in PR #11484:
URL: https://github.com/apache/ozone/pull/11484#discussion_r4246878443


##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/pages/containers/containers.tsx:
##########
@@ -496,6 +491,13 @@ const Containers: React.FC<{}> = () => {
 
   const autoReload = useAutoReload(loadContainersData);
 
+  useEffect(() => {
+    // Auto-reload performs the initial fetch when enabled.
+    if (sessionStorage.getItem('autoReloadEnabled') === 'false') {
+      loadContainersData();
+    }
+  }, []); // eslint-disable-line react-hooks/exhaustive-deps

Review Comment:
   Could we fix this in `useAutoReload` instead? It appears the root cause is 
that the hook only loads on mount when **Auto Refresh** is on. That's why 
Containers double fetches, and Pipelines loads nothing when it's off. Happy to 
discuss if I'm missing something.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to