public RequestsViewModel get_requests() { return(new RequestsViewModel { Table = new RequestTable(_cache.RecentReports()) }); }
public RequestCacheModel Build() { return(new RequestCacheModel { Requests = _requestCache .RecentReports() .Select(r => new RecordedRequestModel { Id = r.Id, Url = r.Url, Time = r.Time, FormData = r.FormData, ExecutionTime = r.ExecutionTime, Steps = r.Steps }) }); }
public RequestDetailsModel Get(RecordedRequestRequestModel request) { var report = _requestCache.RecentReports().SingleOrDefault(r => r.Id == request.Id); if (report == null) { throw new UnknownObjectException(request.Id); } var model = new RequestDetailsModel { Report = report, Root = Gather(report) }; return(model); }
public RequestDetailsModel Execute(RecordedRequestRequestModel request) { var report = _requestCache.RecentReports().SingleOrDefault(r => r.Id == request.Id); if (report == null) { throw new ArgumentException("{0} does not exist".ToFormat(request.Id)); } var model = new RequestDetailsModel { Report = report, Root = Gather(report), Chain = _chainVisualizer.VisualizerFor(report.BehaviorId), Logs = report .Steps .Where(s => s.Details is RequestLogEntry) .Select(s => s.Details) .Cast <RequestLogEntry>() .ToList() }; return(model); }