Settings split according to chart
routes/api.js - check type of sensor - translate error message app.js - debug = false at i18n public/javascripts/chart_utilities.js - setter/getter for current Tab public/javascripts/global.js - settings dialog completely rearranged - if only sensorid is given, check type routes/index.js - set language to global variable views/index.pug - reaggange settings dialog - translate 'Error' views/layout.pug - load new datepicker (vanillajs-datepicker) public/javascripts/map.js - fetching from server refactored to function - reenable tabs after leaving map charts/preparecharts - typo public/javascripts/showcharts.js - loadAll extended to load also live and map public/stylesheets/style.sass - a few changes for settinds dialog locales/[de|en] - added a few words charts/utilities.js - setter and getter for language
This commit is contained in:
@@ -15,7 +15,7 @@ let stucols = 1; // Anzeige nur Balken (StundenMittel)
|
||||
|
||||
export const noise_ymin = 30; // lowest value on y-axis for noise
|
||||
export const noise_ymax = 120; // highest value on y-axis for noise
|
||||
let activeTab = 0; // active TAB number
|
||||
let activeTab = 'maptab'; // active TAB ID
|
||||
export let peaklim = 70; // threshold for peak count
|
||||
|
||||
export const url = '/api'
|
||||
@@ -197,3 +197,18 @@ export const showTabs = () => {
|
||||
document.querySelector('#navi').style.display = 'block'
|
||||
}
|
||||
|
||||
export const setCurrentTab = (tab) => {
|
||||
activeTab = tab
|
||||
}
|
||||
|
||||
export const getCurrentTab = () => {
|
||||
return activeTab
|
||||
}
|
||||
|
||||
export const fetchfromserver = async (url) => {
|
||||
const ret = await fetch(url)
|
||||
.catch(e => {
|
||||
showError(e)
|
||||
});
|
||||
return await ret.json()
|
||||
}
|
||||
Reference in New Issue
Block a user