Prepare charts moved from api server to here
route/api.js - new distriputer fpr chart preparation appp.js - removed unnecessary calls public/javascripts/map.js - changed /char/... call to /api/... call charts/preparecharts - added charts/utilities.js - added public/javascripts/showcharts.js - changed /char/... call to /api/... call routes/users.js - deleted
This commit is contained in:
@@ -165,7 +165,7 @@ export async function buildMarkers() {
|
||||
west: bounds.getWest(), south: bounds.getSouth(),
|
||||
east: bounds.getEast(), north: bounds.getNorth()
|
||||
}
|
||||
const url = `/chart/getmapdata?type=noise&box=${bounds.toBBoxString()}`
|
||||
const url = `/api/getmapdata?type=noise&box=${bounds.toBBoxString()}`
|
||||
|
||||
let ret = await fetch(url)
|
||||
.catch(e => {
|
||||
@@ -265,7 +265,7 @@ async function setCenter(adr) {
|
||||
|
||||
// Show the last date below tha map grafics
|
||||
async function showLastDate(ld) {
|
||||
const url = `/chart/getmapdata?type=noise`
|
||||
const url = `/api/getmapdata?type=noise`
|
||||
let ret = await fetch(url)
|
||||
.catch(e => {
|
||||
console.log(e)
|
||||
|
||||
@@ -56,7 +56,7 @@ export async function showChart(params, typ, container) {
|
||||
}
|
||||
}
|
||||
|
||||
const url = `/chart/getsensordata?sensorid=${params.sid}&data=${typ}&span=${params.span}&datetime=${params.datetime.slice(0,-10)}&peak=${params.peak}`
|
||||
const url = `/api/getsensordata?sensorid=${params.sid}&data=${typ}&span=${params.span}&datetime=${params.datetime.slice(0,-10)}&peak=${params.peak}`
|
||||
let ret = await fetch(url)
|
||||
.catch(e => {
|
||||
logerror(e)
|
||||
|
||||
Reference in New Issue
Block a user