aboutsummaryrefslogtreecommitdiffstats
path: root/csit.infra.dash/app/cdash/comparisons/layout.py
diff options
context:
space:
mode:
Diffstat (limited to 'csit.infra.dash/app/cdash/comparisons/layout.py')
-rw-r--r--csit.infra.dash/app/cdash/comparisons/layout.py52
1 files changed, 43 insertions, 9 deletions
diff --git a/csit.infra.dash/app/cdash/comparisons/layout.py b/csit.infra.dash/app/cdash/comparisons/layout.py
index a16277c0f1..0680cc3d06 100644
--- a/csit.infra.dash/app/cdash/comparisons/layout.py
+++ b/csit.infra.dash/app/cdash/comparisons/layout.py
@@ -210,6 +210,18 @@ class Layout:
self._add_ctrl_col(),
self._add_plotting_col()
]
+ ),
+ dbc.Offcanvas(
+ class_name="w-75",
+ id="offcanvas-documentation",
+ title="Documentation",
+ placement="end",
+ is_open=False,
+ children=html.Iframe(
+ src=C.URL_DOC_REL_NOTES,
+ width="100%",
+ height="100%"
+ )
)
]
)
@@ -235,14 +247,26 @@ class Layout:
return dbc.NavbarSimple(
id="navbarsimple-main",
children=[
- dbc.NavItem(
- dbc.NavLink(
- C.COMP_TITLE,
- disabled=True,
- external_link=True,
- href="#"
- )
- )
+ dbc.NavItem(dbc.NavLink(
+ C.REPORT_TITLE,
+ external_link=True,
+ href="/report"
+ )),
+ dbc.NavItem(dbc.NavLink(
+ "Comparisons",
+ active=True,
+ external_link=True,
+ href="/comparisons"
+ )),
+ dbc.NavItem(dbc.NavLink(
+ "Coverage Data",
+ external_link=True,
+ href="/coverage"
+ )),
+ dbc.NavItem(dbc.NavLink(
+ "Documentation",
+ id="btn-documentation",
+ ))
],
brand=C.BRAND,
brand_href="/",
@@ -1018,10 +1042,20 @@ class Layout:
if not table_data:
raise PreventUpdate
-
+
if filtered_table_data:
table = pd.DataFrame.from_records(filtered_table_data)
else:
table = pd.DataFrame.from_records(table_data)
return dcc.send_data_frame(table.to_csv, C.COMP_DOWNLOAD_FILE_NAME)
+
+ @app.callback(
+ Output("offcanvas-documentation", "is_open"),
+ Input("btn-documentation", "n_clicks"),
+ State("offcanvas-documentation", "is_open")
+ )
+ def toggle_offcanvas_documentation(n_clicks, is_open):
+ if n_clicks:
+ return not is_open
+ return is_open