Added Front End

This commit is contained in:
DerDavidBohl
2025-06-21 09:47:03 +02:00
parent b4eea7cec0
commit 0f9ede8fa9
9 changed files with 15357 additions and 4 deletions

4
.gitignore vendored
View File

@@ -37,3 +37,7 @@ backend/config/
### Config Files ###
backend/src/main/resources/application-local.properties
backend/data/
/backend/src/main/resources/static/
/data/
/deployments/
/config/

View File

@@ -12,7 +12,7 @@ FROM maven:3.9.9 AS backend-build
WORKDIR /app
COPY backend/pom.xml .
COPY backend/src ./src
COPY --from=frontend-build /app/dist/browser ./src/main/resources/public/ui
COPY --from=frontend-build /app/dist/browser ./src/main/resources/static
RUN mvn clean package -DskipTests
# Use OpenJDK image to run the application

View File

@@ -0,0 +1,23 @@
//package org.davidbohl.dirigent.ui;
//
//import jakarta.servlet.http.HttpServletRequest;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.servlet.HandlerMapping;
//import org.springframework.web.util.UrlPathHelper;
//
//@Controller
//public class SpaController {
//
// @RequestMapping(path = { "/ui/", "/ui/**"})
// public String forward(HttpServletRequest request) {
// UrlPathHelper pathHelper = new UrlPathHelper();
// String path = pathHelper.getPathWithinApplication(request);
//
// if (path.contains(".")) {
// return null;
// }
//
// return "forward:/ui/index.html";
// }
//}

View File

@@ -0,0 +1,16 @@
//package org.davidbohl.dirigent.ui;
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
//import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//@Configuration
//public class WebConfig implements WebMvcConfigurer {
// @Override
// public void addViewControllers(ViewControllerRegistry registry) {
// // Forward only if it's NOT a request for a resource with a file extension (like .js, .css, .png)
// registry.addViewController("/ui/{path:[^\\.]*}/**") // Match "/ui/something" or "/ui/something/else", excluding URLs with dots.
// .setViewName("forward:/ui/index.html");
// }
//}

View File

@@ -7,8 +7,10 @@ spring.datasource.password=password
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.h2.console.enabled=false
spring.jpa.hibernate.ddl-auto=update
dirigent.git.authToken=
dirigent.compose.command=docker compose
dirigent.start.all.on.startup=true
dirigent.delpoyments.schedule.enabled=true
dirigent.delpoyments.schedule.cron=0 */5 * * * *
dirigent.delpoyments.schedule.cron=0 */5 * * * *

View File

@@ -94,5 +94,8 @@
}
}
}
},
"cli": {
"analytics": false
}
}

15305
frontend/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"build": "ng build --base-href /ui/",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},

View File

@@ -10,6 +10,6 @@ export const appConfig: ApplicationConfig = {
{provide: MAT_DIALOG_DEFAULT_OPTIONS, useValue: {hasBackdrop: true}},
provideHttpClient(),
provideZoneChangeDetection({eventCoalescing: true}),
provideRouter(routes, withHashLocation())
provideRouter(routes)
]
};