dombizita commented on code in PR #3765:
URL: https://github.com/apache/ozone/pull/3765#discussion_r977456078


##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/autoReloadPanel/autoReloadPanel.tsx:
##########
@@ -38,21 +42,47 @@ class AutoReloadPanel extends 
React.Component<IAutoReloadPanelProps> {
   };
 
   render() {
-    const {onReload, lastUpdated, isLoading} = this.props;
-    const lastUpdatedText = lastUpdated === 0 ? 'NA' :
+    const {onReload, lastUpdated, 
lastUpdatedOMDBDelta,lastUpdatedOMDBFull,isLoading,lastUpdatedOMDBDeltaText,lastUpdatedOMDBFullText}
 = this.props;
+    
+     const lastUpdatedText = lastUpdated === 0 || lastUpdated === undefined ? 
'NA' :
       (
         <Tooltip
           placement='bottom' title={moment(lastUpdated).format('ll LTS')}
         >
-          {moment(lastUpdated).format('LTS')}
+          {moment(lastUpdated).format('LT')}
         </Tooltip>
       );
+
+      const omDBDeltaFullToolTip = <span>
+          {lastUpdatedOMDBFullText}: {moment(lastUpdatedOMDBFull).fromNow()}, 
{moment(lastUpdatedOMDBFull).format('LT')}
+          <br/>
+          {lastUpdatedOMDBDeltaText}: 
{moment(lastUpdatedOMDBDelta).fromNow()}, 
{moment(lastUpdatedOMDBDelta).format('LT')}

Review Comment:
   Sorry, I don't understand why we can't hard-code the texts here. If we 
hard-code here the texts (as we always want to display "`Full update`" or 
"`Delta update`") we don't even need the `lastUpdatedOMDBDeltaText` and 
`lastUpdatedOMDBFullText` variables on the `overview.tsx`, as we just add the 
`autoReloadPanel` to the overview page. We need two parameters for the 
`autoReloadPanel`, the two timestamps, the delta and full update times. So with 
the hard-code texts here we can also remove the text variables from the 
`overview.tsx` which would be easier. Let me know if I misunderstood 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