File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
api/src/main/java/io/kafbat/ui/util
src/components/common/NewTable Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
package io .kafbat .ui .util ;
2
2
3
3
import java .io .IOException ;
4
+ import lombok .extern .slf4j .Slf4j ;
4
5
import org .jetbrains .annotations .NotNull ;
5
6
import org .springframework .core .io .ClassPathResource ;
6
7
import org .springframework .core .io .buffer .DataBufferFactory ;
15
16
import org .springframework .web .server .WebFilterChain ;
16
17
import reactor .core .publisher .Mono ;
17
18
19
+ @ Slf4j
18
20
public class StaticFileWebFilter implements WebFilter {
19
21
20
22
private static final String INDEX_HTML = "/static/index.html" ;
@@ -29,6 +31,12 @@ public StaticFileWebFilter() {
29
31
public StaticFileWebFilter (String path , ClassPathResource resource ) {
30
32
this .matcher = ServerWebExchangeMatchers .pathMatchers (HttpMethod .GET , path );
31
33
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
+
32
40
try {
33
41
this .contents = ResourceUtil .readAsString (resource );
34
42
} catch (IOException e ) {
Original file line number Diff line number Diff line change 104
104
},
105
105
"engines" : {
106
106
"node" : " 18.17.1" ,
107
- "pnpm" : " 9.15.0"
107
+ "pnpm" : " ^ 9.15.0"
108
108
},
109
109
"pnpm" : {
110
110
"overrides" : {
Original file line number Diff line number Diff line change @@ -157,7 +157,6 @@ export const Table = styled.table(
157
157
& a {
158
158
color: ${ table . td . color . normal } ;
159
159
font-weight: 500;
160
- max-width: 450px;
161
160
white-space: nowrap;
162
161
overflow: hidden;
163
162
text-overflow: ellipsis;
You can’t perform that action at this time.
0 commit comments