File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
api/src/main/java/io/kafbat/ui/controller Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 2828import org .springframework .http .ResponseEntity ;
2929import org .springframework .http .codec .multipart .FilePart ;
3030import org .springframework .http .codec .multipart .Part ;
31- import org .springframework .web .bind .annotation .GetMapping ;
3231import org .springframework .web .bind .annotation .RestController ;
3332import org .springframework .web .server .ServerWebExchange ;
3433import reactor .core .publisher .Flux ;
@@ -57,6 +56,7 @@ default ActionDTO stringToActionDto(String str) {
5756 }
5857 }
5958
59+ private final ClustersProperties clustersProperties ;
6060 private final DynamicConfigOperations dynamicConfigOperations ;
6161 private final ApplicationRestarter restarter ;
6262 private final KafkaClusterFactory kafkaClusterFactory ;
@@ -83,10 +83,11 @@ public Mono<ResponseEntity<ApplicationConfigDTO>> getCurrentConfig(ServerWebExch
8383
8484 @ Override
8585 public Mono <ResponseEntity <String >> getSupportUrl (ServerWebExchange exchange ) {
86- var kafkaClusters = dynamicConfigOperations .getCurrentProperties ().getKafka ().getClusters ();
87-
88- String supportUrl = kafkaClusters != null && !kafkaClusters .isEmpty ()
89- ? kafkaClusters .get (0 ).getSupportUrl ()
86+ var clusters = clustersProperties .getClusters ();
87+
88+ // Check if clusters are available and extract the support URL from the first one
89+ String supportUrl = clusters != null && !clusters .isEmpty ()
90+ ? clusters .get (0 ).getSupportUrl ()
9091 : null ;
9192
9293 return Mono .just (ResponseEntity .ok (supportUrl ));
You can’t perform that action at this time.
0 commit comments