devabhishekpal commented on PR #7216:
URL: https://github.com/apache/ozone/pull/7216#issuecomment-2360844658

   Yes Devesh.
   So if you check the line: ```omStatus === '' ? false : true```
   Ref: 
https://github.com/apache/ozone/blob/70b8dd5ea3b433c2f1b7f8816b269a71d9a2466e/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/autoReloadPanel/autoReloadPanel.tsx#L82
   This condition would disable the button, if omStatus got a response back i.e 
the API call was done.
   
   Initially in Overview page we are initializing `omStatus: ''` which matches 
the condition and returns true.
   Ref: 
https://github.com/apache/ozone/blob/70b8dd5ea3b433c2f1b7f8816b269a71d9a2466e/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.tsx#L107
   Hence the button is enabled.
   
   After we click the button 
[omSyncData()](https://github.com/apache/ozone/blob/70b8dd5ea3b433c2f1b7f8816b269a71d9a2466e/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.tsx#L233)
 is triggered which sets the omStatus state.
   
   Hence the check for disabled now `omStatus === ''` doesn't match and it 
returns `disabled={true}`.
   
   After refresh the state is again being set to `''` i.e empty string, and the 
button is enabled again.
   
   This is the RCA.
   
   We have now removed the `disabled` prop from the button, thus the button 
will be enabled at all times allowing the sync.
   


-- 
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