aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/dash/app/pal/trending/trending.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2022-04-27 13:39:07 +0200
committerTibor Frank <tifrank@cisco.com>2022-04-27 15:17:30 +0200
commit3c421a0c9690b782f299946903a928632cb36f52 (patch)
treea3154b92472e597670ee8ae059a39239b70533d2 /resources/tools/dash/app/pal/trending/trending.py
parentcb61767fb2133890a786fc8f580109e9f8f3c5c5 (diff)
feat(uti): Add constant TIME_PERIOD
It defines the time period from now back to the past from which data is raed to dataframes. Change-Id: Ic6feeb8e7958d69aa2e39922b48e9898e09b45dd Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/dash/app/pal/trending/trending.py')
-rw-r--r--resources/tools/dash/app/pal/trending/trending.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/resources/tools/dash/app/pal/trending/trending.py b/resources/tools/dash/app/pal/trending/trending.py
index 99a571315a..8cd52b5c3f 100644
--- a/resources/tools/dash/app/pal/trending/trending.py
+++ b/resources/tools/dash/app/pal/trending/trending.py
@@ -19,7 +19,7 @@ import dash_bootstrap_components as dbc
from .layout import Layout
-def init_trending(server):
+def init_trending(server, time_period=None):
"""Create a Plotly Dash dashboard.
:param server: Flask server.
@@ -40,7 +40,8 @@ def init_trending(server):
html_layout_file="pal/templates/trending_layout.jinja2",
spec_file="pal/trending/spec_test_selection.yaml",
graph_layout_file="pal/trending/layout.yaml",
- data_spec_file="pal/data/data.yaml"
+ data_spec_file="pal/data/data.yaml",
+ time_period=time_period
)
dash_app.index_string = layout.html_layout
dash_app.layout = layout.add_content()