Commit c7c3667a authored by EnesKarakas's avatar EnesKarakas
Browse files

Merge branch 'devbackend' of...

Merge branch 'devbackend' of https://transfer.hft-stuttgart.de/gitlab/22kaen1bdi/swp_ss24_wetterdaten_sammeln into devbackend
parents 06d9a846 65619562
...@@ -317,6 +317,10 @@ const WeatherForecastData = (props) => { ...@@ -317,6 +317,10 @@ const WeatherForecastData = (props) => {
<label for="hour_uv">Hour UV</label> <label for="hour_uv">Hour UV</label>
<br /> <br />
<br /> <br />
<div>
<label for="days">Days:</label>
<input type="range" id="days" name="days" min="0" max="7" />
</div>
<div> <div>
<label for="units">Choose a unit:</label> <label for="units">Choose a unit:</label>
<select name="unnits" id="units"> <select name="unnits" id="units">
...@@ -357,6 +361,7 @@ const WeatherForecastData = (props) => { ...@@ -357,6 +361,7 @@ const WeatherForecastData = (props) => {
function getData() { function getData() {
const units = document.getElementById("units").value; const units = document.getElementById("units").value;
const days = document.getElementById("days").value;
const city_text = document.getElementById("city_text").value; const city_text = document.getElementById("city_text").value;
const region_text = document.getElementById("region_text").value; const region_text = document.getElementById("region_text").value;
...@@ -574,7 +579,7 @@ const WeatherForecastData = (props) => { ...@@ -574,7 +579,7 @@ const WeatherForecastData = (props) => {
let filterString = filterArray.join(","); let filterString = filterArray.join(",");
const apiUrl = `http://localhost:8080/forecastweather?q=${latitude_text},${longitude_text}&filter=${filterString}`; const apiUrl = `http://localhost:8080/forecastweather?q=${latitude_text},${longitude_text}&filter=${filterString}&days=${days}`;
console.log(apiUrl); console.log(apiUrl);
fetch(apiUrl) fetch(apiUrl)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment