devmadhuu commented on code in PR #5521:
URL: https://github.com/apache/ozone/pull/5521#discussion_r1384380107
##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx:
##########
@@ -459,6 +495,9 @@ export class Om extends React.Component<Record<string,
object>, IOmdbInsightsSta
} else if (this.state.activeTab === '4') {
this.fetchDeletedKeys(this.state.DEFAULT_LIMIT,
this.state.prevKeyDeleted);
}
+ else if (this.state.activeTab === '5') {
+ this.fetchDeletePendingDir(this.state.DEFAULT_LIMIT,
this.state.prevKeyDirDelete);
Review Comment:
@smitajoshi12 thanks for working on this patch. Pls correct the formatting
and indent.
##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx:
##########
@@ -776,6 +820,66 @@ export class Om extends React.Component<Record<string,
object>, IOmdbInsightsSta
});
};
+ // Pending Delete Directories
+ fetchDeletePendingDir = (limit: number, prevKeyDirDelete: string) => {
+ this.setState({
+ loading: true,
+ nextClickable: true,
+ prevClickable: true
+ });
+
+ //Cancel any previous pending request
+ cancelRequests([
+ cancelMismatchedEndpointSignal,
+ cancelOpenKeysSignal,
+ cancelDeletePendingSignal,
+ cancelDeletedKeysSignal,
+ cancelRowExpandSignal,
+ cancelDeletedPendingDirSignal
+ ]);
+
+ let deletePendingDirEndpoint;
+ if (prevKeyDirDelete === "" || prevKeyDirDelete === undefined ) {
+ deletePendingDirEndpoint =
`/api/v1/keys/deletePending/dirs?limit=${limit}`;
+ }
+ else {
+ deletePendingDirEndpoint =
`/api/v1/keys/deletePending/dirs?limit=${limit}&prevKey=${prevKeyDirDelete}`;
+ }
+
+ const { request, controller } = AxiosGetHelper(deletePendingDirEndpoint,
cancelDeletedPendingDirSignal);
+ cancelDeletedPendingDirSignal = controller
+ request.then(deletePendingDirResponse => {
+ const deletedDirInfo = deletePendingDirResponse &&
deletePendingDirResponse.data && deletePendingDirResponse.data.deletedDirInfo;
+ if (deletePendingDirResponse && deletePendingDirResponse.data &&
deletePendingDirResponse.data.lastKey === "") {
+ //last key of api is empty may be last record no further records
+ dirPendingPrevList =[""];
+ this.setState({
+ loading: false,
+ nextClickable: false,
+ pendingDeleteDirDataSource: deletedDirInfo
+ })
+ }
+ else {
+ if (this.state.prevKeyDirDelete === ""
||this.state.prevKeyDirDelete === undefined ) {
Review Comment:
Add space after ||
--
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]