Add dataTypes parameter to generateLink function
This commit is contained in:
@@ -110,12 +110,12 @@ container.appendChild(filterButton);
|
|||||||
document.body.appendChild(container);
|
document.body.appendChild(container);
|
||||||
|
|
||||||
// Function to get the link for the get request
|
// Function to get the link for the get request
|
||||||
function generateLink(dateStart, dateEnd, node) {
|
function generateLink(dateStart, dateEnd, node, dataTypes) {
|
||||||
const baseUrl = 'http://145.92.8.114/getMeasurements';
|
const baseUrl = 'http://145.92.8.114/getMeasurements';
|
||||||
const formattedDateStart = new Date(dateStart).toISOString().replace('T', '%20');
|
const formattedDateStart = new Date(dateStart).toISOString().replace('T', '%20');
|
||||||
const formattedDateEnd = new Date(dateEnd).toISOString().replace('T', '%20');
|
const formattedDateEnd = new Date(dateEnd).toISOString().replace('T', '%20');
|
||||||
|
|
||||||
link = `${baseUrl}?dateStart=${formattedDateStart}&dateEnd=${formattedDateEnd}&node=${node}`;
|
link = `${baseUrl}?dateStart=${formattedDateStart}&dateEnd=${formattedDateEnd}&node=${node}&dataTypes=${dataTypes}`;
|
||||||
|
|
||||||
console.log(link);
|
console.log(link);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user