use of com.epam.ta.reportportal.entity.widget.content.ChartStatisticsContent in project service-api by reportportal.
the class LaunchesComparisonContentLoader method loadContent.
@Override
public Map<String, ?> loadContent(List<String> contentFields, Map<Filter, Sort> filterSortMapping, WidgetOptions widgetOptions, int limit) {
Filter filter = GROUP_FILTERS.apply(filterSortMapping.keySet());
Sort sort = Sort.by(Sort.Order.desc(CRITERIA_START_TIME), Sort.Order.desc(CRITERIA_LAUNCH_NUMBER));
List<ChartStatisticsContent> result = widgetContentRepository.launchesComparisonStatistics(filter, contentFields, sort, limit);
if (result.isEmpty()) {
return emptyMap();
} else {
Collections.reverse(result);
return singletonMap(RESULT, result);
}
}
Aggregations