Class DashboardApiController

java.lang.Object
com.nmontytskyi.monitoring.server.controller.DashboardApiController

@Validated @RestController @RequestMapping("/api/dashboard") public class DashboardApiController extends Object
REST controller powering the main dashboard page.

Aggregates the current status of all registered services into a DashboardSummaryResponse and exposes the five most recent alert events across all services. Responses are consumed directly by the Thymeleaf dashboard template on initial page load and refreshed periodically via fetch calls from the browser.

Author:
Nazar Montytskyi
See Also:
  • Constructor Details

    • DashboardApiController

      public DashboardApiController()
  • Method Details

    • getDashboard

      @GetMapping public org.springframework.http.ResponseEntity<DashboardSummaryResponse> getDashboard()
    • getRecentEvents

      @GetMapping("/recent-events") public org.springframework.http.ResponseEntity<List<AlertEventResponse>> getRecentEvents()