Search for both LeafInput and LeafInputData
This commit is contained in:
@@ -5,7 +5,11 @@ namespace LeafWeb.WebCms.Models
|
||||
{
|
||||
public class LeafDataQuery
|
||||
{
|
||||
private const string FloatingPointRegex = @"^([-+]?[0-9]*\.[0-9]+|[0-9]+)$";
|
||||
// https://3widgets.com/
|
||||
private const string NumberRange_0_to_2000_Regex = @"^(\d|[1-9]\d{1,2}|1\d{3}|2000)(\.[0-9]+)?$";
|
||||
private const string NumberRange_0_to_3000_Regex = @"^(\d|[1-9]\d{1,2}|[12]\d{3}|3000)(\.[0-9]+)?$";
|
||||
private const string NumberRange_Neg20_to_50_Regex = @"^(-[1-9]|-1\d|-20|\d|[1-4]\d|50)(\.[0-9]+)?$";
|
||||
private const string NumberRange_0_to_1_Regex = @"^(0?\.[0-9]+)|(0|1)?$";
|
||||
|
||||
/// <summary>Query</summary>
|
||||
[Display(Name = "Search", Description = "General query")]
|
||||
@@ -39,22 +43,22 @@ namespace LeafWeb.WebCms.Models
|
||||
|
||||
/// <summary>Sample CO2 concentration</summary>
|
||||
[Display(Name = "CO2 response curves (CO2S)")]
|
||||
[RegularExpression(FloatingPointRegex, ErrorMessage = "Must be numeric")]
|
||||
[RegularExpression(NumberRange_0_to_2000_Regex, ErrorMessage = "Must be numeric, 0 to 2000")]
|
||||
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")]
|
||||
[RegularExpression(NumberRange_0_to_3000_Regex, ErrorMessage = "Must be numeric, 0 to 3000")]
|
||||
public string pari { get; set; }
|
||||
|
||||
/// <summary> temperature of leaf thermocouple</summary>
|
||||
[Display(Name = "Temperature response curves (Tleaf)")]
|
||||
[RegularExpression(FloatingPointRegex, ErrorMessage = "Must be numeric")]
|
||||
[RegularExpression(NumberRange_Neg20_to_50_Regex, ErrorMessage = "Must be numeric, -20 to 50")]
|
||||
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")]
|
||||
[RegularExpression(NumberRange_0_to_1_Regex, ErrorMessage = "Must be numeric, 0 to 1")]
|
||||
public string phips2 { get; set; }
|
||||
|
||||
[Display(Name = "Show Only Successfully Completed")]
|
||||
@@ -75,6 +79,15 @@ namespace LeafWeb.WebCms.Models
|
||||
|
||||
public bool OnlyUserData => !string.IsNullOrEmpty(usr);
|
||||
|
||||
[Display(Name = "Result Type")]
|
||||
//[UIHint("Radio")]
|
||||
public string dsp { get; set; }
|
||||
|
||||
public const string LeafInputDataSearchParam = "data";
|
||||
public bool ShowLeafInputData => dsp == LeafInputDataSearchParam;
|
||||
|
||||
public const string LeafInputSearchParam = "set";
|
||||
public bool ShowLeafInput => dsp == LeafInputSearchParam;
|
||||
|
||||
public bool HasExtendedParameters =>
|
||||
!(
|
||||
|
||||
Reference in New Issue
Block a user