Sprach- und Stadt-Wechsel geht wieder
This commit is contained in:
@@ -13,7 +13,6 @@ export const tabtable = [
|
||||
{id: 'ldentab', type: 'lden', container: 'dlden', func: showChart, div: 1, dformat: "dd.LL"},
|
||||
]
|
||||
|
||||
|
||||
export async function showChart(params, typ, container) {
|
||||
function form() {
|
||||
for (let item of tabtable) {
|
||||
@@ -60,6 +59,7 @@ export async function showChart(params, typ, container) {
|
||||
} else if ((typ === 'havg') || (typ === 'davg')) {
|
||||
url += `&peak=${params.peak}`
|
||||
}
|
||||
console.log(`fetch ${typ} from server ${url}`)
|
||||
let erg = await fetchfromserver(url)
|
||||
if (!erg.err) {
|
||||
if(sysparams.category === 'noise') {
|
||||
@@ -91,26 +91,31 @@ export async function showChart(params, typ, container) {
|
||||
}).add();
|
||||
}
|
||||
})
|
||||
return true
|
||||
return {error: false}
|
||||
} else {
|
||||
showError(erg.err)
|
||||
return false
|
||||
// showError(erg.err)
|
||||
return {error: erg.err}
|
||||
}
|
||||
}
|
||||
|
||||
export const loadAll = async (params, start = 2) => {
|
||||
console.log('now load all in Background')
|
||||
let messzeit = DateTime.now()
|
||||
if (start == 0) {
|
||||
map.showMap(params)
|
||||
start++
|
||||
}
|
||||
if (params.sid !== -1) {
|
||||
for (let i = start; i < tabtable.length; i++) {
|
||||
let ok = await showChart(params, tabtable[i].type, tabtable[i].container)
|
||||
if (!ok) {
|
||||
break;
|
||||
let err = await showChart(params, tabtable[i].type, tabtable[i].container)
|
||||
if (err.error) {
|
||||
if(tabtable[i].type !== 'live') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
let dauer = DateTime.now().diff(messzeit,['seconds']).toObject().seconds
|
||||
console.log(`now all loaded. Zeitdauer: ${dauer}`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,6 +123,9 @@ export const setNoUTC = () => {
|
||||
Highcharts.setOptions({
|
||||
global: {
|
||||
useUTC: false // Don't use UTC on the charts
|
||||
},
|
||||
accessibility: { // supress warning concerning accessability
|
||||
enabled: false
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user