Add output file type, collect all files

This commit is contained in:
2016-05-18 13:05:24 -04:00
parent 4343f08733
commit 77ae03534e
19 changed files with 288 additions and 48 deletions
@@ -15,7 +15,7 @@ namespace LeafWeb.Web.ViewModels.Results
public string LeafInputPhotosynthesisType { get; set; }
public bool HasLeafChart { get; set; }
public string CurrentStatus { get; set; }
public string[] ErrorMessages { get; set; }
//public string[] ErrorMessages { get; set; }
//public string[] LeafOutputFilenames { get; set; }
//public bool HasLeafChartOutputFile { get; set; }
@@ -41,14 +41,15 @@ namespace LeafWeb.Web.ViewModels.Results
.ForMember(dest => dest.LeafInputIdentifier, opt => opt.MapFrom(src => src.Identifier))
.ForMember(dest => dest.LeafInputSiteId, opt => opt.MapFrom(src => src.SiteId))
.ForMember(dest => dest.LeafInputPhotosynthesisType, opt => opt.MapFrom(src => src.PhotosynthesisType.Name))
.ForMember(dest => dest.ErrorMessages,
opt => opt.ResolveUsing(
src =>
src.StatusHistory?
.Where(sh => sh.Status == LeafInputStatusType.Exception)
.Select(sh => sh.Description)
.ToArray()
?? new string[] {}));
//.ForMember(dest => dest.ErrorMessages,
// opt => opt.ResolveUsing(
// src =>
// src.StatusHistory?
// .Where(sh => sh.Status == LeafInputStatusType.Exception)
// .Select(sh => sh.Description)
// .ToArray()
// ?? new string[] {}))
;
});
Mapper = config.CreateMapper();
}