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
65619562
Commit
65619562
authored
Jun 09, 2024
by
Weiser
Browse files
days
parent
a50ceffe
Changes
1
Show whitespace changes
Inline
Side-by-side
frontend/src/components/weather/weatherForecastData.js
View file @
65619562
...
@@ -316,6 +316,10 @@ const WeatherForecastData = (props) => {
...
@@ -316,6 +316,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/forcastweather?q=
${
latitude_text
}
,
${
longitude_text
}
&filter=
${
filterString
}
`
;
const
apiUrl
=
`http://localhost:8080/for
e
castweather?q=
${
latitude_text
}
,
${
longitude_text
}
&filter=
${
filterString
}
&days=
${
days
}
`
;
fetch
(
apiUrl
)
fetch
(
apiUrl
)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
...
...
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