Add remaining fields for query

This commit is contained in:
2020-07-03 10:18:13 -04:00
parent d107cc8e8b
commit 7ad10d6ddc
5 changed files with 118 additions and 19 deletions
+22 -3
View File
@@ -6,6 +6,8 @@ namespace LeafWeb.WebCms.Models
{
public class LeafDataQuery
{
private const string FloatingPointRegex = @"^([-+]?[0-9]*\.[0-9]+|[0-9]+)$";
/// <summary>Query</summary>
[Display(Name = "Search", Description = "General query")]
public string q { get; set; }
@@ -37,11 +39,25 @@ namespace LeafWeb.WebCms.Models
public string lonr { get; set; }
/// <summary>Sample CO2 concentration</summary>
//[ParseInfo(17, units: "umol/mol")]
[Display(Name = "CO2 response curves")]
[RegularExpression(@"^([0-9]*\.[0-9]+|[0-9]+)$", ErrorMessage = "Value is numeric")]
[Display(Name = "CO2 response curves (CO2S)")]
[RegularExpression(FloatingPointRegex, ErrorMessage = "Must be numeric")]
public string co2s { get; set; }
/// <summary> PAR measured by the in-chamber quantum sensor</summary>
[Display(Name = "Light response curves (PARi)")]
[RegularExpression(FloatingPointRegex, ErrorMessage = "Must be numeric")]
public string pari { get; set; }
/// <summary> temperature of leaf thermocouple</summary>
[Display(Name = "Temperature response curves (Tleaf)")]
[RegularExpression(FloatingPointRegex, ErrorMessage = "Must be numeric")]
public string tleaf { get; set; }
/// <summary> DeltaF/Fm, the fraction of absorbed PSII photons that are used in photochemistry</summary>
[Display(Name = "Fluorometry measurements (PhiPS2)")]
[RegularExpression(FloatingPointRegex, ErrorMessage = "Must be numeric")]
public string phips2 { get; set; }
public bool HasExtendedParameters =>
!(
string.IsNullOrEmpty(siteid)
@@ -51,6 +67,9 @@ namespace LeafWeb.WebCms.Models
&& string.IsNullOrEmpty(lon)
&& string.IsNullOrEmpty(lonr)
&& string.IsNullOrEmpty(co2s)
&& string.IsNullOrEmpty(pari)
&& string.IsNullOrEmpty(tleaf)
&& string.IsNullOrEmpty(phips2)
);
}
}
+8 -1
View File
@@ -6,9 +6,16 @@ namespace LeafWeb.WebCms.Models
public class LeafInputDataCurveViewModel
{
/// <summary>Sample CO2 concentration</summary>
//[ParseInfo(17, units: "umol/mol")]
public double? CO2S { get; set; }
/// <summary> PAR measured by the in-chamber quantum sensor</summary>
public double? PARi { get; set; }
/// <summary>temperature of leaf thermocouple</summary>
public double? Tleaf { get; set; }
/// <summary>DeltaF/Fm, the fraction of absorbed PSII photons that are used in photochemistry</summary>
public double? PhiPS2 { get; set; }
public LeafInputDataCurveViewModel() {}
public LeafInputDataCurveViewModel(LeafInputDataCurve leafInputDataCurve)