aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/dash/app/pal/trending
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2022-04-21 07:38:49 +0200
committerTibor Frank <tifrank@cisco.com>2022-04-21 07:38:49 +0200
commit25c3aa43a0022d180fc9b31d68071790721c008b (patch)
tree690ae14e333e9a0a75905964f2313458a3f8e334 /resources/tools/dash/app/pal/trending
parentdcdb82a6a1ae769c72546d642b1c3a38299d97b8 (diff)
feat(uti): Remove button "Display"
- not needed Change-Id: Ic2bc74af1574e766c007f310f626c2e9ba61bbc1 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/dash/app/pal/trending')
-rw-r--r--resources/tools/dash/app/pal/trending/graphs.py2
-rw-r--r--resources/tools/dash/app/pal/trending/layout.py19
2 files changed, 10 insertions, 11 deletions
diff --git a/resources/tools/dash/app/pal/trending/graphs.py b/resources/tools/dash/app/pal/trending/graphs.py
index 6e0bcb55eb..7089e2c080 100644
--- a/resources/tools/dash/app/pal/trending/graphs.py
+++ b/resources/tools/dash/app/pal/trending/graphs.py
@@ -203,6 +203,8 @@ def _generate_trending_traces(ttype: str, name: str, df: pd.DataFrame,
return list()
x_axis = [d for d in df["start_time"] if d >= start and d <= end]
+ if not x_axis:
+ return list()
anomalies, trend_avg, trend_stdev = _classify_anomalies(
{k: v for k, v in zip(x_axis, df[_VALUE[ttype]])}
diff --git a/resources/tools/dash/app/pal/trending/layout.py b/resources/tools/dash/app/pal/trending/layout.py
index 690a9b72e0..35668a4751 100644
--- a/resources/tools/dash/app/pal/trending/layout.py
+++ b/resources/tools/dash/app/pal/trending/layout.py
@@ -470,13 +470,6 @@ class Layout:
color="secondary",
disabled=False
),
- dbc.Button(
- id="btn-sel-display",
- children="Display",
- class_name="w-100",
- color="secondary",
- disabled=False
- )
],
size="md",
)
@@ -653,7 +646,6 @@ class Layout:
Input("btn-ctrl-add", "n_clicks"),
Input("dpr-period", "start_date"),
Input("dpr-period", "end_date"),
- Input("btn-sel-display", "n_clicks"),
Input("btn-sel-remove", "n_clicks"),
Input("btn-sel-remove-all", "n_clicks"),
)
@@ -661,7 +653,7 @@ class Layout:
dd_phy: str, dd_area: str, dd_test: str, cl_core: list,
cl_core_all: list, cl_framesize: list, cl_framesize_all: list,
cl_testtype: list, cl_testtype_all: list, btn_add: int,
- d_start: str, d_end: str, btn_display: int, btn_remove: int,
+ d_start: str, d_end: str, btn_remove: int,
btn_remove_all: int) -> tuple:
"""
"""
@@ -881,8 +873,13 @@ class Layout:
ctrl_panel.set({
"cl-selected-options": self._list_tests(store_sel)
})
- elif trigger_id in ("btn-sel-display", "dpr-period"):
- _ = btn_display
+ row_fig_tput, row_fig_lat, row_btn_dwnld = \
+ _generate_plotting_arrea(
+ graph_trending(
+ self.data, store_sel, self.layout, d_start, d_end
+ )
+ )
+ elif trigger_id == "dpr-period":
row_fig_tput, row_fig_lat, row_btn_dwnld = \
_generate_plotting_arrea(
graph_trending(