This is an automated email from the ASF dual-hosted git repository.
arafat2198 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new cd996f0468 HDDS-12073. Don't show Source Bucket and Volume if null in
DU metadata (#7760)
cd996f0468 is described below
commit cd996f0468158f8ec653ee0ece21e37f0e0ec4b7
Author: Abhishek Pal <[email protected]>
AuthorDate: Mon Feb 3 12:33:28 2025 +0530
HDDS-12073. Don't show Source Bucket and Volume if null in DU metadata
(#7760)
---
.../src/v2/components/duMetadata/duMetadata.tsx | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git
a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/duMetadata/duMetadata.tsx
b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/duMetadata/duMetadata.tsx
index 5cae2fbc87..b5dc002c1f 100644
---
a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/duMetadata/duMetadata.tsx
+++
b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/duMetadata/duMetadata.tsx
@@ -137,8 +137,7 @@ const DUMetadata: React.FC<MetadataProps> = ({
*/
const selectedInfoKeys = [
'bucketName', 'bucketLayout', 'encInfo', 'fileName', 'keyName',
- 'name', 'owner', 'sourceBucket', 'sourceVolume', 'storageType',
- 'usedNamespace', 'volumeName', 'volume'
+ 'name', 'owner', 'storageType', 'usedNamespace', 'volumeName', 'volume'
] as const;
const objectInfo: ObjectInfo = summaryResponse.objectInfo ?? {};
@@ -155,6 +154,22 @@ const DUMetadata: React.FC<MetadataProps> = ({
}
});
+ // Source Volume and Source Bucket are present for linked buckets and
volumes.
+ // If it is not linked it will be null and should not be shown
+ if (objectInfo?.sourceBucket !== undefined && objectInfo?.sourceBucket !==
null) {
+ data.push({
+ key: 'Source Bucket',
+ value: objectInfo.sourceBucket
+ });
+ }
+
+ if(objectInfo?.sourceVolume !== undefined && objectInfo?.sourceVolume !==
null) {
+ data.push({
+ key: 'Source Volume',
+ value: objectInfo.sourceVolume
+ });
+ }
+
if (objectInfo?.creationTime !== undefined && objectInfo?.creationTime !==
-1) {
data.push({
key: 'Creation Time',
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]