@@ -61,7 +61,10 @@ public class GlobalSearchStatisticsResponse {
|
||||
@JsonProperty("duration_seconds")
|
||||
private Long durationSeconds;
|
||||
|
||||
public static SearchStatDto fromEntity(GlobalSearchTask task, long violationsCount) {
|
||||
@JsonProperty("file_ids")
|
||||
private List<String> fileIds;
|
||||
|
||||
public static SearchStatDto fromEntity(GlobalSearchTask task, long violationsCount, List<String> fileIds ) {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
Long duration = null;
|
||||
@@ -75,6 +78,7 @@ public class GlobalSearchStatisticsResponse {
|
||||
.status(task.getStatus())
|
||||
.totalFiles(task.getTotalFiles())
|
||||
.violationsFound(violationsCount)
|
||||
.fileIds(fileIds)
|
||||
.createdAt(task.getCreatedAt() != null ? task.getCreatedAt().format(formatter) : null)
|
||||
.durationSeconds(duration)
|
||||
.build();
|
||||
|
||||
Reference in New Issue
Block a user