Skip to content

Commit

Permalink
fix/periodic-sync: sep 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
mavemuri committed Sep 6, 2023
1 parent 5d77f56 commit d337beb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
10 changes: 8 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</repository>
</repositories>

<dependencyManagement>
<!-- <dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand All @@ -60,7 +60,7 @@
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
</dependencyManagement> -->

<dependencies>
<!-- https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java -->
Expand Down Expand Up @@ -219,6 +219,12 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>

</dependencies>

<build>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/kafdrop/controller/ClusterController.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
Expand Down
15 changes: 8 additions & 7 deletions src/main/java/kafdrop/controller/QuotaController.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package kafdrop.controller;

import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import kafdrop.model.KafkaQuotaVO;
import kafdrop.service.KafkaMonitor;
import org.slf4j.Logger;
Expand All @@ -15,6 +12,10 @@
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.responses.ApiResponse;

import javax.annotation.PostConstruct;
import java.io.IOException;
import java.nio.file.Files;
Expand Down Expand Up @@ -61,10 +62,10 @@ public String quotas(Model model) {
return "quota-overview";
}

@ApiOperation(value = "getAllQuotas", notes = "Get list of all quotas")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success", response = String.class, responseContainer = "List")
})
@Operation(description = "Get list of all quotas")
// @ApiResponses(value = {
// @ApiResponse(statusCode = 200, message = "Success", response = String.class, responseContainer = "List")
// })
@RequestMapping(path = "/quotas", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
public @ResponseBody
List<KafkaQuotaVO> getAllQuotas() {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/kafdrop/KafdropTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void contextLoads() throws Exception {
@Test
public void getReturnsExpectedGutHubStarText() throws Exception {
ResponseEntity<String> responseEntity = restTemplate
.getForEntity("http://localhost:" + port + "/", String.class);
.getForEntity("http://localhost:" + port + "/overview", String.class);
assertEquals(OK, responseEntity.getStatusCode());
assertThat(responseEntity.getBody().contains("Star Kafdrop on GitHub"));
}
Expand Down

0 comments on commit d337beb

Please sign in to comment.