Skip to content

Commit dee2c2e

Browse files
authored
Merge branch 'main' into node/22
2 parents 45deab8 + 2b3abd2 commit dee2c2e

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

api/src/main/java/io/kafbat/ui/util/StaticFileWebFilter.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.kafbat.ui.util;
22

33
import java.io.IOException;
4+
import lombok.extern.slf4j.Slf4j;
45
import org.jetbrains.annotations.NotNull;
56
import org.springframework.core.io.ClassPathResource;
67
import org.springframework.core.io.buffer.DataBufferFactory;
@@ -15,6 +16,7 @@
1516
import org.springframework.web.server.WebFilterChain;
1617
import reactor.core.publisher.Mono;
1718

19+
@Slf4j
1820
public class StaticFileWebFilter implements WebFilter {
1921

2022
private static final String INDEX_HTML = "/static/index.html";
@@ -29,6 +31,12 @@ public StaticFileWebFilter() {
2931
public StaticFileWebFilter(String path, ClassPathResource resource) {
3032
this.matcher = ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET, path);
3133

34+
if (!resource.exists()) {
35+
log.warn("Resource [{}] does not exist. Frontend might not be available.", resource.getPath());
36+
contents = "Missing index.html. Make sure the app has been built with a correct (prod) profile.";
37+
return;
38+
}
39+
3240
try {
3341
this.contents = ResourceUtil.readAsString(resource);
3442
} catch (IOException e) {

api/src/test/java/io/kafbat/ui/AbstractIntegrationTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ public abstract class AbstractIntegrationTest {
3737
public static final String LOCAL = "local";
3838
public static final String SECOND_LOCAL = "secondLocal";
3939

40-
private static final boolean IS_ARM =
41-
System.getProperty("os.arch").contains("arm") || System.getProperty("os.arch").contains("aarch64");
42-
43-
private static final String CONFLUENT_PLATFORM_VERSION = IS_ARM ? "7.8.0.arm64" : "7.8.0";
40+
private static final String CONFLUENT_PLATFORM_VERSION = "7.8.0";
4441

4542
public static final KafkaContainer kafka = new KafkaContainer(
4643
DockerImageName.parse("confluentinc/cp-kafka").withTag(CONFLUENT_PLATFORM_VERSION))

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
},
105105
"engines": {
106106
"node": "^22.12.0",
107-
"pnpm": "9.15.0"
107+
"pnpm": "^9.15.0"
108108
},
109109
"pnpm": {
110110
"overrides": {

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<junit.version>5.11.2</junit.version>
5656
<mockito.version>5.14.2</mockito.version>
5757
<okhttp3.mockwebserver.version>4.12.0</okhttp3.mockwebserver.version>
58-
<testcontainers.version>1.20.2</testcontainers.version>
58+
<testcontainers.version>1.20.4</testcontainers.version>
5959

6060
<!-- Frontend dependency versions -->
6161
<node.version>v22.12.0</node.version>

0 commit comments

Comments
 (0)