Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Karakas
SWP_SS24_Wetterdaten_sammeln
Commits
576b3e31
Commit
576b3e31
authored
Jun 09, 2024
by
EnesKarakas
Browse files
dfaw
parent
c62af3ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
frontend/src/components/weather/weatherForecastData.js
View file @
576b3e31
...
...
@@ -316,10 +316,12 @@ const WeatherForecastData = (props) => {
<
input
type
=
"
checkbox
"
id
=
"
hour_uv
"
class
=
"
checkBoxFilter
"
/>
<
label
for
=
"
hour_uv
"
>
Hour
UV
<
/label
>
<
br
/>
<
input
type
=
"
checkbox
"
id
=
"
alerts
"
class
=
"
checkBoxFilter
"
/>
<
label
for
=
"
alerts
"
>
Alerts
<
/label
>
<
br
/>
<
div
>
<
label
for
=
"
days
"
>
Days
:
<
/label
>
<
input
type
=
"
range
"
id
=
"
days
"
name
=
"
days
"
min
=
"
0
"
max
=
"
7
"
/>
<
input
type
=
"
range
"
id
=
"
days
"
name
=
"
days
"
min
=
"
1
"
max
=
"
7
"
/>
<
/div
>
<
div
>
<
label
for
=
"
units
"
>
Choose
a
unit
:
<
/label
>
...
...
@@ -361,6 +363,7 @@ const WeatherForecastData = (props) => {
function
getData
()
{
const
units
=
document
.
getElementById
(
"
units
"
).
value
;
const
days
=
document
.
getElementById
(
"
days
"
).
value
;
const
alerts
=
boolToWord
(
document
.
getElementById
(
"
alerts
"
).
checked
);
const
city_text
=
document
.
getElementById
(
"
city_text
"
).
value
;
const
region_text
=
document
.
getElementById
(
"
region_text
"
).
value
;
...
...
@@ -578,7 +581,7 @@ const WeatherForecastData = (props) => {
let
filterString
=
filterArray
.
join
(
"
,
"
);
const
apiUrl
=
`http://localhost:8080/forecastweather?q=
${
latitude_text
}
,
${
longitude_text
}
&filter=
${
filterString
}
&
days=
${
day
s
}
`
;
const
apiUrl
=
`http://localhost:8080/forecastweather?q=
${
latitude_text
}
,
${
longitude_text
}
&
days=
${
days
}
&
filter=
${
filterString
}
&
alerts=
${
alert
s
}
`
;
console
.
log
(
apiUrl
);
fetch
(
apiUrl
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment