Skip to content

Commit

Permalink
Add monitoring endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-emilius committed Nov 30, 2024
1 parent 732938e commit 4749fa8
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ const ThesisConfigSection = () => {
<Group>
{!isThesisClosed(thesis) && (
<ConfirmationButton
confirmationText='Are you sure you want to close the thesis? This action cannot be undone.'
confirmationText='Are you sure you want to close the thesis? This will set the thesis state to DROPPED OUT and cannot be undone.'
confirmationTitle='Close Thesis'
variant='outline'
color='red'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,15 +315,16 @@ const ThesisWritingSection = () => {
</Accordion.Item>
</Accordion>
<Stack mt='md'>
{access.student && thesis.state === ThesisState.WRITING && requiredFilesUploaded && (
{access.student && thesis.state === ThesisState.WRITING && (
<ConfirmationButton
confirmationTitle='Final Submission'
confirmationText='Are you sure you want to submit your thesis? This action cannot be undone.'
ml='auto'
onClick={onFinalSubmission}
disabled={!requiredFilesUploaded}
loading={submitting}
>
Mark Submission as final
Mark Submission as Final
</ConfirmationButton>
)}
</Stack>
Expand Down
6 changes: 6 additions & 0 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id "java"
id "idea"
id "com.github.andygoossens.modernizer" version "1.10.0"
id "com.gorylenko.gradle-git-properties" version "2.4.2"
id "org.springframework.boot" version "${spring_boot_version}"
id "io.spring.dependency-management" version "1.1.6"
id "com.github.ben-manes.versions" version "0.51.0"
Expand Down Expand Up @@ -30,6 +31,7 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-oauth2-client"
implementation "org.springframework.boot:spring-boot-starter-oauth2-resource-server"
implementation "org.springframework.boot:spring-boot-starter-thymeleaf"
implementation 'org.springframework.boot:spring-boot-starter-actuator'

// Avoid outdated version of netty to prevent security issues
implementation("io.netty:netty-common") {
Expand Down Expand Up @@ -72,6 +74,10 @@ dependencies {
annotationProcessor "org.projectlombok:lombok:1.18.36"
}

springBoot {
buildInfo()
}

test {
useJUnitPlatform()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
@SpringBootApplication
@EnableScheduling
public class ThesisTrackApplication implements ApplicationRunner {

private static final Logger logger = LoggerFactory.getLogger(ThesisTrackApplication.class);

public static void main(String[] args) {
Expand All @@ -22,5 +21,4 @@ public static void main(String[] args) {
public void run(ApplicationArguments applicationArguments) {
logger.info("Service running...");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.requestMatchers(HttpMethod.GET, "/v2/published-presentations/**").permitAll()
.requestMatchers(HttpMethod.GET, "/v2/calendar/**").permitAll()
.requestMatchers(HttpMethod.GET, "/v2/avatars/**").permitAll()
.requestMatchers(HttpMethod.GET, "/actuator/info").permitAll()
.requestMatchers(HttpMethod.GET, "/actuator/health").permitAll()
.anyRequest().authenticated()
)
.oauth2ResourceServer(server -> {
Expand Down
14 changes: 14 additions & 0 deletions server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ spring:
starttls:
enable: true

management:
endpoints:
web:
exposure:
include: health,info
info:
java:
enabled: true
git:
enabled: true
health:
mail:
enabled: ${MAIL_ENABLED:false}

server:
servlet:
context-path: /api
Expand Down

0 comments on commit 4749fa8

Please sign in to comment.