aboutsummaryrefslogtreecommitdiffstats
path: root/csit.infra.dash/app/pal/news/layout.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2022-10-03 15:11:02 +0200
committerTibor Frank <tifrank@cisco.com>2022-10-03 15:14:24 +0200
commitc6bfe865e4a62dda2c5e635df53083e909a6558b (patch)
treeaaca7069ba8c77b6e47de56f1e00b239efdd9f56 /csit.infra.dash/app/pal/news/layout.py
parent3b57cc60251300ad79b42ec52cc2f6cc1e950165 (diff)
CDash: Improvements in layout
Signed-off-by: Tibor Frank <tifrank@cisco.com> Change-Id: I28697efb31a7c661547872bedb696317197b5c7f
Diffstat (limited to 'csit.infra.dash/app/pal/news/layout.py')
-rw-r--r--csit.infra.dash/app/pal/news/layout.py106
1 files changed, 46 insertions, 60 deletions
diff --git a/csit.infra.dash/app/pal/news/layout.py b/csit.infra.dash/app/pal/news/layout.py
index cd1618d719..e9ff4dc334 100644
--- a/csit.infra.dash/app/pal/news/layout.py
+++ b/csit.infra.dash/app/pal/news/layout.py
@@ -331,7 +331,7 @@ class Layout:
)
)
],
- brand="Dashboard",
+ brand=C.BRAND,
brand_href="/",
brand_external_link=True,
class_name="p-2",
@@ -344,13 +344,12 @@ class Layout:
:returns: Column with the control panel.
:rtype: dbc.Col
"""
-
- return dbc.Col(
- id="col-controls",
- children=[
- self._add_ctrl_panel(),
- ],
- )
+ return dbc.Col([
+ html.Div(
+ children=self._add_ctrl_panel(),
+ className="sticky-top"
+ )
+ ])
def _add_plotting_col(self) -> dbc.Col:
"""Add column with tables. It is placed on the right side.
@@ -408,58 +407,45 @@ class Layout:
:returns: Control panel.
:rtype: dbc.Row
"""
- return dbc.Row(
- id="row-ctrl-panel",
- class_name="g-0",
- children=[
- dbc.Row(
- class_name="g-0 p-2",
- children=[
- dbc.Row(
- class_name="g-0",
- children=[
- dbc.Label(
- class_name="g-0",
- children=show_tooltip(self._tooltips,
- "help-summary-period", "Window")
- ),
- dbc.Row(
- dbc.ButtonGroup(
- id="bg-time-period",
- class_name="g-0",
- children=[
- dbc.Button(
- id="period-last",
- children="Last Run",
- className="me-1",
- outline=True,
- color="info"
- ),
- dbc.Button(
- id="period-short",
- children=\
- f"Last {C.NEWS_SHORT} Runs",
- className="me-1",
- outline=True,
- active=True,
- color="info"
- ),
- dbc.Button(
- id="period-long",
- children="All Runs",
- className="me-1",
- outline=True,
- color="info"
- )
- ]
- )
- )
- ]
- )
- ]
- )
- ]
- )
+ return [
+ dbc.Label(
+ class_name="g-0 p-1",
+ children=show_tooltip(self._tooltips,
+ "help-summary-period", "Window")
+ ),
+ dbc.Row(
+ class_name="g-0 p-1",
+ children=[
+ dbc.ButtonGroup(
+ id="bg-time-period",
+ children=[
+ dbc.Button(
+ id="period-last",
+ children="Last Run",
+ className="me-1",
+ outline=True,
+ color="info"
+ ),
+ dbc.Button(
+ id="period-short",
+ children=f"Last {C.NEWS_SHORT} Runs",
+ className="me-1",
+ outline=True,
+ active=True,
+ color="info"
+ ),
+ dbc.Button(
+ id="period-long",
+ children="All Runs",
+ className="me-1",
+ outline=True,
+ color="info"
+ )
+ ]
+ )
+ ]
+ )
+ ]
def callbacks(self, app):
"""Callbacks for the whole application.