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 bb80a14f35 HDDS-11246. [Recon] Use optional chaining instead of 
explicit undefined check for Objects in Container and Pipeline Module. (#7037)
bb80a14f35 is described below

commit bb80a14f35a1cce2b0940987b37d236a41b7bc6f
Author: Smita <[email protected]>
AuthorDate: Mon Aug 19 21:30:00 2024 +0530

    HDDS-11246. [Recon] Use optional chaining instead of explicit undefined 
check for Objects in Container and Pipeline Module. (#7037)
---
 .../src/views/missingContainers/missingContainers.tsx             | 8 ++++----
 .../recon/ozone-recon-web/src/views/pipelines/pipelines.tsx       | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/missingContainers/missingContainers.tsx
 
b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/missingContainers/missingContainers.tsx
index 1f583a5549..fff4a05a50 100644
--- 
a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/missingContainers/missingContainers.tsx
+++ 
b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/missingContainers/missingContainers.tsx
@@ -398,22 +398,22 @@ export class MissingContainers extends 
React.Component<Record<string, object>, I
           <Tabs defaultActiveKey='1'>
             <Tabs.TabPane
               key='1'
-              tab={`Missing${(missingDataSource && missingDataSource.length > 
0) ? ` (${missingDataSource.length})` : ''}`}>
+              tab={`Missing (${missingDataSource?.length ?? 0})`}>
               {generateTable(missingDataSource)}
             </Tabs.TabPane>
             <Tabs.TabPane
               key='2'
-              tab={`Under-Replicated${(underReplicatedDataSource && 
underReplicatedDataSource.length > 0) ? ` 
(${underReplicatedDataSource.length})` : ''}`}>
+              tab={`Under-Replicated (${underReplicatedDataSource?.length ?? 
0})`}>
               {generateTable(underReplicatedDataSource)}
             </Tabs.TabPane>
             <Tabs.TabPane
               key='3'
-              tab={`Over-Replicated${(overReplicatedDataSource && 
overReplicatedDataSource.length > 0) ? ` (${overReplicatedDataSource.length})` 
: ''}`}>
+              tab={`Over-Replicated (${overReplicatedDataSource?.length ?? 
0})`}>
               {generateTable(overReplicatedDataSource)}
             </Tabs.TabPane>
             <Tabs.TabPane
               key='4'
-              tab={`Mis-Replicated${(misReplicatedDataSource && 
misReplicatedDataSource.length > 0) ? ` (${misReplicatedDataSource.length})` : 
''}`}>
+              tab={`Mis-Replicated (${misReplicatedDataSource?.length ?? 0})`}>
               {generateTable(misReplicatedDataSource)}
             </Tabs.TabPane>
           </Tabs>
diff --git 
a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/pipelines/pipelines.tsx
 
b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/pipelines/pipelines.tsx
index e0167bd11b..c53be4f7a2 100644
--- 
a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/pipelines/pipelines.tsx
+++ 
b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/pipelines/pipelines.tsx
@@ -116,8 +116,8 @@ const COLUMNS = [
     render: (datanodes: string[]) => <div> {datanodes && 
datanodes.map(datanode =>
       <div key={datanode.hostName}>
         <div className='uuidtooltip'>
-          <Tooltip placement='top' title={`UUID: ${datanode && 
datanode.uuid}`} getPopupContainer={(triggerNode) => triggerNode}>
-            {datanode && datanode.hostName}
+          <Tooltip placement='top' title={`UUID: ${datanode?.uuid ?? 'NA'}`} 
getPopupContainer={(triggerNode) => triggerNode}>
+            {datanode?.hostName ?? 'N/A'}
           </Tooltip>
         </div>
       </div>)}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to