ivandika3 commented on code in PR #6769:
URL: https://github.com/apache/ozone/pull/6769#discussion_r1627861093
##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.tsx:
##########
@@ -249,6 +262,8 @@ export class Overview extends
React.Component<Record<string, object>, IOverviewS
</Tooltip>
</div>
const clusterCapacity = `${size(storageReport.capacity -
storageReport.remaining)}/${size(storageReport.capacity)}`;
+ const clusterIsInHaMode = scmServiceId !== null && scmServiceId !==
undefined && scmServiceId !== '' && omServiceId !== null
+ && omServiceId !== undefined && omServiceId !== '';
Review Comment:
Nit: I think this can be simplified to
```javascript
const clusterIsInHaMode = scmServiceId && omServiceId;
```
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/types/ClusterStateResponse.java:
##########
@@ -102,6 +102,12 @@ public final class ClusterStateResponse {
@JsonProperty
private long deletedDirs;
+ @JsonProperty
+ private String scmServiceId;
+
+ @JsonProperty
+ private String omServiceId;
Review Comment:
Nit: Let's add the `JsonProperty` filed (e.g. like "keysPendingDeletion")
although `deletedDirs` does not have one.
##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.tsx:
##########
@@ -302,6 +317,11 @@ export class Overview extends
React.Component<Record<string, object>, IOverviewS
<Col xs={24} sm={18} md={12} lg={12} xl={6} className='summary-font'>
<OverviewCard loading={loading} title='Pending Deleted Keys
Summary' data={deletePendingSummaryData} icon='delete' linkToUrl='/Om'/>
</Col>
+ {clusterIsInHaMode &&
+ <Col xs={24} sm={18} md={12} lg={12} xl={6}>
+ <OverviewCard loading={loading} data={scmAndOmServicesData}/>
Review Comment:
Could you help to take a screenshot on the overview page and update the PR
description?
You can either use `pnpm run dev` with mocked data, or you spin up a docker
compose cluster.
We might want to consider adding an icon and also having one `OverviewCard`
for each service ID (you can set to OM service ID overview card to link to
'/Om' page).
##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/db.json:
##########
@@ -15,7 +15,9 @@
"volumes": 5,
"buckets": 156,
"keys": 253000,
- "keysPendingDeletion": 1000
+ "keysPendingDeletion": 1000,
+ "scmServiceId": "scmservice,",
Review Comment:
Nit: Let's remove the trailing comma
--
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]