@@ -218,6 +218,7 @@ public String searchMessageForm(@PathVariable("name") String topicName,
218218 defaultForm .setSearchText ("" );
219219 defaultForm .setFormat (defaultFormat );
220220 defaultForm .setKeyFormat (defaultKeyFormat );
221+ defaultForm .setPartition (-1 );
221222 defaultForm .setMaximumCount (100 );
222223 defaultForm .setStartTimestamp (new Date (0 ));
223224 model .addAttribute ("searchMessageForm" , defaultForm );
@@ -231,6 +232,7 @@ public String searchMessageForm(@PathVariable("name") String topicName,
231232 model .addAttribute ("messageFormats" , MessageFormat .values ());
232233 model .addAttribute ("defaultKeyFormat" , defaultKeyFormat );
233234 model .addAttribute ("keyFormats" , KeyFormat .values ());
235+ model .addAttribute ("partitions" , topic .getPartitions ().stream ().map (TopicPartitionVO ::getId ).toList ());
234236 model .addAttribute ("descFiles" , protobufProperties .getDescFilesList ());
235237
236238 if (!searchMessageForm .isEmpty () && !errors .hasErrors ()) {
@@ -247,6 +249,7 @@ public String searchMessageForm(@PathVariable("name") String topicName,
247249 var searchResults = kafkaMonitor .searchMessages (
248250 topicName ,
249251 searchMessageForm .getSearchText (),
252+ searchMessageForm .getPartition (),
250253 searchMessageForm .getMaximumCount (),
251254 searchMessageForm .getStartTimestamp (),
252255 deserializers );
0 commit comments