public async Task <DataTablesResponseDto> SearchInfrastructureLogsDataTable() { var dataTablesRequestDto = new DataTablesRequestDto(Request.Query); var logResults = await _infrastructureLogService.SearchLogsAsync(dataTablesRequestDto.Start, dataTablesRequestDto.Length, dataTablesRequestDto.SearchValue, dataTablesRequestDto.SortDirection, dataTablesRequestDto.SortColumnName, dataTablesRequestDto.LogLevels).ConfigureAwait(false); var logResultDto = new DataTablesResponseDto { Draw = dataTablesRequestDto.Draw, RecordsTotal = logResults.TotalLogCount, RecordsFiltered = logResults.RecordsFiltered, Data = logResults.FilteredLogs.Select(x => x.ToDataTablesDto()).ToArray() }; return(logResultDto); }
public async Task <IActionResult> SearchInfrastructureLogs(int start = 0, int length = 10, string searchValue = "", SortDirection sortDirection = SortDirection.Descending, InfrastructureLogSortColumnName sortColumnName = InfrastructureLogSortColumnName.CreatedDate, LogLevel[] logLevels = null) { return(Ok(await _infrastructureLogService.SearchLogsAsync(start, length, searchValue, sortDirection, sortColumnName, logLevels).ConfigureAwait(false))); }