Selaa lähdekoodia

Implemented topics sorting by size (#1539)

Co-authored-by: Roman Zabaluev <rzabaluev@provectus.com>
ValentinPrischepa 3 vuotta sitten
vanhempi
commit
529cd0bd6e

+ 2 - 0
kafka-ui-api/src/main/java/com/provectus/kafka/ui/service/TopicsService.java

@@ -455,6 +455,8 @@ public class TopicsService {
           return Comparator.comparing(t -> t.getReplicas() - t.getInSyncReplicas());
         case REPLICATION_FACTOR:
           return Comparator.comparing(InternalTopic::getReplicationFactor);
+        case SIZE:
+          return Comparator.comparing(InternalTopic::getSegmentSize);
         case NAME:
         default:
           return defaultComparator;

+ 1 - 0
kafka-ui-contract/src/main/resources/swagger/kafka-ui-api.yaml

@@ -1742,6 +1742,7 @@ components:
         - OUT_OF_SYNC_REPLICAS
         - TOTAL_PARTITIONS
         - REPLICATION_FACTOR
+        - SIZE
 
     SortOrder:
       type: string