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
4c3b8c9e
Commit
4c3b8c9e
authored
Jun 13, 2024
by
Weiser
Browse files
air wuality fix
parent
dc32f29d
Changes
2
Hide whitespace changes
Inline
Side-by-side
frontend/src/components/weather/currentData.js
View file @
4c3b8c9e
...
@@ -299,11 +299,7 @@ const Currentdata = (props) => {
...
@@ -299,11 +299,7 @@ const Currentdata = (props) => {
<
div
class
=
"
h3
"
>
<
div
class
=
"
h3
"
>
<
h3
>
Air
Quality
<
/h3
>
<
h3
>
Air
Quality
<
/h3
>
<
/div
>
<
/div
>
<
input
<
input
type
=
"
checkbox
"
id
=
"
air_quality_co
"
className
=
"
checkBoxFilter
"
/>
type
=
"
checkbox
"
id
=
"
air_quality_co
"
className
=
"
checkBoxFilter
"
/>
<
label
for
=
"
air_quality_co
"
>
Air
Quality
CO
<
/label
>
<
label
for
=
"
air_quality_co
"
>
Air
Quality
CO
<
/label
>
<
br
/>
<
br
/>
<
input
<
input
...
@@ -588,18 +584,7 @@ const Currentdata = (props) => {
...
@@ -588,18 +584,7 @@ const Currentdata = (props) => {
filterArray
.
push
(
"
gust_mph
"
);
filterArray
.
push
(
"
gust_mph
"
);
}
}
}
}
if
(
console
.
log
(
air_quality_co
);
air_quality_co
||
air_quality_no2
||
air_quality_o3
||
air_quality_so2
||
air_quality_pm2_5
||
air_quality_pm10
||
air_quality_us_epa_index
||
air_quality_gb_defra_index
)
{
filterArray
.
push
(
"
air_quality
"
);
}
if
(
air_quality_co
)
{
if
(
air_quality_co
)
{
filterArray
.
push
(
"
co
"
);
filterArray
.
push
(
"
co
"
);
}
}
...
@@ -628,7 +613,7 @@ const Currentdata = (props) => {
...
@@ -628,7 +613,7 @@ const Currentdata = (props) => {
let
filterString
=
filterArray
.
join
(
"
,
"
);
let
filterString
=
filterArray
.
join
(
"
,
"
);
const
apiUrl
=
`http://localhost:8080/currentweather?q=
${
latitude_text
}
,
${
longitude_text
}
&filter=
${
filterString
}
`
;
const
apiUrl
=
`http://localhost:8080/currentweather?q=
${
latitude_text
}
,
${
longitude_text
}
&filter=
${
filterString
}
`
;
console
.
log
(
apiUrl
);
fetch
(
apiUrl
)
fetch
(
apiUrl
)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
if
(
!
response
.
ok
)
{
if
(
!
response
.
ok
)
{
...
...
src/main/java/io/swagger/model/Current.java
View file @
4c3b8c9e
...
@@ -107,7 +107,7 @@ public class Current {
...
@@ -107,7 +107,7 @@ public class Current {
private
BigDecimal
gustKph
=
null
;
private
BigDecimal
gustKph
=
null
;
@JsonProperty
(
"air_quality"
)
@JsonProperty
(
"air_quality"
)
private
WeatherAirQuality
airQuality
=
n
ull
;
private
WeatherAirQuality
airQuality
=
n
ew
WeatherAirQuality
()
;
public
Current
lastUpdatedEpoch
(
Integer
lastUpdatedEpoch
)
{
public
Current
lastUpdatedEpoch
(
Integer
lastUpdatedEpoch
)
{
this
.
lastUpdatedEpoch
=
lastUpdatedEpoch
;
this
.
lastUpdatedEpoch
=
lastUpdatedEpoch
;
...
...
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