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 11package io .kafbat .ui .util ;
22
33import java .io .IOException ;
4+ import lombok .extern .slf4j .Slf4j ;
45import org .jetbrains .annotations .NotNull ;
56import org .springframework .core .io .ClassPathResource ;
67import org .springframework .core .io .buffer .DataBufferFactory ;
1516import org .springframework .web .server .WebFilterChain ;
1617import reactor .core .publisher .Mono ;
1718
19+ @ Slf4j
1820public 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 ) {
Original file line number Diff line number Diff line change 104104 },
105105 "engines" : {
106106 "node" : " 18.17.1" ,
107- "pnpm" : " 9.15.0"
107+ "pnpm" : " ^ 9.15.0"
108108 },
109109 "pnpm" : {
110110 "overrides" : {
Original file line number Diff line number Diff line change @@ -157,7 +157,6 @@ export const Table = styled.table(
157157 & a {
158158 color: ${ table . td . color . normal } ;
159159 font-weight: 500;
160- max-width: 450px;
161160 white-space: nowrap;
162161 overflow: hidden;
163162 text-overflow: ellipsis;
You can’t perform that action at this time.
0 commit comments