From e3893fc3107644e115748765226c7dd427360efd Mon Sep 17 00:00:00 2001 From: Palina Krukovich <36711714+palina-krukovich@users.noreply.github.com> Date: Fri, 30 Aug 2024 10:40:14 +0200 Subject: [PATCH] #19494 add more analytics functions to DN BE (#159) --- .../java/io/kontur/disasterninja/service/AnalyticsService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/io/kontur/disasterninja/service/AnalyticsService.java b/src/main/java/io/kontur/disasterninja/service/AnalyticsService.java index 86cbcaea..8d8c822d 100644 --- a/src/main/java/io/kontur/disasterninja/service/AnalyticsService.java +++ b/src/main/java/io/kontur/disasterninja/service/AnalyticsService.java @@ -83,7 +83,9 @@ private List organizeResponse(List functions, Li switch (function.getFunction()) { case "maxX" -> combinedData.setPrefix("Maximum"); + case "minX" -> combinedData.setPrefix("Minimum"); case "sumX" -> combinedData.setPrefix("Total"); + case "avgX" -> combinedData.setPrefix("Average"); case "sumXWhereNoY" -> combinedData.setPrefix("Total with no"); case "percentageXWhereNoY" -> combinedData.setPrefix("Percent with no"); default -> throw new WebApplicationException("Not a proper function name found", HttpStatus.INTERNAL_SERVER_ERROR);