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


##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/db.json:
##########
@@ -1218,5 +1218,47 @@
       }
     ],
     "sizeDirectKey": 0
-  }
-}
+  },
+  "taskStatus": [
+    {
+      "taskName": "ContainerKeyMapperTask",
+      "lastUpdatedTimestamp": 0,
+      "lastUpdatedSeqNumber": 0
+    },
+    {
+      "taskName": "FileSizeCountTask",
+      "lastUpdatedTimestamp": 0,
+      "lastUpdatedSeqNumber": 0
+    },
+    {
+      "taskName": "TableCountTask",
+      "lastUpdatedTimestamp": 0,
+      "lastUpdatedSeqNumber": 0
+    },
+    {
+      "taskName": "NSSummaryTaskWithFSO",
+      "lastUpdatedTimestamp": 0,
+      "lastUpdatedSeqNumber": 0
+    },
+    {
+      "taskName": "OmDeltaRequest",
+      "lastUpdatedTimestamp": 1663842113,

Review Comment:
   Please note the timestamp here should be in millis (epoch), not seconds. I 
have fixed it for you.



##########
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;
+  lastUpdatedOMDBDelta: number;
+  lastUpdatedOMDBFull: number;
+  lastUpdatedOMDBDeltaText: string;
+  lastUpdatedOMDBFullText: string;

Review Comment:
   I have changes the comparison logic inside the render function. It seems to 
work as well.



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

Review Comment:
   Whitespace here as well. Fixed it for you.



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

Review Comment:
   Please note the space after each `:` . To make your code style in-line with 
the rest. I have fixed this for you this time.



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

Review Comment:
   I have made the change to use `LT` instead of long format so that each line 
won't be wrapped around in the tooltip.



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