Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KI-WaVo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Landesamt für Umwelt
KI-WaVo
Commits
f4bcf62c
Commit
f4bcf62c
authored
6 months ago
by
Michel Spils
Browse files
Options
Downloads
Patches
Plain Diff
remove dummy time
parent
3c3c00d6
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/dashboard.py
+16
-15
16 additions, 15 deletions
src/dashboard.py
with
16 additions
and
15 deletions
src/dashboard.py
+
16
−
15
View file @
f4bcf62c
from
re
import
A
from
dash
import
html
,
dcc
,
dash_table
,
Dash
from
dash.dependencies
import
Input
,
Output
,
State
,
MATCH
import
os
from
datetime
import
datetime
,
timedelta
import
oracledb
import
pandas
as
pd
import
plotly.express
as
px
import
plotly.graph_objs
as
go
import
pandas
as
pd
from
da
tetime
import
datetime
,
timedelta
from
sqlalchemy
import
create_engine
,
select
,
and_
,
desc
from
dash
import
Dash
,
dash_table
,
dcc
,
html
from
da
sh.dependencies
import
MATCH
,
Input
,
Output
,
State
from
sqlalchemy
import
and_
,
create_engine
,
desc
,
func
,
select
from
sqlalchemy.orm
import
Session
from
utils.db_tools.orm_classes
import
InputForecasts
,
Modell
,
PegelForecasts
,
Log
,
ModellSensor
,
SensorData
import
oracledb
import
os
from
sqlalchemy
import
select
,
func
from
dash_tools.style_configs
import
(
create_log_table
,
create_historical_plot
,
from
dash_tools.layout_helper
import
create_collapsible_section
from
dash_tools.style_configs
import
(
create_historical_plot
,
create_historical_table
,
create_input_forecasts_plot
,
create_inp_forecast_status_table
,
create_input_forecasts_plot
,
create_log_table
,
create_model_forecasts_plot
)
from
dash_tools.layout_helper
import
create_collapsible_section
from
utils.db_tools.orm_classes
import
(
InputForecasts
,
Log
,
Modell
,
ModellSensor
,
PegelForecasts
,
SensorData
)
NUM_RECENT_INPUT_FORECASTS
=
12
NUM_RECENT_PEGEL_FORECASTS
=
5
...
...
@@ -202,7 +203,7 @@ class ForecastMonitor:
# Get last 144 hours of sensor data
time_threshold
=
datetime
.
now
()
-
timedelta
(
hours
=
144
)
time_threshold
=
pd
.
to_datetime
(
"
2024-09-13 14:00:00.000
"
)
-
timedelta
(
hours
=
144
)
#TODO rausnehmen
#
time_threshold= pd.to_datetime("2024-09-13 14:00:00.000") - timedelta(hours=144) #TODO rausnehmen
stmt
=
select
(
SensorData
).
where
(
SensorData
.
tstamp
>=
time_threshold
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment