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


##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/autoReloadPanel/autoReloadPanel.tsx:
##########
@@ -27,6 +27,10 @@ import moment from 'moment';
 interface IAutoReloadPanelProps extends RouteComponentProps<object> {
   onReload: () => void;
   lastUpdated: number;

Review Comment:
   Maybe we could do a small refactoring here, like you changed the text from 
"updated" to "refreshed" at the already existing timestamp on the page.
   ```suggestion
     lastRefreshed: number;
   ```



##########
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')}
+      </span>
+
+      const lastUpdatedDeltaToolTip = lastUpdatedOMDBDelta === 0 || 
lastUpdatedOMDBDelta === undefined || lastUpdatedOMDBFull === 0 || 
lastUpdatedOMDBFull === undefined ? 'NA' :

Review Comment:
   This is not necessarily the last updated delta, so we can use the previously 
used name like this (just so the code can be more understandable later).
   ```suggestion
         const lastUpdatedDeltaFullToolTip = lastUpdatedOMDBDelta === 0 || 
lastUpdatedOMDBDelta === undefined || lastUpdatedOMDBFull === 0 || 
lastUpdatedOMDBFull === undefined ? 'NA' :
   ```



##########
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')}
+      </span>
+
+      const lastUpdatedDeltaToolTip = lastUpdatedOMDBDelta === 0 || 
lastUpdatedOMDBDelta === undefined || lastUpdatedOMDBFull === 0 || 
lastUpdatedOMDBFull === undefined ? 'NA' :
+      (
+        <Tooltip
+          placement='bottom' title={omDBDeltaFullToolTip}
+        >
+          {moment(lastUpdatedOMDBDelta).format('LT')}
+        </Tooltip>
+      );
+
+     const lastUpdatedDeltaText = lastUpdatedOMDBDelta === 0 || 
lastUpdatedOMDBDelta === undefined || lastUpdatedOMDBFull===0 || 
lastUpdatedOMDBFull === undefined ? '' :

Review Comment:
   Same here.
   ```suggestion
        const lastUpdatedDeltaFullText = lastUpdatedOMDBDelta === 0 || 
lastUpdatedOMDBDelta === undefined || lastUpdatedOMDBFull === 0 || 
lastUpdatedOMDBFull === undefined ? '' :
   ```



##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.tsx:
##########
@@ -75,7 +79,12 @@ export class Overview extends React.Component<Record<string, 
object>, IOverviewS
       buckets: 0,
       keys: 0,
       missingContainersCount: 0,
-      lastUpdated: 0
+      lastUpdated: 0,

Review Comment:
   Maybe change here as well to refer that this is the refresh timstamp.
   ```suggestion
         lastRefreshed: 0,
   ```



##########
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' :

Review Comment:
   Here as well.
   ```suggestion
        const lastRefreshedText = lastRefreshed === 0 || lastRefreshed === 
undefined ? 'NA' :
   ```



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