Commit 0cd79aee authored by Matija Obreza's avatar Matija Obreza

Merge branch 'filter-by-climate-data'

* filter-by-climate-data:
  Filtering by climate data
parents ed94c557 0d4f8ccf
......@@ -60,7 +60,8 @@
},
"f": {
"dateSearch": "Date search",
"fromIncluding": "From including",
"fromIncluding": "At least (min)",
"toIncluding": "At most (max)",
"lastModifiedDate": "Last modified date",
"textSearch": "Text search",
"keyword": "Keyword search"
......
......@@ -357,7 +357,8 @@
"available": "Available for distribution",
"mlsStatus": "Included in MLS",
"sgsv": "Backed up in SGSV",
"images": "Accessions with images"
"images": "Accessions with images",
"climate": "Climate at origin"
},
"p": {
"display": {
......@@ -401,6 +402,7 @@
"andMore": "And {{otherMore}} more",
"kml": "KML"
}
}
},
"tab": {
......@@ -408,6 +410,27 @@
"overview": "Overview",
"map": "Map"
},
"climate": {
"bio1": "Annual Mean Temperature [°C]",
"bio2": "Mean Diurnal Range (Mean of monthly (max temp - min temp))",
"bio3": "Isothermality (BIO2/BIO7) (* 100)",
"bio4": "Temperature Seasonality (standard deviation *100)",
"bio5": "Max Temperature of Warmest Month [°C]",
"bio6": "Min Temperature of Coldest Month [°C]",
"bio7": "Temperature Annual Range (BIO5-BIO6) [°C]",
"bio8": "Mean Temperature of Wettest Quarter [°C]",
"bio9": "Mean Temperature of Driest Quarter [°C]",
"bio10": "Mean Temperature of Warmest Quarter [°C]",
"bio11": "Mean Temperature of Coldest Quarter [°C]",
"bio12": "Annual Precipitation [mm]",
"bio13": "Precipitation of Wettest Month [mm]",
"bio14": "Precipitation of Driest Month [mm]",
"bio15": "Precipitation Seasonality (Coefficient of Variation)",
"bio16": "Precipitation of Wettest Quarter [mm]",
"bio17": "Precipitation of Driest Quarter [mm]",
"bio18": "Precipitation of Warmest Quarter [mm]",
"bio19": "Precipitation of Coldest Quarter [mm]"
},
"common": {
"modelName": "Accession",
"modelName_plural": "Accessions",
......
......@@ -22,7 +22,8 @@
"available": "Available for distribution",
"mlsStatus": "Included in MLS",
"sgsv": "Backed up in SGSV",
"images": "Accessions with images"
"images": "Accessions with images",
"climate": "Climate at origin"
},
"p": {
"display": {
......@@ -66,6 +67,7 @@
"andMore": "And {{otherMore}} more",
"kml": "KML"
}
}
},
"tab": {
......@@ -73,6 +75,27 @@
"overview": "Overview",
"map": "Map"
},
"climate": {
"bio1": "Annual Mean Temperature [°C]",
"bio2": "Mean Diurnal Range (Mean of monthly (max temp - min temp))",
"bio3": "Isothermality (BIO2/BIO7) (* 100)",
"bio4": "Temperature Seasonality (standard deviation *100)",
"bio5": "Max Temperature of Warmest Month [°C]",
"bio6": "Min Temperature of Coldest Month [°C]",
"bio7": "Temperature Annual Range (BIO5-BIO6) [°C]",
"bio8": "Mean Temperature of Wettest Quarter [°C]",
"bio9": "Mean Temperature of Driest Quarter [°C]",
"bio10": "Mean Temperature of Warmest Quarter [°C]",
"bio11": "Mean Temperature of Coldest Quarter [°C]",
"bio12": "Annual Precipitation [mm]",
"bio13": "Precipitation of Wettest Month [mm]",
"bio14": "Precipitation of Driest Month [mm]",
"bio15": "Precipitation Seasonality (Coefficient of Variation)",
"bio16": "Precipitation of Wettest Quarter [mm]",
"bio17": "Precipitation of Driest Quarter [mm]",
"bio18": "Precipitation of Warmest Quarter [mm]",
"bio19": "Precipitation of Coldest Quarter [mm]"
},
"common": {
"modelName": "Accession",
"modelName_plural": "Accessions",
......
......@@ -43,6 +43,27 @@ const AccessionFilters = ({handleSubmit, initialValues, initialize, t, ...other}
<NumberFilter name="geo.longitude" label={ t('geo.common.longitude') } />
<NumberFilter name="geo.elevation" label={ t('accessions.public.f.elevation') } />
</CollapsibleComponentSearch>
<CollapsibleComponentSearch title={ t('accessions.public.f.climate') }>
<NumberFilter name="geo.climate.bio1" label={ t('accessions.climate.bio1') } />
<NumberFilter name="geo.climate.bio2" label={ t('accessions.climate.bio2') } />
<NumberFilter name="geo.climate.bio3" label={ t('accessions.climate.bio3') } />
<NumberFilter name="geo.climate.bio4" label={ t('accessions.climate.bio4') } />
<NumberFilter name="geo.climate.bio5" label={ t('accessions.climate.bio5') } />
<NumberFilter name="geo.climate.bio6" label={ t('accessions.climate.bio6') } />
<NumberFilter name="geo.climate.bio7" label={ t('accessions.climate.bio7') } />
<NumberFilter name="geo.climate.bio8" label={ t('accessions.climate.bio8') } />
<NumberFilter name="geo.climate.bio9" label={ t('accessions.climate.bio9') } />
<NumberFilter name="geo.climate.bio10" label={ t('accessions.climate.bio10') } />
<NumberFilter name="geo.climate.bio11" label={ t('accessions.climate.bio11') } />
<NumberFilter name="geo.climate.bio12" label={ t('accessions.climate.bio12') } />
<NumberFilter name="geo.climate.bio13" label={ t('accessions.climate.bio13') } />
<NumberFilter name="geo.climate.bio14" label={ t('accessions.climate.bio14') } />
<NumberFilter name="geo.climate.bio15" label={ t('accessions.climate.bio15') } />
<NumberFilter name="geo.climate.bio16" label={ t('accessions.climate.bio16') } />
<NumberFilter name="geo.climate.bio17" label={ t('accessions.climate.bio17') } />
<NumberFilter name="geo.climate.bio18" label={ t('accessions.climate.bio18') } />
<NumberFilter name="geo.climate.bio19" label={ t('accessions.climate.bio19') } />
</CollapsibleComponentSearch>
<CollapsibleComponentSearch title={ t('accessions.common.sampStat') }>
<StringArrFilter name="sampStat" options={ Accession.SAMPSTAT } />
</CollapsibleComponentSearch>
......
......@@ -4,6 +4,7 @@ import InstituteFilter from 'model/genesys/InstituteFilter';
import NumberFilter from 'model/filter/NumberFilter';
import StringFilter from 'model/filter/StringFilter';
import TaxonomyFilter from 'model/genesys/TaxonomyFilter';
import ClimateFilter from 'model/genesys/ClimateFilter';
/*
* Defined in Swagger as '#/definitions/AccessionFilter'
......@@ -18,7 +19,7 @@ class AccessionFilter {
public cropName: string;
public doi: string[];
public elevation: NumberFilter;
public geo: { latitude: NumberFilter, longitude: NumberFilter };
public geo: { latitude: NumberFilter, longitude: NumberFilter, climate?: ClimateFilter };
public historic: boolean;
public holder: InstituteFilter;
public id: number[];
......
import TileClimate from 'model/genesys/TileClimate';
/*
* Defined in Swagger as '#/definitions/AccessionGeo'
*/
class AccessionGeo {
public datum: string;
public elevation: number;
public id: number;
public version: number;
public datum: string;
public latitude: number;
public longitude: number;
public method: string;
public tileIndex: number;
public uncertainty: number;
public version: number;
public elevation: number;
public tileIndex: number;
public climate: TileClimate;
}
......
import NumberFilter from 'model/filter/NumberFilter';
/*
* Defined in Swagger as '#/definitions/ClimateFilter'
*/
class ClimateFilter {
public tileIndex?: number[];
public alt?: NumberFilter;
public bio1?: NumberFilter;
public bio2?: NumberFilter;
public bio3?: NumberFilter;
public bio4?: NumberFilter;
public bio5?: NumberFilter;
public bio6?: NumberFilter;
public bio7?: NumberFilter;
public bio8?: NumberFilter;
public bio9?: NumberFilter;
public bio10?: NumberFilter;
public bio11?: NumberFilter;
public bio12?: NumberFilter;
public bio13?: NumberFilter;
public bio14?: NumberFilter;
public bio15?: NumberFilter;
public prec1?: NumberFilter;
public prec2?: NumberFilter;
public prec3?: NumberFilter;
public prec4?: NumberFilter;
public prec5?: NumberFilter;
public prec6?: NumberFilter;
public prec7?: NumberFilter;
public prec8?: NumberFilter;
public prec9?: NumberFilter;
public prec10?: NumberFilter;
public prec11?: NumberFilter;
public prec12?: NumberFilter;
public tmax1?: NumberFilter;
public tmax2?: NumberFilter;
public tmax3?: NumberFilter;
public tmax4?: NumberFilter;
public tmax5?: NumberFilter;
public tmax6?: NumberFilter;
public tmax7?: NumberFilter;
public tmax8?: NumberFilter;
public tmax9?: NumberFilter;
public tmax10?: NumberFilter;
public tmax11?: NumberFilter;
public tmax12?: NumberFilter;
public tmean1?: NumberFilter;
public tmean2?: NumberFilter;
public tmean3?: NumberFilter;
public tmean4?: NumberFilter;
public tmean5?: NumberFilter;
public tmean6?: NumberFilter;
public tmean7?: NumberFilter;
public tmean8?: NumberFilter;
public tmean9?: NumberFilter;
public tmean10?: NumberFilter;
public tmean11?: NumberFilter;
public tmean12?: NumberFilter;
public tmin1?: NumberFilter;
public tmin2?: NumberFilter;
public tmin3?: NumberFilter;
public tmin4?: NumberFilter;
public tmin5?: NumberFilter;
public tmin6?: NumberFilter;
public tmin7?: NumberFilter;
public tmin8?: NumberFilter;
public tmin9?: NumberFilter;
public tmin10?: NumberFilter;
public tmin11?: NumberFilter;
public tmin12?: NumberFilter;
}
export default ClimateFilter;
/*
* Defined in Swagger as '#/definitions/TileClimate'
*/
class TileClimate {
public tileIndex: number;
public alt: number;
public bio1: number;
public bio2: number;
public bio3: number;
public bio4: number;
public bio5: number;
public bio6: number;
public bio7: number;
public bio8: number;
public bio9: number;
public bio10: number;
public bio11: number;
public bio12: number;
public bio13: number;
public bio14: number;
public bio15: number;
public prec1: number;
public prec2: number;
public prec3: number;
public prec4: number;
public prec5: number;
public prec6: number;
public prec7: number;
public prec8: number;
public prec9: number;
public prec10: number;
public prec11: number;
public prec12: number;
public tmax1: number;
public tmax2: number;
public tmax3: number;
public tmax4: number;
public tmax5: number;
public tmax6: number;
public tmax7: number;
public tmax8: number;
public tmax9: number;
public tmax10: number;
public tmax11: number;
public tmax12: number;
public tmean1: number;
public tmean2: number;
public tmean3: number;
public tmean4: number;
public tmean5: number;
public tmean6: number;
public tmean7: number;
public tmean8: number;
public tmean9: number;
public tmean10: number;
public tmean11: number;
public tmean12: number;
public tmin1: number;
public tmin2: number;
public tmin3: number;
public tmin4: number;
public tmin5: number;
public tmin6: number;
public tmin7: number;
public tmin8: number;
public tmin9: number;
public tmin10: number;
public tmin11: number;
public tmin12: number;
}
export default TileClimate;
......@@ -65,6 +65,7 @@ class NumberFilterInternal extends React.Component<INumberFilterInternal, any> {
<div>
<TextField
style={ {width: '50%'} }
InputLabelProps={ { shrink: true } }
label={ t(label) }
value={ this.state.textA }
placeholder={ t('common:f.fromIncluding') }
......@@ -72,9 +73,10 @@ class NumberFilterInternal extends React.Component<INumberFilterInternal, any> {
/>
<TextField
style={ {width: '50%'} }
label={ t(label) }
InputLabelProps={ { shrink: true } }
label=" "
value={ this.state.textB }
placeholder={ t('common:f.fromIncluding') }
placeholder={ t('common:f.toIncluding') }
onChange={ this.textBChange }
/>
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment