Pārlūkot izejas kodu

Display replication factor field in topics list #608 (#697)

MBovtriukProvectus 4 gadi atpakaļ
vecāks
revīzija
326786e4ff

+ 1 - 0
kafka-ui-react-app/src/components/Topics/List/List.tsx

@@ -135,6 +135,7 @@ const List: React.FC<Props> = ({
                   orderBy={orderBy}
                   orderBy={orderBy}
                   setOrderBy={setTopicsOrderBy}
                   setOrderBy={setTopicsOrderBy}
                 />
                 />
+                <th>Replication Factor</th>
                 <th>Number of messages</th>
                 <th>Number of messages</th>
                 <th>Size</th>
                 <th>Size</th>
                 <th>Type</th>
                 <th>Type</th>

+ 2 - 1
kafka-ui-react-app/src/components/Topics/List/ListItem.tsx

@@ -20,7 +20,7 @@ export interface ListItemProps {
 }
 }
 
 
 const ListItem: React.FC<ListItemProps> = ({
 const ListItem: React.FC<ListItemProps> = ({
-  topic: { name, internal, partitions, segmentSize },
+  topic: { name, internal, partitions, segmentSize, replicationFactor },
   deleteTopic,
   deleteTopic,
   clusterName,
   clusterName,
   clearTopicMessages,
   clearTopicMessages,
@@ -75,6 +75,7 @@ const ListItem: React.FC<ListItemProps> = ({
       </td>
       </td>
       <td>{partitions?.length}</td>
       <td>{partitions?.length}</td>
       <td>{outOfSyncReplicas}</td>
       <td>{outOfSyncReplicas}</td>
+      <td>{replicationFactor}</td>
       <td>{numberOfMessages}</td>
       <td>{numberOfMessages}</td>
       <td>
       <td>
         <BytesFormatted value={segmentSize} />
         <BytesFormatted value={segmentSize} />

+ 3 - 0
kafka-ui-react-app/src/components/Topics/List/__tests__/__snapshots__/List.spec.tsx.snap

@@ -205,6 +205,9 @@ exports[`List when it does not have readonly flag matches the snapshot 1`] = `
                     </span>
                     </span>
                   </th>
                   </th>
                 </ListHeaderCell>
                 </ListHeaderCell>
+                <th>
+                  Replication Factor
+                </th>
                 <th>
                 <th>
                   Number of messages
                   Number of messages
                 </th>
                 </th>