diff --git a/spring-boot-admin-server-cloud/src/main/java/de/codecentric/boot/admin/server/cloud/discovery/InstanceDiscoveryListener.java b/spring-boot-admin-server-cloud/src/main/java/de/codecentric/boot/admin/server/cloud/discovery/InstanceDiscoveryListener.java index 1cda69fa7f1..fd4a2c5d8ab 100644 --- a/spring-boot-admin-server-cloud/src/main/java/de/codecentric/boot/admin/server/cloud/discovery/InstanceDiscoveryListener.java +++ b/spring-boot-admin-server-cloud/src/main/java/de/codecentric/boot/admin/server/cloud/discovery/InstanceDiscoveryListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2023 the original author or authors. + * Copyright 2014-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,7 @@ import de.codecentric.boot.admin.server.domain.values.InstanceId; import de.codecentric.boot.admin.server.domain.values.Registration; import de.codecentric.boot.admin.server.services.InstanceRegistry; +import de.codecentric.boot.admin.server.web.client.RefreshInstancesEvent; /** * Listener for Heartbeats events to publish all services to the instance registry. @@ -105,6 +106,11 @@ public void onInstanceRegistered(InstanceRegisteredEvent event) { discover(); } + @EventListener + public void onRefreshInstances(RefreshInstancesEvent event) { + discover(); + } + @EventListener public void onParentHeartbeat(ParentHeartbeatEvent event) { discoverIfNeeded(event.getValue()); diff --git a/spring-boot-admin-server-ui/src/main/frontend/views/applications/i18n.de.json b/spring-boot-admin-server-ui/src/main/frontend/views/applications/i18n.de.json index 98dad65be8a..c24b046e14a 100644 --- a/spring-boot-admin-server-ui/src/main/frontend/views/applications/i18n.de.json +++ b/spring-boot-admin-server-ui/src/main/frontend/views/applications/i18n.de.json @@ -28,6 +28,7 @@ "status": "Status", "label": "Anwendungen", "shutdown": "Möchten Sie die Anwendung {name} herunterfahren?", + "refreshed": "Anwendungen wurden aktualisiert.", "restart": "Möchten Sie Anwendung {name} neu starten?", "restarted": "Die Anwendung wurde neu gestartet.", "unregister": "Möchten Sie die Anwendung {name} deregistrieren?", diff --git a/spring-boot-admin-server-ui/src/main/frontend/views/applications/i18n.en.json b/spring-boot-admin-server-ui/src/main/frontend/views/applications/i18n.en.json index bb795a3e599..8a0ae213ca4 100644 --- a/spring-boot-admin-server-ui/src/main/frontend/views/applications/i18n.en.json +++ b/spring-boot-admin-server-ui/src/main/frontend/views/applications/i18n.en.json @@ -32,6 +32,7 @@ "offline": "offline", "shutdown": "Shutdown application {name}?", "shutdown_successful": "Successfully shutdown application {name}.", + "refreshed": "Applications refreshed.", "restart": "Restart application {name}?", "restarted": "Successfully restarted application {name}.", "unregister": "Deregister application {name}?", diff --git a/spring-boot-admin-server-ui/src/main/frontend/views/applications/index.vue b/spring-boot-admin-server-ui/src/main/frontend/views/applications/index.vue index ec8f0057b31..71728ef925b 100644 --- a/spring-boot-admin-server-ui/src/main/frontend/views/applications/index.vue +++ b/spring-boot-admin-server-ui/src/main/frontend/views/applications/index.vue @@ -1,5 +1,5 @@