Skip to content
Snippets Groups Projects
Commit 3c75a8ea authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Added chart, field memory (locally on unit) and other improvements

parent 6cf0792b
Branches
No related tags found
No related merge requests found
...@@ -334,6 +334,11 @@ function getJSON(ambiguousVar) ...@@ -334,6 +334,11 @@ function getJSON(ambiguousVar)
} }
} }
function isDictEmpty(v){
return Object.keys(v).length == 0;
}
function isDict(v){ function isDict(v){
return typeof v==='object' && v!==null && !(v instanceof Array) && !(v instanceof Date); return typeof v==='object' && v!==null && !(v instanceof Array) && !(v instanceof Date);
} }
......
No preview for this file type
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-23 14:14+0200\n" "POT-Creation-Date: 2018-05-02 11:21+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -28,6 +28,7 @@ msgid "Background data for the barley net blotch model" ...@@ -28,6 +28,7 @@ msgid "Background data for the barley net blotch model"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/barleynetblotchform.html:49 #: templates/cerealblotchmodels/barleynetblotchform.html:49
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:45
#: templates/cerealblotchmodels/wheatleafblotchform.html:49 #: templates/cerealblotchmodels/wheatleafblotchform.html:49
msgid "Weather station" msgid "Weather station"
msgstr "" msgstr ""
...@@ -138,13 +139,13 @@ msgid "Disease" ...@@ -138,13 +139,13 @@ msgid "Disease"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/barleynetblotchform.html:206 #: templates/cerealblotchmodels/barleynetblotchform.html:206
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:333 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:382
#: templates/cerealblotchmodels/wheatleafblotchform.html:208 #: templates/cerealblotchmodels/wheatleafblotchform.html:208
msgid "Time" msgid "Time"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/barleynetblotchform.html:214 #: templates/cerealblotchmodels/barleynetblotchform.html:214
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:341 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:389
#: templates/cerealblotchmodels/wheatleafblotchform.html:216 #: templates/cerealblotchmodels/wheatleafblotchform.html:216
msgid "Warning status" msgid "Warning status"
msgstr "" msgstr ""
...@@ -160,12 +161,13 @@ msgid "Disease value" ...@@ -160,12 +161,13 @@ msgid "Disease value"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/barleynetblotchform.html:267 #: templates/cerealblotchmodels/barleynetblotchform.html:267
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:438
#: templates/cerealblotchmodels/wheatleafblotchform.html:269 #: templates/cerealblotchmodels/wheatleafblotchform.html:269
msgid "Barley net blotch development" msgid "Barley net blotch development"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/barleynetblotchform.html:279 #: templates/cerealblotchmodels/barleynetblotchform.html:279
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:263 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:308
#: templates/cerealblotchmodels/wheatleafblotchform.html:281 #: templates/cerealblotchmodels/wheatleafblotchform.html:281
msgid "Select weather station" msgid "Select weather station"
msgstr "" msgstr ""
...@@ -203,10 +205,6 @@ msgstr "" ...@@ -203,10 +205,6 @@ msgstr ""
msgid "Please select" msgid "Please select"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:45
msgid "WeatherStation"
msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:53 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:53
msgid "Sprayings" msgid "Sprayings"
msgstr "" msgstr ""
...@@ -273,45 +271,58 @@ msgid "Number of consecutive 'humid hours'" ...@@ -273,45 +271,58 @@ msgid "Number of consecutive 'humid hours'"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:138 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:138
msgid "Spraying protection period" msgid "Spraying protection days"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:143 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:143
msgid "Leaf life time (days)" msgid "Leaf life time (days)"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:303 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:350
msgid "The model is running, please wait" msgid "The model is running, please wait"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:320 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:369
msgid "Temperature, hourly mean" msgid "Leaf wetness, hourly"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:321 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:370
msgid "Rain, hourly" msgid "Rain, hourly"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:322 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:371
msgid "Relative humidity, hourly mean" msgid "Relative humidity, hourly mean"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:323 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:372
msgid "Leaf wetness, hourly" msgid "Humid hour (yes/no)"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:324 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:373
msgid "Humid period hour" msgid "Humid period hour"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:325 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:374
msgid "Humid hour (yes/no)" msgid "Humid hour sum"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:326 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:375
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:433
msgid "Humid period hour outside protection period" msgid "Humid period hour outside protection period"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:429
msgid "Hours"
msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:434
msgid "Threshold humid period"
msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:435
msgid "Spraying protection period"
msgstr ""
#: templates/cerealblotchmodels/wheatleafblotchform.html:25 #: templates/cerealblotchmodels/wheatleafblotchform.html:25
#: templates/cerealblotchmodels/wheatleafblotchform.html:34 #: templates/cerealblotchmodels/wheatleafblotchform.html:34
msgid "Wheat leaf blotch" msgid "Wheat leaf blotch"
......
No preview for this file type
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-23 14:14+0200\n" "POT-Creation-Date: 2018-05-02 11:21+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -28,6 +28,7 @@ msgid "Background data for the barley net blotch model" ...@@ -28,6 +28,7 @@ msgid "Background data for the barley net blotch model"
msgstr "Bakgrunnsdata for byggbrunflekkmodellen" msgstr "Bakgrunnsdata for byggbrunflekkmodellen"
#: templates/cerealblotchmodels/barleynetblotchform.html:49 #: templates/cerealblotchmodels/barleynetblotchform.html:49
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:45
#: templates/cerealblotchmodels/wheatleafblotchform.html:49 #: templates/cerealblotchmodels/wheatleafblotchform.html:49
msgid "Weather station" msgid "Weather station"
msgstr "Målestasjon" msgstr "Målestasjon"
...@@ -138,13 +139,13 @@ msgid "Disease" ...@@ -138,13 +139,13 @@ msgid "Disease"
msgstr "Sykdom" msgstr "Sykdom"
#: templates/cerealblotchmodels/barleynetblotchform.html:206 #: templates/cerealblotchmodels/barleynetblotchform.html:206
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:333 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:382
#: templates/cerealblotchmodels/wheatleafblotchform.html:208 #: templates/cerealblotchmodels/wheatleafblotchform.html:208
msgid "Time" msgid "Time"
msgstr "Tid" msgstr "Tid"
#: templates/cerealblotchmodels/barleynetblotchform.html:214 #: templates/cerealblotchmodels/barleynetblotchform.html:214
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:341 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:389
#: templates/cerealblotchmodels/wheatleafblotchform.html:216 #: templates/cerealblotchmodels/wheatleafblotchform.html:216
msgid "Warning status" msgid "Warning status"
msgstr "Varselstatus" msgstr "Varselstatus"
...@@ -160,12 +161,13 @@ msgid "Disease value" ...@@ -160,12 +161,13 @@ msgid "Disease value"
msgstr "Sykdomsverdi" msgstr "Sykdomsverdi"
#: templates/cerealblotchmodels/barleynetblotchform.html:267 #: templates/cerealblotchmodels/barleynetblotchform.html:267
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:438
#: templates/cerealblotchmodels/wheatleafblotchform.html:269 #: templates/cerealblotchmodels/wheatleafblotchform.html:269
msgid "Barley net blotch development" msgid "Barley net blotch development"
msgstr "Utvikling av byggbrunflekk" msgstr "Utvikling av byggbrunflekk"
#: templates/cerealblotchmodels/barleynetblotchform.html:279 #: templates/cerealblotchmodels/barleynetblotchform.html:279
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:263 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:308
#: templates/cerealblotchmodels/wheatleafblotchform.html:281 #: templates/cerealblotchmodels/wheatleafblotchform.html:281
msgid "Select weather station" msgid "Select weather station"
msgstr "Velg målestasjon" msgstr "Velg målestasjon"
...@@ -203,21 +205,14 @@ msgstr "Land" ...@@ -203,21 +205,14 @@ msgstr "Land"
msgid "Please select" msgid "Please select"
msgstr "Vennligst velg" msgstr "Vennligst velg"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:45
#, fuzzy
msgid "WeatherStation"
msgstr "Målestasjon"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:53 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:53
#, fuzzy
msgid "Sprayings" msgid "Sprayings"
msgstr "Sprøytedato" msgstr "Sprøytinger"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:55 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:55
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:60 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:60
#, fuzzy
msgid "Spraying 1" msgid "Spraying 1"
msgstr "Sprøytedato" msgstr "Sprøytedato 1"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:70 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:70
msgid "Phenology" msgid "Phenology"
...@@ -245,7 +240,7 @@ msgstr "Alle kjerner fullt strukket ut (vs 75)" ...@@ -245,7 +240,7 @@ msgstr "Alle kjerner fullt strukket ut (vs 75)"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:100 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:100
msgid "Threshold values for 'humid hour'" msgid "Threshold values for 'humid hour'"
msgstr "Terskelverdier for \"fuktig time\"" msgstr "Terskelverdier for fuktig time"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:102 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:102
msgid "Relative humidity" msgid "Relative humidity"
...@@ -256,9 +251,8 @@ msgid "Leaf wetness (min/hour)" ...@@ -256,9 +251,8 @@ msgid "Leaf wetness (min/hour)"
msgstr "Bladfukt (min/t)" msgstr "Bladfukt (min/t)"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:112 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:112
#, fuzzy
msgid "Precipitation" msgid "Precipitation"
msgstr "Plantevernmiddel" msgstr "Nedbør"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:117 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:117
msgid "Sliding hours past (hours)" msgid "Sliding hours past (hours)"
...@@ -277,55 +271,64 @@ msgid "Number of consecutive 'humid hours'" ...@@ -277,55 +271,64 @@ msgid "Number of consecutive 'humid hours'"
msgstr "Antall sammenhengende \"fuktige timer\"" msgstr "Antall sammenhengende \"fuktige timer\""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:138 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:138
msgid "Spraying protection period" msgid "Spraying protection days"
msgstr "Antall dager beskyttelse etter sprøyting" msgstr "Antall dager beskyttelse etter sprøyting"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:143 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:143
msgid "Leaf life time (days)" msgid "Leaf life time (days)"
msgstr "Levetid for blad (dager)" msgstr "Levetid for blad (dager)"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:303 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:350
#, fuzzy
msgid "The model is running, please wait" msgid "The model is running, please wait"
msgstr "Modellen kjører, vennligst vent" msgstr "Modellen kjører, vennligst vent"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:320 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:369
#, fuzzy msgid "Leaf wetness, hourly"
msgid "Temperature, hourly mean" msgstr "Bladfukt, timesverdi"
msgstr "Temperatur, døgngjennomsnitt"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:321 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:370
#, fuzzy
msgid "Rain, hourly" msgid "Rain, hourly"
msgstr "Regn, daglig" msgstr "Regn, timeverdi"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:322 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:371
msgid "Relative humidity, hourly mean" msgid "Relative humidity, hourly mean"
msgstr "Relativ luftfuktighet, timesgjennomsnitt" msgstr "Relativ luftfuktighet, timesgjennomsnitt"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:323 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:372
msgid "Leaf wetness, hourly" msgid "Humid hour (yes/no)"
msgstr "Bladfukt, timesverdi" msgstr "Fuktig time (ja/nei)"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:324 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:373
msgid "Humid period hour" msgid "Humid period hour"
msgstr "Time nr i fuktig periode" msgstr "Time nr i fuktig periode"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:325 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:374
msgid "Humid hour (yes/no)" msgid "Humid hour sum"
msgstr "Fuktig time (ja/nei)" msgstr "Sum fuktige timer"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:326 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:375
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:433
msgid "Humid period hour outside protection period" msgid "Humid period hour outside protection period"
msgstr "Time nr x i fuktig periode utenfor sprøyteperiode" msgstr "Time nr x i fuktig periode utenfor sprøyteperiode"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:429
msgid "Hours"
msgstr "Timer"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:434
msgid "Threshold humid period"
msgstr "Terskelverdier for fuktig time"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:435
msgid "Spraying protection period"
msgstr "Beskyttelse etter sprøyting"
#: templates/cerealblotchmodels/wheatleafblotchform.html:25 #: templates/cerealblotchmodels/wheatleafblotchform.html:25
#: templates/cerealblotchmodels/wheatleafblotchform.html:34 #: templates/cerealblotchmodels/wheatleafblotchform.html:34
msgid "Wheat leaf blotch" msgid "Wheat leaf blotch"
msgstr "Bladflekksjukdommer i hvete" msgstr "Bladflekksjukdommer i hvete"
#: templates/cerealblotchmodels/wheatleafblotchform.html:42 #: templates/cerealblotchmodels/wheatleafblotchform.html:42
#, fuzzy
msgid "Background data for the wheat leaf blotch model" msgid "Background data for the wheat leaf blotch model"
msgstr "Bakgrunnsdata for byggbrunflekkmodellen" msgstr "Bakgrunnsdata for bladflekksjukdomsmodellen"
No preview for this file type
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-23 14:14+0200\n" "POT-Creation-Date: 2018-05-02 11:21+0200\n"
"PO-Revision-Date: 2016-10-07 11:05+0200\n" "PO-Revision-Date: 2016-10-07 11:05+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
...@@ -28,6 +28,7 @@ msgid "Background data for the barley net blotch model" ...@@ -28,6 +28,7 @@ msgid "Background data for the barley net blotch model"
msgstr "大麦网斑病模型的背景数据" msgstr "大麦网斑病模型的背景数据"
#: templates/cerealblotchmodels/barleynetblotchform.html:49 #: templates/cerealblotchmodels/barleynetblotchform.html:49
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:45
#: templates/cerealblotchmodels/wheatleafblotchform.html:49 #: templates/cerealblotchmodels/wheatleafblotchform.html:49
msgid "Weather station" msgid "Weather station"
msgstr "气象站" msgstr "气象站"
...@@ -138,13 +139,13 @@ msgid "Disease" ...@@ -138,13 +139,13 @@ msgid "Disease"
msgstr "疾病" msgstr "疾病"
#: templates/cerealblotchmodels/barleynetblotchform.html:206 #: templates/cerealblotchmodels/barleynetblotchform.html:206
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:333 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:382
#: templates/cerealblotchmodels/wheatleafblotchform.html:208 #: templates/cerealblotchmodels/wheatleafblotchform.html:208
msgid "Time" msgid "Time"
msgstr "时间" msgstr "时间"
#: templates/cerealblotchmodels/barleynetblotchform.html:214 #: templates/cerealblotchmodels/barleynetblotchform.html:214
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:341 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:389
#: templates/cerealblotchmodels/wheatleafblotchform.html:216 #: templates/cerealblotchmodels/wheatleafblotchform.html:216
msgid "Warning status" msgid "Warning status"
msgstr "预警信息" msgstr "预警信息"
...@@ -160,12 +161,13 @@ msgid "Disease value" ...@@ -160,12 +161,13 @@ msgid "Disease value"
msgstr "疾病值" msgstr "疾病值"
#: templates/cerealblotchmodels/barleynetblotchform.html:267 #: templates/cerealblotchmodels/barleynetblotchform.html:267
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:438
#: templates/cerealblotchmodels/wheatleafblotchform.html:269 #: templates/cerealblotchmodels/wheatleafblotchform.html:269
msgid "Barley net blotch development" msgid "Barley net blotch development"
msgstr "大麦网斑病发展" msgstr "大麦网斑病发展"
#: templates/cerealblotchmodels/barleynetblotchform.html:279 #: templates/cerealblotchmodels/barleynetblotchform.html:279
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:263 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:308
#: templates/cerealblotchmodels/wheatleafblotchform.html:281 #: templates/cerealblotchmodels/wheatleafblotchform.html:281
msgid "Select weather station" msgid "Select weather station"
msgstr "选择气象站" msgstr "选择气象站"
...@@ -203,12 +205,6 @@ msgstr "" ...@@ -203,12 +205,6 @@ msgstr ""
msgid "Please select" msgid "Please select"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:45
#, fuzzy
#| msgid "Weather station"
msgid "WeatherStation"
msgstr "气象站"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:53 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:53
#, fuzzy #, fuzzy
#| msgid "Spraying date" #| msgid "Spraying date"
...@@ -281,51 +277,62 @@ msgid "Number of consecutive 'humid hours'" ...@@ -281,51 +277,62 @@ msgid "Number of consecutive 'humid hours'"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:138 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:138
msgid "Spraying protection period" msgid "Spraying protection days"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:143 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:143
msgid "Leaf life time (days)" msgid "Leaf life time (days)"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:303 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:350
#, fuzzy #, fuzzy
#| msgid "Model is running, please wait" #| msgid "Model is running, please wait"
msgid "The model is running, please wait" msgid "The model is running, please wait"
msgstr "模型在运行,请等候" msgstr "模型在运行,请等候"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:320 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:369
#, fuzzy msgid "Leaf wetness, hourly"
#| msgid "Temperature, daily mean" msgstr ""
msgid "Temperature, hourly mean"
msgstr "日均温"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:321 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:370
#, fuzzy #, fuzzy
#| msgid "Rain, daily" #| msgid "Rain, daily"
msgid "Rain, hourly" msgid "Rain, hourly"
msgstr "日降雨" msgstr "日降雨"
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:322 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:371
msgid "Relative humidity, hourly mean" msgid "Relative humidity, hourly mean"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:323 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:372
msgid "Leaf wetness, hourly" msgid "Humid hour (yes/no)"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:324 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:373
msgid "Humid period hour" msgid "Humid period hour"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:325 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:374
msgid "Humid hour (yes/no)" msgid "Humid hour sum"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:326 #: templates/cerealblotchmodels/septoriahumiditymodelform.html:375
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:433
msgid "Humid period hour outside protection period" msgid "Humid period hour outside protection period"
msgstr "" msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:429
msgid "Hours"
msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:434
msgid "Threshold humid period"
msgstr ""
#: templates/cerealblotchmodels/septoriahumiditymodelform.html:435
msgid "Spraying protection period"
msgstr ""
#: templates/cerealblotchmodels/wheatleafblotchform.html:25 #: templates/cerealblotchmodels/wheatleafblotchform.html:25
#: templates/cerealblotchmodels/wheatleafblotchform.html:34 #: templates/cerealblotchmodels/wheatleafblotchform.html:34
msgid "Wheat leaf blotch" msgid "Wheat leaf blotch"
...@@ -337,6 +344,16 @@ msgstr "" ...@@ -337,6 +344,16 @@ msgstr ""
msgid "Background data for the wheat leaf blotch model" msgid "Background data for the wheat leaf blotch model"
msgstr "大麦网斑病模型的背景数据" msgstr "大麦网斑病模型的背景数据"
#, fuzzy
#~| msgid "Weather station"
#~ msgid "WeatherStation"
#~ msgstr "气象站"
#, fuzzy
#~| msgid "Temperature, daily mean"
#~ msgid "Temperature, hourly mean"
#~ msgstr "日均温"
#, fuzzy #, fuzzy
#~| msgid "Background data for the barley net blotch model" #~| msgid "Background data for the barley net blotch model"
#~ msgid "Background data for the Septoria humidity model" #~ msgid "Background data for the Septoria humidity model"
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<span class="help-block" id="{{ form_id }}_organizationId_countryCode_validation"></span> <span class="help-block" id="{{ form_id }}_organizationId_countryCode_validation"></span>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="weatherStationId">{% trans "WeatherStation" %}</label> <label for="weatherStationId">{% trans "Weather station" %}</label>
<select name="weatherStationId" id="weatherStationId" class="form-control"> <select name="weatherStationId" id="weatherStationId" class="form-control">
<option value="">{% trans "Please select" %}</option> <option value="">{% trans "Please select" %}</option>
<option value="test">TEST</option> <option value="test">TEST</option>
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<span class="help-block" id="{{ form_id }}_thresholdHumidPeriodHours_validation"></span> <span class="help-block" id="{{ form_id }}_thresholdHumidPeriodHours_validation"></span>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="sprayingProtectionDays">{% trans "Spraying protection period" %}</label> <label for="sprayingProtectionDays">{% trans "Spraying protection days" %}</label>
<input type="number" name="sprayingProtectionDays" class="form-control" value="10"/> <input type="number" name="sprayingProtectionDays" class="form-control" value="10"/>
<span class="help-block" id="{{ form_id }}_sprayingProtectionDays_validation"></span> <span class="help-block" id="{{ form_id }}_sprayingProtectionDays_validation"></span>
</div> </div>
...@@ -149,10 +149,15 @@ ...@@ -149,10 +149,15 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-12 form-group"> <div class="col-md-12 form-group">
<button type="button" class="btn btn-primary" onclick="if(validateForm(document.getElementById('{{ form_id }}'))){runModel();}">{% trans "Run model" %}</button> <button type="button" class="btn btn-primary" onclick="if(validateForm(document.getElementById('{{ form_id }}'))){storeUserSettings();runModel();}">{% trans "Run model" %}</button>
</div> </div>
</div> </div>
</form> </form>
<div class="row">
<div class="col-md-12" id="chartContainer" style="height:400px; display: none;">
</div>
</div>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="table-responsive"> <div class="table-responsive">
...@@ -169,19 +174,54 @@ ...@@ -169,19 +174,54 @@
<script type="text/javascript" src="{% static "js/3rdparty/highcharts.js" %}"></script> <script type="text/javascript" src="{% static "js/3rdparty/highcharts.js" %}"></script>
<script type="text/javascript" src="{% static "js/util.js" %}"></script> <script type="text/javascript" src="{% static "js/util.js" %}"></script>
<script type="text/javascript" src="{% static "js/validateForm.js" %}"></script> <script type="text/javascript" src="{% static "js/validateForm.js" %}"></script>
<script type="text/javascript" src="{% static "forecasts/js/forecasts.js" %}"></script>
<script type="text/javascript"> <script type="text/javascript">
var danishPostCodesUTM; var danishPostCodesUTM;
var organizations; var organizations;
var allowedCountryCodes = ["NO","DK","SE","FI","LT"]; var allowedCountryCodes = ["NO","DK","SE","FI","LT"];
var formFields = [
"organizationId_countryCode",
"weatherStationId",
"dateSpraying1",
"dateSpraying2",
"dateGs31",
"date3rdUpperLeafEmerging",
"date2ndUpperLeafEmerging",
"dateUpperLeafEmerging",
"dateGs75",
"thresholdRelativeHumidity",
"thresholdLeafWetness",
"thresholdPrecipitation",
"slidingHoursPast",
"slidingHoursAhead",
"thresholdHumidPeriodHours",
"sprayingProtectionDays",
"leafLifeTime"
];
var specialFormFields = ["organizationId_countryCode","weatherStationId"]; // Must be initialized after a few events
$(document).ready(function() { $(document).ready(function() {
initOrganizations();
//initWeatherStations(); //initWeatherStations();
// Init form validation // Init form validation
loadFormDefinition("{{ form_id }}","/static/cerealblotchmodels/formdefinitions/"); loadFormDefinition("{{ form_id }}","/static/cerealblotchmodels/formdefinitions/");
initDanishPostCodesUTM(); initDanishPostCodesUTM(function(){
updateGSDates(); initOrganizations(function(){
var userSettings = getLocalSettings(getNameSpaced("{{ form_id }}",formFields), false);
if(!isDictEmpty(userSettings)) {
renderUserSettings(userSettings);
}
else
{
updateGSDates();
}
});
});
}); });
var initDanishPostCodesUTM = function(){ var initDanishPostCodesUTM = function(callback){
$.ajax({ $.ajax({
type:"GET", type:"GET",
url: "{% static "cerealblotchmodels/weatherDataInfo/PostalCodesUTM.xml" %}", url: "{% static "cerealblotchmodels/weatherDataInfo/PostalCodesUTM.xml" %}",
...@@ -190,6 +230,7 @@ ...@@ -190,6 +230,7 @@
danishPostCodesUTM = Array.prototype.slice.call(data.getElementsByTagName("PostalCode"),0).sort(function(a,b){ danishPostCodesUTM = Array.prototype.slice.call(data.getElementsByTagName("PostalCode"),0).sort(function(a,b){
return a.getElementsByTagName("CityName")[0].firstChild.nodeValue < b.getElementsByTagName("CityName")[0].firstChild.nodeValue ? -1 : 1; return a.getElementsByTagName("CityName")[0].firstChild.nodeValue < b.getElementsByTagName("CityName")[0].firstChild.nodeValue ? -1 : 1;
}); });
callback();
}, },
400: handleAjaxError, 400: handleAjaxError,
401: handleAjaxError, 401: handleAjaxError,
...@@ -199,7 +240,7 @@ ...@@ -199,7 +240,7 @@
}); });
}; };
var initOrganizations = function(){ var initOrganizations = function(callback){
$.ajax({ $.ajax({
type:"GET", type:"GET",
url: settings.vipslogicProtocol + "://" + settings.vipslogicServerName + "/rest/organization", url: settings.vipslogicProtocol + "://" + settings.vipslogicServerName + "/rest/organization",
...@@ -219,6 +260,9 @@ ...@@ -219,6 +260,9 @@
} }
} }
} }
renderUserSetting(orgSelect);
orgSelect.onchange();
callback();
}, },
400: handleAjaxError, 400: handleAjaxError,
401: handleAjaxError, 401: handleAjaxError,
...@@ -251,6 +295,7 @@ ...@@ -251,6 +295,7 @@
//console.info(opt); //console.info(opt);
selectList.options[selectList.options.length] = opt; selectList.options[selectList.options.length] = opt;
} }
renderUserSetting(selectList);
} }
else else
{ {
...@@ -267,7 +312,9 @@ ...@@ -267,7 +312,9 @@
var ws = data[i]; var ws = data[i];
wsHTML.push("<option value=\"" + ws["pointOfInterestId"] + "\">" + ws["name"] + "</option>"); wsHTML.push("<option value=\"" + ws["pointOfInterestId"] + "\">" + ws["name"] + "</option>");
} }
document.getElementById("weatherStationId").innerHTML = wsHTML.join(""); var wsSelect = document.getElementById("weatherStationId");
wsSelect.innerHTML = wsHTML.join("");
renderUserSetting(wsSelect);
}, },
400: handleAjaxError, 400: handleAjaxError,
401: handleAjaxError, 401: handleAjaxError,
...@@ -299,6 +346,7 @@ ...@@ -299,6 +346,7 @@
} }
var runModel = function(){ var runModel = function(){
document.getElementById("chartContainer").style.display="none"; // Hide chart
// Insert please wait message // Insert please wait message
document.getElementById("resultsTable").innerHTML='<div class="alert alert-info" role="alert">{% trans "The model is running, please wait" %}</div>'; document.getElementById("resultsTable").innerHTML='<div class="alert alert-info" role="alert">{% trans "The model is running, please wait" %}</div>';
var formStr = $("#{{ form_id }}").serialize(); var formStr = $("#{{ form_id }}").serialize();
...@@ -316,13 +364,15 @@ ...@@ -316,13 +364,15 @@
//console.log(formStr); //console.log(formStr);
} }
var resultParameterOrdering = ["WEATHER.UM","WEATHER.RR","WEATHER.BT","SEPTORIAHU.HH","SEPTORIAHU.HPH","SEPTORIAHU.HHS","SEPTORIAHU.HPHPP"];
var paramDict = { var paramDict = {
"WEATHER.TM": "{% trans "Temperature, hourly mean" %}", "WEATHER.BT" : "{% trans "Leaf wetness, hourly" %}",
"WEATHER.RR" : "{% trans "Rain, hourly" %}", "WEATHER.RR" : "{% trans "Rain, hourly" %}",
"WEATHER.UM": "{% trans "Relative humidity, hourly mean" %}", "WEATHER.UM": "{% trans "Relative humidity, hourly mean" %}",
"WEATHER.BT" : "{% trans "Leaf wetness, hourly" %}",
"SEPTORIAHU.HPH" : "{% trans "Humid period hour" %}",
"SEPTORIAHU.HH" : "{% trans "Humid hour (yes/no)" %}", "SEPTORIAHU.HH" : "{% trans "Humid hour (yes/no)" %}",
"SEPTORIAHU.HPH" : "{% trans "Humid period hour" %}",
"SEPTORIAHU.HHS" : "{% trans "Humid hour sum" %}",
"SEPTORIAHU.HPHPP" : "{% trans "Humid period hour outside protection period" %}" "SEPTORIAHU.HPHPP" : "{% trans "Humid period hour outside protection period" %}"
}; };
...@@ -333,10 +383,9 @@ ...@@ -333,10 +383,9 @@
var headingLine = "<tr><td style=\"font-weight: bold;\">{% trans "Time" %}</td>"; var headingLine = "<tr><td style=\"font-weight: bold;\">{% trans "Time" %}</td>";
if(data.length > 0) if(data.length > 0)
{ {
var allKeys = JSON.parse(data[0].keys); for(var i in paramDict)
for(var i=0;i<allKeys.length;i++)
{ {
headingLine +="<td style=\"font-weight: bold;\">" + paramDict[allKeys[i]] + "</td>"; headingLine +="<td style=\"font-weight: bold;\">" + paramDict[i] + "</td>";
} }
headingLine +="<td style=\"font-weight: bold;\">{% trans "Warning status" %}</td>"; headingLine +="<td style=\"font-weight: bold;\">{% trans "Warning status" %}</td>";
headingLine += "</tr>"; headingLine += "</tr>";
...@@ -350,9 +399,9 @@ ...@@ -350,9 +399,9 @@
} }
var resultLine = "<tr><td>" + moment(data[row]["validTimeStart"]).format("YYYY-MM-DD HH:mm") + "</td>"; var resultLine = "<tr><td>" + moment(data[row]["validTimeStart"]).format("YYYY-MM-DD HH:mm") + "</td>";
var allValues = JSON.parse(data[row].allValues); var allValues = JSON.parse(data[row].allValues);
for(var i in allKeys) for(var i in paramDict)
{ {
var value = allValues[allKeys[i]]; var value = allValues[i];
if(value != null && $.isNumeric(value)) if(value != null && $.isNumeric(value))
{ {
value = parseFloat(value).toFixed(2); value = parseFloat(value).toFixed(2);
...@@ -369,10 +418,72 @@ ...@@ -369,10 +418,72 @@
table.push("</table>"); table.push("</table>");
document.getElementById("resultsTable").innerHTML=table.join(""); document.getElementById("resultsTable").innerHTML=table.join("");
} }
// Then: The chart
// We must sort data ascending again
document.getElementById("chartContainer").style.display="block";
data.reverse();
var warningStatusPlotBandData = getWarningStatusPlotBandData(data);
//console.log(warningStatusPlotBandData);
var data = getHighChartsSeries(
data,
[
{"color": "#6600FF", "opposite": false, "abbr": " ", "title": "{% trans "Hours" %}"},
{min: 0, max: 1.5, visible: false}
],
[
{key: "SEPTORIAHU.HPHPP", type: "spline", color: "black", name: "{% trans "Humid period hour outside protection period" %}", yAxis: 0},
{key: "SEPTORIAHU.THPHPP", type: "spline", color: "red", name: "{% trans "Threshold humid period" %}", yAxis: 0},
{key: "SEPTORIAHU.SPP", type: "spline", lineWidth: 5, color: "blue", name: "{% trans "Spraying protection period" %}", yAxis: 1},
]
);
renderForecastChart("chartContainer", "{% trans "Barley net blotch development" %}", warningStatusPlotBandData, data);
} }
var handleAjaxError = function(jqXHR,textStatus,errorThrown){ var handleAjaxError = function(jqXHR,textStatus,errorThrown){
alert(textStatus); alert(textStatus);
}; };
var renderUserSettings = function(userSettings){
// Strip namespace from form field
var theForm = document.getElementById('{{ form_id }}');
for(var i in userSettings){
var fieldName = i.substring("{{form_id}}.".length);
if(specialFormFields.indexOf(fieldName) < 0){
theForm[fieldName].value = userSettings[i];
}
}
};
var renderUserSetting = function(formField)
{
var localStorageKey = "{{form_id}}." + formField.name;
var locallyStoredValue = getLocalSettings([localStorageKey]) != null ? getLocalSettings([localStorageKey])[localStorageKey] : null;
if(locallyStoredValue != null)
{
formField.value = locallyStoredValue;
}
}
var getNameSpaced = function(nameSpace, anArray){
var retVal = [];
for(var i = 0; i<anArray.length;i++)
{
retVal.push(nameSpace + "." + anArray[i]);
}
return retVal;
};
var storeUserSettings = function(){
var theForm = document.getElementById('{{ form_id }}');
var settingsDict = {}
for(var i in formFields)
{
// Need to add the formId as namespace to avoid confusion in Local Storage
settingsDict["{{ form_id }}" + "." + formFields[i]] = theForm[formFields[i]].value;
}
storeLocalSettings(settingsDict);
};
</script> </script>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -275,7 +275,7 @@ function getWarningStatusPlotBandData(forecastResults) ...@@ -275,7 +275,7 @@ function getWarningStatusPlotBandData(forecastResults)
if(plotBand != null && plotBand["to"] == null) if(plotBand != null && plotBand["to"] == null)
{ {
// Moment.js!!! // Moment.js!!!
plotBand.to = getUnixTimestampFromJSONforecastResults([forecastResults.length -1]["validTimeStart"]) + bandOffset; plotBand.to = getUnixTimestampFromJSON([forecastResults.length -1]["validTimeStart"]) + bandOffset;
plotBands.push(plotBand); plotBands.push(plotBand);
} }
...@@ -298,7 +298,8 @@ function getHighChartsSeries(forecastResults, yAxisList, parameterList) ...@@ -298,7 +298,8 @@ function getHighChartsSeries(forecastResults, yAxisList, parameterList)
name: parameter.name, name: parameter.name,
showInLegend: (parameter.showInLegend === undefined || parameter.showInLegend === null || parameter.showInLegend === true), showInLegend: (parameter.showInLegend === undefined || parameter.showInLegend === null || parameter.showInLegend === true),
color: parameter.color, color: parameter.color,
yAxis: parameter.yAxis yAxis: parameter.yAxis,
lineWidth: parameter.lineWidth !== undefined ? parameter.lineWidth: 2
}; };
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment