Skip to content
GitLab
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
ab9111d4
Commit
ab9111d4
authored
Jun 09, 2024
by
EnesKarakas
Browse files
adw
parent
f31da304
Changes
3
Hide whitespace changes
Inline
Side-by-side
frontend/src/components/weather/currentData.js
View file @
ab9111d4
...
...
@@ -245,9 +245,6 @@ const Currentdata = (props) => {
<
br
/>
<
input
className
=
"
input
"
type
=
"
text
"
id
=
"
apiUrloutput
"
readOnly
/>
<
/div
>
<
button
className
=
"
APIButton
"
onClick
=
{
searchAPI
}
>
City
api
<
/button
>
<
br
/>
<
br
/>
<
/div
>
...
...
@@ -257,7 +254,7 @@ const Currentdata = (props) => {
);
function
getData
()
{
//switch
//switch
const
units
=
document
.
getElementById
(
"
units
"
).
value
;
const
city_text
=
document
.
getElementById
(
"
city_text
"
).
value
;
...
...
@@ -315,7 +312,7 @@ const Currentdata = (props) => {
).
checked
;
let
filterArray
=
[];
if
(
name
)
{
filterArray
.
push
(
"
name
"
);
}
...
...
@@ -347,8 +344,8 @@ const Currentdata = (props) => {
filterArray
.
push
(
"
last_updated
"
);
}
if
(
temp
)
{
if
(
units
==
world
){
filterArray
.
push
(
"
temp_
f
"
);
if
(
units
==
world
)
{
filterArray
.
push
(
"
temp_
c
"
);
}
filterArray
.
push
(
"
temp_f
"
);
}
...
...
@@ -366,7 +363,7 @@ const Currentdata = (props) => {
filterArray
.
push
(
"
condition_code
"
);
}
if
(
wind
)
{
if
(
units
==
world
){
if
(
units
==
world
)
{
filterArray
.
push
(
"
wind_mph
"
);
}
filterArray
.
push
(
"
wind_kph
"
);
...
...
@@ -378,14 +375,15 @@ const Currentdata = (props) => {
filterArray
.
push
(
"
wind_dir
"
);
}
if
(
pressure
)
{
if
(
units
==
world
){
if
(
units
==
world
)
{
filterArray
.
push
(
"
temp_mb
"
);
}
filterArray
.
push
(
"
pressure_in
"
);
}
if
(
precip
)
{
if
(
units
==
world
){
filterArray
.
push
(
"
temp_mm
"
);
}
if
(
precip
)
{
if
(
units
==
world
)
{
filterArray
.
push
(
"
temp_mm
"
);
}
filterArray
.
push
(
"
precip_in
"
);
}
if
(
humidity
)
{
...
...
@@ -395,31 +393,31 @@ const Currentdata = (props) => {
filterArray
.
push
(
"
cloud
"
);
}
if
(
feelslike
)
{
if
(
units
==
world
){
if
(
units
==
world
)
{
filterArray
.
push
(
"
feelslike_c
"
);
}
filterArray
.
push
(
"
feelslike_f
"
);
}
if
(
windchill
)
{
if
(
units
==
world
){
if
(
units
==
world
)
{
filterArray
.
push
(
"
windchill_c
"
);
}
filterArray
.
push
(
"
windchill_f
"
);
}
if
(
heatindex
)
{
if
(
units
==
world
){
if
(
units
==
world
)
{
filterArray
.
push
(
"
heatindex_c
"
);
}
filterArray
.
push
(
"
heatindex_f
"
);
}
if
(
dewpoint
)
{
if
(
units
==
world
){
if
(
units
==
world
)
{
filterArray
.
push
(
"
dewpoint_c
"
);
}
filterArray
.
push
(
"
dewpoint_f
"
);
}
if
(
vis
)
{
if
(
units
==
world
){
if
(
units
==
world
)
{
filterArray
.
push
(
"
vis_miles
"
);
}
filterArray
.
push
(
"
vis_miles
"
);
...
...
@@ -428,7 +426,7 @@ const Currentdata = (props) => {
filterArray
.
push
(
"
uv
"
);
}
if
(
gust
)
{
if
(
units
==
world
){
if
(
units
==
world
)
{
filterArray
.
push
(
"
gust_kph
"
);
}
filterArray
.
push
(
"
gust_mph
"
);
...
...
frontend/src/components/weather/historicalWeatherData.js
View file @
ab9111d4
...
...
@@ -184,9 +184,6 @@ const HistoricalWeatherData = (props) => {
<
br
/>
<
input
className
=
"
input
"
type
=
"
text
"
id
=
"
apiUrloutput
"
readOnly
/>
<
/div
>
<
button
className
=
"
APIButton
"
onClick
=
{
searchAPI
}
>
City
api
<
/button
>
<
br
/>
<
br
/>
<
/div
>
...
...
frontend/src/components/weather/weatherForecastData.js
View file @
ab9111d4
...
...
@@ -314,9 +314,6 @@ const WeatherForecastData = (props) => {
readOnly
/>
<
/div
>
<
button
className
=
"
APIButton
"
onClick
=
{
searchAPI
}
>
City
api
<
/button
>
<
br
/>
<
br
/>
<
/div
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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