diff --git a/locales/de/translation.json b/locales/de/translation.json index 75a1c81..70fd4ab 100644 --- a/locales/de/translation.json +++ b/locales/de/translation.json @@ -3,7 +3,7 @@ "Settings": "Einstellungen", "Info": "Info", "StartDate": "Start Datum", - "NumberOfDays": "Anzahl Tage", + "NumberOfDays": "So viele Tage anzeigen", "Only_for_live_chart": "Nur bei 'live' Grafik", "Count_peaks_over": "Zähle Spitzen über", "Close": "Schließen", @@ -39,5 +39,8 @@ "DailyMeanValuesOfLDEN-Index": "Tages-Mittelwerte des LDEN-Index", "Date": "Datum", "Version": "Version", - "from": "vom" + "from": "vom", + "RemoveFromMap": "Sensoren nicht anzeigen, die nicht gesendet haben seit", + "weeks": "Wochen" + } \ No newline at end of file diff --git a/locales/dev/translation.json b/locales/dev/translation.json index 75a1c81..70fd4ab 100644 --- a/locales/dev/translation.json +++ b/locales/dev/translation.json @@ -3,7 +3,7 @@ "Settings": "Einstellungen", "Info": "Info", "StartDate": "Start Datum", - "NumberOfDays": "Anzahl Tage", + "NumberOfDays": "So viele Tage anzeigen", "Only_for_live_chart": "Nur bei 'live' Grafik", "Count_peaks_over": "Zähle Spitzen über", "Close": "Schließen", @@ -39,5 +39,8 @@ "DailyMeanValuesOfLDEN-Index": "Tages-Mittelwerte des LDEN-Index", "Date": "Datum", "Version": "Version", - "from": "vom" + "from": "vom", + "RemoveFromMap": "Sensoren nicht anzeigen, die nicht gesendet haben seit", + "weeks": "Wochen" + } \ No newline at end of file diff --git a/locales/en/translation.json b/locales/en/translation.json index be17038..224d33b 100644 --- a/locales/en/translation.json +++ b/locales/en/translation.json @@ -2,8 +2,8 @@ "NoiseMeasurement": "Noise Measurement", "Settings": "Settings", "Info": "Info", - "StartDate": "Start date:", - "NumberOfDays": "Number of days", + "StartDate": "Start date", + "NumberOfDays": "Show so many days", "Only_for_live_chart": "Only for 'live' chart", "Count_peaks_over": "Count peaks over", "Close": "Close", @@ -39,5 +39,7 @@ "DailyMeanValuesOfLDEN-Index": "Daily mean values of LDEN-Index", "Date": "Date", "Version": "Version", - "from": "from" + "from": "from", + "RemoveFromMap": "Don't show sensors that have not sent for", + "weeks": "weeks" } \ No newline at end of file diff --git a/public/javascripts/global.js b/public/javascripts/global.js index 917375b..7211480 100644 --- a/public/javascripts/global.js +++ b/public/javascripts/global.js @@ -21,6 +21,7 @@ import { DateTime } from './luxon.min.js' zoom: 10, span: 1, peak: 70, + weeks: 4, datetime: '', seldate: 'today', refresh: 0, @@ -46,6 +47,7 @@ import { DateTime } from './luxon.min.js' params.seldate = selDate const span = document.getElementById('nbrofdays').value const peak = document.getElementById('peaklim').value + const weeks = document.getElementById('olderthan').value console.log(starttime, span, peak) if(span < 10) { params.span = span @@ -53,6 +55,9 @@ import { DateTime } from './luxon.min.js' if(peak < 130 ) { params.peak = peak } + if (weeks < 52) { + params.weeks = weeks + } let newlng = document.querySelector('#sellan input:checked').id let oldlng = localStorage.getItem('curlang') localStorage.setItem('curlang', newlng) @@ -75,6 +80,7 @@ import { DateTime } from './luxon.min.js' document.getElementById('startday').value = params.seldate document.getElementById('nbrofdays').value = params.span document.getElementById('peaklim').value = params.peak + document.getElementById('olderthan').value = params.weeks myModal.show() }) diff --git a/public/javascripts/map.js b/public/javascripts/map.js index 0d7c735..b8273b0 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -64,6 +64,7 @@ export async function showMap(params, sysparams) { await loadAll(params) } params.center = [clickedcoords.lat, clickedcoords.lng] + map.setView([clickedcoords.lat, clickedcoords.lng]); }) }) } diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 86ff157..f610ee3 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -177,7 +177,7 @@ footer #author #versn { } .thelabels { - width: 40%; + width: 50%; float: left; } @@ -197,11 +197,11 @@ footer #author #versn { } #startday { - width: 60%; + width: 40%; } -#nbrofdays, #peaklim { - width: 20%; +#nbrofdays, #peaklim, #olderthan { + width: 10%; } .addit { @@ -209,7 +209,7 @@ footer #author #versn { border: 1px solid blue; } -#klein { +.klein { font-size: 80%; } diff --git a/public/stylesheets/style.sass b/public/stylesheets/style.sass index 9451810..071d29d 100644 --- a/public/stylesheets/style.sass +++ b/public/stylesheets/style.sass @@ -170,7 +170,7 @@ footer text-align: left .thelabels - width: 40% + width: 50% float: left // border: 1px solid green @@ -189,16 +189,16 @@ footer margin-bottom: 15px #startday - width: 60% + width: 40% -#nbrofdays, #peaklim - width: 20% +#nbrofdays, #peaklim, #olderthan + width: 10% .addit width: 20% border: 1px solid blue -#klein +.klein font-size: 80% .infoTafel th,td diff --git a/views/index.pug b/views/index.pug index ba0bb00..f4bcb44 100644 --- a/views/index.pug +++ b/views/index.pug @@ -80,14 +80,21 @@ block content .column label.thelabels(for='nbrofdays') | #{t("NumberOfDays")}:
- span#klein (#{t("Only_for_live_chart")}) + span.klein (#{t("Only_for_live_chart")}) input.theInputs#nbrofdays(type = 'number' name = 'nbrofdays') - |   (max. 10) + span.klein   (max. 10) .column label.thelabels(for='peaklim') | #{t("Count_peaks_over")} input.theInputs#peaklim(type = 'number' name = 'peaklim') |   dbA + span.klein   (max. 130) + .column + label.thelabels(for='olderthan') + | #{t("RemoveFromMap")} + input.theInputs#olderthan(type = 'number' name = 'olderthan') + |   #{t("weeks")} + span.klein   (max. 52) .column#sellan label.thelabels | #{t("Language")}: