Loading src/main/java/org/etsi/osl/tmf/metrics/api/MetricsApiController.java +3 −3 Changes for src/main/java/org/etsi/osl/tmf/metrics/api/MetricsApiController.java: 3 added lines, 3 removed lines. Original line number Original line Diff line number Diff line Loading @@ -55,12 +55,12 @@ public class MetricsApiController implements MetricsApi { }); }); // Create aggregation items // Create aggregation items List<GroupByItem> groupByStateList = fullStateMap.entrySet().stream() List<ResourcesGroupByStateItem> groupByStateList = fullStateMap.entrySet().stream() .map(entry -> new GroupByItem(entry.getKey(), entry.getValue())) .map(entry -> new ResourcesGroupByStateItem(ResourceStatusType.valueOf(entry.getKey()), entry.getValue())) .toList(); .toList(); // Build response structure using models // Build response structure using models GroupByStateAggregations aggregations = new GroupByStateAggregations(groupByStateList); ResourcesGroupByStateAggregations aggregations = new ResourcesGroupByStateAggregations(groupByStateList); int total = fullStateMap.values().stream().mapToInt(Integer::intValue).sum(); int total = fullStateMap.values().stream().mapToInt(Integer::intValue).sum(); Resources services = new Resources(total, aggregations); Resources services = new Resources(total, aggregations); ResourcesGroupByState response = new ResourcesGroupByState(services); ResourcesGroupByState response = new ResourcesGroupByState(services); Loading Loading
src/main/java/org/etsi/osl/tmf/metrics/api/MetricsApiController.java +3 −3 Changes for src/main/java/org/etsi/osl/tmf/metrics/api/MetricsApiController.java: 3 added lines, 3 removed lines. Original line number Original line Diff line number Diff line Loading @@ -55,12 +55,12 @@ public class MetricsApiController implements MetricsApi { }); }); // Create aggregation items // Create aggregation items List<GroupByItem> groupByStateList = fullStateMap.entrySet().stream() List<ResourcesGroupByStateItem> groupByStateList = fullStateMap.entrySet().stream() .map(entry -> new GroupByItem(entry.getKey(), entry.getValue())) .map(entry -> new ResourcesGroupByStateItem(ResourceStatusType.valueOf(entry.getKey()), entry.getValue())) .toList(); .toList(); // Build response structure using models // Build response structure using models GroupByStateAggregations aggregations = new GroupByStateAggregations(groupByStateList); ResourcesGroupByStateAggregations aggregations = new ResourcesGroupByStateAggregations(groupByStateList); int total = fullStateMap.values().stream().mapToInt(Integer::intValue).sum(); int total = fullStateMap.values().stream().mapToInt(Integer::intValue).sum(); Resources services = new Resources(total, aggregations); Resources services = new Resources(total, aggregations); ResourcesGroupByState response = new ResourcesGroupByState(services); ResourcesGroupByState response = new ResourcesGroupByState(services); Loading