devabhishekpal commented on code in PR #6724:
URL: https://github.com/apache/ozone/pull/6724#discussion_r1674321345
##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx:
##########
@@ -190,15 +190,21 @@ const COLUMNS = [
render: (text: DatanodeOpState) => renderDatanodeOpState(text),
sorter: (a: IDatanode, b: IDatanode) => a.opState.localeCompare(b.opState)
},
-
{
title: 'Uuid',
dataIndex: 'uuid',
key: 'uuid',
isVisible: true,
isSearchable: true,
sorter: (a: IDatanode, b: IDatanode) => a.uuid.localeCompare(b.uuid),
- defaultSortOrder: 'ascend' as const
+ defaultSortOrder: 'ascend' as const,
+ render: (uuid: IDatanode, record: IDatanode) => {
+ return (
+ //1. Compare Decommission Api's UUID with all UUID in table and show
Decommission Summary
+ (decommissionUids && decommissionUids.includes(record.uuid) &&
record.opState !== 'DECOMMISSIONED') ?
Review Comment:
Minor nit for UUID spelling
```suggestion
(decommissionUuids && decommissionUuids.includes(record.uuid) &&
record.opState !== 'DECOMMISSIONED') ?
```
##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.tsx:
##########
@@ -304,6 +309,8 @@ export class Overview extends
React.Component<Record<string, object>, IOverviewS
<Col xs={24} sm={18} md={12} lg={12} xl={6}>
<OverviewCard loading={loading} title='Deleted Containers'
data={deletedContainers.toString()} icon='delete' />
</Col>
+ </Row>
+ <Row gutter={[25, 25]}>
Review Comment:
We don't need to separate out into rows.
Single row parent wrapper would automatically handle card breaks to new rows.
Could you check once without this <Row> component wrapped?
##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx:
##########
@@ -389,24 +398,39 @@ export class Datanodes extends
React.Component<Record<string, object>, IDatanode
return selectedColumns;
};
- _loadData = () => {
- this.setState(prevState => ({
- loading: true,
- selectedColumns: this._getSelectedColumns(prevState.selectedColumns)
- }));
+ _loadData = async () => {
+ // Need to call decommission API on each interval to get updated status
before datanode API to compare UUID's
+ // update Operation State Column in table Manually before rendering
+ let decommissionAPIRequest = this._loadDecommisionAPI();
Review Comment:
I think we don't need both `await` and `then()`
```suggestion
let decommissionAPIResponse = await this._loadDecommisionAPI();
decomissionUids = decommissionAPIResponse && decommissionAPIResponse.data
```
--
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]