smitajoshi12 commented on code in PR #5658:
URL: https://github.com/apache/ozone/pull/5658#discussion_r1463177327


##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx:
##########
@@ -305,7 +304,8 @@ interface IOmdbInsightsState {
   nextClickable: boolean;
   includeFso: boolean;
   includeNonFso: boolean;
-  prevClickable: boolean
+  prevClickable: boolean;
+  pageDisplayCount: number;

Review Comment:
   Added comment in latest commit we are navigating need to understand we are 
at last  previous page and pageDisplayCount is used to store values For ex Page 
1, Value =10, Page 2= Value 20



##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx:
##########
@@ -818,26 +837,30 @@ export class Om extends React.Component<Record<string, 
object>, IOmdbInsightsSta
     // to fetch previous call stored all prevkey in array and fetching in 
respective tabs
     if (this.state.activeTab === '2') {
         this.setState({
-          prevKeyOpen: 
openPrevKeyList[openPrevKeyList.indexOf(this.state.prevKeyOpen)-2]
+          prevKeyOpen: prevKeyListMap.get(this.state.pageDisplayCount - 1),
+          pageDisplayCount : this.state.pageDisplayCount - 1
         }, () => {
           this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, 
this.state.DEFAULT_LIMIT,this.state.prevKeyOpen);
         })
     } else if (this.state.activeTab === '3') {
       this.setState({
-        prevKeyDeletePending: 
keysPendingPrevList[keysPendingPrevList.indexOf(this.state.prevKeyDeletePending)-2]
+        prevKeyDeletePending: prevKeyListMap.get(this.state.pageDisplayCount - 
1),
+        pageDisplayCount: this.state.pageDisplayCount - 1
       }, () => {
         this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, 
this.state.prevKeyDeletePending);
       })
     } else if (this.state.activeTab === '4') {
       this.setState({
-        prevKeyDeleted: 
deletedKeysPrevList[deletedKeysPrevList.indexOf(this.state.prevKeyDeleted)-2]
+        prevKeyDeleted: prevKeyListMap.get(this.state.pageDisplayCount - 1),
+        pageDisplayCount : this.state.pageDisplayCount- 1

Review Comment:
   Done Changes suggested by you in latest commit.



##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx:
##########
@@ -856,14 +883,19 @@ export class Om extends React.Component<Record<string, 
object>, IOmdbInsightsSta
     else {
       this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, 
this.state.prevKeyMismatch, this.state.mismatchMissingState);
     }
+  })
   };
 
   itemRender = (_: any, type: string, originalElement: any) => {
     if (type === 'prev') {
-      return <div>{this.state.prevClickable ? <Link to="/Om" 
onClick={this.fetchPreviousRecords}> Prev</Link>: <Link to="/Om" style={{ 
pointerEvents: 'none' }}>No Records</Link>}</div>;
+      return <>{this.state.prevClickable && this.state.pageDisplayCount && 
<Link to="/Om" className='ant-pagination-item-link' 
onClick={this.fetchPreviousRecords}> {'<'}
+      </Link>}</>;
+    }
+    if (type === 'page') {
+      return <>{this.state.pageDisplayCount}</>
     }
     if (type === 'next') {
-      return <div> {this.state.nextClickable ? <Link to="/Om" 
onClick={this.fetchNextRecords}> {'>>'} </Link> : <Link to="/Om" style={{ 
pointerEvents: 'none' }}>No More Further Records</Link>}</div>;
+      return <>{this.state.nextClickable ? <Link to="/Om" 
className='ant-pagination-item-link next' onClick={this.fetchNextRecords}> 
{'>'} </Link> : <div className='norecords'>No Records</div> }</>;
     }

Review Comment:
   @dombizita 
   Done Changes in latest commit and added screenshot



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